Hello. I am trying to create a dynamic menu. The problem is that I am
unsure how to render ruby code in the controller class. Thanks for any
help.
Here is the standard layout
<%= link_to_remote( image_tag(“graphics/
select01.gif”, :alt=>‘Programming’, :size=>‘100x20’, :border=>0),
:update => “select01_div”,
:url =>{ :action => :select01_action }) %>
In the controller, when select01_action is called
def select01_action
<%= link_to image_tag(“graphics/
select01a.gif”, :alt=>‘Programming’, :size=>‘100x20’, :border=>0),
:controller
=> ‘videos’, :action => ‘selectaction’%>
end
This produces the error below. I would like to render <%= link_to
image_tag(“graphics/
select01a.gif”, :alt=>‘Programming’, :size=>‘100x20’, :border=>0),
:controller
=> ‘videos’, :action => ‘selectaction’%>, but how do I do that?
app/controllers/videos_controller.rb:64: syntax error
<%= link_to image_tag(“graphics/
select01a.gif”, :alt=>‘Programming’, :size=>‘100x20’, :border=>0),
:controller
=> ‘videos’, :action => ‘selectaction’%>
^