Skip to content

Commit

Permalink
Merge pull request #1386 from namusyaka/fix-custom_condition
Browse files Browse the repository at this point in the history
Fix conditional expression of custom_conditions.
  • Loading branch information
ujifgc committed Aug 28, 2013
2 parents 71aaf21 + 5a42501 commit 681dfbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion padrino-core/lib/padrino-core/application/routing.rb
Expand Up @@ -49,7 +49,7 @@ def process_destination_path(path, env)
filter! :before
(@route.before_filters - settings.filters[:before]).each { |block| instance_eval(&block) }
@layout = path.route.use_layout if path.route.use_layout
@route.custom_conditions.each { |block| pass if block.bind(self).call == false } if @route.custom_conditions
@route.custom_conditions.each { |block| pass if block.bind(self).call == false }
halt_response = catch(:halt) { route_eval { @route.dest[self, @block_params] } }
@_response_buffer = halt_response.is_a?(Array) ? halt_response.last : halt_response
successful = true
Expand Down

0 comments on commit 681dfbf

Please sign in to comment.