making sure that my libraries that inject into ActiveRecord don't affect parent apps
Oleg
committed Jun 13, 2011
commit ee85de1d9a6b0a41abc4be69fbbda7376253483a
Showing 6
changed files with
11 additions
and 11 deletions
app/models/cms/layout.rb
+3
-3
| @@ | @@ -2,9 +2,9 @@ class Cms::Layout < ActiveRecord::Base |
| set_table_name :cms_layouts | |
| - | acts_as_tree |
| - | is_mirrored |
| - | has_revisions_for :content, :css, :js |
| + | cms_acts_as_tree |
| + | cms_is_mirrored |
| + | cms_has_revisions_for :content, :css, :js |
| # -- Relationships -------------------------------------------------------- | |
| belongs_to :site | |
app/models/cms/page.rb
+3
-3
| @@ | @@ -2,9 +2,9 @@ class Cms::Page < ActiveRecord::Base |
| set_table_name :cms_pages | |
| - | acts_as_tree :counter_cache => :children_count |
| - | is_mirrored |
| - | has_revisions_for :blocks_attributes |
| + | cms_acts_as_tree :counter_cache => :children_count |
| + | cms_is_mirrored |
| + | cms_has_revisions_for :blocks_attributes |
| attr_accessor :tags, | |
| :blocks_attributes_changed | |
app/models/cms/snippet.rb
+2
-2
| @@ | @@ -1,8 +1,8 @@ |
| class Cms::Snippet < ActiveRecord::Base | |
| set_table_name :cms_snippets | |
| - | is_mirrored |
| - | has_revisions_for :content |
| + | cms_is_mirrored |
| + | cms_has_revisions_for :content |
| # -- Relationships -------------------------------------------------------- | |
| belongs_to :site | |
comfortable_mexican_sofa/acts_as_tree.rb b/lib/comfortable_mexican_sofa/acts_as_tree.rb
+1
-1
| @@ | @@ -5,7 +5,7 @@ module ComfortableMexicanSofa::ActsAsTree |
| end | |
| module ClassMethods | |
| - | def acts_as_tree(options = {}) |
| + | def cms_acts_as_tree(options = {}) |
| configuration = { | |
| :foreign_key => 'parent_id', | |
| :order => nil, | |
comfortable_mexican_sofa/has_revisions.rb b/lib/comfortable_mexican_sofa/has_revisions.rb
+1
-1
| @@ | @@ -6,7 +6,7 @@ module ComfortableMexicanSofa::HasRevisions |
| module ClassMethods | |
| - | def has_revisions_for(*fields) |
| + | def cms_has_revisions_for(*fields) |
| include ComfortableMexicanSofa::HasRevisions::InstanceMethods | |
comfortable_mexican_sofa/is_mirrored.rb b/lib/comfortable_mexican_sofa/is_mirrored.rb
+1
-1
| @@ | @@ -6,7 +6,7 @@ module ComfortableMexicanSofa::IsMirrored |
| module ClassMethods | |
| - | def is_mirrored |
| + | def cms_is_mirrored |
| if ComfortableMexicanSofa.config.enable_mirror_sites | |
| include ComfortableMexicanSofa::IsMirrored::InstanceMethods | |