search for: exercise_id

Displaying 4 results from an estimated 4 matches for "exercise_id".

2006 Jan 21
3
help... why can''t Iuse data from two tables in the same view
...eg @newex[''objectives_note''] gives me = "To test the system" which is correct. Template Items. Then in the same ''hello'' method in the setup controller I define @mytemplate: @mytemplate = Template.find_by_sql(''select * from templates where exercise_id = "1"''). (in other words, trying to access the other database table.) I have included "model :template" in the setup controller and also in the application controller. Also, the template model (template.rb) includes "belongs_to :exercises" and the exercise...
2008 Feb 25
4
Using group in with find in an ActiveRecord appropriately
I''m playing around with the Practical Rails Projects code, and was attempting to make a change for graphing data differently using groupings. Basically the code went from: total_weight = @exercise.activities.collect {|e| e.repetitions * e.resistance} workout_dates = @exercise.activities.collect {|e| e.workout.date.to_s} To: total_weight =
2006 Jan 17
0
:afterFinish not getting called?
...element in the :afterFinish callback of the "Squish" effect. This is what my call looks like. <%= link_to_remote ("X", :url => { :action => "deleteIt", :id => wc_line.attributes[''id''], :exercise_id => wc_line.attributes[''exercise_id''] }, :complete => visual_effect(:squish, "item_#{wc_line.attributes[''id''].to_s}", { :afterFinish => "function(effect) { Element.Destroy(effect.element); Sortable.create(''#{...
2008 May 07
2
Begginer question: how to edit using options_from_collection
...view the edit.html that was generated through scaffold I wrote this <% form_for(@workout) do |f| %> <p> <b>Exercise</b><br /> <%= select_tag "exercise", options_from_collection_for_select(Exercise.find_all, "id", "name", @workout.exercise_id) %> </p> <%= f.submit "Update" %> </p> <% end %> For some reason it does not update when I click it. I don''t have any errors but it just doesn''t update. Does anyone know why? Any help would be apperciated. Thanks Kane -- Posted via...