On 06/12/2011 01:58 AM, radhames brito wrote:
please confirm that the code in the helper is like this
module HomeHelper
def hi
if user_signed_in?
return "¡Bienvenid@ #{current_user.username} a nuestra web!"
else
return "¡Bienvenid@ invitad@, no dude en registrarse!"
end
end
end
in ruby there is no multi inheritance but you can import modules into
classes, helpers are modules that are auto imported to he views of a
given controller by rails , it appears you have deleted the module
declaration inside the helper or you have placed the function outside
the module declaration , in any case is if it still does not work
please post the code in your helper.
--
You received this message because you are subscribed to the Google
Groups "Ruby on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
Oh, thanks. I understand the code and work with the result that I want.
Thanks again, Radhames.
With this problem I have learned things about the helpers and the way to
work with its and the controllers. Thanks also for the rest of the users
who tried to help me.
Rewards, Ivan
--
You received this message because you are subscribed to the Google Groups "Ruby on
Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.