My Recent Pastes (19 and counting)
Pastes by Adam French (19 and counting)
Below are the 15 most recent pasties by Adam French.
March 12, 2008
11:24AM EDT
by Adam French
View all 89 lines
[10:51am] midget_nuts: god, can you stop giving me such a hard time, cut me one break sheesh. [10:51am] midget_nuts: i figure since you never listen to my prayers, it was best to hit you up on IRC. [10:51am] Flea`: hahaha [10:51am] afrench: holy sh!t, there is a god [10:51am] midget_nuts: wait wait . . . hold the idoling . . . its a lower case "g" ... so its not The God . . .
March 12, 2008
11:21AM EDT
by Adam French
View all 89 lines
[10:51am] midget_nuts: god, can you stop giving me such a hard time, cut me one break sheesh. [10:51am] midget_nuts: i figure since you never listen to my prayers, it was best to hit you up on IRC. [10:51am] Flea`: hahaha [10:51am] afrench: holy sh!t, there is a god [10:51am] midget_nuts: wait wait . . . hold the idoling . . . its a lower case "g" ... so its not The God . . .
March 12, 2008
11:21AM EDT
by Adam French
View all 89 lines
[10:51am] midget_nuts: god, can you stop giving me such a hard time, cut me one break sheesh. [10:51am] midget_nuts: i figure since you never listen to my prayers, it was best to hit you up on IRC. [10:51am] Flea`: hahaha [10:51am] afrench: holy sh!t, there is a god [10:51am] midget_nuts: wait wait . . . hold the idoling . . . its a lower case "g" ... so its not The God . . .
February 23, 2008
8:19PM EDT
by Adam French
View all 122 lines
<p><strong>Contextual Validations</strong></p> <p>It's a known fact that users are stupid. They screw up; it happens. They enter in wrong data, or leave things blank that shouldn't be, or even enter in completely horrid data because they're idiots and that's what idiots do. I point you at youtube.com video comments, digg (as a whole), and myspace.com as proof of web users' collective idiocy.</p> <p>But, alas, they're how we make our money online. Thus, we need to guard against idiots doing idiot things by validating anything that we need to save out to our persistence layers. Sometimes that means guarding against hack attempts, but most of the time it means guarding against invalid data.</p>
February 23, 2008
7:39PM EDT
by Adam French
View all 114 lines
<p><strong>Contextual Validations</strong></p> <p>It's a known fact that users are stupid. They screw up; it happens. They enter in wrong data, or leave things blank that shouldn't be, or even enter in completely horrid data because they're idiots and that's what idiots do. I point you at youtube.com video comments, digg (as a whole), and myspace.com as proof of web users' collective idiocy.</p> <p>But, alas, they're how we make our money online. Thus, we need to guard against idiots doing idiot things by validating anything that we need to save out to our persistence layers. Sometimes that means guarding against hack attempts, but most of the time it means guarding against invalid data.</p>
February 23, 2008
1:39AM EDT
by Adam French
View all 170 lines
<p> In this series of blog entries, I'm going to highlight little things that make my experiences while developing with DataMapper that much more special and better than with ActiveRecord (or other <span class="caps">ORM</span> layers). </p>
February 22, 2008
4:33PM EDT
by Adam French
View all 19 lines
class User include DataMapper::Persistence # has_many :friends, :through => 'invitations' # class invitation
February 14, 2008
11:40PM EDT
by Adam French
View all 48 lines
h1. Big differences between datamapper and Activerecord I'll be honest: A majority of people interested in DataMapper come from Rails and ActiveRecord. As such, here's some of the major differences ActiveRecord people will immediately notice about Datamapper. h2. Finder Syntax
February 14, 2008
6:27PM EDT
by Adam French
View all 31 lines
Index: spec/symbolic_operators_spec.rb =================================================================== --- spec/symbolic_operators_spec.rb (revision 738) +++ spec/symbolic_operators_spec.rb (working copy) @@ -24,4 +24,10 @@
February 14, 2008
3:16PM EDT
by Adam French
View all 59 lines
irb(main):024:0> puts ([].methods - DataMapper::Associations::HasManyAssociation::Set.instance_methods).to_yaml --- - concat - delete_at - pack
February 14, 2008
3:00PM EDT
by Adam French
View all 17 lines
irb(main):001:0> c = Career.first => #<Career:0x6d65b4 @new_record=false, @name="Programmer"> irb(main):002:0> c.followers => [#<Person:0x6c8284 @new_record=false, @type="Person", @address_city="Galveston", @name="Sam", @age=29, @address_state=nil, @notes="Lorem ipsum dolor sit amet", @career_name="Programmer", @occupation="Programmer", @date_of_birth=#<Date: 4908795/2,0,2299161>, @address_street="1337 Duck Way", @id=1, @address_zip_code="75000">, #<SalesPerson:0x6c208c @new_record=false, @type="SalesPerson", @address_city=nil, @name="Scott", @age=25, @address_state=nil, @notes="Lorem ipsum dolor sit amet", @career_name="Programmer", @occupation="Programmer", @date_of_birth=nil, @address_street=nil, @commission=nil, @id=3, @address_zip_code=nil>]
February 14, 2008
10:38AM EDT
by Adam French
View all 10 lines
# Right now Story.first :id => 1 # => #<Story:0x2e4a708 @new_record=false,
February 10, 2008
2:41AM EDT
by Adam French
View all 15 lines
/Library/Ruby/Gems/1.8/gems/do_postgres-0.2.3/lib/do_postgres.rb in "last_insert_row" /Library/Ruby/Gems/1.8/gems/datamapper-0.2.5/lib/data_mapper/adapters/data_object_adapter.rb in "create" /Library/Ruby/Gems/1.8/gems/datamapper-0.2.5/lib/data_mapper/adapters/data_object_adapter.rb in "connection" /Library/Ruby/Gems/1.8/gems/datamapper-0.2.5/lib/data_mapper/support/connection_pool.rb in "hold" /Library/Ruby/Gems/1.8/gems/datamapper-0.2.5/lib/data_mapper/adapters/data_object_adapter.rb in "connection
February 07, 2008
11:38PM EDT
by Adam French
View all 98 lines
# => Before prettification class Post include DataMapper::Persistence property :body, :text, :lazy => false
December 12, 2007
1:04AM EDT
by Adam French
View all 30 lines
# ====================================== # = Possible Pagination Syntax Options = # ====================================== # assumes we have Widget::DEFAULT_LIMIT assigned # 3 is the page number
