Today, we're announcing the availability of a RubyGem that helps you quickly add Kendo UI to your Rails applications. In this post, I'll share an overview of the Gem, a quick tutorial on how to use it, and even a video of the new Gem in action.
$ rails new shoe_fodder $ cd shoe_fodder
Now, return to your console and run `bundle install.` Check that wall of text that Bundler sends your way to confirm that kendoui-rails (v0.0.5 at the time of this post) has been properly installed.
$ rails generate kendoui:install
/* app/assets/stylesheets/application.css */ *= require kendo/kendo.common.min *= require kendo/kendo.default.min
Ok, we have a switch for that. You no doubt noticed that the generator command used the 'default' theme upon installation. 'default' is, of course, the default, but you can use the '--theme' switch on the generator command to install another theme instead. Let's say I prefer BlueOpal:
$ rails generate kendoui:install -- theme=blueopal
Now that I've added Kendo UI into my rails app, I can do some quick scaffolding to see just how easy it is to use. I'll run the following in my terminal to generate a `shoe` model, including views and controller:
$ rails g scaffold shoe name price:decimal url replacement_mileage
$ rake db:migrate
Now, I'll navigate to my `shoes/new` view and add some Kendo goodness to the bottom of the page. In this case, an AutoComplete box that provides some assitance to the user when naming a new shoe:
$("#shoe_name").kendoAutoComplete(["Nike Free", "Saucony Series 7", "Vibram Five Fingers"]);
$ rails server
That's it! I'm rocking and rolling with Rails and Kendo UI from scratch in under three minutes. Or two minutes and twenty-seven seconds, to be exact. To show you just how quick this whole process can be--and prove that I didn't make that 2:27 figure up--I recorded myself going through the exact same steps as above. Check out the embedded video below, or watch it over on our YouTube channel (Note: be sure to watch in Fullscreen mode to get all of the detail.)
Screencast on YouTube
Brandon Satrom (@BrandonSatrom) is General Manager for Telerik Developer Tools and Platform. A longtime developer, Brandon is passionate about the web, mobile and is an aspiring maker and electronics enthusiast. Brandon has spoken at national, international and online events, and he loves hanging out with and learning from passionate designers and developers. He is the author of two books, the latest being "Building Polyfills" from O'Reilly. Brandon lives in Austin, TX with his wife, Sarah, and three sons, Benjamin, Jack and Matthew. He can be found on Twitter as @brandonsatrom.