search for: build_student_fail

Displaying 3 results from an estimated 3 matches for "build_student_fail".

2010 Feb 20
3
update user input to another table without using html form
...ntfails table). I was hoping something like this, but this doesn''t work: student.rb has_one :student_fail attr_accessor :student_fail_attribute def find_failing_student @student = @student.find params[:id] end def update_failing_student @student = @student.find params[:id] @student.build_student_fail params[:student][:student_fail_attribute] end Even for this you have to put student_fail_attribute in the html. I''m hoping there''s a way where you don''t have to put anything in the html. Any suggestions? Thanks for any response. -- Posted via http://www.ruby-forum.com/....
2010 Feb 10
2
undefined method 'state'
...mplicated at all in Rails. Yet, I am now getting this error: undefined method `state'' for :StudentFailState:Symbol. student.rb has_one :student_fail attr_accessor :student_fail_attribute #controller def student_fail @student = @student.find params[:id] def update_student_fail @student.build_student_fail params[:student][:student_fail_attribute] if @student.save #view form_for @student do |f| f.collection_select( :student_fail_attribute, params[:StudentFailState.state], params[:id], params[:key]) end true is an attribute of the StudentFailState table. There are three records in that...
2010 Feb 10
7
undefined method join
Hey all, I get an undefined method `join'' for #<String NoMethodError. student.rb has_one :student_fail attr_accessor :student_fail_attribute #controller def student_fail @student = @student.find params[:id] def update_student_fail @student.build_student_fail params[:student][:student_fail_attribute] if @student.save #view form_for @student do |f| f.collection_select(:student_fail_attribute, StudentFailState.all, :id, :key) end I don''t understand why the error. This is the example that rails documentation gives, which looks very close...