Home »
MCQs »
Ruby on Rails MCQs
Which method is used to specify a filter that is executed before to a controller action?
50. Which method is used to specify a filter that is executed before to a controller action?
- before_router
- before_action
- before_engine
- before_component
Answer: B) before_action
Explanation:
before_action method is used to specify a filter that is executed before a controller action.