Rails: How to Create a New Associated Model From a Collection of Templates -
Rails: How to Create a New Associated Model From a Collection of Templates -
i want have series of workout templates user can select when making booking. booking version of workout template can edited without changing original template.
context
i have personal trainer makes bookings clients. the personal trainer has many workouts. each booking has associated workout can edited booking.question how create new workout each booking and:
associate new workout's id booking keep template workouts in collection displayed @ new booking formguess current guess on doing have hidden field workout params in form passed bookings_controller, create method @booking.save && @workout.save
i'm stuck on details execute.
it hard understand trying looks want use: http://api.rubyonrails.org/classes/activerecord/nestedattributes/classmethods.html
ruby-on-rails ruby-on-rails-3 ruby-on-rails-3.1
Comments
Post a Comment