Guest User

Untitled

a guest
Jul 20th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. class HomeController < ApplicationController
  2. def index
  3. if not current_user
  4. @resolutions = Resolution.find(:all, :offset => (Resolution.count * rand).to_i, :limit => 3 )
  5. render 'index_not_logged_in'
  6. else
  7. @my_resolutions = current_user.resolutions
  8. @resolutions = Resolution.all
  9. render 'index'
  10. end
  11. end
  12.  
  13. end
Add Comment
Please, Sign In to add comment