Assuming your Player model has_many :salaries, you can enable the expected f.fields_for :salaries behaviour in your form by adding the appropriate attributes:
ruby
classPlayersForm
include ActiveModel::Modeldefpersisted?falseend
attr_accessor :salaries, :salaries_attributesdefinitialize(player)
@player = player
@salaries = player.salaries
endend
Alternatively, set the default format in the routes.rb file:
Fairly simple to achieve.
Assuming your
Player
modelhas_many :salaries
, you can enable the expectedf.fields_for :salaries
behaviour in your form by adding the appropriate attributes:I think the routes.rb code needs to change for Rails 3 apps to something like this:
resources :orders do
get 'express', :on => :collection
end
and then use the express_orders_path rather than express_new_order_path