Giter Club home page Giter Club logo

Comments (2)

noorcs avatar noorcs commented on June 10, 2024

OK so I just digged into the blueprint source code. And finally found out that it was all lower case softdeletes and I assigned value true to it. This way it worked. I had followed all the documentation and in this issue #39 for blueprint where I got the softDeletes word. So I had just followed that.

Now I got it with success. Here is my yaml file:

models:
    Salesperson:
        name: string:255
        f_name: string:255
        dob: date
        address: string:400
        softdeletes: true

controllers:
   Salesperson:
      index:
        query: all
        render: salesperson.index with:salespeople

    create:
        render: salesperson.create

    store:
        validate: name, f_name
        save: salesperson
        flash: salesperson.name
        redirect: salesperson.index

    show:
        render: salesperson.show with:salesperson

    edit:
        render: salesperson.edit with:salesperson

    update:
        validate: name, f_name
        update: salesperson
        flash: salesperson.name
        redirect: salesperson.index

    destroy:
        delete: salesperson
        redirect: salesperson.index

and here is the screenshot after execution:
Screenshot (438)

from blueprint.

jasonmccreary avatar jasonmccreary commented on June 10, 2024

Yes, Blueprint uses some shorthands which are technically invalid YAML syntax. These were for developer convenience.

To enable soft deletes for a model, you can simply write: softDeletes or softdeletes, or to write valid YAML: softDeletes: true or softdeletes: true

from blueprint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.