2011-02-04 04:13:41 +00:00
|
|
|
class ArticlesController < ApplicationController
|
2011-02-10 21:13:30 +00:00
|
|
|
before_filter :test_current_user_var
|
2012-03-06 21:42:28 +00:00
|
|
|
|
2011-02-10 21:13:30 +00:00
|
|
|
def test_current_user_var
|
|
|
|
if session[:user_id]
|
|
|
|
@current_user = User.new
|
|
|
|
@current_user.id = session[:user_id]
|
|
|
|
end
|
|
|
|
end
|
2012-03-06 21:42:28 +00:00
|
|
|
|
2011-02-04 04:13:41 +00:00
|
|
|
def index
|
|
|
|
impressionist(Article.first,"this is a test article impression")
|
|
|
|
end
|
2012-03-06 21:42:28 +00:00
|
|
|
|
2011-02-04 04:13:41 +00:00
|
|
|
def show
|
|
|
|
impressionist(Article.first)
|
|
|
|
end
|
2012-03-06 21:42:28 +00:00
|
|
|
end
|