Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make protected method public so we avoid method_missing.

  • Loading branch information...
commit 8667d3aeb64dd8dba463ace364534326411bb46c 1 parent 3386a08
@jonleighton jonleighton authored
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")
Please sign in to comment.
Something went wrong with that request. Please try again.