Sha256: 4639182081c1f2843044f0a8c97e4aed2aa54869845233bf311406e2d2b25e4e
Contents?: true
Size: 841 Bytes
Versions: 41
Compression:
Stored size: 841 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/:id def details @open_houses = OpenHouse.find(params[:id]) end # get /admin/open-houses def admin_index render :layout => 'caboose/admin' end # get /admin/open-houses/refresh def admin_refresh RetsImporter.update_helper('OPH', 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
41 entries across 41 versions & 1 rubygems