August 2009
11 posts
how do i call length on nil?
– #rubyonrails
I’m coding Ruby on Rails outside on my porch. It’s still 93’...
– Twitter Spammer
[…] this is outrageous instance variables.
– Trapped In Ruby on Rails Reserved Words | CodeWeblog.com
A must read WTF
what if all maintainers get hit by a bus? (BUS FACTOR)
– #ruby-lang troll pointing out a danger in programming in Ruby [and why Ruby doesn’t scale]
I’m assuming my question may be too complicated for this room, but I...
– Idiot in #rubyonrails, thinking this would motivate anyone to help him
Insignificant Whitespace
def self.labelable #:nodoc:
public_instance_methods.
reject { |h| h =~ /form|field_set|submit|hidden|password|file/ || h =~ /_with(out)?_label/ }.
map { |x| x.to_sym }
end
Ruby on Rails has grown enormously due to its following benefits:
It follows Agile Software Development cycle
It is consistent & simple; and supports Perl and Python. [Emphasis added]
It uses the Model-View-Controller (MVC) architecture pattern to organize application programming.
It provides scaffolding which can automatically construct some of the models needed for a basic website.
...
"because i want to see what AR generates"
module ActiveRecord
class Base
class SQLReturn < StandardError; end
def self.sql_for(method = nil, *args, &block)
connection.class_eval do
alias_method :old_execute, :execute
alias_method :execute, :return_sql_without_executing
end
method && send(method, *args, &block) || self
rescue ActiveRecord::Base::SQLReturn => e
...
unless @sense.find(&:any?)
RubyPanther: unless [@clients,@employees,@customers].find(&:nil?)
Hi doubt in unit testing -
Ruby on Rails:... →