Browse files

Make protected method public so we avoid method_missing.

  • Loading branch information...
1 parent 3386a08 commit 8667d3aeb64dd8dba463ace364534326411bb46c @jonleighton jonleighton committed Sep 10, 2011
Showing with 5 additions and 4 deletions.
  1. +5 −4 activerecord/test/models/topic.rb
View
9 activerecord/test/models/topic.rb
@@ -78,11 +78,12 @@ def topic_id
after_initialize :set_email_address
+ def approved=(val)
+ @custom_approved = val
+ write_attribute(:approved, val)
+ end
+
protected
- def approved=(val)
- @custom_approved = val
- write_attribute(:approved, val)
- end
def default_written_on
self.written_on = Time.now unless attribute_present?("written_on")

0 comments on commit 8667d3a

Please sign in to comment.