[LRUG] Proffer and introducing constraints to Rails

mudge mudge at mudge.name
Mon Apr 2 02:23:44 PDT 2012


We had a brief look at decent_exposure but found that it focussed on
promoting the pattern of using `helper_method` to expose functionality
to views from the controller (something the list discussed recently
when I raised the issue of before_filter abuse in Rails).

Our goal was simpler in a way: stop Rails passing instance variables
to your views; the `proffer` API came about almost as a side-effect of
that.

On Mon, Apr 2, 2012 at 10:09 AM, Tom Stuart <tom at experthuman.com> wrote:
> On 2 Apr 2012, at 09:59, James Hunt wrote:
>> There is more information on GitHub but the summary is that it stops Action
>> Controller from exposing all defined instance variables to your views by default
>> and instead provides a way to explicitly declare your dependencies instead.
>
> This reminds me of https://github.com/voxdolo/decent_exposure. Had you previously tried that and found it inadequate / stupid / insufficiently strict?
>
> Cheers,
> -Tom
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org



More information about the Chat mailing list