Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danieleteti committed Oct 6, 2023
1 parent d935c3f commit 7cb33e8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 5 additions & 0 deletions sources/MVCFramework.ActiveRecord.pas
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,11 @@ implementation

function GetBackEndByConnection(aConnection: TFDConnection): string;
begin
if not aConnection.Connected then
begin
aConnection.Connected := True; {required to know the backend}
end;

case Ord(aConnection.RDBMSKind) of
0:
Exit(TMVCActiveRecordBackEnd.Unknown);
Expand Down
7 changes: 0 additions & 7 deletions sources/MVCFramework.View.Renderers.Mustache.pas
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ TMVCMustacheViewEngine = class(TMVCBaseViewEngine)
function RenderJSON(lViewEngine: TSynMustache; const JSON: RawUTF8; Partials: TSynMustachePartials;
Helpers: TSynMustacheHelpers; OnTranslate: TOnStringTranslate; EscapeInvert: boolean): RawUTF8; virtual;
public
class constructor Create;
class var CustomHelpers: TSynMustacheHelpers;
procedure Execute(const ViewName: string; const OutputStream: TStream); override;
constructor Create(const AEngine: TMVCEngine; const AWebContext: TWebContext;
const AViewModel: TMVCViewDataObject;
Expand Down Expand Up @@ -108,11 +106,6 @@ constructor TMVCMustacheViewEngine.Create(const AEngine: TMVCEngine;
LoadHelpers;
end;

class constructor TMVCMustacheViewEngine.Create;
begin
SetLength(CustomHelpers, 0);
end;

class destructor TMVCMustacheViewEngine.Destroy;
begin
fPartials.Free;
Expand Down

0 comments on commit 7cb33e8

Please sign in to comment.