We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I agree with this but it makes confusing me. How to reduce variables or some links if I have a blog app like this?
class PostsController < ApplicationController def index @posts = Post.all.paginate(params[:page]) @posts_shown_at_sidebar = Post.first(5) @recent_comments = Comment.first(5) @pages_shown_at_sidebar = Page.all end end
The text was updated successfully, but these errors were encountered:
@nzwsch, try using Presenter and Delegator patterns. http://nithinbekal.com/posts/rails-presenters/ https://gist.github.com/somebox/5a7ebf56e3236372eec4
Sorry, something went wrong.
Since the this issue's author no longer exists on GitHub, and @panasyuk gave some suggestions, I'm going to close this.
No branches or pull requests
I agree with this but it makes confusing me.
How to reduce variables or some links if I have a blog app like this?
The text was updated successfully, but these errors were encountered: