`
clark1231
  • 浏览: 247541 次
  • 性别: Icon_minigender_1
  • 来自: 苏州
社区版块
存档分类
最新评论

Rails 3.0.7 - before_filter returns false, but action executed

阅读更多

Test Case Description:

 

Created vanilla rails 3.0.7 app with single controller containing 5 actions.

 

Each action was guarded by a 'before_filter ..., :only => '.

 

Each action and each filter 'puts '

 

The five filters did:

  1. always returned true
  2. always returned false
  3. always rendered 'action a'
  4. always redirected to 'action a'
  5. always raised an exception

Ran test case via Webrick on port 3001

Probed each action using 'curl http://localhost:3001/a/'

 

1, 3, 4, & 5 performed as expected

2 failed

 

See https://mikehoward@github.com/mikehoward/before_filter_but.git for test case

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics