Created
November 27, 2016 09:25
-
-
Save lbvf50mobile/00d2479b8c627d88b7a25e287bd41999 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ef get_front_side (post_card) | |
@post_card = post_card | |
@msg = JSON.parse(@post_card.message) | |
@msg['front_side']['texts'].each do |text| | |
text['bg_color_rgba'] = 'rgba(255,255,255,'+(text['opacity'].to_f/100.0).to_s+')'; | |
end | |
fonts_list = [] | |
@msg['front_side']['texts'].each do |text| | |
fonts_list.push text['font_family'] | |
end | |
@user_fonts = UserFont.where(:name => fonts_list).all | |
return render_to_string ( | |
{ | |
template: 'home/post_card_front', | |
layout: false | |
} | |
) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment