Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use filter in a block? #62

Open
phlegx opened this issue Jun 21, 2016 · 0 comments
Open

How to use filter in a block? #62

phlegx opened this issue Jun 21, 2016 · 0 comments

Comments

@phlegx
Copy link

phlegx commented Jun 21, 2016

Hi! I want to use filter in routes.rb in a block, so that I can filter only for some routes the locale:

Rails.application.routes.draw do
  filter :locale do
    get '/home', ...
    get '/help', ...
  end
end

So, the idea comes from gem route_translator where I can do:

Rails.application.routes.draw do
  localized do
    get '/home', ...
    get '/help', ...
  end
end

How can I do that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant