RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: ssaunier
Site: http://sebastien.saunier.me
I recently wrote an article about how to set up Angular in Rails, making Karma aware of the assets pipeline.
The magic is basically in a rake task:
sprockets = Rails.application.assets sprockets.append_path Rails.root.join("spec/karma") files = Rails.application.assets.find_asset("application_spec.js").to_a.map {|e| e.pathname.to_s }
with the karma configuration being:
files: [ APPLICATION_SPEC, 'app/assets/javascripts/angular/*/*.{coffee,js}', 'spec/javascripts/**/*_spec.{coffee,js}' ]
More info: http://sebastien.saunier.me/blog/2014/02/04/angular--rails-with-no-fuss.html
I recently wrote an article about how to set up Angular in Rails, making Karma aware of the assets pipeline.
The magic is basically in a rake task:
with the karma configuration being:
More info: http://sebastien.saunier.me/blog/2014/02/04/angular--rails-with-no-fuss.html