Browse files

refactored some of the wording for messages so it's less confusing an…

…d acts more like email.
  • Loading branch information...
1 parent 9cad976 commit 9b0ebbffcdd61c1cefb9c46f31d3108eecb47a40 Eric Ryan Jones committed Nov 16, 2013
View
8 app/controllers/messages_controller.rb
@@ -3,14 +3,20 @@ def index
@messages = current_user.received_messages
end
- def outbox
+ #inbox
+ def inbox
+ @messages = current_user.received_messages
+ end
+
+ def sent
@messages = current_user.sent_messages
end
def show
@message = current_user.messages.find(params[:id])
end
+ #trash
def destroy
@message = current_user.messages.find(params[:id])
if @message.destroy
View
0 app/views/messages/_recieved.html.erb → app/views/messages/_inbox.html.erb
File renamed without changes.
View
0 app/views/messages/_outbox.html.erb → app/views/messages/_sent.html.erb
File renamed without changes.
View
4 app/views/messages/inbox.html.erb
@@ -0,0 +1,4 @@
+<h1>Received Messages</h1>
+<div class="messagesOutbox">
+ <%= render :partial => 'messages/inbox', :collection => @messages, :as => :message %>
+</div>
View
6 app/views/messages/index.html.erb
@@ -1,5 +1,5 @@
<h1>Messages</h1>
-<h2>Recieved Messages</h2>
-<div class="messagesOutbox">
- <%= render :partial => 'messages/recieved', :collection => @messages, :as => :message %>
+<h2>Received Messages</h2>
+<div class="messagesInbox">
+ <%= render :partial => 'messages/inbox', :collection => @messages, :as => :message %>
</div>
View
3 app/views/messages/outbox.html.erb
@@ -1,3 +0,0 @@
-<div class="messagesOutbox">
- <%= render :partial => 'messages/outbox', :collection => @messages, :as => :message %>
-</div>
View
4 app/views/messages/sent.html.erb
@@ -0,0 +1,4 @@
+<h1>Sent Messages</h1>
+<div class="messagesSent">
+ <%= render :partial => 'messages/sent', :collection => @messages, :as => :message %>
+</div>
View
6 config/routes.rb
@@ -8,9 +8,9 @@
root :to => "home#index"
- get "messages/recieved" => "messages#recieved", :as => :messages
- get "messages/outbox" => "messages#outbox", :as => :messages
- get "messages/outbox" => "messages#destroy", :as => :messages
+ get "messages/inbox" => "messages#inbox", :as => :messages
+ get "messages/sent" => "messages#sent", :as => :messages
+ get "messages/trash" => "messages#destroy", :as => :messages
get "topics/keywords" => "topics#keywords", :as => :keywords
resources :users

0 comments on commit 9b0ebbf

Please sign in to comment.