Code Monkey home page Code Monkey logo

Comments (4)

neokoenig avatar neokoenig commented on June 12, 2024 1

IIRC when I wrote it, the aim was to follow wheels conventions of singular models and plural controllers.
It actually uses the inbuilt wheels functions to do this:

 loc.objectName          = lcase(trim(arguments.name));
  loc.objectNameSingular  = singularize(loc.objectName);
  loc.objectNamePlural    = pluralize(loc.objectName);
  loc.objectNameSingularC = capitalize(loc.objectNameSingular);
  loc.objectNamePluralC   = capitalize(loc.objectNamePlural);

So yeah, as intended :P

from cfwheels.

zainforbjs avatar zainforbjs commented on June 12, 2024

@tamdang501 I am not understanding what this issue is for.
It is working as expected and creates controller with plural name in both commands.

Wheels automatically pluralize the controller name every time even if we pass in a singular name.

What is the bug here? Please clarify

from cfwheels.

MvdO79 avatar MvdO79 commented on June 12, 2024

Describe the bug 2 command lines give a same result of creating a controller Users.cfc (with plural)

  1. wheels generate controller user
  2. wheels generate controller users

Expected behavior I don't know if this is a bug, but because by the conventions, the name controllers is in plural form while model is singular, I want to report this.

Hi @tamdang501, as @zainforbjs reported this is indeed default behaviour so no bug. It forces the naming convention. I think the issue can be closed? Thanks for reporting though!

from cfwheels.

MvdO79 avatar MvdO79 commented on June 12, 2024

Nice, and great, another problem solved 👍

from cfwheels.

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.