impressionist/test_app/app/controllers/posts_controller.rb

24 lines
297 B
Ruby
Raw Normal View History

2011-02-04 04:13:41 +00:00
class PostsController < ApplicationController
helper_method :current_user
2011-02-04 04:13:41 +00:00
impressionist
def index
2011-02-04 04:13:41 +00:00
end
2011-02-04 04:13:41 +00:00
def show
2011-02-04 04:13:41 +00:00
end
2011-02-04 04:13:41 +00:00
def edit
2011-02-04 04:13:41 +00:00
end
def current_user
if session[:user_id]
user = User.new
user.id = session[:user_id]
@current_user ||= user
end
end
end