How can I render a show action on certain conditions? def show @post = Post.find_approved if @post.approved approved = true end respond_to do |format| # I only want to render show.html.erb if approved is true if not I would like to redirect the user back to where he came from end end
-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.