aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2013-11-04 19:36:22 +0100
committerYves Senn <yves.senn@gmail.com>2013-11-05 16:45:34 +0100
commit813c8c0751b18389431912328f9c90933f26d819 (patch)
tree16b3425632fbc729fecdf163eacd9e7d7eb04ad4 /activerecord/test/models
parent5a011409a46811a9bd46400cc0147d4a85fa02e9 (diff)
downloadrails-813c8c0751b18389431912328f9c90933f26d819.tar.gz
rails-813c8c0751b18389431912328f9c90933f26d819.tar.bz2
rails-813c8c0751b18389431912328f9c90933f26d819.zip
define enum methods inside a `Module` to make them overwritable.
Diffstat (limited to 'activerecord/test/models')
-rw-r--r--activerecord/test/models/book.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/models/book.rb b/activerecord/test/models/book.rb
index 781f67557b..4cb2c7606b 100644
--- a/activerecord/test/models/book.rb
+++ b/activerecord/test/models/book.rb
@@ -9,4 +9,9 @@ class Book < ActiveRecord::Base
enum status: [:proposed, :written, :published]
enum read_status: {unread: 0, reading: 2, read: 3}
+
+ def published!
+ super
+ "do publish work..."
+ end
end