hi, i just got started with rails and am trying to work with the (deep
breath) saltedhashlogingenerator gem in my app.
more specifically, i am trying to generate a select box in my _edit
<%= form_input select(:id, :name, @customers) %>
(i used Customer instead of User when installing the gem into my rails
app) this would appear to be the correct syntax, based on the wiki
documentation for using select. but i get an error:
You have a nil object when you didn’t expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.inject
@customers is created via:
@customer_pages, @customers = paginate :customers, :per_page => 10
which i believe is the default when creating the scaffold. i tried using
@customers.list in the _edit partial but got the same result.
i did notice that its list method uses paginate rather than find_all
which is what the onlamp articles for getting started with rails uses.
sooooo i tried using that, which was equally vain.
am i completely missing something here? :\
ps- i also checked out how typo addresses this issue, because i believe
the author of typo is who wrote the module. but it appears that typo
uses no select methods at all–they are all done manually!