I want my @current_user in my model: A Lesson in Abstraction
This method was adapted from this blog post. So, you are creating a thing (record) or maybe you are updating it. You’ve added created_by and updated_by fields to your model,…
Engineering Success with Automated Testing
Posts related to Ruby, Rails, other programming topics. Highly technical.
This method was adapted from this blog post. So, you are creating a thing (record) or maybe you are updating it. You’ve added created_by and updated_by fields to your model,…
Quick demonstration of public, private, and protected methods.
Reads a file line by line into an array my_stuff my_stuff = [] file = File.new(“config/random_categories.txt”, “r”) while (line = file.gets) my_stuff << line.chop! end file.close my_stuff Pass file to…
Note that when setting the Rails environment you have to pass it differently in different cases. For rake, set RAILS_ENV= as part of the command line options. rake db:migrate RAILS_ENV=test…
WARNING: These instructions are for Facebook version 1 (not Facebooker2). Since last year, I have moved toward using a different gem for this due to Facebooker’s lack of documentation. Working…
Getting RSS feeds to work right; Firefox error message “This XML file does not appear to have any style information associated with it. The document tree is shown below.” I…
Very quick rdebug primer for using the debugger in Mongrel. <h1>Setting Up your Environment for Debugging</h1> gem install ruby-debug If you’re in textmate go to Bundles > Bundle Editor >…
Quick cheet-sheet to help you remember when to type a singular entity or a plural.
Web Developer — adds a robust set of tools to peek under the hood. Adds a toolbar to your windows to let you do things like disable Javascript, cookies, css,…