To display the current controller name in a view template you can write
<%= controller.controller_name %>.
How do you write if you want to display the current ID parameter in a
URL like this /pages/show/1?
To display the current controller name in a view template you can write
<%= controller.controller_name %>.
How do you write if you want to display the current ID parameter in a
URL like this /pages/show/1?
<%= params[:id] %>
Assuming that’s what you called it in your route.