Skip to content

Instantly share code, notes, and snippets.

@nitsujw
Created February 11, 2009 01:27
Show Gist options
  • Save nitsujw/61753 to your computer and use it in GitHub Desktop.
Save nitsujw/61753 to your computer and use it in GitHub Desktop.
@posts = @topic.posts.paginate(:per_page => 25, :page => params[:page], :order => [:created_at.asc]) # Runs an update on posts
@posts = Post.paginate(:per_page => 25, :page => params[:page], :order => [:created_at.asc], :topic_id => @topic.id) # Doesn't run an update on posts
## The first line above calls this on the show action, when it should only run before saving an object
before :save, :white_list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment