sms-pager/app/helpers/application_helper.rb

20 lines
388 B
Ruby
Raw Normal View History

2015-09-12 15:37:05 -05:00
module ApplicationHelper
2015-09-20 13:26:45 -05:00
def page_link(person)
return if person.phone.blank?
2015-10-04 20:27:03 -05:00
link_to 'page', page_person_path(person), class: 'btn'
end
def edit_btn(url)
link_to 'edit', url, class: 'btn'
2015-09-20 13:26:45 -05:00
end
2015-10-03 22:44:36 -05:00
def active_controller(kontroller)
'active' if params[:controller] == kontroller
end
def active_action(action)
'active' if params[:action] == action
end
2015-09-12 15:37:05 -05:00
end