Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 141. Added setting 'modelRequireInit' #181

Closed
wants to merge 1 commit into from

Conversation

gralen
Copy link
Contributor

@gralen gralen commented Aug 29, 2013

Set this config setting to true to require an init function in each of
your models. Super helpful for the initial wire-up of your wheels app to
the database.

Set this config setting to true to require an init function in each of
your models. Super helpful for the initial wire-up of your wheels app to
the database.
@perdjurner
Copy link
Contributor

Interesting change, can you tell me why it is helpful though?
I don't doubt that it is but I need to know why before accepting :)

(Closing until a reply comes in).

@perdjurner perdjurner closed this Jul 14, 2014
@gralen
Copy link
Contributor Author

gralen commented Jul 14, 2014

I use the 'modelRequireInit' mod mostly when I'm wiring up a new project, to explicitly make sure I've properly named the model cfc, and that it has been loaded by the framework.

If you have a model cfc which is spelled incorrectly, or not loaded for whatever reason, everything in wheels still works, but you go crazy trying to figure out why none of your object validations, or model init functions aren't being called.

In my case, most of the time I need a model cfc for each table anyways; controllers and views are more obvious when missing.

@perdjurner
Copy link
Contributor

Makes total sense, now that you mention it, it has happened to me too.

We are however using the "master" branch now, so if possible, can you go ahead and submit a pull request on that branch instead?

Thank you.

@gralen gralen deleted the modelRequireInit branch July 14, 2014 19:19
gitbook-com bot pushed a commit that referenced this pull request Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants