Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Seller < ApplicationRecord
- has_many :buyer_sellers
- has_many :buyers, :through => :buyer_sellers
- end
- class Buyer < ApplicationRecord
- has_many :buyer_sellers
- has_many :sellers, :through => :buyer_sellers
- end
- class BuyerSeller < ApplicationRecord
- belongs_to :buyer
- belongs_to :seller
- end
- <%= form_for(buyer) do |f| %>
- <%= some fields %>
- <%= f.fields_for :buyer_seller do |ff| %>
- <% ff.date_select :start_date %>
- <% end %>
- <% end %>
- Buyer Load (3.1ms) SELECT "buyers".* FROM "buyers" WHERE "buyers"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
- Unpermitted parameter: buyer_seller
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement