class Store < ActiveRecord::Base
  has_many :promos
...

Ruby Rails Store has more than m...

by Kenzie, June 08, 2010 00:21, 1 refactoring, tagged with rails, ruby, model, associations

Store has many Promos. Prom...

0f8736dfd93c21c75ad591770a14bdb4 Talk
# Associations
#
# User: has_many :sources, :as => :sourceable, :dependent => :destroy
...

Ruby Get child elements from a o...

by Chris, March 11, 2010 08:27, 2 refactorings, tagged with activerecord, model, rails activerecord, assoziations

For a object (e.g. user), I...

5d7c8b8f2de06c07b2bf0848d20ce71f Talk
class Asset < ActiveRecord::Base
	belongs_to :account
	belongs_to :asset_type
...

Ruby Advanced search form & ...

by Erez Ben Shoham, March 16, 2009 11:33, 3 refactorings, tagged with search, form, model, named_scope

I have an Asset model in a ...

30bcacccb1c7fa2b577b905a2128027f Talk
describe Stock do

  it "should be valid when new" do
...

Ruby repeated code in rspec mode...

by scottmotte.myopenid.com, November 15, 2008 08:51, No refactoring, tagged with model, rspec, merb

how do i clean up this repe...

2fb54bca5a55a7a16f8f9c20c05ce7c2 Talk
class Newalert 

def new_alert_validations(params)
...

Ruby model validations

by DG, June 17, 2008 05:51, 4 refactorings, tagged with model, validations

Following is the big(easy t...

51224bdd17878b3b19e8987e9bb336a2 Talk
class Race < ActiveRecord::Base
  
...

Ruby Help generating abbreviatio...

by Michael Filbin, April 06, 2008 16:16, 3 refactorings, tagged with string, model, abbreviation, attribute

Hi all,

I am attempting ...

14b8667b3bdf64068647b96c26001e0d Talk
class FormMailer < ActionMailer::Base

  def contact_us(params)
...

Ruby Action Mailer - It has to b...

by phill, March 01, 2008 19:19, 4 refactorings, tagged with model, dry form, ActionMailer

Here is a FormMailer that I...

B4cf145acfab95d0a6926b988f93b4b8 Talk
def which_class?
  if self.language == "C/C++"
     self.language = "sh_cpp"
...

Ruby class picker

by Garrett, December 10, 2007 00:04, 8 refactorings, tagged with rails, ruby, activerecord, model

language is a column in a c...

E9674d02c33d1d711a462026f40bbaf4 Talk