May 15, 2015 by Daniel P. Clark

Speed Up Your Rails Views By Deferring Changes

Nobody likes a slow website.  And the more notifications and content privileges you calculate beforehand the longer your web requests take to load and send.  The most efficient way to change this is to make as much of your site static as you can and defer your changes to after the page has fully loaded. …

Continue Reading »

March 15, 2015 by Daniel P. Clark

More UJS fun with Accordion Content

I’ve already covered loading Bootstrap modals directly from the server on Rails with UJS in this blog post: Discovering UJS with AJAX.  Now I’d like to continue from there and demonstrate Bootstrap’s accordion feature with content loaded directly from the server.  We’ll use a personal profile example where you click on an expansion link to…

Continue Reading »

February 1, 2015 by Daniel P. Clark

Discovering UJS with AJAX

Having worked with Rails a while I’d heard of UJS as being Unobtrusive JavaScript.  I had thought that it was simply a pattern of writing your JavaScript in a JS file to be called via a method call rather than inline JavaScript within elements in the view.  So I had definitely overlooked the benefit of…

Continue Reading »