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
|
2012-03-06 21:42:28 +00:00
|
|
|
|
2011-02-04 04:13:41 +00:00
|
|
|
end
|
2012-03-06 21:42:28 +00:00
|
|
|
|
2011-02-04 04:13:41 +00:00
|
|
|
def show
|
2012-03-06 21:42:28 +00:00
|
|
|
|
2011-02-04 04:13:41 +00:00
|
|
|
end
|
2012-03-06 21:42:28 +00:00
|
|
|
|
2011-02-04 04:13:41 +00:00
|
|
|
def edit
|
2012-03-06 21:42:28 +00:00
|
|
|
|
2011-02-04 04:13:41 +00:00
|
|
|
end
|
2012-03-06 21:42:28 +00:00
|
|
|
|
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
|
2012-03-06 21:42:28 +00:00
|
|
|
end
|