I'm assuming you are calling this partial while in the home controller
Right.
2) Move your link_to_customer definition to application_helper.rb so it
will be available to all controllers/views.
Chose this option, definition same as before.
Substituted my helper invocation in app\views\customer\_list.rhtml
(line 12) and got error messages (looks like it's looking for 'show'
in home rather than customer folder):
NameError in Home#start
Showing app/views/customer/_list.rhtml where line #12 raised:
undefined local variable or method `action' for
#<#<Class:0x3cd7520>:0x3cd7418>
Maybe I have to shift to the other option. I thought I'd wait to see
if you had an approach to make the chosen option work. Maybe it's not
worth wasting your time on it.
Thanks again. My excuse (we always need one when we screw up, don't
we), is that I'm a Ruby and Rails newbie. So I'm insufficiently
sensitive to those pesky little colons.
Incidentally, I copied the code I started with from somewhere (but
missed the colons), and that source didn't use any braces to form the
hash. So I left them out to see whether it would work without them,
wish it did.
I infer from this success that the link_to method's prototype requires
a hash and the Ruby interpreter accepts the hash-like elements as
components of the needed hash. Just a theory. No need to spend any more
time on me.