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

Technology CommunityCategory: Ruby on RailsWhat Are Filters? And How Many Types Of Filters Are There In Ruby?
VietMX Staff asked 3 years ago
  • 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).