This app will demonstrate using ember-bootstrap-rails
The application will be built almost entirely using the bootstrap helpers.
The top bar will contain a menu where you can navigate to each page, demonstrating the various bootstrap Views and Handlebars helpers.
Please help out with this demo app and the ember-bootstrap-rails library!
Fork it, fix/improve it and make a pull request :)
Thanks!
- Adjust application.rb
We only need the following!
require "action_controller/railtie"
require "action_mailer/railtie"
require "sprockets/railtie"
We add some Sweet routing macros using a routing.rb
initializer. Sweet!
Note: We could also use the sweet_routing gem
- Add route to 'root' page at 'application#index'
- Adjust application layout file (empty body - will be filled by Ember.js)
- Add index.html file that contains script with app initialization
For Rails 4:
Remove config/initializers/wrap_parameters.rb
Adjust environment files.
Remove whiny_nils
, config.eager_load = false
and add config.ember.variant = :development
We like ember with coffee ;)
rails g ember:bootstrap -g --javascript-engine coffee
Change filename of <my_app>.js.coffee
to just app.js.coffee
.
Convert //= require
to #= require
in app.js.coffee
Change name of ember Application namespace :)
MyApp = Ember.Application.create();
becomes simply window.App = Ember.Application.create()
To setup testing we will use Konacha and Sinon.
To see Konacha live in action, check out this video. AWESOME!
We use the ember-konacha-rails gem.
We also have RubyJS via rubyjs-rails. We wanna make our coffee even sweeter, yet stronger!
To make it all extra delicious, we add slim for templating the index page. We also spice up with Emblem js via emblem-rails to replace the default Handlebars templating on the Ember side ;)
Nice!
Options first!
rails g ember_konacha:install --help
Let's install Konacha testing environment!
rails g ember_konacha:install --guide
To be continued...