#rubyonrails - Tue 3 Apr 2007 between 00:00 and 00:56

NY Lost Funds



Merwllyra`I have /app/model/localized.rb defining the Localized module.
I use `require "localized"` and `include Localized` in the Member model, in the "member.rb"
Anyone having a solution to this?
hackdaddygot it: object-specific classes
Merwllyra`If I update the file "localized.rb" the changes are not reflected until I restart the server.
aztaMerwllyra`: tried load "localized" ?
Merwllyra`azta: What do you mean exactly?
Instead of "require"?
aztayeah
ri Kernel#load and Kernel#require to see the difference
Merwllyra`Seems to work,
but will that only work for the development env?
I wouldn't want Localized to load everytime in production mode...
aztaI'm not sure, you will have to test it. If the model is cached in production mode, then maybe not
Merwllyra`Ok, thanks.
aztastick a logger.info before the load line or something
Ryougaodd...
the :order key on has_many doesn't work when you say :include
joelmichaelryouga: try ordering by table.column instead of just column
Ryougano difference
h.items
=> [#<Item:0x33dfbdc @attributes={"name"=>"Aliens", "container_id"=>"1", "quantity"=>"2", "m3u"=>"1.0", "id"=>"5", "container_type"=>"Hangar"}>, #<Item:0x33dfb00 @attributes={"name"=>"Unobtainium", "container_id"=>"1", "quantity"=>"100", "m3u"=>"0.01", "id"=>"4", "container_type"=>"Hangar"}>]
but,
>> h = Hangar.find(1, :include => :items)
=> #<Hangar:0x33d6eec @attributes={"system_id"=>"2", "id"=>"1", "location"=>"1-1"}, @items=[#<Item:0x33d5ed4 @attributes={"name"=>"Unobtainium", "container_id"=>"1", "m3u"=>"0.01", "quantity"=>"100", "id"=>"4", "container_type"=>"Hangar"}>, #<Item:0x33d5754 @attributes={"name"=>"Aliens", "container_id"=>"1", "m3u"=>"1.0", "quantity"=>"2", "id"=>"5", "container_type"=>"Hangar"}>]>
(sort key is name)
joelmichaeloh i see what you mean
hmm could be a bug
ianm_can someone recommend a scaffolding plugin that does NOT generate code and that supports belongs_to associations (by providing a dropdown) ?
aztaianm_: checked out streamlined?
ianm_no but it looks interesting
thanks gotta run
DisparityHow can I load predefined data into my mysql database? Is there a rails way to do it?
Naz_I'm experimenting with RESTful Rails and am getting this error in my new.rhtml view: http://pastie.caboo.se/51279
tpopeNaz_, it's a new user, use users_url
or better, users_path
Naz_users_path?
Is there a list of helpers for RESTful rails? I'm getting very confused, the Agile book didn't cover parts of it, but I love the way it works.
tpopeNaz_: api.rubyonrails.org
but that doesn't cover the path/url stuff

Page: 2 9 16 23 30 37 44 51 58 65 72 79 86 93 100 107 

IrcArchive

NY Lost Funds