Posts in rails

Creating page-specific JavaScript and CSS in Rails

The Rails Asset Pipeline is a really great tool that improves performance by compressing and minifying assets, as well as compiling JS and CSS assets written in other languages, like CoffeeScript and SASS. When compiled, the files in your app/assets/javascripts/ folder get processed and minified into a single application.js file. In many cases, this is great - all of the views in your app have access to this file at all times, and it cuts down on the number of server requests made by the browser. But what happens if you want to dynamicaly scope JavaScript functions to specific pages in your app, like a function that only fires when an object view page is loaded?

written in css, front-end, javascript, rails Read on →

The People v Turbolinks

This week, as part of the Flatiron Students Present series I gave a presentation on the new features coming in Rails 5.. There’s some really intriguing stuff, highlighted by the Railsified websocket goodness of Action Cable. Nestled in there is the news of Turbolinks 3 Turbolinks 5, the latest version of a Rails feature I was totally unfamiliar with.

written in flatiron school, rails Read on →