Sha256: 28b5814714ea2389d2c2efed28ff80776959c2c619dc0175018d051b4dfdcd58

Contents?: true

Size: 1.12 KB

Versions: 1

Compression:

Stored size: 1.12 KB

Contents

class BuyingWishlist < ActiveRecord::Base

  self.table_name = "buying_wishlists"
  self.primary_key = 'id'

  has_one :wishlist, foreign_key: "id"
  belongs_to :property_type, :inverse_of => :buying_wishlists

  def show_details
    {
      id:                   self.id,
      name:                 self.name,
      price_range_low:      self.price_range_low,
      price_range_high:     self.price_range_high,
      property_type_id:     self.property_type_id,
      beds_number:          self.beds_number,
      baths_number:         self.baths_number,
      square_footage_low:   self.square_footage_low,
      square_footage_high:  self.square_footage_high,
      built_year_low:       self.built_year_low,
      built_year_high:      self.built_year_high,
      lot_size:             self.lot_size,
      listing_type:         self.listing_type.to_s.split(";").join("; "),
      timeframe:            self.timeframe,
      condition:            self.condition,
      gagrage:              self.gagrage,
      pets:                 self.pets,
      view:                 self.view,
      pools:                self.pools
    }
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
civic311_test3-0.0.2 app/models/buying_wishlist.rb