How to run controller methods using rails runner ?

139 views
Skip to first unread message

Fahim Patel

unread,
Nov 1, 2012, 2:04:33 AM11/1/12
to rubyonra...@googlegroups.com

Hi all,

I have run my controller methods from console, but now i learn about rails runner .

i execute model method successful , but i wish to run my controller method using rails runner.

Q  Is this possible to run controller method from rails runner ?

Thanks 

Regards 
Fahim Babar Patel

Fahim Patel

unread,
Nov 2, 2012, 2:36:33 AM11/2/12
to rubyonra...@googlegroups.com

Q  Is this possible to run controller method from rails runner ?

Colin Law

unread,
Nov 2, 2012, 4:06:48 AM11/2/12
to rubyonra...@googlegroups.com
On 1 November 2012 06:04, Fahim Patel <paf...@gmail.com> wrote:
>
> Hi all,
>
> I have run my controller methods from console, but now i learn about rails
> runner .
>
> i execute model method successful , but i wish to run my controller method
> using rails runner.
>
> Q Is this possible to run controller method from rails runner ?

I don't believe this is possible, and don't see any reason to want to
do it. If you have methods there that you want to call from a runner
the methods should probably either be in the models or in separate
modules. Extract those methods from the controller and then you can
call them either from the controller or from the runner.

Colin

Fahim Patel

unread,
Nov 2, 2012, 5:01:40 AM11/2/12
to rubyonra...@googlegroups.com, cla...@googlemail.com
Thanks for reply.

Regards
Fahim Babar Patel
Reply all
Reply to author
Forward
0 new messages