From 641ca9fdd2deede13fb525140ee80695e213eb91 Mon Sep 17 00:00:00 2001 From: danielgrippi Date: Tue, 17 Jan 2012 17:39:12 -0800 Subject: [PATCH] we want to POST to /status_messages on Publisher submit --- app/controllers/application_controller.rb | 2 +- public/javascripts/app/views/publisher_view.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 3afefd3c2..cce1e7772 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -128,6 +128,6 @@ class ApplicationController < ActionController::Base end def max_time - params[:max_time] ? Time.at(params[:max_time].to_i) : Time.now + params[:max_time] ? Time.at(params[:max_time].to_i) : Time.now + 1 end end diff --git a/public/javascripts/app/views/publisher_view.js b/public/javascripts/app/views/publisher_view.js index 2315b8c3d..989d2ce9a 100644 --- a/public/javascripts/app/views/publisher_view.js +++ b/public/javascripts/app/views/publisher_view.js @@ -31,6 +31,7 @@ app.views.Publisher = Backbone.View.extend({ "photos" : serializedForm["photos[]"], "services" : serializedForm["services[]"] }, { + url : "/status_messages", success : function() { app.stream.collection.add(statusMessage.toJSON()); }