Skip to content

Commit

Permalink
modified syntax of data attributes for rails 3.0. #415
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Yoon committed Mar 9, 2013
1 parent d40a817 commit bd51dbd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ History for Surveyor
- Upgrade reset css
- Added surveyor_translations table to support YAML-based localizations of surveys. (#420)
- Add extension point for pre-JSON-export survey modifications (#416)
- Add input mask for text entry fields (#415)

### Fixes

Expand Down
6 changes: 2 additions & 4 deletions lib/surveyor/helpers/surveyor_helper_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,8 @@ def generate_pick_none_input_html(value, default_value, css_class, response_clas
html[:value] = default_value if value.blank?
html[:disabled] = disabled unless disabled.blank?
if input_mask
data = {}
data['input-mask'] = input_mask
data['input-mask-placeholder'] = input_mask_placeholder unless input_mask_placeholder.blank?
html[:data] = data
html[:'data-input-mask'] = input_mask
html[:'data-input-mask-placeholder'] = input_mask_placeholder unless input_mask_placeholder.blank?
end
html
end
Expand Down

0 comments on commit bd51dbd

Please sign in to comment.