[LRUG] [accu-general] Ruby on Rails help

Craig Webster craig at xeriom.net
Thu Sep 27 02:33:09 PDT 2007


On 27 Sep 2007, at 10:27, Alec Ross wrote:
>   ------- Forwarded message follows -------
> From: "Simon Sebright" <simonsebright at hotmail.com>
> Date: 27 September 2007 09:08:34 BDT
>
> First of all, can anyone recommend good books on both Ruby and Rails?

Agile Web Development is quite a good intro.
   http://www.pragmaticprogrammer.com/title/rails/

> Secondly, for anyone who is in the know, I am trying to create my  
> own example and have a piece of functionality I want to run from  
> both a controller task and a rake task (I don't know what the  
> latter actually is!).  I have written the function in the rake  
> file, but ideally want to extract it to somewhere I can include in  
> the controller file as well.
>
> How do I actually do that?  The rake task, as the book explains  
> already loads ActiveRecord and "the environment", which I need.   
> How do I do that, I wonder?

Sounds like it should go in a model. A bit more detail - roughly what  
the functionality should be - would help me provide an example.

Cheers,
Craig
--
Craig Webster   | Lead Developer   | skype: craigwebster
Xeriom Networks | t: 0131 208 3800 | w: http://xeriom.net/

  -- Virtual machines, dedicated servers and colocation --

Xeriom Networks Limited.
94/1 Spring Gardens, Abbeyhill, Edinburgh, Scotland.
Registered in England and Wales. Company No. 5961686.

All agreements are made under our standard terms and conditions.
These can be found at http://xeriom.net/terms_and_conditions





More information about the Chat mailing list