I have this error which is not letting me look at articles that are created
here are my codes article_controller.rb file:
class ArticlesController < ApplicationController
def new
@article = Article.new
end
def create
@article = Article.new(article_params)
if @article.save
flash [:notice] = "Article was submitted succsefully"
redirect_to_article_path(@article)
else
render :new
end
end
private
def article_params
params.require(:article).permit(:title, :description)
end
end
end
ask me for any other files if you need them
Aucun commentaire:
Enregistrer un commentaire