Using select with saltedhashlogingenerator

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
partial, via:

<%= 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:

def list
@customer_pages, @customers = paginate :customers, :per_page => 10
end

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? :\

thanks!

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!

a non y mouse wrote:

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
partial, via:

<%= form_input select(:id, :name, @customers) %>

ok, so I just realized that :name should be :login (whoops), but
regardless i am still unable to get anything working with this :frowning: