Module: DmCore::ParamsHelper
- Defined in:
- app/helpers/dm_core/params_helper.rb
Instance Method Summary collapse
-
#css_style_height(height = '') ⇒ Object
given a “height” parameter, make it into a valid css height value ——————————————————————————.
-
#css_style_width(width = '') ⇒ Object
given a “width” parameter, make it into a valid css width value ——————————————————————————.
Instance Method Details
#css_style_height(height = '') ⇒ Object
given a “height” parameter, make it into a valid css height value
13 14 15 16 |
# File 'app/helpers/dm_core/params_helper.rb', line 13 def css_style_height(height = '') height = height.to_s.as_css_size return height.blank? ? '' : "height:#{height};" end |
#css_style_width(width = '') ⇒ Object
given a “width” parameter, make it into a valid css width value
6 7 8 9 |
# File 'app/helpers/dm_core/params_helper.rb', line 6 def css_style_width(width = '') width = width.to_s.as_css_size return width.blank? ? '' : "width:#{width};" end |