SelfSolved

Record, recall, share

  • Log in
  • Sign up
  • About
  • What's New
  • Home
  • All Problems
  • SelfSolvers
148c663fd665c53518538e093ce3c2ab_thumb
2512 views

Registered: 2009-04-15

Update: about 11 hours ago

Problems: 22

Solutions: 21

References: 9

Problem views: 2512

Unsolved problem views: 143

Ken-ichi

kueda

User

Website: http://inaturalist.org

Location: Oakland, CA

I am the hand of doom. All code withers at my buggy touch.

Recent problems

Atom Feed

#101: detecting whether association loaded in ActiveRecord

Solved!
on August 18, 2010, 11:42 PM UTC   —   from   148c663fd665c53518538e093ce3c2ab_small kueda    ( 22 views )
Sometimes you want to check if something's loaded before you hit the db.
Tags: activerecord, Rails
1 solution | 0 references     Add Solution | Add Reference    

#96: rails tests not getting rolled back

Solved!
on May 19, 2010, 11:25 PM UTC   —   from   148c663fd665c53518538e093ce3c2ab_small kueda    ( 58 views )
There are a number of reasons this might happen: you have a test, it runs fine individually, but when you run rake test or rake test:units, it fails. This might be because one test is writing to the db and those changes aren't getting rolled back.
Tags: testings, tests, Rails
1 solution | 0 references     Add Solution | Add Reference    

#93: inspecting the state of a named_scope

Solved!
on May 10, 2010, 09:22 PM UTC   —   from   148c663fd665c53518538e093ce3c2ab_small kueda    ( 56 views )
I know named scopes are getting all changed around in Rails 3, but I figured this out a while ago, and then forgot it, came here to find my answer, and realized I never wrote it down. The problem is that when you're building complex chained scopes its often...
Tags: ruby, Rails
1 solution | 0 references     Add Solution | Add Reference    

#91: piping stderr and stdout

Solved!
on April 21, 2010, 05:58 PM UTC   —   from   148c663fd665c53518538e093ce3c2ab_small kueda    ( 73 views )
Well, I think I've already looked this up and forgotten it twice.
Tags: bash
1 solution | 0 references     Add Solution | Add Reference    

#89: view readline history in irb

Solved!
on April 01, 2010, 06:53 PM UTC   —   from   148c663fd665c53518538e093ce3c2ab_small kueda    ( 126 views )
I wanted to view a log of all the lines I'd written in an IRB session, but didn't see a simple equivalent of bash's "history" command.
Tags: irb, ruby, history
1 solution | 1 reference     Add Solution | Add Reference    
« Previous 1 2 3 4 5 Next »
  • About Us
  • Contact
  • Terms of Service
  • Privacy
  • Feedback
  • © 2009-2010 All rights reserved
  • Hosted on Linode