Home How can I run a Rails controller action manually ("offline")?
Reply: 0

How can I run a Rails controller action manually ("offline")?

user807
1#
user807 Published in April 26, 2018, 7:45 am

I need a way to run controller actions manually "offline" and store the result output.

Looking into controller initialization, it seems nothing interesting happens there.

Looking into send_action, it seems by the time this is called, the controller instance already knows much about the action! (e.g. @_action_name, @_env, etv... are already set!).

I need to understand where that happened so I can do in manually to a controller instance. I have never quite figured out how to navigate code as dynamic as Rails, and cannot seem to find out where this set up occurs. I've used caller in a few places to understand how actions get called but haven't found the code I'm looking for.

Any help is appreciated.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.302674 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO