Sha256: 903b71c5ed4b0d36e7a4b8abc50b1d12a9b53580b53deca502e2bf7c8b62a182
Contents?: true
Size: 863 Bytes
Versions: 38
Compression:
Stored size: 863 Bytes
Contents
require "open-uri" module CabooseRets class OpenHousesController < ApplicationController # get /open-houses def index @open_houses = OpenHouse.where("open_house_type = 'PUB' and open_house_date >= '#{DateTime.now.strftime("%F")}'").reorder("open_house_date, start_time").all end # get /open-houses/:mls_number def details @open_houses = OpenHouse.find(params[:mls_number]) end # get /admin/open-houses def admin_index render :layout => 'caboose/admin' end # get /admin/open-houses/refresh def admin_refresh RetsImporter.update_helper('OpenHouse', DateTime.parse(1.month.ago.strftime('%F %T'))) resp = Caboose::StdClass.new resp.success = "The open houses have been refreshed successfully." render :json => resp end end end
Version data entries
38 entries across 38 versions & 1 rubygems