ruby on rails - How to access controller action from production command line -
ruby on rails - How to access controller action from production command line -
i have controller action changes status of records in database. want run in production. on local server, can access rails console ,
=> x= welcomecontroller.new => x.method_name
on production don't have rails console. can run controller method straight command line? what's preferred way perform kind of task? can move method anywhere in helper etc.
keeping such logic in controllers bad practice. should move model or service layer. recommend take @ this article.
ruby-on-rails ruby
Comments
Post a Comment