diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index de6be79..544f411 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,2 +1,12 @@ module ApplicationHelper + def number_to_won(number) + number_to_currency number, unit: '원', precision: 0, format: '%n%u' + end + + def facebook_image_tag_by_uid(uid, *args, &block) + options = args.extract_options! + url_options = options.slice(:width, :height) + image_url = "//graph.facebook.com/#{uid}/picture?#{url_options.to_query}" + image_tag image_url, options, &block + end end diff --git a/app/views/contributions/new.html.erb b/app/views/contributions/new.html.erb index e26e6ee..a1b6787 100644 --- a/app/views/contributions/new.html.erb +++ b/app/views/contributions/new.html.erb @@ -1,5 +1,5 @@
나에게 선물하기
<%= f["name"] %>
- <%= number_to_currency gift.price, unit: '₩ ', precision: 0 %> + <%= number_to_won gift.price %>