adopt-a-hydrant/app/controllers/reminders_controller.rb

18 lines
404 B
Ruby
Raw Normal View History

2011-06-13 22:39:39 +00:00
class RemindersController < ApplicationController
respond_to :json
def create
puts params[:reminder].inspect
@reminder = Reminder.new(params[:reminder])
if @reminder.save
render(:json => @reminder)
else
render(:json => {"errors" => @reminder.errors}, :status => 500)
end
# ReminderMailer.send_reminder
# @reminder.sent = true
# @reminder.save!
end
end