Filters
Before filter
# Filters are methods that are run "before", "after" a controller action.
before_action do
# runs for specified actions
only [:index, :world, :show] { increment(1) }
# runs for all actions
all { increment(1) }
endAfter filter
after_action do
# runs for specified actions
only [:index, :world] { increment(1) }
endLast updated