public
Last active

How is babby formed in Rails?

  • Download Gist
babby.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
class Babby < PragnentGirl::GetPragnent
 
attr_accessible :name, :mother, :location, :pragnent_girl_id
 
belongs_to :pragnent_girl
before_save :destroy_instain_mothers
after_save :pary_for_father
#How is babby formed?
def initialize(name, mother_id)
@name = name
@pragnent_girl_id = mother_id
@mother = PragnentGirl.find(mother_id).name
@location = "ar"
end
 
private
 
#They need to do way instain mother> who kill thier babbys. becuse these babby cant frigth back
def destroy_instain_mothers
@mothers = Mother.where(:babby_can_frigth_back => false)
@mothers.each do |mother|
do_way(mother) if mother.instain?
end
end
# i am truley sorry for your lots
def pary_for_father
@fathers = Father.where(:chrilden_status => "lost")
@fathers.each do |father|
pary_for(father)
end
end
 
end

Michelangelo's Statue of David, Picasso's Les Demoiselles d'Avignon, and now Takahashi's babby.rb

me.age == 12 && this.is_a?

class LatvianGoToMarketGetPotato
  def goings_to_market(market)
    ride(:horse).to(market)
    # horse die
    ride(:horse).to(market)
    # horse die more
    ride(:horse).to(market)
    # is at market!

    be_sad unless market.have_potato?

    walk(:back)
  end
end

class Market
  def have_potato?
    false # are always false, market never have potato
  end
end

This is glorious. Roflmao.

This needs to be a gem. Every Rails app needs this functionality.

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.