aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-01-03 16:33:39 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-01-03 16:33:49 -0200
commit96c4bd69c101b866b80a3ca5424439c87791af5e (patch)
tree70a8e30477c88e4eb08569c2c8c2c572aebd7f14 /activerecord/lib
parent788bb40e3887e2718f07be769b80818d653638f0 (diff)
downloadrails-96c4bd69c101b866b80a3ca5424439c87791af5e.tar.gz
rails-96c4bd69c101b866b80a3ca5424439c87791af5e.tar.bz2
rails-96c4bd69c101b866b80a3ca5424439c87791af5e.zip
Whitespace [ci skip]
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/enum.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/enum.rb b/activerecord/lib/active_record/enum.rb
index 3dd093b8a2..c43b311223 100644
--- a/activerecord/lib/active_record/enum.rb
+++ b/activerecord/lib/active_record/enum.rb
@@ -72,7 +72,7 @@ module ActiveRecord
_enum_methods_module.module_eval do
# def status=(value) self[:status] = STATUS[value] end
define_method("#{name}=") { |value|
- if enum_values.has_key?(value)|| value.blank?
+ if enum_values.has_key?(value) || value.blank?
self[name] = enum_values[value]
elsif enum_values.has_value?(value)
# Assigning a value directly is not a end-user fetaure, hence it's not documented.