Answers for "ruby on rails how to store variables across methods in controller"

0

rails pass variable between controller methods

@pages = Post.find.all

@@my_value = @pages.(any manipulations)

# now @@my_vales can be used in any actions of that controller..
# Be carefull, it is not thread-safe...
Posted by: Guest on March-03-2021

Code answers related to "ruby on rails how to store variables across methods in controller"

Browse Popular Code Answers by Language