How do you find out what action rendered a page

Hi I have this list page that has some rjs templates updating parts of
it including a table of results. i’m trying to put pagination on the
table. thing is lots of different actions update the table and they have
their own paginators.

anyway i have this code at the bottom which worked for another page

pagination_links_each(@offer_pages,:window_size =>4) do |n|
“<a href=”#" onclick=“new
Ajax.Request(’/user/choose_offer?page=#{n}’, {asynchronous:true,
evalScripts:true}); return false;”>#{n}"


but i need to right it so that the calling action is substituted into
where choose offer is now…

so how do i get the name of the action that rendered the page?

Just starting out with rails so forgive me if this code looks horrible.
thanks in advance

I have the following in one of my layout head sections

<%= “admin::#{controller.controller_name}::#{controller.action_name}” %>

That might get you started.


Thanks peter, thats exactly what i wanted.

I run the plugin query_trace

and tail -f the logs

its handy as pie and requires nothing to be inserted into your code

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs