2011-02-04 04:13:41 +00:00
|
|
|
class PostsController < ApplicationController
|
2011-02-10 21:13:30 +00:00
|
|
|
helper_method :current_user
|
2011-02-04 04:13:41 +00:00
|
|
|
impressionist
|
|
|
|
def index
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
def show
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
def edit
|
|
|
|
|
|
|
|
end
|
2011-02-10 21:13:30 +00:00
|
|
|
|
|
|
|
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
|