Module: MessageQuickly::ApplicationHelper
- Defined in:
- app/helpers/message_quickly/application_helper.rb
Instance Method Summary collapse
- #message_us(params = {}, client = nil) ⇒ Object
- #send_to_messenger(params = {}, client = nil) ⇒ Object
Instance Method Details
#message_us(params = {}, client = nil) ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'app/helpers/message_quickly/application_helper.rb', line 15 def (params = {}, client = nil) params[:class] = 'fb-messengermessageus' params[:messenger_app_id] = client.try(:app_id) || ENV['FACEBOOK_APP_ID'] params[:page_id] = client.try(:page_id) || ENV['FACEBOOK_PAGE_ID'] params[:color] ||= 'blue' params[:size] ||= 'standard' content_tag(:div, '', params) end |
#send_to_messenger(params = {}, client = nil) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'app/helpers/message_quickly/application_helper.rb', line 4 def send_to_messenger(params = {}, client = nil) params[:class] = 'fb-send-to-messenger' params[:messenger_app_id] = client.try(:app_id) || ENV['FACEBOOK_APP_ID'] params[:page_id] = client.try(:page_id) || ENV['FACEBOOK_PAGE_ID'] params[:data] ||= {} params[:data][:ref] ||= 'PASS_THROUGH_PARAM' params[:color] ||= 'blue' params[:size] ||= 'standard' content_tag(:div, '', params) end |