Created
October 14, 2012 19:17
-
-
Save aalvesjr/3889535 to your computer and use it in GitHub Desktop.
Como tratar o /edit com accepts_nested_attributes_for ???
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Release < ActiveRecord::Base | |
| attr_accessible :category_id, :code, :description, :first_paid, :fixed_payment, :name, :number_instalments, :total_amount, :instalments_attributes | |
| has_many :instalments | |
| accepts_nested_attributes_for :instalments | |
| end | |
| __END__ | |
| Como montar o formulario para edição que na mesma tela vai ter os atributos de Release e das Instalments sem ter que especificar todos os names e id's na mão? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment