Site Search
101–110 of 194 results for ruby on rails
-
How To Create PDFs in Rails
November 20, 2013 - We worked with The Bill of Rights Institute recently to create an interactive digital course for American History teachers. One of the interesting challenges, among many, stemmed from the fact that the project had large sections of readable content. One of our goals was to…
-
2014 Conferences
January 10, 2014 - Viget has always funded and supported conference attendance for all staff. The idea is to support the professional growth of all our staff by ensuring a chance to share hard-earned knowledge in a public forum, learn even more, and meet some talented peers.But how can we cut…
-
Create a Github Repo from the Command Line
January 29, 2014 - As a developer, a majority of my day is spent at my computer cranking away on various things. Inspired by a RubyRogues episode (Sharpening Tools with Ben Orenstein), I’ve taken an interest lately in making my day-to-day tasks more efficient, scratching the itches that are…
-
Make Remote Files Local with Ruby Tempfile
February 27, 2014 - We live in the age of remote resources. It's pretty rare to store uploaded files on the same machine as your server process. File storage these days is almost completely remote, and for very good reasons. Using file storage services like S3 is awesome, but not having your…
-
Writing Conversion Methods in Rails
March 4, 2014 - As developers, we're occasionally tasked with maintaining software that we weren't directly involved in crafting. We don't have extensive knowledge of the domain, yet we can read the code, (hopefully) understand what's there, and modify it. We'll even attempt…
-
How I Used ActiveRecord#serialize with a Custom Data Type
April 30, 2014 - In case you're unfamiliar, ActiveRecord#serialize is a method that allows an attribute to be saved in the database and later retrieved as an object. The common example given involves storing a user's preferences like so:
-
Sharing Data Between Sass and JavaScript with JSON
June 10, 2014 - Traditionally stylesheets describe the majority of the presentation layer for a website. However as JavaScript becomes necessary to present information in a stylistically consistent way, it becomes troublesome to keep these mediums in sync. Data visualizations and break-point…
-
Migrating Existing Data Around Destructive Rails Migrations
February 25, 2014 - The Background Recently, we had to restructure a complicated piece of a pretty huge Ruby on Rails application. This resulted in significant changes to the model landscape, including the removal of a model that was rendered obsolete. While this model was going to go away, we…
-
Seven Useful ActiveModel Validators
July 29, 2014 - Custom ActiveModel::Validators are an easy way to validate individual attributes on your Rails models. All that's required is a Ruby class that inherits from ActiveModel::EachValidator and implements a validate_each method that takes three arguments: record,…
-
Simple Benchmarking in Ruby
August 11, 2014 - While working on a new feature, I ran into a problem where the response time for a single page was approaching 30 seconds. Each request made an API call, so I first ruled that out as the culprit by logging the response time for every external request. I then turned my attention…