neone familiar with Ruby?

Discussion in 'OT Technology' started by babygodzilla, May 30, 2007.

  1. babygodzilla

    babygodzilla I love rice

    Joined:
    Nov 5, 2001
    Messages:
    3,108
    Likes Received:
    0
    im trying to follow some tutorials on Ruby/Rails, so maybe I'm just missing something here, but...

    so say I have a table 'categories' in my table, and i have the controller setup with all the action definition (update, create, etc).

    say i want to edit my /public/index.rhtml to have a form to create new record for my 'categories' table, essentially just like /views/category/new.rhtml BUT i don't wanna route my index.rhtml to new.rhtml, rather i would like to know how to call the action "new" in category_controller.rb
    like if i just do

    Code:
     :action => 'create' 
    how would this index.rhtml know which 'create' im trying to call? it could be any create from any other class... rite?

    maybe im missing something and thinkin too much Java here...
     
    Last edited: May 30, 2007
  2. babygodzilla

    babygodzilla I love rice

    Joined:
    Nov 5, 2001
    Messages:
    3,108
    Likes Received:
    0
    bump. neone?
     
  3. Create

    Create :free at last:

    Joined:
    Jan 4, 2006
    Messages:
    8,043
    Likes Received:
    2
    uggggh, 1/2 an employee here
     
  4. babygodzilla

    babygodzilla I love rice

    Joined:
    Nov 5, 2001
    Messages:
    3,108
    Likes Received:
    0
    what? 1/2 an employee? what does that mean and what does that have to do with my question?
     
  5. SLED

    SLED build an idiot proof device and someone else will

    Joined:
    Sep 20, 2001
    Messages:
    28,118
    Likes Received:
    0
    Location:
    AZ, like a bauce!
    :controller => "categories", :action => "create"
     

Share This Page