Scope in model Rails 3.X

Purspose Complex queries in controller make application hard to maintain. Move them into the model as named_scope or scope(Rails 3.X) make the controller simple and the complex find logics are all in models. Suppose we have in controller, class JobsController < ApplicationController     def index         @published_jobs = Job.find(:all, :conditions => { :status […]