Module: RadSocialHelper

Defined in:
app/helpers/rad_social_helper.rb

Instance Method Summary collapse

Instance Method Details

#rad_share_widget(options) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'app/helpers/rad_social_helper.rb', line 7

def rad_share_widget(options)
  url = options[:url].nil? ? request.url : options[:url]
  message = options[:message].nil? ? "Check out #{options[:title]}." : options[:message]
  email_subject = options[:email_subject].nil? ? options[:title] : options[:email_subject]
  email_message = options[:email_message].nil? ? "I thought you might be interested in this: #{url}" : "#{options[:email_message]} #{url}"
  email_action_url = options[:email_action_url].nil? ? "/rad_social/mail" : options[:email_action_url]

  render :partial => "widget/horizontal_widget",
                           :locals => { :url => url,
                                        :message => message,
                                        :email_subject => email_subject,
                                        :email_message => email_message,
                                        :email_action_url => email_action_url
                           }
end

#rad_test_methodObject



3
4
5
# File 'app/helpers/rad_social_helper.rb', line 3

def rad_test_method
  "SURPRISE SURPRISE SURPRISE"
end