Open samarthsikotara opened 9 years ago
Does this help? https://github.com/meleyal/backbone-on-rails/issues/43
@meleyal I have added my coffee script files to my rails engine manually and set path in application.js. I t's working. however I am still finding out Is there any proper way to install backbone directly to my rails engine?
There's an old pull request that needs some tests, I'd be happy to integrate this if you can take a look?
I have already tried this pull request but It creates nil_class.js.coffee in my assets. I couldn't able to look an engine name cpanel.js.coffee file.
@samarthsikotara
as of 1.2.0.0 ( https://github.com/meleyal/backbone-on-rails/pull/70 ) allows you to name the app what you wish.
For the shared engines part -- I know in Rails 4, I have to add requires in my engine's main ruby file... this is true for everything. (such as jquery-rails)
ROOT/lib/shared_assets.rb
require "shared_assets/engine"
require 'coffee-rails'
require 'sass-rails'
require 'bootstrap-sass'
require 'jquery-rails'
require 'backbone-on-rails'
require 'requirejs-rails'
module SharedAssets
end
do a bundle on the main app and bundle exec rails g backbone:scaffold Home --app=App
I have 2 engines in rails application. I want to add backbone in 1 engine. how to do it? If I run rails g backbone:install
it will not add backbone to my engine.