Skip to content

kofno/freshy_filter_chain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

We've renamed and moved

Find us here now

Freshy Filter Chains: Get yourself a freshy!

Freshy gives your ActionController filter chains more consistent inheritence behavior, regardless of the order the code is loaded.

Install

As a plugin:

./script/plugin install git://github.com/kofno/freshy_filter_chain.git

As a gem:

gem install freshy_filter_chain

And don't forget to add the gem to your rails config

config.gem "freshy_filter_chain"

Links

Why would I need this?

You may not. In general, the Rails community tends to treat plugins as extensions to Rails, and application code builds on Rails and the plugins. For this scenario, the default filter chain inheritence is fine.

Of course, the other use of plugins is to extend the application's functionality. When writing an extension, its quite common to re-open the application controller and update the filters. In this scenario, depending on how the code loads, extension filters may not be inherited by subclasses. This is exactly the scenario freshy was created to fix.

More information on inheritable attributes and filter chains

How it works

About

Makes filter chains plugin friendly

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages