1 2 3 4
def search Course.paged_search nil, nil, nil, params[:page] # ... add breadcrumb and course_categories ...
Ruby On Search with fulltext, ago-c...
by danielharan,
October 07, 2008 14:40
1 2 3 4
class ReportReader def initialize(file_name) @lines = File.open(file_name).read.split("\n") ...
Ruby On Parsing non-delimited text
by danielharan,
October 06, 2008 13:54
Separate out parsing logic ...
Ruby On Map fields array and data a...
by danielharan,
September 22, 2008 17:07
It's rather odd not to know...
1
biggest_square = [1,4,3,5].inject(0){ |memo, i| [memo, square(i)].max }
Ruby On Conditional Assignment
by danielharan,
September 22, 2008 16:34
I sent MA a link to your re...
1 2 3 4
class BandMember attr_accessor :first, :last, :band def initialize(first, last, band) ...
Ruby On Map fields array and data a...
by danielharan,
September 22, 2008 16:00
Wrap that in an object lets...
Ruby On Conditional Assignment
by danielharan,
September 21, 2008 23:53
Maciej, nice catch, that do...
1 2 3 4
biggest_square = 0 [1,4,3,5].each do |base| (temp = square(base)) > biggest_square && biggest_square = temp ...
Ruby On Conditional Assignment
by danielharan,
September 21, 2008 19:38
Tien - I voted 5 for your 2...
1 2 3 4
def square(number) return number**2 end ...
Ruby On Conditional Assignment
by danielharan,
September 21, 2008 16:23
Tien Dung's last function i...
1 2 3 4
for feedback in @feedbacks 1.upto(20) do |i| # unless (answer = feedback.question(i)).nil? # lets you avoid a second call ...
1 2 3 4
# For the initial view, there's a better way to keep track of 'count' # each_with_index is in Enumerable <ul id="lastfm_update_list"> ...
Ruby On Think this needs a loop
by danielharan,
September 06, 2008 20:31
What Elij wrote. It avoids ...
1 2 3 4
class Report < ActiveRecord::Base belongs_to :reportable, :polymorphic => true ...
Ruby A shorter way to declare cl...
I added these so I could re...
Ruby On Same function repeated but ...
by danielharan,
August 08, 2008 19:32
The two last methods don't ...
Ruby On How to make instance variab...
by danielharan,
July 31, 2008 13:51
Persistent storage by addin...
1 2 3 4
class User < ActiveRecord::Base has_many :orders has_many :products, :through => :orders ...
Ruby On rails ActiveRecord finder_s...
by danielharan,
July 23, 2008 01:42
Here's where I'd see it goi...
1 2 3 4
module DashboardHelper def activity_message_for(object) render :partial => "#{object.class.name.downcase.pluralize}/activity" ...


Is this what's going on whe...