test_app/app/assets/javascripts/application.js in paloma-3.0.2 vs test_app/app/assets/javascripts/application.js in paloma-4.0.0

- old
+ new

@@ -14,80 +14,33 @@ //= require jquery_ujs //= require paloma //= require_tree . -// Will be manipulated by Paloma controllers. -window.called = []; - - - - // // -// Routes -// -// -var router = Paloma.router; - -router.resource('Foo', {controller: 'MyFoo'}); -router.redirect('Foo#new', {to: 'AnotherFoo#build'}); - - - - -// -// // Controllers // // + var Main = Paloma.controller('Main'); +Main.prototype.index = function(){}; +Main.prototype.otherAction = function(){}; +Main.prototype.prevent = function(){}; +Main.prototype.basic_params = function(){}; -Main.prototype.index = function(){ - window.called.push('Main#index'); -}; +var OtherMain = Paloma.controller('OtherMain'); +OtherMain.prototype.show = function(){}; +OtherMain.prototype.otherAction = function(){}; -var MyFoo = Paloma.controller('MyFoo'); -MyFoo.prototype.index = function(){ - window.called.push('MyFoo#index'); -}; +var Foos = Paloma.controller('Admin/Foos'); +Foos.prototype.index = function(){}; +Foos.prototype.otherAction = function(){}; -MyFoo.prototype.show = function(){ - window.called.push('MyFoo#show'); - window.parameter = this.params.parameter; -}; - - -MyFoo.prototype.edit = function(){ - window.called.push('MyFoo#edit'); -}; - - - -var AnotherFoo = Paloma.controller('AnotherFoo'); - -AnotherFoo.prototype.build = function(){ - window.called.push('AnotherFoo#build'); -}; - - - -var Bar = Paloma.controller('Admin/Bar'); - -Bar.prototype.show = function(){ - window.called.push('Admin/Bar#show'); -}; - - - - - -var MultipleNames = Paloma.controller('MultipleNames'); - -MultipleNames.prototype.index = function(){ - window.called.push('MultipleNames#index') -}; +var NotFoos = Paloma.controller('NotAdmin/Foos'); +NotFoos.prototype.show = function(){}; +NotFoos.prototype.otherAction = function(){}; \ No newline at end of file