No release in over 3 years
Low commit activity in last 3 years
Simple helpers to have more readable checks for current controller name or action name in rails views.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

> 4.0.0
 Project Readme

Rails Controller Action Name Helpers

Repository - casaper/rails_controller_action_name_helpers
Documentation

Simple view helpers to have more readable checks for current controller name or action name.

- # this condition here
- if action_name == 'index' && (controller_name == 'members' || controller_name == 'users')
  %p This will only show if the partial is run on the index action on the members or users controller
- # can be done like this
- if ca_index?(:members, :users)
  %p This will only show if the partial is run on the index action on the members or users controller