Created
September 5, 2011 15:47
-
-
Save skeller1/1195296 to your computer and use it in GitHub Desktop.
routing of an extjs request
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# register middleware | |
config.use.middleware "ExtDirectRouter" "my/special/url" | |
#Calling the extjs router brings me the class of the controller as raw http json request or form_post | |
# more here http://rubyforge.org/docman/view.php/7639/9465/Ext.Direct-pre-alpha.pdf | |
#I can change the request uri in the controller and starts a new @app.call, than return the response | |
# example is here https://github.com/extjs/direct-rails/blob/master/lib/rack/remoting_provider.rb | |
# my controller should handle ext direct requests | |
# My controller works more like a service controller (domain driven design), not a standard resource controller | |
# so I have perhaps no defined route | |
# is this evil??? | |
class MyControllerService < ApplicationController | |
respond_to :ext_direct, :only => :index | |
def index | |
end | |
def get_status | |
end | |
end | |
# So I have to define the controller routes in the routes.rb, that's stupid | |
#MY QUESTION | |
# Are there any solutions to call a controller from a middleware without changing the request path info?? | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment