aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/models/refinery/blog/post.rb6
-rw-r--r--spec/models/refinery/blog/post_spec.rb17
2 files changed, 0 insertions, 23 deletions
diff --git a/app/models/refinery/blog/post.rb b/app/models/refinery/blog/post.rb
index a4507ed..81d2f54 100644
--- a/app/models/refinery/blog/post.rb
+++ b/app/models/refinery/blog/post.rb
@@ -52,12 +52,6 @@ module Refinery
!draft and published_at <= Time.now
end
- def category_ids=(ids)
- self.categories = ids.reject{|id| id.blank?}.collect {|c_id|
- Refinery::Blog::Category.find(c_id.to_i) rescue nil
- }.compact
- end
-
def friendly_id_source
custom_url.present? ? custom_url : title
end
diff --git a/spec/models/refinery/blog/post_spec.rb b/spec/models/refinery/blog/post_spec.rb
index acc4f95..0b96311 100644
--- a/spec/models/refinery/blog/post_spec.rb
+++ b/spec/models/refinery/blog/post_spec.rb
@@ -148,23 +148,6 @@ module Refinery
end
end
- describe "#category_ids=" do
- before do
- @cat1 = FactoryGirl.create(:blog_category, :id => 1)
- @cat2 = FactoryGirl.create(:blog_category, :id => 2)
- @cat3 = FactoryGirl.create(:blog_category, :id => 3)
- post.category_ids = [1,2,"","",3]
- end
-
- it "rejects blank category ids" do
- post.categories.count.should == 3
- end
-
- it "returns array of categories based on given ids" do
- post.categories.should == [@cat1, @cat2, @cat3]
- end
- end
-
describe ".comments_allowed?" do
context "with Refinery::Setting comments_allowed set to true" do
before do