Rails

User has_many selfies

When creating a self referential join through another table, you must think of each entry as a new row even if two of the columns have the same number, but...

Jul 16, 2014 on Rails Ruby ActiveRecord  0

Polymorphism, Very Difficult? Or Suprisingly Simple?

I have heard of a polymorphic relationship before, and it was difficult to wrap my head around but it is actually very simple, as it has similarities with ...

Jul 18, 2014 on Polymorphism Rails Ruby  0

Polymorphic Controllers???

That's right, polymorphic controllers in Ruby on Rails...

Jul 21, 2014 on Polymorphism Rails Ruby Metaprogramming RegularExpressions  0

Javascript on Rails

The Javascript syntax is not nearly as fun as Ruby's but you must use it if you want to do anything dynamic on the client-side...

Jul 24, 2014 on Rails JavaScript Ajax  0

Keep Your Queries DRY with Eager Loading

The N + 1 query problem can be very tricky to deal with or even find because you won't be typically dealing with a lot of data in development mode...

Aug 01, 2014 on Rails Ruby Performance  0

You're so vain, you probably think this URL is about you.

In Ruby on Rails, when you want to make a particular route that has a parameter with spaces in it, you would typically get something like /regions/new%20york...

Aug 08, 2014 on Rails Ruby ActiveRecord Prettyurls  0

NullUser On Rails

The Null Object Pattern is a popular software pattern that can be very useful as it can get rid of many nil checks in Ruby...

Aug 11, 2014 on Rails Ruby Authentication SoftwarePatterns  0

Multiple Images with PaperClip

For any given web application, you probably want your users to be able to embed pictures or other types of multimedia for a richer experience...

Aug 14, 2014 on Rails Ruby Paperclip  0

Testing Paperclip with RSpec, Capybara, and Factory Girl

Recently I've been working on a project that allows users to upload photos or videos with the twist of using the same form and determining file type on the s...

Aug 22, 2014 on Rails Ruby TDD Paperclip  2

Send Email on Rails with ActionMailer

In Ruby on Rails, ActionMailer allows you to email users from your server with processed Ruby code, which can serve any number of uses...

Sep 03, 2014 on Rails Ruby Email  0