bigbanger
2007-Dec-11 02:53 UTC
TypeError: Effect[effect_class] when using block form of link_to helper
Anyone have any idea why I''m getting this error when using the block form of the link_to helper in Rails 2.0.1? I''m essentially using the exact same code as in the Rails doc example, but no luck. Any help would be appreciated. --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
bigbanger
2007-Dec-11 03:01 UTC
Re: TypeError: Effect[effect_class] when using block form of link_to helper
Sorry, meant link_to_function, not link_to. On Dec 10, 6:53 pm, bigbanger <bigbanger...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Anyone have any idea why I''m getting this error when using the block > form of the link_to helper in Rails 2.0.1? I''m essentially using the > exact same code as in the Rails doc example, but no luck. Any help > would be appreciated.--~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Ryan Bigg
2007-Dec-11 03:02 UTC
Re: TypeError: Effect[effect_class] when using block form of link_to helper
Could you show us the exact code you''re using please? On Dec 11, 2007 1:31 PM, bigbanger <bigbanger10s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Sorry, meant link_to_function, not link_to. > > On Dec 10, 6:53 pm, bigbanger <bigbanger...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Anyone have any idea why I''m getting this error when using the block > > form of the link_to helper in Rails 2.0.1? I''m essentially using the > > exact same code as in the Rails doc example, but no luck. Any help > > would be appreciated. > > >-- Ryan Bigg http://www.frozenplague.net --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
bigbanger
2007-Dec-11 03:21 UTC
Re: TypeError: Effect[effect_class] when using block form of link_to helper
Ryan, I''m using the following code in my .rhtml file: <% link_to_function("show", nil, :id => "more_link", :class => "expand_collapse") do |page| page[:user_listings].visual_effect :toggle_appear page[:more_link].replace_html "hide" end %> On Dec 10, 7:02 pm, "Ryan Bigg" <radarliste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Could you show us the exact code you''re using please? > > On Dec 11, 2007 1:31 PM, bigbanger <bigbanger...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Sorry, meant link_to_function, not link_to. > > > On Dec 10, 6:53 pm, bigbanger <bigbanger...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Anyone have any idea why I''m getting this error when using the block > > > form of the link_to helper in Rails 2.0.1? I''m essentially using the > > > exact same code as in the Rails doc example, but no luck. Any help > > > would be appreciated. > > -- > Ryan Bigghttp://www.frozenplague.net--~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
bigbanger
2007-Dec-11 03:23 UTC
Re: TypeError: Effect[effect_class] when using block form of link_to helper
I should have mentioned that ''user_listings'' is the id of a div defined on my page. On Dec 10, 7:21 pm, bigbanger <bigbanger...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Ryan, > > I''m using the following code in my .rhtml file: > > <%> link_to_function("show", nil, :id => "more_link", :class => > "expand_collapse") do |page| > page[:user_listings].visual_effect :toggle_appear > page[:more_link].replace_html "hide" > end > %> > > On Dec 10, 7:02 pm, "Ryan Bigg" <radarliste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Could you show us the exact code you''re using please? > > > On Dec 11, 2007 1:31 PM, bigbanger <bigbanger...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Sorry, meant link_to_function, not link_to. > > > > On Dec 10, 6:53 pm, bigbanger <bigbanger...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Anyone have any idea why I''m getting this error when using the block > > > > form of the link_to helper in Rails 2.0.1? I''m essentially using the > > > > exact same code as in the Rails doc example, but no luck. Any help > > > > would be appreciated. > > > -- > > Ryan Bigghttp://www.frozenplague.net--~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Ryan Bigg
2007-Dec-11 03:29 UTC
Re: TypeError: Effect[effect_class] when using block form of link_to helper
I was not aware you could use link_to_function as a block. It has something to do with your :toggle_appear custom function at a guess. link_to_function("show", nil, { :id => "more_link", :class => "expand_collapse" } ) On Dec 11, 2007 1:53 PM, bigbanger <bigbanger10s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I should have mentioned that ''user_listings'' is the id of a div > defined on my page. > > On Dec 10, 7:21 pm, bigbanger <bigbanger...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Ryan, > > > > I''m using the following code in my .rhtml file: > > > > <%> > link_to_function("show", nil, :id => "more_link", :class => > > "expand_collapse") do |page| > > page[:user_listings].visual_effect :toggle_appear > > page[:more_link].replace_html "hide" > > end > > %> > > > > On Dec 10, 7:02 pm, "Ryan Bigg" <radarliste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Could you show us the exact code you''re using please? > > > > > On Dec 11, 2007 1:31 PM, bigbanger <bigbanger...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > Sorry, meant link_to_function, not link_to. > > > > > > On Dec 10, 6:53 pm, bigbanger <bigbanger...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Anyone have any idea why I''m getting this error when using the > block > > > > > form of the link_to helper in Rails 2.0.1? I''m essentially using > the > > > > > exact same code as in the Rails doc example, but no luck. Any > help > > > > > would be appreciated. > > > > > -- > > > Ryan Bigghttp://www.frozenplague.net > > >-- Ryan Bigg http://www.frozenplague.net --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
bigbanger
2007-Dec-11 03:34 UTC
Re: TypeError: Effect[effect_class] when using block form of link_to helper
It''s in the Rails docs here: http://api.rubyonrails.org/classes/ActionView/Helpers/JavaScriptHelper.html#M001048. Specifically, this part: "The function argument can be omitted in favor of an update_page block, which evaluates to a string when the template is rendered (instead of making an Ajax request first)." Followed by an example similar to the one I posted. On Dec 10, 7:29 pm, "Ryan Bigg" <radarliste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I was not aware you could use link_to_function as a block. > > It has something to do with your :toggle_appear custom function at a guess. > > link_to_function("show", nil, { :id => "more_link", :class => > "expand_collapse" } ) > > On Dec 11, 2007 1:53 PM, bigbanger <bigbanger...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > I should have mentioned that ''user_listings'' is the id of a div > > defined on my page. > > > On Dec 10, 7:21 pm, bigbanger <bigbanger...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Ryan, > > > > I''m using the following code in my .rhtml file: > > > > <%> > > link_to_function("show", nil, :id => "more_link", :class => > > > "expand_collapse") do |page| > > > page[:user_listings].visual_effect :toggle_appear > > > page[:more_link].replace_html "hide" > > > end > > > %> > > > > On Dec 10, 7:02 pm, "Ryan Bigg" <radarliste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Could you show us the exact code you''re using please? > > > > > On Dec 11, 2007 1:31 PM, bigbanger <bigbanger...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > Sorry, meant link_to_function, not link_to. > > > > > > On Dec 10, 6:53 pm, bigbanger <bigbanger...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > Anyone have any idea why I''m getting this error when using the > > block > > > > > > form of the link_to helper in Rails 2.0.1? I''m essentially using > > the > > > > > > exact same code as in the Rails doc example, but no luck. Any > > help > > > > > > would be appreciated. > > > > > -- > > > > Ryan Bigghttp://www.frozenplague.net > > -- > Ryan Bigghttp://www.frozenplague.net--~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Ryan Bigg
2007-Dec-11 03:39 UTC
Re: TypeError: Effect[effect_class] when using block form of link_to helper
On Dec 11, 2007 2:04 PM, bigbanger <bigbanger10s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > It''s in the Rails docs here: > http://api.rubyonrails.org/classes/ActionView/Helpers/JavaScriptHelper.html#M001048 > . > Specifically, this part: > > "The function argument can be omitted in favor of an update_page > block, which evaluates to a string when the template is rendered > (instead of making an Ajax request first)." > > Followed by an example similar to the one I posted. > > On Dec 10, 7:29 pm, "Ryan Bigg" <radarliste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I was not aware you could use link_to_function as a block. > > > > It has something to do with your :toggle_appear custom function at a > guess. > > > > link_to_function("show", nil, { :id => "more_link", :class => > > "expand_collapse" } ) > > > > On Dec 11, 2007 1:53 PM, bigbanger <bigbanger...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > > > > > I should have mentioned that ''user_listings'' is the id of a div > > > defined on my page. > > > > > On Dec 10, 7:21 pm, bigbanger <bigbanger...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Ryan, > > > > > > I''m using the following code in my .rhtml file: > > > > > > <%> > > > link_to_function("show", nil, :id => "more_link", :class => > > > > "expand_collapse") do |page| > > > > page[:user_listings].visual_effect :toggle_appear > > > > page[:more_link].replace_html "hide" > > > > end > > > > %> > > > > > > On Dec 10, 7:02 pm, "Ryan Bigg" <radarliste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > Could you show us the exact code you''re using please? > > > > > > > On Dec 11, 2007 1:31 PM, bigbanger <bigbanger...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > Sorry, meant link_to_function, not link_to. > > > > > > > > On Dec 10, 6:53 pm, bigbanger <bigbanger...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > Anyone have any idea why I''m getting this error when using the > > > block > > > > > > > form of the link_to helper in Rails 2.0.1? I''m essentially > using > > > the > > > > > > > exact same code as in the Rails doc example, but no luck. Any > > > help > > > > > > > would be appreciated. > > > > > > > -- > > > > > Ryan Bigghttp://www.frozenplague.net > > > > -- > > Ryan Bigghttp://www.frozenplague.net > > >-- Ryan Bigg http://www.frozenplague.net --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Ryan Bigg
2007-Dec-11 03:40 UTC
Re: TypeError: Effect[effect_class] when using block form of link_to helper
* It has something to do with your :toggle_appear custom function at a guess. * AFAIK, there is no toggle_appear visual effect. It''s either toggle, or appear. Not both. On Dec 11, 2007 2:09 PM, Ryan Bigg <radarlistener-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Dec 11, 2007 2:04 PM, bigbanger <bigbanger10s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > It''s in the Rails docs here: http://api.rubyonrails.org/classes/ActionView/Helpers/JavaScriptHelper.html#M001048 > > . > > Specifically, this part: > > > > "The function argument can be omitted in favor of an update_page > > block, which evaluates to a string when the template is rendered > > (instead of making an Ajax request first)." > > > > Followed by an example similar to the one I posted. > > > > On Dec 10, 7:29 pm, "Ryan Bigg" <radarliste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I was not aware you could use link_to_function as a block. > > > > > > It has something to do with your :toggle_appear custom function at a > > guess. > > > > > > link_to_function("show", nil, { :id => "more_link", :class => > > > "expand_collapse" } ) > > > > > > On Dec 11, 2007 1:53 PM, bigbanger <bigbanger...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > > > > > > > > > > > I should have mentioned that ''user_listings'' is the id of a div > > > > defined on my page. > > > > > > > On Dec 10, 7:21 pm, bigbanger <bigbanger...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Ryan, > > > > > > > > I''m using the following code in my .rhtml file: > > > > > > > > <%> > > > > link_to_function("show", nil, :id => "more_link", :class => > > > > > "expand_collapse") do |page| > > > > > page[:user_listings].visual_effect :toggle_appear > > > > > page[:more_link].replace_html "hide" > > > > > end > > > > > %> > > > > > > > > On Dec 10, 7:02 pm, "Ryan Bigg" < radarliste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > Could you show us the exact code you''re using please? > > > > > > > > > On Dec 11, 2007 1:31 PM, bigbanger < bigbanger...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > wrote: > > > > > > > > > > Sorry, meant link_to_function, not link_to. > > > > > > > > > > On Dec 10, 6:53 pm, bigbanger < bigbanger...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > Anyone have any idea why I''m getting this error when using > > the > > > > block > > > > > > > > form of the link_to helper in Rails 2.0.1? I''m essentially > > using > > > > the > > > > > > > > exact same code as in the Rails doc example, but no luck. > > Any > > > > help > > > > > > > > would be appreciated. > > > > > > > > > -- > > > > > > Ryan Bigghttp://www.frozenplague.net > > > > > > -- > > > Ryan Bigghttp://www.frozenplague.net > > > > > > > > > -- > Ryan Bigg > http://www.frozenplague.net >-- Ryan Bigg http://www.frozenplague.net --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---