Module: FbauthHelper
- Defined in:
- app/helpers/fbauth_helper.rb
Instance Method Summary collapse
- #fbauth ⇒ Object
- #fbauth_build_url(path) ⇒ Object
- #fbauth_init_javascript(options = {}) ⇒ Object
- #fbauth_login_javascript(options = {}) ⇒ Object
Instance Method Details
#fbauth ⇒ Object
25 26 27 |
# File 'app/helpers/fbauth_helper.rb', line 25 def fbauth @facebook_auth end |
#fbauth_build_url(path) ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'app/helpers/fbauth_helper.rb', line 14 def fbauth_build_url path if request.ssl? u = "https://" else u = "http://" end u += request.host u += ":#{request.port}" if request.port != 80 u += path end |
#fbauth_init_javascript(options = {}) ⇒ Object
10 11 12 |
# File 'app/helpers/fbauth_helper.rb', line 10 def fbauth_init_javascript ={} render :partial => '/fbauth/init.html.haml', :locals => .merge(:channel_url => fbauth_build_url('/channel.html')) end |
#fbauth_login_javascript(options = {}) ⇒ Object
2 3 4 5 6 7 8 |
# File 'app/helpers/fbauth_helper.rb', line 2 def fbauth_login_javascript ={} login_el = [:login] || 'login' add_el = [:add] || 'add' ready_el = [:ready] || 'ready' render :partial => '/fbauth/login.html.haml', :locals => { :login_el => login_el, :add_el => add_el, :ready_el => ready_el } end |