Ruby on Rails Monday, January 3, 2011

Hi,

Can anyone help me to pass an argument from a controller to a method in
a model...


In Controller:
def show
...
@formatted_question = @question.set_format_for_presentation("true")
...
end


In Model:
def set_format_for_presentation(student_true_or_false)
...
end

I am unable to pass "true" or anything else to (student) in the model.

Thanks, I'm still pretty new at this!

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment