hi all,

i m also facing the same issue pls suggest me a solution?????

ActionController::RoutingError in copy_books#index
Showing app/views/copy_books/index.html.erb where line #32 raised:

29: <td><%=h copy_book.last_modified_by_user.username %></td>
30: <td><%=h copy_book.creation_time %></td>
31: <td><%=h copy_book.created_by_user.username %></td>
32: <td><%= link_to 'Show', copy_book %></td>
33: <td><%= link_to 'Edit', edit_copy_book_path(copy_book) %></td>
34: <td><%= link_to 'Destroy', copy_book, :confirm => 'Are you
sure?', :method => :delete %></td>
35: </tr>

thanks in advance..

Regards,
Arul

--
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 post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Wuyouduan at Dec 21, 2012 at 11:17 am
    Change
    Copy_book
    To
    Copy_book_path(copy_book)
    Sent from my BlackBerry® smartphone from Sinyal Bagus XL, Nyambung Teruuusss...!

    -----Original Message-----
    From: arulvel Perumal <lists@ruby-forum.com>
    Sender: rubyonrails-talk@googlegroups.com
    Date: Fri, 21 Dec 2012 12:05:14
    To: <rubyonrails-talk@googlegroups.com>
    Reply-To: rubyonrails-talk@googlegroups.com
    Subject: [Rails] Re: ActionController::RoutingError in Products#index

    hi all,

    i m also facing the same issue pls suggest me a solution?????

    ActionController::RoutingError in copy_books#index
    Showing app/views/copy_books/index.html.erb where line #32 raised:

    29: <td><%=h copy_book.last_modified_by_user.username %></td>
    30: <td><%=h copy_book.creation_time %></td>
    31: <td><%=h copy_book.created_by_user.username %></td>
    32: <td><%= link_to 'Show', copy_book %></td>
    33: <td><%= link_to 'Edit', edit_copy_book_path(copy_book) %></td>
    34: <td><%= link_to 'Destroy', copy_book, :confirm => 'Are you
    sure?', :method => :delete %></td>
    35: </tr>

    thanks in advance..

    Regards,
    Arul

    --
    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 post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.


    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Arul vel at Dec 21, 2012 at 10:20 pm
    No use ... still i m getting error :(

    On Wednesday, 11 February 2009 22:49:11 UTC+5:30, Ashok Bee wrote:

    Env: rails 2.2.2
    oracle 10g

    Have created a table and sequence
    --------------------------------
    create table products (
    id number not null,
    title varchar2(100) not null,
    description varchar2(255) not null,
    image_url varchar2(200) not null,
    price number(10,2) not null,
    primary key(id)
    )

    create sequence products_seq
    start with 1
    increment by 1
    nomaxvalue

    No errors displaying all the products using the default action index
    But when I put show/edit links , it errors out.
    Is this show link is not able to get the product id ?
    Please help.
    route.rb is good. I did look at rake route output.

    Error
    ------

    ActionController::RoutingError in Products#index

    Showing app/views/products/index.html.erb where line #17 raised:

    product_url failed to generate from {:action=>"show",
    :controller=>"products", :id=>#<Product id:
    #<BigDecimal:506ca20,'0.1E1',4(8)>, title: "Laptop", description:
    "Laptop - TODO", image_url: "http://localhost:3000/products/new", price:
    #<BigDecimal:506c958,'0.2E4',4(12)>>}, expected: {:action=>"show",
    :controller=>"products"}, diff: {:id=>#<Product id:
    #<BigDecimal:506c764,'0.1E1',4(8)>, title: "Laptop", description:
    "Laptop - TODO", image_url: "http://localhost:3000/products/new", price:
    #<BigDecimal:506c69c,'0.2E4',4(12)>>}

    Extracted source (around line #17):

    14: <td><%=h product.description %></td>
    15: <td><%=h product.image_url %></td>
    16: <td><%=h product.price %></td>
    17: <td><%= link_to 'Show', product %></td>
    18: <td><%= link_to 'Edit', edit_product_path(product) %></td>
    19: <td><%= link_to 'Destroy', product, :confirm => 'Are you sure?',
    :method => :delete %></td>
    20: </tr>

    RAILS_ROOT: C:/Documents and Settings/beesaa/Desktop/ruby/web/depot
    Application Trace | Framework Trace | Full Trace


    C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/routing/route_set.rb:377:in
    `raise_named_route_error'

    C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/routing/route_set.rb:341:in
    `generate'

    C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/url_rewriter.rb:208:in
    `rewrite_path'

    C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/url_rewriter.rb:187:in
    `rewrite_url'

    C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/url_rewriter.rb:165:in
    `rewrite'

    C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:626:in
    `url_for'

    C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/helpers/url_helper.rb:85:in
    `send'

    C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/helpers/url_helper.rb:85:in
    `url_for'
    (eval):16:in `product_path'
    app/views/products/index.html.erb:17
    app/views/products/index.html.erb:11:in `each'
    app/views/products/index.html.erb:11
    app/controllers/products_controller.rb:7:in `index'
    --
    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 post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/_9hSdNbV4I8J.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedDec 21, '12 at 11:05a
activeDec 21, '12 at 10:20p
posts3
users3
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2021 Grokbase