Tag: rails

CloudFront CDN with Rails on Heroku

(or, Everything You Never Wanted To Know About Serving Webfonts From A CDN)

by Leon Miller-Out

TL;DR

If you're using a CDN to serve your static assets, your webfonts may break if you don't provide the correct CORS headers.

Update: be sure to turn...

Read more

New to Rails? Tracking Down Free-Floating Methods

By Jeffrey Konowitch

I was quite confused when I saw lines like this in controllers that I was working on:

class SessionController < ApplicationController
  def create
    user = User.find_by_email(params[:session][:email])
    password = params[:session][:password]
    if user && user.authenticate(password)
      sign_in user
      redirect_to user
    else
      redirect_to sign_in_path
    end
  end
end

Sign in user? Is it that easy? Do I just type what I want in plain text and the computer will know what I’m talking about? Well, no, of course not...but as someone new to the system, these sorts of conventions can be really confusing.

If you find yourself in this position, then you are probably coming from another language where class inheritance worked differently from Ruby. 

Read more

Building RailsBridges to New Communities

I walked up to the door, not quite knowing what to expect. I had rushed over there from my co-working space to participate in the RailsBridge Friday night install-fest. I buzzed and was let in.

RailsBridge started a few years ago in the wake of a...

Read more

Rails Bugmash Wrap Up

Singlebrook had a great Bugmash on Saturday. Six developers from Ithaca's small (but committed) Ruby community showed up to help move Rails 3.0 to a release candidate.
Everyone here was a first-time contributor, so we had a range of successes, from...

Read more