diff --git a/app/helpers/status_messages_helper.rb b/app/helpers/status_messages_helper.rb index 32a742d9e..2e933d784 100644 --- a/app/helpers/status_messages_helper.rb +++ b/app/helpers/status_messages_helper.rb @@ -3,7 +3,7 @@ module StatusMessagesHelper def my_latest_message message = StatusMessage.my_newest unless message.nil? - return message.message + " " + how_long_ago(message) + return message.message + " - " + how_long_ago(message) else return "No message to display." end diff --git a/app/views/comments/_new_comment.html.haml b/app/views/comments/_new_comment.html.haml index 7cfc43756..bb16dffbb 100644 --- a/app/views/comments/_new_comment.html.haml +++ b/app/views/comments/_new_comment.html.haml @@ -1,6 +1,5 @@ -= form_tag("/comments",:remote => true, :class =>"new_comment", :id => "new_comment") do += form_tag("/comments", :remote => true, :class =>"new_comment", :id => "new_comment-#{post.id}") do %p = text_field_tag "comment_text", 'dislike!', :size => 30, :name => 'comment[text]' = hidden_field_tag "comment_post_id", "#{post.id}", :name => "comment[post_id]" - = submit_tag 'comment', :id => "comment_submit", :name => "commit" - + = submit_tag 'comment', :id => "comment_submit_#{post.id}", :name => "commit" diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 42b1577d7..31b14138f 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -8,7 +8,7 @@ = stylesheet_link_tag "blueprint/screen", :media => 'screen' = stylesheet_link_tag "application" - /= javascript_include_tag"http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js" + /= javascript_include_tag"http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" = javascript_include_tag 'jquery142', 'rails', 'view' = javascript_include_tag 'tiny_mce/tiny_mce.js' diff --git a/app/views/status_messages/_status_message.html.haml b/app/views/status_messages/_status_message.html.haml index 5e643efae..f9ec3c03b 100644 --- a/app/views/status_messages/_status_message.html.haml +++ b/app/views/status_messages/_status_message.html.haml @@ -4,7 +4,7 @@ = post.message %div.time = link_to(how_long_ago(post), status_message_path(post)) - /= render "comments/comments", :post => post + = render "comments/comments", :post => post - if mine?(post) = link_to 'Destroy', status_message_path(post), :confirm => 'Are you sure?', :method => :delete diff --git a/config/initializers/socket.rb b/config/initializers/socket.rb index 52c8ea3d9..61fb85d59 100644 --- a/config/initializers/socket.rb +++ b/config/initializers/socket.rb @@ -11,7 +11,12 @@ module WebSocket class << @view include ApplicationHelper include Rails.application.routes.url_helpers - #include ActionView::Helpers::FormTagHelper + include ActionController::RequestForgeryProtection::ClassMethods + include ActionView::Helpers::FormTagHelper + include ActionView::Helpers::UrlHelper + def protect_against_forgery? + false + end end end @@ -36,13 +41,13 @@ module WebSocket v = WebSocket.view_for(object) puts v.inspect - rescue Exception > e + rescue Exception => e puts "in failzord " + v.inspect puts object.inspect - puts e.inspect + puts e.message raise e end - + puts "i made it here" {:class =>object.class.to_s.underscore.pluralize, :html => v} end diff --git a/public/javascripts/view.js b/public/javascripts/view.js index 3593fa4c6..31ab2d57e 100644 --- a/public/javascripts/view.js +++ b/public/javascripts/view.js @@ -30,6 +30,7 @@ $(document).ready(function(){ $('#bookmark_title').click(clearForm); $('#bookmark_link').click(clearForm); + $('#debug_more').hide(); function clearForm(){ $(this).val("");