rails/rails — pull request #6834 by 0x000000 (2012-06-22 23:50:23+00:00)
Title: Sprockets should ignore :cache and :concat options

By some reasons, if someone will put these options in javascript_include_tag or stylesheet_link_tag it will
cause strange errors (when sprockets is enable for app). For me it took about work day to detect what exactly happened.

You can easy reproduce the error: just create new rails 3.2 app, generate simple controller with one action, specify root action in routes and add :cache => true, :cache => "foo" or :concat => "foo" to the end of any javascript_include_tag or stylesheet_link_tag helpers.

I am in the middle of migrating 2.3.x app to 3.2.x for my current project, so I have a lot of legacy :cache options. Unfortunately current exception is too hard to undersand situation for developers, without spending time to debugging Rails.

I suggest to ignore :cache and :concat options for js and css sprockets tag helpers (like I have done). Also I think that sprockets may detect these options and say something (for example it can show warning).

If something wrong in my commit let me know and I will fix it asap. Hope it will help someone.