no more ambiguous default scopes

Oleg committed Feb 02, 2012
commit 490a401a71c31e2c3eb0f37cf6594d0f0b43d2be
Showing 3 changed files with 3 additions and 3 deletions
app/models/cms/layout.rb +1 -1
@@ @@ -29,7 +29,7 @@ class Cms::Layout < ActiveRecord::Base
:format => { :with => /^\w[a-z0-9_-]*$/i }
# -- Scopes ---------------------------------------------------------------
- default_scope order(:position)
+ default_scope order('cms_layouts.position')
# -- Class Methods --------------------------------------------------------
# Tree-like structure for layouts
app/models/cms/page.rb +1 -1
@@ @@ -44,7 +44,7 @@ class Cms::Page < ActiveRecord::Base
validate :validate_target_page
# -- Scopes ---------------------------------------------------------------
- default_scope order(:position)
+ default_scope order('cms_pages.position')
scope :published, where(:is_published => true)
# -- Class Methods --------------------------------------------------------
app/models/cms/snippet.rb +1 -1
@@ @@ -28,7 +28,7 @@ class Cms::Snippet < ActiveRecord::Base
:format => { :with => /^\w[a-z0-9_-]*$/i }
# -- Scopes ---------------------------------------------------------------
- default_scope order(:position)
+ default_scope order('cms_snippets.position')
protected