# OPTIMIZE: I think we can do a LOT for optimize this.
def create
added_counter = 0
...
<table class="charge">
<tr>
<td colspan="100%" class="mainHeader"><%=@label.label%></td>
...
Ruby Iterating through a nested ...
by mwilliams,
January 31, 2008 18:21,
3 refactorings, tagged with rails, ruby, Ruby on Rails, view, table, hash, nested hash, iterator, iterate
Good afternoon. I have a n...
def planned_percent_complete
if self.planned_complete_in_dollars != nil
(( self.planned_complete_in_dollars.to_f / self.task.budget.to_f ) * 100).round(2)
...
Ruby Same methods, different Act...
I know there has to be a "r...
def self.find_matches(params)
matches = self.find(:all)
...
Ruby Filtering Method Needs to b...
by bradly.myopenid.com,
January 04, 2008 16:38,
No refactoring, tagged with rails, ruby, filtering, wet
I know it looks long, but i...
module Enumerable
def to_a(n = nil)
result = []
...
Ruby Enumerable#to_a with termin...
by Ben Kudria,
December 24, 2007 23:36,
No refactoring, tagged with ruby, enumerable, finite, countable, countability
Please see this ruby-talk t...
#!/usr/bin/ruby -w status, *cmd = ARGV ...
Ruby script for subversion statu...
by philippe.rathe.myopenid.com,
December 17, 2007 19:01,
2 refactorings, tagged with ruby, subversion, svn, tools
For those who work with sub...
require 'find' excludes = [".svn", "lib", "modules", "feathers"] exclude_files = [] ...
Ruby Crawl a directory and searc...
This recursively goes throu...
def which_class?
if self.language == "C/C++"
self.language = "sh_cpp"
...
Ruby class picker
language is a column in a c...
def test_destroy_category_with_dependent
category = Category.find(3)
...
Ruby managable test method
by we4tech,
November 21, 2007 09:13,
5 refactorings, tagged with test, ruby, test case, method, unit test
in my test case method, i w...
module ModelHelpers def self.included(base) ...
Ruby textilize model helper
OK, so I just realized ther...
This scripts get textarea w...