From faa5d216361bd759d979b82cd46aa57a6faa6048 Mon Sep 17 00:00:00 2001 From: maxwell Date: Fri, 25 Jun 2010 19:58:40 -0700 Subject: [PATCH] Change the form_for not to need a message passed, and adding it to the home page --- app/controllers/status_messages_controller.rb | 1 - app/views/dashboard/index.html.haml | 1 + app/views/status_messages/_new_status_message.haml | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/status_messages_controller.rb b/app/controllers/status_messages_controller.rb index 0c24a76bd..00b1b8e1a 100644 --- a/app/controllers/status_messages_controller.rb +++ b/app/controllers/status_messages_controller.rb @@ -2,7 +2,6 @@ class StatusMessagesController < ApplicationController before_filter :authenticate_user! def index - @status_message = StatusMessage.new @status_messages = StatusMessage.sort(:created_at.desc).all diff --git a/app/views/dashboard/index.html.haml b/app/views/dashboard/index.html.haml index 3a892c651..8d669a018 100644 --- a/app/views/dashboard/index.html.haml +++ b/app/views/dashboard/index.html.haml @@ -1,4 +1,5 @@ %h1 your network stream += render "status_messages/new_status_message" %ul#stream - for post in @posts = render type_partial(post), :post => post diff --git a/app/views/status_messages/_new_status_message.haml b/app/views/status_messages/_new_status_message.haml index 5e3ac8663..d8cb1d328 100644 --- a/app/views/status_messages/_new_status_message.haml +++ b/app/views/status_messages/_new_status_message.haml @@ -1,4 +1,4 @@ -= form_for status_message, :remote => true do |f| += form_for StatusMessage.new, :remote => true do |f| = f.error_messages %p /= f.label :message