=f.input :amount, :label => "Montant" =f.text_field :transaction_content_type =#f.text_field :transaction_content_id - transaction_content_type = f.object.transaction_content_type =f.semantic_fields_for :transaction_content do |f| -if transaction_content_type == "TransactionDonate" =f.input :donate_destination, :collection => DonateDestination.all -else transaction_content_type == "TransactionSponsorship" =f.input :sponsorship_animal, :collection => SponsorshipAnimal.all