Guest User

Untitled

a guest
Jun 25th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. class GotsController < ApplicationController
  2.  
  3. def new
  4. @got = Got.new
  5. end
  6.  
  7. def create
  8. @got = Got.new(params[:got])
  9. @got.user = current_user
  10. if @got.save
  11. redirect_to "/my_splogna"
  12. end
  13. end
  14.  
  15. def index
  16. @gots = Got.search(params[:search])
  17. end
  18.  
  19. def show
  20. @got = Got.find(params[:id])
  21. end
  22.  
  23. end
Add Comment
Please, Sign In to add comment