>
> trainling newline? like in your source code? or when you look at the
> page?
>
On the page. I guess what I am trying to do is have an update in a
division using a partial, with multiple divisions on the same line.
render :update do |page|
page[:test].replace_html :partial => 'pretty'
page[:test2].replace_html :partial => 'reptiles'
end
A friend of mine who is a mid-level rails developer thinks it might be
impossible to avoid the breaks.
>
> Show your code - both models with names and associations, and also your
> database table names and field names for both.
>
Here is the parent
class SpreadType < ActiveRecord::Base
has_many :spreads
has_many :customer_subscriptions
has_many :ghostlegs
has_many :abstractlegs
def index
end
def self.find_spread_names
find (:all)
end
end
Here is the child that works:
class CustomerSubscription < ActiveRecord::Base
belongs_to :customer
belongs_to :underlying
belongs_to :spread_type
end
Here is the child that doesn't work
class Ghostlegs < ActiveRecord::Base
belongs_to :spread_type
end
Here is the creation code for the child that doesn't work:
class CreateGhostlegs < ActiveRecord::Migration
def self.up
create_table :ghostlegs do |t|
t.decimal :daystoexpire
t.decimal :distancefromunderlying
t.decimal :abstractratio
t.integer :corp
t.integer :spread_type_id
t.timestamps
end
end
def self.down
drop_table :ghostlegs
end
end
And here is the migration code for the parent
class CreateSpreadTypes < ActiveRecord::Migration
def self.up
create_table :spread_types do |t|
t.string :name
t.timestamps
end
end
def self.down
drop_table :spread_types
end
end
So maybe the underscore in the table name is what's confusing things?
Or is that just FUD logic? Why does it work for one and not the other?
Shouldn't it just generate the queries?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" 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/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---