문제

I want to pass some variables to a method called with the before_filter. It is possible to use the controller instance like before_filter with parameters. But in my case I have a private method.

I can't use the same solution for it.

Is there any way to parse the arguments to it?

도움이 되었습니까?

해결책

It's not nice, as already was stated, but usage of .send does help and it is also mentioned in the Action Controller Overview Guide, therefore I think there is no real better way.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top