can't convert Symbol into String
Rails.root: /home/pdipietro/blog
app/controllers/posts_controller.rb:19:in `post_params'
app/controllers/posts_controller.rb:8:in `create'
This error occurred while loading the following files:
post
Has anyone an idea on how the thing should be changed?
Here is PostsController
class PostsController < ApplicationController
def new
end
def index
@posts = Post.all
end
def create
@post = Post.new(post_params)
@post.save
redirect_to @post
end
def show
@post = Post.find(params[:id])
end
private
def post_params
params.require(:post).permit(:title, :text)
end
end
TIA
Paolo
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Documentation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-do...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
Visit this group at http://groups.google.com/group/rubyonrails-docs.
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to a topic in the Google Groups "Ruby on Rails: Documentation" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rubyonrails-docs/TuQ1FYIzk_M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rubyonrails-do...@googlegroups.com.