ruby on rails - calling actions in other controller -


i have controller called twits controller .. here have few actions communicate 3rd party api.. has few actions authenticate , few actions values of api. have controller called home , in index page of controller have call actions of twits controller , should happen while index page getting rendered. please advice.

calling actions of 1 controller bad idea. should extract functionality module or class , use in both controllers.

so in case, should writing wrapper class communicating 3rd party api , use wrapper. note wrapper class not abstracted wrapper general use, functionality legacy code provides, intend reuse.

hope helps. if isn't, try posting code , maybe can suggest more.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -