Class: RailsAdmin::Config::Fields::Types::Phone
- Inherits:
-
String
- Object
- String
- RailsAdmin::Config::Fields::Types::Phone
- Defined in:
- lib/basepack/rails_admin/fields_types/phone.rb
Instance Method Summary collapse
-
#normalized_value ⇒ Object
in case you want to save normalized value must be called from controller def parse_input(params) raise params.inspect params = Phony.normalize(params, cc, ndc: ndc) if params.present? end.
Instance Method Details
#normalized_value ⇒ Object
in case you want to save normalized value must be called from controller def parse_input(params)
raise params[name].inspect
params[name] = Phony.normalize(params[name], {cc: cc, ndc: ndc}) if params[name].present?
end
51 52 53 54 55 56 |
# File 'lib/basepack/rails_admin/fields_types/phone.rb', line 51 def normalized_value = {} [:cc] = cc if cc.present? [:ndc] = ndc if ndc.present? Phony.normalize(value, ) end |