Module: ApplicationHelper

Defined in:
lib/application_helper.rb

Instance Method Summary collapse

Instance Method Details

#focus(input) ⇒ Object



15
16
17
# File 'lib/application_helper.rb', line 15

def focus(input)
  haml_tag :script, "$(function(){$('##{input}').focus()})"
end

#submit_or_return_to(return_path) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
13
# File 'lib/application_helper.rb', line 2

def submit_or_return_to(return_path)
  haml_tag :table, {:style => 'padding-top:30px'} do
    haml_tag :tr do
      haml_tag :td, {:width => '180px'} do
        haml_tag :input, {:type => 'submit', :value => 'Save'}
      end
      haml_tag :td do
        haml_tag :a, "Cancel", {:href => return_path}
      end
    end
  end
end