diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 8817bc645..52975730b 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -41,7 +41,7 @@ class ApplicationController < ActionController::Base def fb_user_info if current_user - @access_token = env['warden'].session[:access_token] + @access_token = warden.session[:access_token] @logged_in = @access_token.present? end end diff --git a/app/controllers/services_controller.rb b/app/controllers/services_controller.rb index b39538d96..82a58c508 100644 --- a/app/controllers/services_controller.rb +++ b/app/controllers/services_controller.rb @@ -17,15 +17,15 @@ class ServicesController < ApplicationController # TODO: This is where you'd want to store the token in your database # but for now, we'll just keep it in the session so we don't need a database - env['warden'].session[:access_token] = @access_token + warden.session[:access_token] = @access_token flash[:success] = "Authentication successful." end redirect_to edit_user_url current_user end def destroy - env['warden'].session[:access_token] = nil - env['warden'].session[:user_id] = nil + warden.session[:access_token] = nil + warden.session[:user_id] = nil redirect_to edit_user_url current_user end diff --git a/app/models/user.rb b/app/models/user.rb index d89b8b59a..ca248a8f2 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -114,12 +114,6 @@ class User post end - def repost( post, options = {} ) - aspect_ids = validate_aspect_permissions(options[:to]) - push_to_aspects(post, aspect_ids) - post - end - def update_post( post, post_hash = {} ) if self.owns? post post.update_attributes(post_hash) diff --git a/spec/models/user/posting_spec.rb b/spec/models/user/posting_spec.rb index 76f4243f7..d86433ad6 100644 --- a/spec/models/user/posting_spec.rb +++ b/spec/models/user/posting_spec.rb @@ -46,15 +46,6 @@ describe User do end end - describe '#repost' do - it 'should make the post visible in another aspect' do - status_message = user.post(:status_message, :message => "hello", :to => aspect.id) - user.repost(status_message, :to => aspect1.id) - aspect1.reload - aspect1.posts.count.should be 1 - end - end - describe '#update_post' do it 'should update fields' do album = user.post(:album, :name => "Profile Photos", :to => aspect.id)