Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed redirecting

  • Loading branch information...
commit 780c97cfbdeeb34fef0cf0aeb18ec6e8e1c9f355 1 parent 21ddbc7
@sebastianhoitz sebastianhoitz authored
View
5 lib/tower/controller/redirecting.js
@@ -28,11 +28,6 @@ Tower.Controller.Redirecting = {
}).call(this);
}
url || (url = "/");
- if (options.action === 'index') {
- url = "/custom";
- } else {
- url = "/custom/1";
- }
this.response.redirect(url);
} catch (error) {
console.log(error);
View
1  lib/tower/http/agent.js
@@ -1,3 +1,4 @@
+// Generated by CoffeeScript 1.3.1
Tower.HTTP.Agent = (function() {
View
1  lib/tower/http/cookies.js
@@ -1,3 +1,4 @@
+// Generated by CoffeeScript 1.3.1
Tower.HTTP.Cookies = (function() {
View
1  lib/tower/http/param.js
@@ -1,3 +1,4 @@
+// Generated by CoffeeScript 1.3.1
Tower.HTTP.Param = (function() {
View
1  lib/tower/http/param/array.js
@@ -1,3 +1,4 @@
+// Generated by CoffeeScript 1.3.1
var __hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };
View
1  lib/tower/http/param/date.js
@@ -1,3 +1,4 @@
+// Generated by CoffeeScript 1.3.1
var __hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };
View
1  lib/tower/http/param/number.js
@@ -1,3 +1,4 @@
+// Generated by CoffeeScript 1.3.1
var __hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };
View
1  lib/tower/http/param/order.js
@@ -1,3 +1,4 @@
+// Generated by CoffeeScript 1.3.1
var __hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };
View
1  lib/tower/http/param/string.js
@@ -1,3 +1,4 @@
+// Generated by CoffeeScript 1.3.1
var __hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };
View
1  lib/tower/http/request.js
@@ -1,3 +1,4 @@
+// Generated by CoffeeScript 1.3.1
Tower.HTTP.Request = (function() {
View
1  lib/tower/http/response.js
@@ -1,3 +1,4 @@
+// Generated by CoffeeScript 1.3.1
Tower.HTTP.Response = (function() {
View
1  lib/tower/http/route.js
@@ -1,3 +1,4 @@
+// Generated by CoffeeScript 1.3.1
var __hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };
View
1  lib/tower/http/route/dsl.js
@@ -1,3 +1,4 @@
+// Generated by CoffeeScript 1.3.1
Tower.HTTP.Route.DSL = (function() {
View
1  lib/tower/http/route/polymorphicUrls.js
@@ -1,3 +1,4 @@
+// Generated by CoffeeScript 1.3.1
Tower.HTTP.Route.PolymorphicUrls = {
ClassMethods: {
View
1  lib/tower/http/route/urls.js
@@ -1,3 +1,4 @@
+// Generated by CoffeeScript 1.3.1
Tower.HTTP.Route.Urls = {
ClassMethods: {
View
1  lib/tower/http/url.js
@@ -1,3 +1,4 @@
+// Generated by CoffeeScript 1.3.1
Tower.HTTP.Url = (function() {
View
8 src/tower/controller/redirecting.coffee
@@ -17,13 +17,7 @@ Tower.Controller.Redirecting =
when "edit", "show"
Tower.urlFor(@resource, action: options.action)
url ||= "/"
-
- #console.log @response.redirect.toString()
- if options.action == 'index'
- url = "/custom"
- else
- url = "/custom/1"
-
+
@response.redirect url
catch error
console.log error
View
2  test/example/app/models/user.coffee
@@ -24,4 +24,4 @@ class App.User extends Tower.Model
@timestamps()
class App.Admin extends App.User
- @scope "subclassNamedScope", likes: ">": 0
+ @scope "subclassNamedScope", likes: ">": 0
Please sign in to comment.
Something went wrong with that request. Please try again.