Class: ChatsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ChatsController
- Defined in:
- lib/generators/appchat/templates/chats_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
8 9 10 11 |
# File 'lib/generators/appchat/templates/chats_controller.rb', line 8 def create @chat = Chat.create redirect_to @chat end |
#index ⇒ Object
5 6 7 |
# File 'lib/generators/appchat/templates/chats_controller.rb', line 5 def index @chats = Chat.all.reverse end |
#show ⇒ Object
2 3 4 |
# File 'lib/generators/appchat/templates/chats_controller.rb', line 2 def show @chat = Chat.find(params[:id]) end |