Remove statuS MESsages new page. TaKE New OUt OF ROutes

This commit is contained in:
Raphael 2010-08-24 14:44:32 -07:00
parent ef9cf8fc52
commit 03abd1ac21
3 changed files with 2 additions and 20 deletions

View file

@ -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

View file

@ -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

View file

@ -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]