You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my use case I need to factor rendering logic whose behaviour is conditioned by some values computed on the action:
class StatisticsController < ApplicationController
before_render :choose_render
def my_custom_action
...
@records = <something>
.,.
end
...
def choose_render
if @records.first # here is an exception (@records is nil)...
...
end
end
but it is not possible, since @records is not available in the context of the callback function choose_render.
The text was updated successfully, but these errors were encountered:
In my use case I need to factor rendering logic whose behaviour is conditioned by some values computed on the action:
but it is not possible, since @records is not available in the context of the callback function
choose_render
.The text was updated successfully, but these errors were encountered: