开发者

Accessing rails private/protected methods through javascript or jquery

开发者 https://www.devze.com 2023-02-13 03:33 出处:网络
I know I can access pu开发者_StackOverflow社区blic controller actions by doing something like this with jquery:

I know I can access pu开发者_StackOverflow社区blic controller actions by doing something like this with jquery:

$("#stuff").load("/controller/action");

But how do I access the private/protected actions in a controller using jquery or javascript?


You can create an action in the controller file which will call your private or protected action. A direct call is not possible.

0

精彩评论

暂无评论...
验证码 换一张
取 消