Ruby on Rails Thursday, April 25, 2013

I canged my link it is no longer image it is model part and

phone index.html.erb
<% @phones.each do |phone| %>
<tr>
<td><%=image_tag(phone.image, :class => 'list_image')%></td>
<td><%= phone.brand %></td>
<td><%= link_to "#{phone.model}", :controller =>
:phones_feature_controller, :action => :index,:id => :phone.id %></td>
<td><%= phone.ops %></td>
<td><%= phone.price %></td>

</tr>
<% end %>

and phones_feature_controller

def index
@phones = Phone.all

respond_to do |format|
format.html # index.html.erb
format.json { render json: @phones }
end
end

eror is :No route matches {:controller=>"phones_feature_controller"}

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment