search for: clip_id

Displaying 2 results from an estimated 2 matches for "clip_id".

Did you mean: chip_id
2007 Jul 24
11
Mock or Stub strategy for validates_uniqueness_of
...alidates_uniqueness_of clause. I have class Book < AR:B has_many :clippings various validates_presence_of etc end class Clip < AR:B has_many :clippings various validates_presence_of etc end class Clipping < AR:B belongs_to :book belongs_to :clip validates_uniqueness_of :clip_id, :scope => :book_id end What I want to do is just confirm that the validates uniqueness_of clause is set and functioning correctly in the spec for the clipping model. So if I was using fixtures I would do something like it "should not allow duplicate clips in the same book" do cli...
2011 Jul 07
0
Rails3 Mailer html / text versions order
...(:to => user.email, :subject => "Welcome to My Awesome Site") do |format| format.html { render ''another_template'' } format.text { render ''another_template'' } end end MY USER MAILER ======= def analysis_received(user_id, clip_id, request_id) ...... skipped lines ...... @template = "user_mailer/#{I18n.locale.to_s}/ analysis_received.erb" mail(:to => @user[:email], :subject => "#{@request_type.capitalize}") do |format| format.html { render :template => @template }...