Ruby on Rails Question:
Download Questions PDF

What are filters? and how many types of filters are there in ruby?

Ruby on Rails Interview Question
Ruby on Rails Interview Question

Answer:

Filters enable controllers to run shared pre and post
processing code for its actions.

Filter methods are macro-style, that is, they appear at the
top of your controller method, inside the class context,
before method definitions.

the below types of filters in ruby

before_filter,
after_filter,
prepend_before_filter,
prepend_after_filter,
around_filter

Download Ruby on Rails Interview Questions And Answers PDF

Previous QuestionNext Question
What is the difference between sessions and flash?what is ruby software and where and when it is usefull.
Is it usefull to data base developer, if yes...where?