kevgo/sections_rails — pull request #7 by alexdavid (2014-09-25 02:13:52+00:00)
Title: Make locals its own argument

@kevgo This is a proposed breaking change that would change
`= section 'foo', locals: { some: 'locals' }, partial: false`
to
`= section 'foo', { some: 'locals' }, partial: false`

and even nicer
`= section 'foo', locals: { some: 'locals', more: 'locals }`
to
`= section 'foo', some: 'locals', more: 'locals'`

After using this on multiple projects I've found that 99% of the time you are passing options to a section it is only the `locals` hash. Very rarely do I end up overriding the defaults for js/css name or turning off a partial.

I think this change makes sense because it adds 3 additional characters `{},` for the rare case where you are setting options and not locals, and immensely DRYs up the much more common case of passing locals without options.