Skip to content

Instantly share code, notes, and snippets.

@kevinrood
Created January 17, 2012 19:30
Show Gist options
  • Save kevinrood/1628350 to your computer and use it in GitHub Desktop.
Save kevinrood/1628350 to your computer and use it in GitHub Desktop.
Budget allocation view code
%h2 Budget Allocations
-# - binding.pry
- @media_plan_request.product_groups.each do |product_group|
%h3= product_group.ui_name if product_group.has_budget_allocations?
= feilds_for "{product_group_name_here}", product_group do |pg|
- product_group.products.each do |product|
- if defined?(product.budget_allocations) && product.budget_allocations.any?
= fields_for product do |p|
%h4= product.ui_name
%ul
= p.fields_for product.budget_allocations do |f|
= f.input :date
= f.input :amount
= render_step_buttons(form)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment