We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8c2e844 commit 6bf8669Copy full SHA for 6bf8669
1 file changed
app/controllers/blog_controller.rb
@@ -10,13 +10,13 @@ def show
10
end
11
12
def admin
13
- redirect_to blog_index unless current_user.blog_poster
+ redirect_to blog_index_path unless current_user.blog_poster
14
@post = BlogPost.new
15
@posts = BlogPost.all.reverse
16
17
18
def create
19
+ redirect_to blog_index_path and return unless current_user.blog_poster
20
@post = BlogPost.create(params[:blog_post])
21
redirect_to admin_blog_index_path, :notice => "Blog Post created!"
22
0 commit comments