Method: Megatron::ApplicationHelper#test_current_page
- Defined in:
- app/helpers/megatron/application_helper.rb
#test_current_page(criteria) ⇒ Object
62 63 64 65 66 67 68 69 70 71 |
# File 'app/helpers/megatron/application_helper.rb', line 62 def test_current_page(criteria) return false unless criteria.present? test_params = criteria.delete(:params) || {} test_params[:controller] ||= criteria[:controller] if criteria[:controller].present? test_params[:action] ||= criteria[:action] if criteria[:action].present? test_params.all? {|k, v| test_here_key_value(k, v) } end |