rails_generators/rx_controller/templates/controller.as.erb in dima-restfulx-1.2.1 vs rails_generators/rx_controller/templates/controller.as.erb in dima-restfulx-1.2.2

- old
+ new

@@ -12,28 +12,26 @@ public static var models:Array = [<%= model_names %>]; /* Models */ public static var commands:Array = [<%= command_names %>]; /* Commands */ - public function <%= command_controller_name %>(enforcer:SingletonEnforcer, extraServices:Array, - defaultServiceId:int = -1) { + public function <%= command_controller_name %>(enforcer:SingletonEnforcer, + extraServices:Array, defaultServiceId:int = -1) { super(commands, models, extraServices, defaultServiceId); } public static function get instance():<%= command_controller_name %> { if (controller == null) initialize(); return controller; } - public static function initialize(extraServices:Array = null, defaultServiceId:int = -1, - airDatabaseName:String = null):void { + public static function initialize(extraServices:Array = null, + defaultServiceId:int = -1, airDatabaseName:String = null):void { if (!RxUtils.isEmpty(airDatabaseName)) Rx.airDatabaseName = airDatabaseName; - controller = new <%= command_controller_name %>(new SingletonEnforcer, extraServices, - defaultServiceId); + controller = new <%= command_controller_name %>(new SingletonEnforcer, + extraServices, defaultServiceId); Rx.sessionToken = Application.application.parameters.session_token; - if (Application.application.parameters.authenticity_token) { - Rx.defaultMetadata = { authenticity_token : Application.application.parameters.authenticity_token }; - } + Rx.authenticityToken = Application.application.parameters.authenticity_token; } } } class SingletonEnforcer {}