Guest User

Untitled

a guest
Aug 21st, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. Error in rails3 in the controller file
  2. class HomeController < ApplicationController
  3. respond_to :json
  4.  
  5. def index
  6. @home = Home.all
  7.  
  8. respond_with(@home)
  9.  
  10. cookies['AFID'] = {
  11. :value => request.env['AFID'],
  12. :expires => 1.year.from_now
  13. }
  14.  
  15.  
  16. cookies['SID'] = {
  17. :value => request.env['SID'],
  18. :expires => 1.year.from_now
  19. }
  20.  
  21. #cookies[:AFID] = { :value =>}
  22.  
  23. end
  24.  
  25.  
  26. def create
  27. @homes = Home.create(params[:home])
  28.  
  29. respond_with(@home, :location => users_url)
  30. end
  31. end
Add Comment
Please, Sign In to add comment