problem with link_to with :id field

my code is in .rhtml page     <%= link_to(image_tag( @plantStatusImage[i], :style=>" border:none" ,:height=>"35"), {:controller => 'device_group_details', :action => 'index', :id => item.plantid}, :post => true) %>

but, then i redirect to my nwxt page e.i   http://localhost:3000/device_group_details/index/002

and here my CSS and other javascript is not working. achually my desire link is http://localhost:3000/device_group_details/

So how can i solve this problem..what is my fault. ? and also why the CSS is not working ?

What version of rails are you working with? Why can't you do something like this?

    <%= link_to 'Description', device_group_details_path(item.plantid) %>

If all else fails, just specify the url manually:

    <%= link_to 'Description',   "/device_group_details/index/#{item.plantid}" %>

You have specified :id => ... in link_to so it is adding the id to the url. Try without :id =>

Colin