#rubyonrails - Sun 11 Mar 2007 between 18:23 and 18:28



ReinHwolves: do rake -T fixtures in your shell
wolvesok, it will create a yml file?
will it...
ReinHwolves: it will list all rake tasks with "fixtures" in their name and their description
moldinagacan I ask a newbie question without getting pissed on? Is this the right channel for such?
ReinHwolves: the next step is left as an exercise for the reader ;)
HolyGoatgoodgoblin: per request, so they should be available then, yeah
ReinH: I was about to give it to him, but now I won't :)
GaryKingHow do I add new data to a hash?
ReinHHolyGoat: ;)
RaydenUnimoldinaga this is the right place
ReinHGaryKing: Hash#merge is one way
That's in the Ruby API: http://www.ruby-doc.org/core
GaryKingthere's no << way?
ReinHGaryKing: search for Hash here:
Check the rails API! http://labs.parkerfox.co.uk/ruby.search
Read the pickaxe entry.
RaydenUniGaryKing << doesn't make sense for a hash
:P
what would it do?
GaryKingisn't there a hash[key] = value way
goodgoblinHolyGoat - ah - ok - so in this case they haven't loaded for this request yet - I am putting them in a cart, putting that cart in the session, and then going to a new session, loading up the old session and getting the 'shirt' out - however I haven't explicitly loaded a Tshirt yet
ReinHRaydenUni: alias_method :<<, :merge ;)
GaryKing: yes, there is.
GaryKing: hash[:foo] = "foo" exactly
HolyGoatgoodgoblin: You shouldn't have to explicitly load the Tshirt model
goodgoblinHolyGoat: i just tried explicitly loading a Tshirt first and it worked - at least it barfed on the next object in the cart I hadn't loaded yet
ReinHbrb laundry
HolyGoatgoodgoblin: That's a bit strange though. They should be available.
Where are you explicitly loading it?
actionHolyGoat is by no means a Rails expert yet, mind you
HolyGoatis by no means a Rails expert yet, mind you
goodgoblinHolyGoat: it might have something to do with the way I'm trying to do this - i'm using SQLSessionStore explicitly to create a new session. Its not 'Rails' code, its Stefan Kaes's code, and resides out in the /lib/ folder
RaydenUniRaydenUni is
lol
GaryKingReinH: @tags['foo'] = 'bar' gave me an error
HolyGoatgoodgoblin: Aha. That might explain the load order issue.
goodgoblinHolyGoat - calling it from within a method within an ActionController
GaryKingohhh
neato
HolyGoatgoodgoblin: Although.. if you're calling it from a controller, the models _should_ be loaded.

Page: 5 12 19 26 33 40 47 54 61 68 75 82 89 96 103 110 

IrcArchive