forgot to take out a debug line. i kept comments in, but they prevent a new post to be sent from the database to the view. on refresh everything works. also moved comments to its own partial so we can add it to all posts

This commit is contained in:
Maxwell Salzberg 2010-06-26 15:40:33 -07:00
parent 4402a84c32
commit b804bdc220
4 changed files with 4 additions and 12 deletions

View file

@ -9,9 +9,7 @@ class DashboardController < ApplicationController
def receive def receive
xml = CGI::unescape(params[:xml]) store_objects_from_xml CGI::unescape(params[:xml])
puts xml
store_objects_from_xml xml
render :nothing => true render :nothing => true
end end

View file

@ -1,7 +1,6 @@
= form_for Comment.new, :remote => true do |f| = form_for Comment.new, :remote => true do |f|
= f.error_messages = f.error_messages
%p %p
/= f.label :message
= f.text_field :text, :value => "dislike!" = f.text_field :text, :value => "dislike!"
= f.hidden_field :post_id, :value => post.id = f.hidden_field :post_id, :value => post.id
= f.submit 'comment', :class => 'button' = f.submit 'comment', :class => 'button'

View file

@ -2,7 +2,7 @@
%html %html
%head %head
%title %title
= yield(:title) || "diaspora" = "diaspora"
%meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/ %meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/
%meta{"http-equiv"=> "X-UA-Compatible", :content =>"chrome=1" } %meta{"http-equiv"=> "X-UA-Compatible", :content =>"chrome=1" }

View file

@ -4,12 +4,7 @@
= post.message = post.message
%div.time %div.time
= link_to "#{time_ago_in_words(post.updated_at)} ago", status_message_path(post) = link_to "#{time_ago_in_words(post.updated_at)} ago", status_message_path(post)
%div.comments = render "comments/comments", :post => post
= render "comments/new_comment", :post => post
%ul.comment_set
- for comment in post.comments
= render "comments/comment", :comment => comment
- if mine?(post) - if mine?(post)
= link_to 'Destroy', status_message_path(post), :confirm => 'Are you sure?', :method => :delete = link_to 'Destroy', status_message_path(post), :confirm => 'Are you sure?', :method => :delete