jwhitley / requirejs-rails

RequireJS support for your Rails 3 or 4 application
MIT License
592 stars 202 forks source link

Fix for Sass::Rails 3.x #231

Closed merqlove closed 8 years ago

merqlove commented 9 years ago

210

merqlove commented 9 years ago

For now seems that it stable. Tests passed.

jcemer commented 9 years ago

Maybe a generic solution is better. What to think about a check like this:

if defined?(super)
  super_method.arity == 1 ? ? super(source) : super
else
  view_proxy.javascript_path(source, options)
end
merqlove commented 9 years ago

We can't do this, super_method in Ruby from 2.2+.

jcemer commented 9 years ago

Sorry, you are right. Looking to the code I don't see a case that the options are used. I think we could remove this params.

  def javascript_path(source)
     if defined?(super)
       super
     else
       view_proxy.javascript_path(source)
     end
  end
merqlove commented 9 years ago

I don't think so. Because this is what we use as helper. We cannot just delete it, this is View API of rjs-rails. :)

When you put requirejs_include_tag into the view, ActionView will use this method.

merqlove commented 8 years ago

This PR was did 5 month ago. Problem still actual. So?

carsomyr commented 8 years ago

@merqlove Sorry for letting this fall through the cracks. I'll issue a minor release tonight.

merqlove commented 8 years ago

@carsomyr Ok. Anyway Rails 3 not working with Sprockets 3, as someone mentioned in #247

carsomyr commented 8 years ago

@merqlove How does 78d43f2 look?

merqlove commented 8 years ago

@carsomyr Thanks, looks good!