impressionist/test_app/app/controllers/posts_controller.rb

23 lines
314 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
end
def show
end
def edit
end
def current_user
if session[:user_id]
user = User.new
user.id = session[:user_id]
@current_user ||= user
end
end
2011-02-04 04:13:41 +00:00
end