Calling method from view

I have this list of users that I capture in a method which is users that
one individual is responciable for. In my view I iterate through that
list of users to place the name of each user into a table.

I also have this hashPassword method that takes the username and a key
and generates the appropriate single sign on hash for a user. My problem
is that I am iterating through the users in the view and I need to call
that hashPassword method from the view. I have tried saying:

<% @hash = hassPassword(. . .) %>

But rails doesn’t like that. Is there a way to call a method from the
view? Thanks,

-S

Sure, you can call methods from a view. Where is hashPassword defined?

Craig

Craig D. wrote:

Sure, you can call methods from a view. Where is hashPassword defined?

Craig

It’s define in my controller and I thought you could call it too, but I
get this error:

undefined method `hashPassword’ for #<#Class:0x4703e48:0x4703e20>

I got it. I added the method to the application.rb file and all is good.