mipearson / webpack-rails

Integrate webpack with your Ruby on Rails application
MIT License
543 stars 82 forks source link

Add compute_asset_path to Webpack::Rails::Helper #50

Closed duderman closed 8 years ago

duderman commented 8 years ago

This way you will be able to include your webpack assets like this:

javascript_include_tag 'bundle'
stylesheet_link_tag 'styles', media: 'all'
mipearson commented 8 years ago

I've thought about this change for a while, and I've decided not to merge it.

The reason why is that I the years I've been doing Rails, the most frequent problem I've had is with gems that override / extend existing Rails methods, as this does.

While the solution you've implemented here is quite benign and well written, I worry about conflicts / problems with future Rails versions / other gems, and the behaviour of using super in a helper has always bugged me (as helpers are mixins rather than subclasses)

mikegreiling commented 8 years ago

:(