Rebooting Assistant from Rails Console

I call helper methods from the Rails console in Rails 3 as follows:

>> helper.my_method(parameter)
>> #=> some result

However, if I change the helper method, the changes are not reflected when I call the same method again. I have exitto run rails consoleto see how the changes to the helper method take effect.

+5
source share
3 answers

First of all, you incorrectly named your question. In the future, if you become clearer about what you are looking for, you will likely get an answer sooner.

-, Ruby "" "". , , , , .

, reload!, , .

+4

, helper - , memoizes ApplicationController, reload!, , Rails 4. , ApplicationController.helpers.my_method(parameter) . reload! , helper.

+7

, , , ApplicationController.helpers.my_method(parameter).

reload! (include MyHelper), .

0
source

All Articles