Quantcast
Channel: Is it possible to include modules in rake task and make its methods available for the task in rails app? - Stack Overflow
Browsing all 5 articles
Browse latest View live

Answer by Alter Lagos for Is it possible to include modules in rake task and...

PLEASE PAY ATTENTION TO THIS AND SAVE SOME RANDOM HEADACHES!! . Don't include your module before your namespace: include YourModule namespace :your_name do desc 'Foo' task foo: :environment do end end...

View Article



Answer by S.Yadav for Is it possible to include modules in rake task and make...

In rails 5.x.x we can do as- Module file exist her app/lib/module/sub_module.rb like- module Module module SubModule def self.method(params1, params2) // code goes here... end end end and my rake_task...

View Article

Answer by Julian Espinel for Is it possible to include modules in rake task...

How to require a Rails service/module in a Rake task? I had the same problem and manage to solve it by requiring the rails files inside the rake task. I had a rake task named give_something defined in...

View Article

Answer by zreitano for Is it possible to include modules in rake task and...

require 'modules/module_name' include ModuleName namespace :rake_name do desc "description of rake task" task example_task: :environment do result = ModuleName::method_name() end #end task end This...

View Article

Is it possible to include modules in rake task and make its methods available...

In our rails 3.2.12 app, there is a rake task created under lib/tasks. The rake task needs to call a method find_config() which resides in another rails module authentify (module is not under /lib/)....

View Article

Browsing all 5 articles
Browse latest View live




Latest Images