Skip to content

Commit

Permalink
Merge pull request #306 from ebeigarts/move-categorization-inside-blo…
Browse files Browse the repository at this point in the history
…g-namespace

Move Refinery::Categorization to Refinery::Blog namespace [Fixes #282]
  • Loading branch information
parndt committed Dec 11, 2012
2 parents 78b88eb + bb6f8b2 commit 745eae1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
12 changes: 12 additions & 0 deletions 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
2 changes: 1 addition & 1 deletion app/models/refinery/blog/post.rb
Expand Up @@ -122,7 +122,7 @@ def previous(item)
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)
Expand Down
10 changes: 0 additions & 10 deletions app/models/refinery/categorization.rb

This file was deleted.

0 comments on commit 745eae1

Please sign in to comment.