README.md in multiview-0.1.0 vs README.md in multiview-0.1.1

- old
+ new

@@ -72,16 +72,20 @@ # or # $multiview.redispatch(self, params[:controller], params[:action]) # if exist V3::XxxController, should to call V3::XxxController - # if not, should to call XxxController + # if not, should to call XxxController and prepend v3 views path + # when you just want to change something for views, you should not to redefined a controller for the version # $multiview.redispatch(self, params[:controller], params[:action], 'v3') end end ``` +Limitation: We only overwrite those action about already defined. + + ### Dispatch request by middleware ``` class MultiviewMiddleware def initialize(app) @@ -105,9 +109,14 @@ `config/application.rb` ``` config.middleware.insert_before Rails.application.routes, MultiviewMiddleware ``` + +Limitation: Depend Rails.application.routes.recognize_path, if you have some specific routes, might it cannot work. + +Anyway, it soloved that problem of `before_action` + ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.