Created
November 23, 2011 01:31
-
-
Save czivko/1387668 to your computer and use it in GitHub Desktop.
event packages
This file contains 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
{ | |
"utf8" =>"✓", | |
"authenticity_token" =>"L8ezPjizbUKbcgi6qHrYrXntBfTPPz1a8QSKqk+lvSk=", | |
"event" => { | |
"name" =>"one", | |
"start_time" =>"", | |
"end_time" =>"", | |
"venue_name" =>"", | |
"address" =>"", | |
"city" =>"", | |
"state" =>"", | |
"zip" =>"", | |
"event_packages_attributes" => { | |
"0" => { | |
"price" =>"33" | |
} | |
}, | |
"private" =>"0" | |
}, | |
"commit" =>"Create Event", | |
"action" =>"create", | |
"controller" =>"vendor/events" | |
} |
This file contains 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
#starting at line 68 | |
.price.section | |
=f.fields_for :event_packages do |p| | |
%section | |
%label | |
Will you be charging for this event? | |
.p | |
%input.ioscheckbox.charging{:type => "checkbox"}/ | |
.pricesection.subsection | |
%section | |
%label General Admission Price | |
.p | |
$ | |
=p.text_field:price | |
%section | |
%label | |
Early Bird Price? | |
.p | |
%input.ioscheckbox.earlybird{:type => "checkbox"}/ | |
.earlysection.subsection | |
%section | |
%label Early Bird Price | |
.p | |
$ | |
%input.small{:type => "text"}/ | |
%section | |
%label When will this promotion end | |
.p | |
%input.medium.hasDatepicker{:type => "text"}/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
see how event_packages needs to be nested inside of even
the generated html needs to look like this
so rails serializes everything correctly to the params
also i have a validation in event_package.rb model that needs to be removed, kill line 4 validates :event_id, :presence => true other wise it won't save