Running a rake task from a controller (pass/return values)

H

Harp Oon

I'm a RoR noob.
I have a controller that receives data from a view. I want to save that
data into a DB, which is fine. After saving the data, I want to run a
rake task on it to get more data to save it in the DB.

The rake task work fine, but I can't figure out a way to pass in the
recordID for the task I want the task to run on.

Within the rake task I can access all the data within a table and run
the task on all the data, but I don't want that to happen. All I want is
to pass in the recordID for the task to run on .

Also, is there a way for a rake task to return an array back to the
controller?
 
J

Julian Leviston

Wow...

It's like a bundle of mixedupness! :)

Can I ask why you're using a rake task?

Better to clarify what you're talking about first, then we can help out.

Julian.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top