diff --git a/app/controllers/status_messages_controller.rb b/app/controllers/status_messages_controller.rb index 1fc0ac9d1c4943a21c1420c20f28e175ea4db125..d5cd07d51c1a3eb1128bb8c409aff10580ce9c7d 100644 --- a/app/controllers/status_messages_controller.rb +++ b/app/controllers/status_messages_controller.rb @@ -6,17 +6,12 @@ class StatusMessagesController < ApplicationController @status_message = current_user.post(:status_message, params[:status_message]) if @status_message.created_at - flash[:notice] = "Successfully created status message." render :nothing => true else - render :action => 'new' + redirect_to root_url end end - def new - @status_message = StatusMessage.new - end - def destroy @status_message = StatusMessage.where(:id => params[:id]).first @status_message.destroy diff --git a/app/views/status_messages/new.html.haml b/app/views/status_messages/new.html.haml deleted file mode 100644 index 2e9c884749157859faab6e86eee716b3ea03e927..0000000000000000000000000000000000000000 --- a/app/views/status_messages/new.html.haml +++ /dev/null @@ -1,13 +0,0 @@ -- title "New Status Message" - -= form_for @status_message, :remote => true do |f| - = f.error_messages - %p - = f.label :message - %br - = f.text_field :message - %p - = f.submit - - -%p= link_to "Back to List", status_messages_path diff --git a/config/routes.rb b/config/routes.rb index f2b4ebd801f3d6845c370e7d7a3b62f9026b15a1..1f3efbbbd9f3a4645a18a7ec15c1dfb9e2c98af3 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,7 +1,7 @@ Diaspora::Application.routes.draw do resources :people, :only => [:index, :show, :destroy] resources :users, :except => [:create, :new] - resources :status_messages, :except => [:index] + resources :status_messages, :only => [:create, :destroy, :show] resources :comments, :except => [:index] resources :requests, :except => [:edit, :update] resources :photos, :except => [:index]