ahh... yes, in controllers/views you have a range of helper functions that aren't available outside controllers/views without giving the namespace, loading modules, etc.
On Apr 27, 8:06 am, Chris Apolzon <[email protected]> wrote: > Ah, I guess I was trying to use a helper function then? I copied the > enum_string code that was in the model for one of the samples and it didn't > work: > field_name enum_string(:first, :second) > I also tried: > t = enum_string(:first, :second) > > I'm (obviously) a rails novice and just beginning with Hobo. I'm guessing > that if I had spent any previous time in the rails console I would have > known to use the module syntax. > > Thanks for the tips. > > On Mon, Apr 26, 2010 at 5:26 PM, kevinpfromnm <[email protected]>wrote: > > > > > Yes, when you use script/console it loads the full (development) > > environment like it was making a web server. Any plugins, custom > > code, etc should work. > > > On Apr 26, 10:52 am, Brett Nelson <[email protected]> wrote: > > > I think this stuff is required automatically in the console. I just > > > tried this on a Hobo app and it worked. > > > > D:\workspace\hoboapp>ruby script\console > > > Loading development environment (Rails 2.3.5)>> es = > > HoboFields::EnumString.new("ABC") > > > => "ABC" > > > >> puts es.class.to_s > > > > HoboFields::EnumString > > > => nil > > > > Brett > > > > On Apr 26, 9:48 am, Chris Apolzon <[email protected]> wrote: > > > > > I wanted to do some interactive testing with the EnumString object and > > > > figured the best way to do it was through the rails console. Is there > > > > a better way to get an interactive hobo session? > > > > I realize I'll have to require the hobo libraries once I'm in the > > > > console session; I'm going to peruse through the base classes to see > > > > what all I would need to require, unless this is documented somewhere > > > > or this would be trickier than I anticipate. > > > > > Otherwise, if anyone knows off-hand what needs requiring or has a hobo- > > > > console script I'm all ears. > > > > > Thanks. > > > > > -- > > > > You received this message because you are subscribed to the Google > > Groups "Hobo Users" group. > > > > To post to this group, send email to [email protected]. > > > > To unsubscribe from this group, send email to > > [email protected]<hobousers%[email protected]> > > . > > > > For more options, visit this group athttp:// > > groups.google.com/group/hobousers?hl=en. > > > > -- > > > You received this message because you are subscribed to the Google Groups > > "Hobo Users" group. > > > To post to this group, send email to [email protected]. > > > To unsubscribe from this group, send email to > > [email protected]<hobousers%[email protected]> > > . > > > For more options, visit this group athttp:// > > groups.google.com/group/hobousers?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Hobo Users" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<hobousers%[email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/hobousers?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Hobo Users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group > athttp://groups.google.com/group/hobousers?hl=en. -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/hobousers?hl=en.
