Displaying 2 results from an estimated 2 matches for "studentfailst".
Did you mean:
studentfails
2010 Feb 10
2
undefined method 'state'
I can''t imagine what 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 @stude...
2010 Feb 10
7
undefined method join
...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 to mine:
collection_select(:post, :author_id, Author.all, :id, :name_with_initial,
{:prompt => true})
--
View this message in context: http://old.nabbl...