SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: CRUD code...

  1. #1
    SitePoint Guru Skyblaze's Avatar
    Join Date
    Jul 2005
    Location
    Italy
    Posts
    734
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CRUD code...

    In the book there is only the code for "Create" operations of the Story model (actually the form code). If i have to edit and delete those model objects which method (code) is the best? Can i generate a scaffold code to that model and take ispiration (or even the same code) from that to create a complete crud interface to my model?

  2. #2
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes.

  3. #3
    SitePoint Guru Skyblaze's Avatar
    Join Date
    Jul 2005
    Location
    Italy
    Posts
    734
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Fenrir2 View Post
    Yes.
    so in general controller scaffolding code is ok to copy for your own application model? Than you write your custom template right?

  4. #4
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you don't want to customize it, yes. You probably want to protect the create/update/destroy actions, for example.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •