lib/forge/app/models/help_topic.rb in forge-cli-0.0.18 vs lib/forge/app/models/help_topic.rb in forge-cli-0.1.0

- old
+ new

@@ -1,10 +1,13 @@ class HelpTopic < ActiveRecord::Base validates_presence_of :language, :slug, :title, :content validates_format_of :slug, :with => /\A[a-zA-Z0-9_-]+\z/ validates_uniqueness_of :slug, :scope => :language before_save :convert_content_to_html - default_scope where(:language => I18n.locale.to_s) + default_scope { where(:language => I18n.locale.to_s) } + + # open up everything for mass assignment + attr_protected protected def convert_content_to_html self.content = RDiscount.new(self.content).to_html