Class: Stay::Room

Inherits:
ApplicationRecord show all
Includes:
CurrencyHelper
Defined in:
app/models/stay/room.rb

Constant Summary collapse

STATUSES =
%w[active inactive].freeze

Instance Method Summary collapse

Methods included from CurrencyHelper

#currency_options, #currency_presentation, #currency_symbol, #should_render_currency_dropdown?, #supported_currency_options

Instance Method Details

#images_urlsObject



60
61
62
# File 'app/models/stay/room.rb', line 60

def images_urls
  room_images.map { |image| image.url }
end

#priceObject



56
57
58
# File 'app/models/stay/room.rb', line 56

def price
  price_per_month
end

#set_default_priceObject



64
65
66
# File 'app/models/stay/room.rb', line 64

def set_default_price
  self.price_per_month ||= 0
end