[Rails] link_to not putting action in output.

Isaac Devine isaac.devine at gmail.com
Sat Nov 13 04:02:05 GMT 2004


Hi,
with the following in my view.
   <% @sections.each do |@item| %>
   
   <%= link_to( @item.name ,  :action => "show", :id = @item.id ) %>
   <br />
   <% end %>

this  in my controller:
 
  def index
    # get actual sections
    @sections = Category.find_all ("issection = true")
  end 

  def show
     render_text "Showing " + @params["id"]
  end

it only outputs:

 <a href="/Section/1">Personal</a> 

so it is missing/ignoring the action.


More information about the Rails mailing list