mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
Boolean -> String quoting has changed on Rails master
CustomField.create(name: 'zomg', value: true).reload.value # => 't' on Rails 4.1, '1' on 4.2 rails/rails@42be84ba
This commit is contained in:
parent
f955ec6018
commit
7351917ee4
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@ module HasCustomFields
|
|||
end
|
||||
end
|
||||
|
||||
CUSTOM_FIELD_TRUE = ['t','true', 'T', 'True', 'TRUE'].freeze unless defined? CUSTOM_FIELD_TRUE
|
||||
CUSTOM_FIELD_TRUE = ['1', 't', 'true', 'T', 'True', 'TRUE'].freeze unless defined? CUSTOM_FIELD_TRUE
|
||||
|
||||
def self.cast_custom_field(key, value, types)
|
||||
return value unless types && type = types[key]
|
||||
|
|
Loading…
Reference in a new issue