Module: ApplicationHelper

Defined in:
lib/application_helper_patch.rb

Instance Method Summary collapse

Instance Method Details

#check_box_belongs_select_all(model, *additional_classes) ⇒ Object



26
27
28
29
# File 'lib/application_helper_patch.rb', line 26

def check_box_belongs_select_all(model, *additional_classes)
  klass = (["select_all"] + additional_classes).join(" ")
  check_box_tag "ids[]", model.id, false, :class => klass
end

#css(*file_name) ⇒ Object



8
9
10
11
12
# File 'lib/application_helper_patch.rb', line 8

def css(*file_name)
  content_for :head do
    stylesheet_link_tag(*file_name)
  end
end

#for_select(name, data, style = {}) ⇒ Object



18
19
20
# File 'lib/application_helper_patch.rb', line 18

def for_select(name, data, style = {})
  select_tag(name.to_s, options_for_select(data.merge({""=>""}), params[name] || ""), style)
end

#js(*file_name) ⇒ Object



2
3
4
5
6
# File 'lib/application_helper_patch.rb', line 2

def js(*file_name)
  content_for :head do
    javascript_include_tag(*file_name)
  end
end

#render_formObject



14
15
16
# File 'lib/application_helper_patch.rb', line 14

def render_form
  render :partial => "form"
end

#select_all_check_boxObject



22
23
24
# File 'lib/application_helper_patch.rb', line 22

def select_all_check_box
  check_box_tag "select-all"
end