Files
impressionist/test_app/app/controllers/articles_controller.rb
T
cowboycoded cc6c813517 added support for current_user helper method of authentication
tests for both current_user (Post) and @current_user (Article) implementations
updated gems
2011-02-10 16:13:30 -05:00

18 lines
378 B
Ruby

class ArticlesController < ApplicationController
before_filter :test_current_user_var
def test_current_user_var
if session[:user_id]
@current_user = User.new
@current_user.id = session[:user_id]
end
end
def index
impressionist(Article.first,"this is a test article impression")
end
def show
impressionist(Article.first)
end
end