Created
February 4, 2016 00:29
-
-
Save gongo/876f660844cd17b588ac to your computer and use it in GitHub Desktop.
Add `default` DSL to placeholder https://github.com/jnicklas/turnip/pull/173
This file contains hidden or 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
placeholder :user_name do | |
match /admin: (.*)/ do |user_name| | |
User.find_by!(name: user_name, role: :admin) | |
end | |
default do |user_name| | |
User.find_by!(name: user_name) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
default
という名前にするなら順番が逆でも動いて欲しい感じがありますね