Hello,
I’m writing a Rails application on my home computer. I update it from
time to time to a demo server.
The demo server complains a lot, while I didn’t have any problems at
home. Whenever I iterate over an empty collection, like :
controller:
@keyword_groups = KeywordGroup.find(:all)
view:
<%= render :partial => “keyword_group”, :collection => @keyword_groups
%>
partial:
<%= link_to keyword_group.label, :action => ‘show_keyword_group’, :id
=> keyword_group %>
If the keyword_groups table is empty, this works fine at home, but
doesn’t work on the demo server:
ActionView::TemplateError (undefined method `label’ for nil:NilClass)
on line #4 of app/views/user/_keyword_group.rhtml:
I’d like to be sure my app will work anywhere, so how can I make my
development environment as much strict as the demo one? Is that just a
configuration option?
Thanks,
Karine D.