Module: FormProps::Helper
Instance Method Summary collapse
Instance Method Details
#format_key(key) ⇒ Object
519 520 521 522 523 524 525 |
# File 'lib/form_props/helper.rb', line 519 def format_key(key) if STANDARD_NAMES.has_key?(key.to_sym) STANDARD_NAMES[key.to_sym] else key end end |
#format_keys(props) ⇒ Object
527 528 529 530 531 532 |
# File 'lib/form_props/helper.rb', line 527 def format_keys(props) props.each_with_object({}) do |(key, val), memo| key = format_key(key) memo[key] = val end end |