sms-pager/app/helpers/application_helper.rb
2015-10-04 20:27:03 -05:00

20 lines
388 B
Ruby

module ApplicationHelper
def page_link(person)
return if person.phone.blank?
link_to 'page', page_person_path(person), class: 'btn'
end
def edit_btn(url)
link_to 'edit', url, class: 'btn'
end
def active_controller(kontroller)
'active' if params[:controller] == kontroller
end
def active_action(action)
'active' if params[:action] == action
end
end