Skip to content

Commit

Permalink
- key [TEMPLATEPATH] doesn't exist when doing orm operations. This wa…
Browse files Browse the repository at this point in the history
…s a typo, it should have been `templatesPath`
  • Loading branch information
lmajano committed Oct 16, 2024
1 parent 1432382 commit fe6acf9
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- key [TEMPLATEPATH] doesn't exist when doing orm operations. This was a typo, it should have been `templatesPath`

## [7.4.0] - 2024-03-20

### Fixed
Expand Down
9 changes: 5 additions & 4 deletions commands/coldbox/create/orm-crud.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ component extends="coldbox-cli.models.BaseCommand" {
boolean tests = true,
testsDirectory = "tests/specs/integration"
){

// This will make each directory canonical and absolute
arguments.handlersDirectory = resolvePath( arguments.handlersDirectory );
arguments.viewsDirectory = resolvePath( arguments.viewsDirectory );
Expand Down Expand Up @@ -71,7 +72,7 @@ component extends="coldbox-cli.models.BaseCommand" {
// ********************** generate handler ************************************//

// Read Handler Content
var hContent = fileRead( "#variables.settings.templatePath#/crud/HandlerContent.txt" );
var hContent = fileRead( "#variables.settings.templatesPath#/crud/HandlerContent.txt" );
// Token replacement
hContent = replaceNoCase(
hContent,
Expand Down Expand Up @@ -108,7 +109,7 @@ component extends="coldbox-cli.models.BaseCommand" {
);
var views = [ "edit", "editor", "new" ];
for ( var thisView in views ) {
var vContent = fileRead( "#variables.settings.templatePath#/crud/#thisView#.txt" );
var vContent = fileRead( "#variables.settings.templatesPath#/crud/#thisView#.txt" );
vContent = replaceNoCase(
vContent,
"|entity|",
Expand All @@ -132,7 +133,7 @@ component extends="coldbox-cli.models.BaseCommand" {

// Build table output for index
savecontent variable="local.tableData" {
include "#variables.settings.templatePath#/crud/table.cfm";
include "#variables.settings.templatesPath#/crud/table.cfm";
}
tableData = replaceNoCase(
tableData,
Expand All @@ -147,7 +148,7 @@ component extends="coldbox-cli.models.BaseCommand" {
"all"
);
// index data
var vContent = fileRead( "#variables.settings.templatePath#/crud/index.txt" );
var vContent = fileRead( "#variables.settings.templatesPath#/crud/index.txt" );
vContent = replaceNoCase(
vContent,
"|entity|",
Expand Down
2 changes: 1 addition & 1 deletion commands/coldbox/create/orm-event-handler.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ component extends="coldbox-cli.models.BaseCommand" {
arguments.name = replace( arguments.name, ".", "/", "all" );

// Read in Template
var modelContent = fileRead( "#variables.settings.templatePath#/orm/ORMEventHandler.txt" );
var modelContent = fileRead( "#variables.settings.templatesPath#/orm/ORMEventHandler.txt" );
// Write out the model
var modelPath = "#directory#/#arguments.name#.cfc";
// Create dir if it doesn't exist
Expand Down
4 changes: 2 additions & 2 deletions commands/coldbox/create/orm-virtual-service.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ component extends="coldbox-cli.models.BaseCommand" {
}

// Read in Template
var modelContent = fileRead( "#variables.settings.templatePath#/orm/VirtualEntityService.txt" );
var modelTestContent = fileRead( "#variables.settings.templatePath#/testing/ModelBDDContent.txt" );
var modelContent = fileRead( "#variables.settings.templatesPath#/orm/VirtualEntityService.txt" );
var modelTestContent = fileRead( "#variables.settings.templatesPath#/testing/ModelBDDContent.txt" );

// Query cache Region
if ( !len( arguments.cacheRegion ) ) {
Expand Down
2 changes: 1 addition & 1 deletion models/BaseCommand.cfc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Base Command Handler
*/
component {
component accessors="true" {

// DI
property name="utility" inject="utility@coldbox-cli";
Expand Down

0 comments on commit fe6acf9

Please sign in to comment.