Announcing Winners of Free Tickets for Intro to Ruby Course

November 30th, 2010 by

Almost a month ago we made two exciting announcements – the first was that SmartLogic will be hosting an Intro to Ruby1 course on December 10-11, 2010. The second announcement was that we would be giving away one free ticket to a local college/university student and another free ticket away to the co/founder of a local startup company.

Well, we upped the ante and have decided to give away a total of FOUR free tickets. We received a total of 40 submissions and were really encouraged by all of the enthusiastic responses. Without further ado:

Read the rest of this entry »

Testing AJAX with Test::Unit

October 8th, 2010 by

If you want real end-to-end testing of a page with functioning AJAX, use Selenium. But I was interested in doing just a bit of JS speccing to make sure that the AJAX routes I called worked and that the data that came back fit the JS that I had written.

So, I figured with a little capybara and a little therubyracer, I could test my javascript with real route calls. Let’s check it out.
Read the rest of this entry »

Nick’s Highlights from Windy City Rails

September 11th, 2010 by

I attended and spoke at Windy City Rails. I tried to take more notes this time. Out of 6 talks an lightning talks, I have ~500 lines of notes. Enjoy!.
Read the rest of this entry »

Nick’s Highlights from Ruby Hoedown

September 7th, 2010 by

I attended and spoke at Ruby Hoedown 2010. Below are my notes from the conference.

Read the rest of this entry »

Nick’s Highlights from Lone Star Ruby Conf

August 30th, 2010 by

I recently attended and spoke at Lone Star Ruby Conf 2010. I took notes on anything technical I thought would be useful to bring back and use day-to-day at SmartLogic. Keep in mind there were many excellent talks that aren’t on this list, it’s just a snippet of things I wanted to look into more.

Read the rest of this entry »

BohConf 2010: A Retrospective

June 22nd, 2010 by
BohConf 2010

BohConf 2010

After an exhilarating week of hosting the Rails community in Baltimore for RailsConf, I thought it’d be helpful to share the lessons that we learned organizing BohConf.

Community Code Drives Rock!

We had a strong showing of open source authors including Wayne Seguin, Gregory Brown, Aslak Hellesøy, Chris Eppstein, Nick Gauthier and various members of Thoughtbot crew. Wayne (rvm) and Greg (prawn) in particular raved about the contributions they were able to make to their projects. Hey, I even got a new release of Timecop out thanks to a patch from Larry Marburger. Other well known OSS authors that dropped by included Rick Olson, Patrick Peak, and Josh Nichols. If you were there and we missed you, please drop us a line in the comments!

Read the rest of this entry »

Setting Up Ubuntu 9.10 for Ruby On Rails Development

February 1st, 2010 by

This is a document I put together at the beginning of 2010 while building yet another Ubuntu VM, digging through our internal documentation to try and find out what I needed. We’ve got the answers, and generally Ruby, Rails, and Ubuntu are pretty good about telling you how to install tools if you don’t have them yet.

But the answers are spread out and distributed randomly. Plus, I can only see “The program ‘______’ is currently not installed. You can install it by typing: sudo apt-get install ______” so many times before I lose interest and put off the task.

Read the rest of this entry »

DRY up your Controllers with find_or_redirect

October 23rd, 2009 by

Do you do this:

  class ModelsController < ApplicationController
    before_filter :find_model
    def show
    end
 
    def destroy
      @model.destroy
    end
 
    private
 
    def find_model
      @model = Model.find_by_id(params[:id])
      unless @model
        redirect_to :action => :index
        flash[:error] = "Invalid model id"
        return false
      end
    end
  end

in every controller? Gets repetitive doesn’t it?
Read the rest of this entry »

Including external .rake files in your project’s Rakefile — keep your rake tasks organized!

May 26th, 2009 by

Perhaps you have a non-Rails project (let’s say it’s in ruby and maybe some other languages, too) and you use Rake tasks to automate some of the dirty work. So you’ve got a bunch of methods that you wish to keep neatly sorted into .rake files in some dir’s (probably a sub folder of lib like lib/tasks) and a single Rakefile in your project’s root directory. Including those external .rake files in your project’s Rakefile via require statements won’t work :

require 'lib/some_rake_file' # or require 'lib/some_rake_file.rake'

=> rake aborted!
no such file to load — /home/your_project/lib/some_rake_file

Rake assumes the ‘require’d files end in .rb, so it won’t find your .rake files. You need to import rake files:

import 'lib/some_rake_file'

This is fine for individual files, but I wanted to include all files that end in .rake in my tasks dir:

Dir.glob('tasks/*.rake').each { |r| import r }

…and there you go. While dead simple, this exemplifies an important distinction between require and import that I found to be poorly documented. Keep your rake tasks organized and remember that Rake isn’t just for rails apps!

Find the Unique Sessions for a Rails Application

May 4th, 2009 by

Today we’re going to look at how to find the number of unique sessions over a specific time frame for a rails application. We’ll be using the slow-actions gem.

Read the rest of this entry »

  • You are currently browsing the archives for the Ruby on Rails category.


escort Girls In Moskow.