lib/oauth/controllers/consumer_controller.rb in oauth-plugin-0.4.0.pre3 vs lib/oauth/controllers/consumer_controller.rb in oauth-plugin-0.4.0.pre4

- old
+ new

@@ -73,10 +73,10 @@ def load_consumer consumer_key=params[:id].to_sym throw RecordNotFound unless OAUTH_CREDENTIALS.include?(consumer_key) deny_access! unless logged_in? || OAUTH_CREDENTIALS[consumer_key][:allow_login] @consumer="#{consumer_key.to_s.camelcase}Token".constantize - @token=@consumer.find_by_user_id current_user.id if logged_in? + @token=@consumer.find(:first, :conditions=>{:user_id=>current_user.id.to_s}) if logged_in? end # Override this in you controller to deny user or redirect to login screen. def deny_access! head 401 \ No newline at end of file