Merged in Joe's and Steven's forks and updated for compatibility with < 0.9.9. Also, specs now work by including the factories and I have also laid the foundation for cucumber features. Fixed an issue where the javascript file was clashing with the same code we merged to core from this engine relating to submenus. Regenerated gemspec.

This commit is contained in:
Philip Arndt 2010-11-22 15:23:25 +13:00
commit e5b9af1054
22 changed files with 152 additions and 78 deletions

View file

@ -60,11 +60,16 @@ class BlogComment < ActiveRecord::Base
end
def toggle!
RefinerySetting[:comment_moderation] = {
:value => !self.enabled?,
new_value = {
:value => !BlogComment::Moderation.enabled?,
:scoping => :blog,
:restricted => false
}
if RefinerySetting.respond_to?(:set)
RefinerySetting.set(:comment_moderation, new_value)
else
RefinerySetting[:comment_moderation] = new_value
end
end
end
end
@ -80,11 +85,16 @@ class BlogComment < ActiveRecord::Base
end
def recipients=(emails)
RefinerySetting[:comment_notification_recipients] = {
new_value = {
:value => emails,
:scoping => :blog,
:restricted => false
}
if RefinerySetting.respond_to?(:set)
RefinerySetting.set(:comment_notification_recipients, new_value)
else
RefinerySetting[:comment_notification_recipients] = new_value
end
end
def subject
@ -95,11 +105,16 @@ class BlogComment < ActiveRecord::Base
end
def subject=(subject_line)
RefinerySetting[:comment_notification_subject] = {
new_value = {
:value => subject_line,
:scoping => :blog,
:restricted => false
}
if RefinerySetting.respond_to?(:set)
RefinerySetting.set(:comment_notification_subject, new_value)
else
RefinerySetting[:comment_notification_subject] = new_value
end
end
end
end