aboutsummaryrefslogblamecommitdiffstats
path: root/actionpack/test/lib/controller/fake_models.rb
blob: c6726432ec92df6d7af9b8f2ef500f0a6fae9ff7 (plain) (tree)
1
2
3
4
5
6
7
8
9
10

                      
                                       

                                 
 



              





                             


                                         

                                   
 




                
require "active_model"

class Customer < Struct.new(:name, :id)
  extend ActiveModel::Naming
  include ActiveModel::Conversion

  def to_param
    id.to_s
  end
end

class BadCustomer < Customer
end

class GoodCustomer < Customer
end

module Quiz
  class Question < Struct.new(:name, :id)
    extend ActiveModel::Naming
    include ActiveModel::Conversion

    def to_param
      id.to_s
    end
  end
end