Guest User

Untitled

a guest
Jul 21st, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. def current_user_session
  2. return @current_user_session if defined?(@current_user_session)
  3. @current_user_session = UserSession.with_scope(:find_options => {:conditions => "site_id = #{current_site.id}"}, :id => "#{current_site.name}") do
  4. UserSession.find || UserSession.new
  5. end
  6. end
Add Comment
Please, Sign In to add comment