Sha256: 147fa54208981947237379260e257bcd374d4be3a66854e5d2b6f334f693651d

Contents?: true

Size: 274 Bytes

Versions: 1

Compression:

Stored size: 274 Bytes

Contents

class ChildModel < ActiveRecord::Base
  belongs_to :parent_model
  belongs_to :second_parent_model
  def parent_model_name
    parent_model.name if parent_model
  end
  def second_parent_model_other_field
    second_parent_model.other_field if second_parent_model
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
view_mapper-0.3.4 test/views/belongs_to/expected_templates/child_model.rb