Displaying 2 results from an estimated 2 matches for "update_student_fail".
2010 Feb 10
2
undefined method 'state'
...I''m trying to do is complicated 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. Th...
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
documentatio...