Created
September 5, 2015 18:38
-
-
Save mbuttler/95a375dfda13dfdd1cc4 to your computer and use it in GitHub Desktop.
Threadly - Posts Controller
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PostsController < ApplicationController | |
def index | |
@new_post = Post.new | |
@all_posts = Post.order(created_at: :desc).all | |
end | |
def new | |
@new_post = Post.new | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment