Skip to content

Instantly share code, notes, and snippets.

@MichaelDrogalis
Created November 23, 2011 20:43
Show Gist options
  • Save MichaelDrogalis/1389842 to your computer and use it in GitHub Desktop.
Save MichaelDrogalis/1389842 to your computer and use it in GitHub Desktop.
= form_for @workout, :url => { :action => "create" }, :method => "post" do |f|
2 .input
3 When
4 = f.date_select :when, :order => [:month, :day, :year],
5 :default => @workout_date
6 .input
7 Type
8 = f.text_field :category
9 .input
10 Duration
11 = fields_for @workout.duration do |duration_fields|
12 Hours:
13 = duration_fields.text_box :hours
14 .input
15 Distance
16 = f.text_field :distance
17 .input
18 Pace
19 = f.text_field :pace
20 .input
21 Route
22 = f.text_field :route
23 .input
24 Notes
25 = f.text_area :notes
26
27 = f.submit "Create Workout"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment