I am unable to get link_to_remote to take a code block. I''ve tried
copying the sample code from the docs into my .rhtml file but I get an
error... Effect[effect_class] is not a constructor.
Here''s what''s in my .rhtml file:
-----------------------------
<div id=''first_div''
style=''text-align:center;color:blue;'' >
asdjfs
asdflkjsdf asdjfs <br />
</div>
<%= link_to_function("Show me more",nil, :id =>
"more_link") do |page|
page[:first_div].visual_effect :toggle_blind
end %>
<br />
<%= link_to_function "Show Div", visual_effect(:toggle_blind,
"first_div") %>
------------------------------
the 2nd link_to_function call (without a code block) works fine. The
first, trying to pass a code block bombs. I tried :
<% link_to_function("Show me more",nil, :id =>
"more_link") do |page|
%>
page[:first_div].visual_effect :toggle_blind
<% end %>
figuring that maybe the format had to be similar to form_to but that
just printed out the page[:first_div] line.
Any help would be appreciated.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---