1.

What Are Filters? And How Many Types Of Filters Are There In Ruby ?

Answer»

Filters are methods that are run before, after or "around" a CONTROLLER action.

Filters are inherited, so if you set a filter on ApplicationController, it will be run on EVERY controller in your application.

Filter can take ONE of three FORMS: method reference (symbol), external class, or INLINE method (proc).

after_filter append_after_filter append_around_filter append_before_filter around_filter before_filter filter_chain prepend_after_filter prepend_around_filter prepend_before_filter skip_after_filter skip_before_filter skip_filter

Filters are methods that are run before, after or "around" a controller action.

Filters are inherited, so if you set a filter on ApplicationController, it will be run on every controller in your application.

Filter can take one of three forms: method reference (symbol), external class, or inline method (proc).



Discussion

No Comment Found