Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. class ArticlesController < ApplicationController
  2. def new
  3. end
  4.  
  5. def create
  6. render plain: params[:article].inspect
  7. end
  8.  
  9. end
  10.  
  11. Template is missing
  12. Missing template articles/create, application/create with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder, :coffee]}.`
  13.  
  14. articles GET /articles(.:format) articles#index
  15. POST /articles(.:format) articles#create
  16.  
  17. render plain: params[:article].inspect
  18.  
  19. render text: params[:article].inspect
  20.  
  21. class ArticlesController < ApplicationController
  22. def new
  23. end
  24.  
  25. def create
  26. render text: params[:article].inspect
  27. end
  28. end
  29.  
  30. {"title"=>"First article!", "text"=>"This is my first article."}
  31. # i.e. your params(whatever params hash contains)
  32.  
  33. class ArticlesController < ApplicationController
  34. def new
  35. end
  36.  
  37. def create
  38. params[:article].inspect
  39. render nothing: true
  40. end
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement