Skip to content

Instantly share code, notes, and snippets.

@Leveton
Created November 22, 2012 22:36
index method from /lib/generators/appointments/templates/appointments_controller.rb
def index
date_from_ajax = params[:matched_date]
reduce = Appointment.where(:date => date_from_ajax)
hour_on_date = reduce.collect {|x| x.hour}
@new_dates = hour_on_date
render :layout => false
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment