aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdgars Beigarts <edgars.beigarts@makit.lv>2012-12-10 21:18:15 +0200
committerEdgars Beigarts <edgars.beigarts@makit.lv>2012-12-10 21:18:18 +0200
commitbb6f8b2bdc6e8978754f25680525fbdb102079e4 (patch)
treeadcbea6d0dee1f83d8d280a097b1365aaac64460
parent78b88eb80b8c1fe13047c7ab3405e29283119fc3 (diff)
downloadrefinerycms-blog-bb6f8b2bdc6e8978754f25680525fbdb102079e4.tar.gz
refinerycms-blog-bb6f8b2bdc6e8978754f25680525fbdb102079e4.tar.bz2
refinerycms-blog-bb6f8b2bdc6e8978754f25680525fbdb102079e4.zip
Move Refinery::Categorization to Refinery::Blog namespace [Fixes #282]
-rw-r--r--app/models/refinery/blog/categorization.rb12
-rw-r--r--app/models/refinery/blog/post.rb2
-rw-r--r--app/models/refinery/categorization.rb10
3 files changed, 13 insertions, 11 deletions
diff --git a/app/models/refinery/blog/categorization.rb b/app/models/refinery/blog/categorization.rb
new file mode 100644
index 0000000..7ca9c77
--- /dev/null
+++ b/app/models/refinery/blog/categorization.rb
@@ -0,0 +1,12 @@
+module Refinery
+ module Blog
+ class Categorization < ActiveRecord::Base
+
+ self.table_name = 'refinery_blog_categories_blog_posts'
+ belongs_to :blog_post, :class_name => 'Refinery::Blog::Post', :foreign_key => :blog_post_id
+ belongs_to :blog_category, :class_name => 'Refinery::Blog::Category', :foreign_key => :blog_category_id
+
+ attr_accessible :blog_category_id, :blog_post_id
+ end
+ end
+end
diff --git a/app/models/refinery/blog/post.rb b/app/models/refinery/blog/post.rb
index 49d77c9..28d14e5 100644
--- a/app/models/refinery/blog/post.rb
+++ b/app/models/refinery/blog/post.rb
@@ -122,7 +122,7 @@ module Refinery
end
def uncategorized
- live.includes(:categories).where(Refinery::Categorization.table_name => { :blog_category_id => nil })
+ live.includes(:categories).where(Refinery::Blog::Categorization.table_name => { :blog_category_id => nil })
end
def next(current_record)
diff --git a/app/models/refinery/categorization.rb b/app/models/refinery/categorization.rb
deleted file mode 100644
index 688da6a..0000000
--- a/app/models/refinery/categorization.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-module Refinery
- class Categorization < ActiveRecord::Base
-
- self.table_name = 'refinery_blog_categories_blog_posts'
- belongs_to :blog_post, :class_name => 'Refinery::Blog::Post', :foreign_key => :blog_post_id
- belongs_to :blog_category, :class_name => 'Refinery::Blog::Category', :foreign_key => :blog_category_id
-
- attr_accessible :blog_category_id, :blog_post_id
- end
-end