dvandersluis / amcharts.rb

Ruby/Rails wrapper for Amcharts
MIT License
12 stars 9 forks source link

content for JavaScript causing issues #6

Open cimtico opened 8 years ago

cimtico commented 8 years ago

I was wondering if there is a reason for the content for calling JavaScript. I use the same content name through all my app in a different form and this is causing issues on the page where I want to display a chart. It should ideally be prefixed with amchart or something to avoid clashes with other code bases

dvandersluis commented 8 years ago

Can you link to exactly where you're asking about?

cimtico commented 8 years ago

https://github.com/dvandersluis/amcharts.rb/blob/3244a69efbf77e48079468e35005da08d7d18a6e/app/helpers/amcharts/amcharts_helper.rb#L20

Ideally the content_for(:javascript) should be prepended with amcharts:

content_for(:amcharts_javascript ...) content_for(:amcharts_stylesheet ...)

This is a suggestion as an improvement, but I'll probably end up trying to use highcharts

dvandersluis commented 8 years ago

How do you use the content_for(:javascript) that conflicts?

cimtico commented 8 years ago

I set it so that I accumulate JavaScript into une script tag instead of multiple script tags

On Wed, Dec 23, 2015, 10:10 AM Daniel Vandersluis notifications@github.com wrote:

How do you use the content_for(:javascript) that conflicts?

— Reply to this email directly or view it on GitHub https://github.com/dvandersluis/amcharts.rb/issues/6#issuecomment-166933626 .