It doesn’t call the method ‘thing’ before render the template
‘thing.rhtml’, but I need some instance variable which are in the
‘thing’ method, how can I let it call the method ‘thing’ and then render
the template?
I usually set up another method called “set_up_country_list” or
whatever, which sets up the instance variables that you need. Then
your original “thing” method, and this other action, can both call
“set_up_country_list” before rendering the view.
I usually set up another method called “set_up_country_list” or
whatever, which sets up the instance variables that you need. Then
your original “thing” method, and this other action, can both call
“set_up_country_list” before rendering the view.