diff --git a/lib/switch_user/provider.rb b/lib/switch_user/provider.rb
index <HASH>..<HASH> 100644
--- a/lib/switch_user/provider.rb
+++ b/lib/switch_user/provider.rb
@@ -10,11 +10,11 @@ module SwitchUser
     autoload :Session, 'switch_user/provider/session'
 
     def self.init(controller)
-      if SwitchUser.provider.is_a?(Hash)
-        klass_part = SwitchUser.provider[:name]
+      klass_part = if SwitchUser.provider.is_a?(Hash)
+        SwitchUser.provider[:name]
       else
-        klass_part = SwitchUser.provider
-      end
+        SwitchUser.provider
+                   end
 
       klass_part = klass_part.to_s.classify
 
diff --git a/lib/switch_user/provider/dummy.rb b/lib/switch_user/provider/dummy.rb
index <HASH>..<HASH> 100644
--- a/lib/switch_user/provider/dummy.rb
+++ b/lib/switch_user/provider/dummy.rb
@@ -20,11 +20,11 @@ module SwitchUser
       attr_reader :original_user
 
       def remember_current_user(remember)
-        if remember
-          @original_user = current_user
+        @original_user = if remember
+          current_user
         else
-          @original_user = nil
-        end
+          nil
+                         end
       end
     end
   end
Auto corrected by following Style/ConditionalAssignment