Hi guys n gals,
I've searched this group and found other members asking about this but
no responses. Thought I'd try again...
On page 248 of the Rapid Rails 3 with Hobo beta 6, which is an
excellent document by the way, details about how to implement a search
feature to restrict the Project's displayed requirements.
When I implement the following show action into the project controller
I get the exception further below when viewing a project's show page.
def show
@project = find_instance
@reqlist = @project.requirements.where(["title like ?",
"%#{params[:search]}
%"]).order(parse_sort_param(:title, :status).join(' '))
end
exception:....
NoMethodError in ProjectsController#show
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.join
I'm new to Ruby and suspect there should be a test for null but how
and where? Any ideas anyone?
Thanks,
Drammy
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en.