diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb index 834b33395..0dae8e54e 100644 --- a/app/controllers/dashboard_controller.rb +++ b/app/controllers/dashboard_controller.rb @@ -9,7 +9,9 @@ class DashboardController < ApplicationController def receive - store_posts_from_xml CGI::unescape(params[:xml]) + xml = CGI::unescape(params[:xml]) + puts xml + store_posts_from_xml xml render :nothing => true end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index ce2847aa0..2865c3476 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -67,7 +67,7 @@ module ApplicationHelper when "User" user_path(person) else - "#" + link_to "unknown person", "#" end end diff --git a/app/models/post.rb b/app/models/post.rb index 6a450ebac..0aba89918 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -25,10 +25,6 @@ class Post Post.sort(:created_at.desc).all end - def each - yield self - end - def self.newest(person = nil) return self.last if person.nil? diff --git a/lib/message_handler.rb b/lib/message_handler.rb index 7d75ce08c..6fb15dfbe 100644 --- a/lib/message_handler.rb +++ b/lib/message_handler.rb @@ -25,7 +25,7 @@ class MessageHandler case query.type when :post http = EventMachine::HttpRequest.new(query.destination).post :timeout => TIMEOUT, :body =>{:xml => query.body} - http.callback { process} + http.callback {puts query.inspect; process} when :get http = EventMachine::HttpRequest.new(query.destination).get :timeout => TIMEOUT http.callback {send_to_seed(query, http.response); process}