Hey all,
I have a strange problem...In my controller I have at the top:
class SomeController < ApplicationController
helper :person
In PersonHelper I have:
def get_user_id
...
curr_user.id
end
In a particular partial (which is rendered via inline RJS by the
controller) under the SomeController class, let''s call it _person.html
I can do the follwing fine:
<%= get_user_id %>
And that works.
However, when I try:
<%= link_to_remote(:url => {:controller => ..., :action => ..., :id
=>
get_user_id}) %>
I get the following error msg:
undefined local variable or method `get_user_id'' for
#<#<Class:0x2531580>:0x2531558>
Any ideas?
Thanks!
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---
Sorry, typo: change _person.html to _person.rhtml The problem is still there! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Vishal wrote:> Sorry, typo: change _person.html to _person.rhtml > The problem is still there!What is even STRANGER(!!) is that calling the helper function ''get_user_name'' within the link_to_remote works...but NOT get_user_id. What gives? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---