engine/app/helpers/application_helper.rb

27 lines
511 B
Ruby
Raw Normal View History

2010-03-29 22:01:47 +00:00
module ApplicationHelper
2010-04-22 23:52:11 +00:00
def title(title = nil)
if title.nil?
@content_for_title
else
@content_for_title = title
''
end
end
def flash_message
if not flash.empty?
content_tag :div, flash.values.first,
:id => "flash-#{flash.keys.first}",
:class => 'application-message'
else
''
end
end
def submit_button_tag(label)
content_tag(:button, content_tag(:span, label), :type => 'submit', :class => 'button')
end
2010-03-29 22:01:47 +00:00
end