Permalink
Browse files

Fixed redirecting

  • Loading branch information...
1 parent 21ddbc7 commit 780c97cfbdeeb34fef0cf0aeb18ec6e8e1c9f355 @sebastianhoitz sebastianhoitz committed Apr 19, 2012
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
@@ -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
@@ -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

0 comments on commit 780c97c

Please sign in to comment.