Explicitly defined default order of packages by name.
This commit is contained in:
parent
e3e1871a8f
commit
520d29e629
1 changed files with 4 additions and 0 deletions
|
|
@ -1,6 +1,10 @@
|
||||||
class Package < ActiveRecord::Base
|
class Package < ActiveRecord::Base
|
||||||
has_many :screenshots, :inverse_of=>:package
|
has_many :screenshots, :inverse_of=>:package
|
||||||
|
|
||||||
|
default_scope {
|
||||||
|
order('name ASC')
|
||||||
|
}
|
||||||
|
|
||||||
# Use PostgreSQL's full-text search capability for the user search
|
# Use PostgreSQL's full-text search capability for the user search
|
||||||
def self.text_search(query)
|
def self.text_search(query)
|
||||||
if query.present?
|
if query.present?
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue