Sha256: 6b94485b8bde2157b5bd8abb6e79fcac628f54fc87ceec58ce2c44cd206f3f8c

Contents?: true

Size: 725 Bytes

Versions: 5

Compression:

Stored size: 725 Bytes

Contents

class User < ActiveRecord::Base

  has_many :posts

  def self.nonsense_method_for_test
  end

  def full_name
    "#{first_name} #{last_name}"
  end

  def is_admin
    false
  end

  def admin_export
    unless is_admin
      "monkey"
    end
  end

  if ActiveRecord::VERSION::MAJOR >= 3
    scope :a_limiter, :limit => 1
    scope :order_by, :order => "ID DESC"
    scope :nothing, :conditions => {:first_name => "unfound"}
  else
    named_scope :a_limiter, :limit => 1
    named_scope :order_by, :order => "ID DESC"
    named_scope :nothing, :conditions => {:first_name => "unfound"}
  end

end

class Post < ActiveRecord::Base

  belongs_to :user

end

class Unexportable < ActiveRecord::Base

  belongs_to :user

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
make_exportable-1.1.0 spec/models.rb
make_exportable-1.0.3 spec/models.rb
make_exportable-1.0.2 spec/models.rb
make_exportable-1.0.1 spec/models.rb
make_exportable-1.0.0 spec/models.rb