diff --git a/README.txt b/README.txt index c55cd5a..f14a9bc 100644 --- a/README.txt +++ b/README.txt @@ -14,7 +14,7 @@ How to use it. In you Gemfile: - gem 'enum_column3' + gem 'enum_column3', :git => 'git://github.com/debaillie/enum_column.git' In your schema: diff --git a/lib/enum/active_record_helper.rb b/lib/enum/active_record_helper.rb index d00366f..4c42fde 100644 --- a/lib/enum/active_record_helper.rb +++ b/lib/enum/active_record_helper.rb @@ -31,7 +31,7 @@ def to_enum_select_tag(options, html_options={}) if (value = self.object.__send__(method_name.to_sym)) options[:selected] ||= value.to_s else - options[:include_blank] = enums.allows_nil? if options[:include_blank].nil? + options[:include_blank] = options[:include_blank] == true end end to_select_tag(choices, options, html_options) @@ -60,4 +60,4 @@ def enum_select(method, options={}, html_options={}) end end -end \ No newline at end of file +end