| Module | ApplicationHelper |
| In: |
app/helpers/application_helper.rb
|
Alternating row style setter
# File app/helpers/application_helper.rb, line 14
14: def alt( s='', s2='2')
15: " class='alt#{ cycle( s, s2 ) }'"
16: end
Collection of table type options appropriate for passing to ActionView::Helpers::FormOptionsHelper.options_for_select
# File app/helpers/application_helper.rb, line 38
38: def field_type_options( driver )
39: field_types = get_field_types( driver )
40: field_types.collect { |ft| [ ft, ft ] }
41: end
This method Accepts a String or an Array of options and always includes a blank options.
# File app/helpers/application_helper.rb, line 29
29: def get_options( options, selected )
30: options = options_for_select( options, selected.to_s ) if options.class == Array
31: "<option value=''></option>#{ options }"
32: end
Override @page_title in the view, otheriwse the page gets named ‘Home’.
# File app/helpers/application_helper.rb, line 7 7: def page_title 8: @page_title || 'Home' 9: end