Monday 15 July 2013

Help with rails rest standard -


I have the message controller declared as the resource in my Roots.

I want to be able to see a list of received messages and a different view of the messages sent.

But I do not want to break the rest of the pattern ... what do you think people do?

< config / routes.rb :

  map.resources: message, 

: archive = & gt; {: Sent = & gt; : Get, get: = get => : Receive}

Then in your messages_controller.rb :

  DRF has been received @ messages = message. (Current_use) Define the two dedicated scope methods sent to the end deaf @ message message = send (current_user) end  

your message.rb .

Or as Tony Fonten said:

  DIF received @ messages = current_useor.message.and ended with DEF @ message = current_User. message. End  

No comments:

Post a Comment