Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def current_user_session
- return @current_user_session if defined?(@current_user_session)
- @current_user_session = UserSession.with_scope(:find_options => {:conditions => "site_id = #{current_site.id}"}, :id => "#{current_site.name}") do
- UserSession.find || UserSession.new
- end
- end
Add Comment
Please, Sign In to add comment