ruby on rails 3 - undefined method `article_name' .................NoMethodError in ArticlesController#create -


class articlescontroller < applicationcontroller     def index      @articles = article.all     end     def show      @article = article.find(params[ :id])     end     def new     @article = article.new     end     def create     @article = article.new(article_params)         if @article.save     redirect_to @article     else      render 'new'     end     end      private      def article_params            params.require(:article).permit(:article_name,:enter_text)     end end 

try with:

..... .permit(:name, :enter_text) 

Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -