ruby - How to get Rails views to return its associated action names? -


I have a very easy controller to manage fixed pages within my Rail application:

  Class Page Controller & lt;  

How can I get a visual template to return my name, so I can do something like this:

  # pricing.html .erb & lt; H1 & gt; & Lt;% = my_own_name.capitalize% & gt; & Lt; / H1> # - & gt; "Pricing"  

Thanks for any help.

The parameter hashes will always include: Controller and: Action Keys, but instead of using these values ​​you should use controller_name and action_name .

  & lt; H1 & gt; & Lt;% = action_name.capitalize% & gt; & Lt; / H1>  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -