Module: Sinatra::Hancock::Users::Helpers
- Defined in:
- lib/sinatra/hancock/users.rb
Instance Method Summary collapse
Instance Method Details
#signup_email ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/sinatra/hancock/users.rb', line 17 def signup_email "Hello \#{@user.first_name},\n\nThanks for signing up for \#{::Hancock::App.provider_name}! In order to \ncomplete your registration you will need to click on the following link.\n\n\#{@registration_url}\n\nThanks,\nThe \#{::Hancock::App.provider_name} team\n\#{absolute_url('/')}\n" end |
#user_by_token(token) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/sinatra/hancock/users.rb', line 10 def user_by_token(token) user = ::Hancock::User.first(:access_token => token) throw(:halt, [400, 'BadRequest']) unless user session['hancock_server_user_id'] = user.id user end |