Reputation:
I have a user model and i want to define a default_scope
for ordering like so:
default_scope(order(:firstname))
Nonetheless this is preventing my rails server from starting, any help is appreciated.
Upvotes: 2
Views: 25
Reputation: 51191
You should define your scopes with blocks:
default_scope { order(:firstname) }
Upvotes: 2