Class: Stay::PropertiesController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/stay/properties_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



3
4
5
6
# File 'app/controllers/stay/properties_controller.rb', line 3

def index
 @properties = Stay::Property.all
 render layout: 'stay/application'
end

#showObject



8
9
10
11
12
13
# File 'app/controllers/stay/properties_controller.rb', line 8

def show 
 @property = Property.find(params[:id])
 @average_rating = @property.average_rating
 @reviews_count = @property.reviews_count
 render layout: 'stay/application'
end