Ruby on Rails Thursday, April 25, 2013

On 25 April 2013 10:32, cihad yildiz <lists@ruby-forum.com> wrote:
> I canged my link it is no longer image it is model part and

Please quote the previous reply and insert you reply into it at the
appropriate points so that it is easier to follow the thread.
Remember that this is a mailing list not a forum (though you may be
accessing it via a forum like interface).

>
> 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"}

Have you put an entry in routes.rb for the phones_feature_controller?

You did not answer my query as to whether you have worked right
through a good tutorial. If you had then I would have expected you to
know that this error is probably caused by something missing from
routes.rb.

Colin

--
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