deleting a record from table

Discussion in 'Ruby' started by Nick, Sep 24, 2005.

  1. Nick

    Nick Guest

    hey, me again

    i want to delete a record (product) from a table

    def list
    @products = Product.find_all
    end

    def show
    @product = Product.find(@params["id"])
    end

    def delete
    Product.delete(@params["id"])
    end

    the deleting works but then i get the error htere is no template, but i just
    want to delete it and then show all products again (list)
     
    Nick, Sep 24, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. André
    Replies:
    0
    Views:
    3,771
    André
    Jun 25, 2006
  2. Harry Barker
    Replies:
    2
    Views:
    537
    Alf P. Steinbach
    Apr 19, 2006
  3. wxl
    Replies:
    2
    Views:
    2,701
  4. André
    Replies:
    0
    Views:
    459
    André
    Jun 25, 2006
  5. crea
    Replies:
    2
    Views:
    427
    Nobody
    Dec 28, 2012
Loading...

Share This Page