Guest User

Untitled

a guest
May 23rd, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. ## profile_controller.rb
  2. before_filter :get_user
  3.  
  4. protected
  5.  
  6. def get_user
  7. @user = User.find(params[:user])
  8. end
  9.  
  10. ##view
  11.  
  12. <% if @user = current_user %>
  13. show the user some shit
  14. <% else %>
  15. don't show the user any shit
  16. <% end %>
  17.  
  18. #using restful_authentication and this doesn't work, what am I doing incorrectly?
Add Comment
Please, Sign In to add comment