Skip to content

Commit

Permalink
Limited search for improving..
Browse files Browse the repository at this point in the history
  • Loading branch information
aitor committed Apr 18, 2010
1 parent 699a9df commit 938fac4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/municipio.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def budget_for(year)
presupuestos.for_year(year).first
end
def self.search(query)
Municipio.find(:all, :conditions => ['nombre LIKE ?', "%#{query}%"])
Municipio.find(:all, :conditions => ['nombre LIKE ?', "%#{query}%"], :limit => 10)
end

def to_param
Expand Down

0 comments on commit 938fac4

Please sign in to comment.