ruby - How can I do a default scope in rails 4? -


this question has answer here:

i used default_scope :order => 'group_name' because wanted uses.

this doesn't work in rails 4

i tried

scope :default, -> { order('group_name')} 

which didn't raise syntax error, didn't work - groups not ordered name

i can add scope i'd know if there's replacement default.

should declared

default_scope {order('group_name')} 

Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -