Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostsController present(@post) in #comment action #455

Open
sintro opened this issue May 1, 2016 · 0 comments
Open

PostsController present(@post) in #comment action #455

sintro opened this issue May 1, 2016 · 0 comments

Comments

@sintro
Copy link
Contributor

sintro commented May 1, 2016

There is a small bug in Refinery::Blog::PostsController in comment action.
When the comment is not valid, this action just render :show template, without firing the present() method on @post variable. So the @meta will not be set, and while the rendered html will be posts/show, there will be common "Blog" browser title and all the meta keywords will be blank.

https://github.com/refinery/refinerycms-blog/blob/master/app/controllers/refinery/blog/posts_controller.rb#L59

The suggestion is to add same thing as in show action:

        respond_with (@post) do |format|
          format.html { present(@post) }
          format.js { render :partial => 'post', :layout => false }
        end

Or may be there is a way to do it more DRY

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant