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.
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 table. So in the dropdown it will display the text (key
attribute) of each table and each table will have an id.
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.
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 table. So in the dropdown it will display the text (key
attribute) of each table and each table will have an id.
Any suggestions? Thanks.
Yes. Put Rails aside for a few days and focus on learning Ruby. You're
making an elementary syntax error. If you can't see it, then you don't
yet know Ruby well enough to use Rails profitably.