diff --git a/Rakefile b/Rakefile index c0e3fc4ff7..3aedf2799b 100644 --- a/Rakefile +++ b/Rakefile @@ -64,7 +64,7 @@ def generate_rails_rdoc # Replace sdoc gem with my forked one gemfile = File.read('Gemfile') - gemfile.gsub!(/"sdoc".*$/, '"sdoc", github: "toshimaru/sdoc", branch: "railsdoc"') + gemfile.gsub!(/"sdoc".*$/, '"sdoc", github: "toshimaru/sdoc", branch: "main"') File.write('Gemfile', gemfile) sh 'bundle install && bundle update sdoc' @@ -77,6 +77,7 @@ end def generate_src(target_version:) copy_sources = Dir.glob('rails/doc/rdoc/*').reject { |path| path.end_with?('panel', 'js', 'created.rid') } target_dir = target_version == default_rails_version ? SOURCE_DIR : "#{SOURCE_DIR}/#{target_version}" + remove_existing_files(target_dir) cp_r copy_sources, target_dir cd target_dir do @@ -92,3 +93,10 @@ def generate_src(target_version:) File.write('navigation.html', content) end end + +EXISTING_DIRS = %w[classes files].freeze +def remove_existing_files(target_dir) + EXISTING_DIRS.each do |dir| + rm_rf "#{target_dir}/#{dir}" + end +end diff --git a/src/classes/AbstractController/ActionNotFound/Correction.html b/src/classes/AbstractController/ActionNotFound/Correction.html deleted file mode 100644 index 464fc948f0..0000000000 --- a/src/classes/AbstractController/ActionNotFound/Correction.html +++ /dev/null @@ -1,157 +0,0 @@ ---- -title: AbstractController::ActionNotFound::Correction -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - new(error) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/abstract_controller/base.rb, line 20
-def initialize(error)
-  @error = error
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - corrections() - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/abstract_controller/base.rb, line 24
-def corrections
-  if @error.action
-    maybe_these = @error.controller.class.action_methods
-
-    maybe_these.sort_by { |n|
-      DidYouMean::Jaro.distance(@error.action.to_s, n)
-    }.reverse.first(4)
-  else
-    []
-  end
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/AbstractController/Base.html b/src/classes/AbstractController/Base.html index 3b5c54cda1..8ee3c9a150 100644 --- a/src/classes/AbstractController/Base.html +++ b/src/classes/AbstractController/Base.html @@ -180,22 +180,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/base.rb, line 57
+      def abstract!
+        @abstract = true
+      end
- -
-
# File actionpack/lib/abstract_controller/base.rb, line 57
-def abstract!
-  @abstract = true
-end
-
-
- - + See on GitHub + + + +

@@ -220,30 +220,30 @@

Returns

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/base.rb, line 96
+      def action_methods
+        @action_methods ||= begin
+          # All public instance methods of this class, including ancestors
+          # except for public instance methods of Base and its ancestors.
+          methods = public_instance_methods(true) - internal_methods
+          # Be sure to include shadowed public instance methods of this class.
+          methods.concat(public_instance_methods(false))
+          methods.map!(&:to_s)
+          methods.to_set
+        end
+      end
- -
-
# File actionpack/lib/abstract_controller/base.rb, line 96
-def action_methods
-  @action_methods ||= begin
-    # All public instance methods of this class, including ancestors
-    # except for public instance methods of Base and its ancestors.
-    methods = public_instance_methods(true) - internal_methods
-    # Be sure to include shadowed public instance methods of this class.
-    methods.concat(public_instance_methods(false))
-    methods.map!(&:to_s)
-    methods.to_set
-  end
-end
-
-
- -
+ See on GitHub + + + +

@@ -263,22 +263,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/base.rb, line 111
+      def clear_action_methods!
+        @action_methods = nil
+      end
- -
-
# File actionpack/lib/abstract_controller/base.rb, line 111
-def clear_action_methods!
-  @action_methods = nil
-end
-
-
- -

+ See on GitHub + + + +

@@ -310,22 +310,22 @@

Returns

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/base.rb, line 125
+      def controller_path
+        @controller_path ||= name.delete_suffix("Controller").underscore unless anonymous?
+      end
- -
-
# File actionpack/lib/abstract_controller/base.rb, line 125
-def controller_path
-  @controller_path ||= name.delete_suffix("Controller").underscore unless anonymous?
-end
-
-
- -
+ See on GitHub + + + +

@@ -345,30 +345,30 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/base.rb, line 76
+      def internal_methods
+        controller = self
+        methods = []
+
+        until controller.abstract?
+          methods += controller.public_instance_methods(false)
+          controller = controller.superclass
+        end
+
+        controller.public_instance_methods(true) - methods
+      end
- -
-
# File actionpack/lib/abstract_controller/base.rb, line 76
-def internal_methods
-  controller = self
-  methods = []
-
-  until controller.abstract?
-    methods += controller.public_instance_methods(false)
-    controller = controller.superclass
-  end
-
-  controller.public_instance_methods(true) - methods
-end
-
-
- -

+ See on GitHub + + + +

@@ -388,23 +388,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/base.rb, line 130
+      def method_added(name)
+        super
+        clear_action_methods!
+      end
- -
-
# File actionpack/lib/abstract_controller/base.rb, line 130
-def method_added(name)
-  super
-  clear_action_methods!
-end
-
-
- -

+ See on GitHub + + + +

@@ -424,22 +424,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/base.rb, line 199
+    def self.supports_path?
+      true
+    end
- -
-
# File actionpack/lib/abstract_controller/base.rb, line 199
-def self.supports_path?
-  true
-end
-
-
- -

+ See on GitHub + + + + @@ -463,22 +463,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/base.rb, line 170
+    def action_methods
+      self.class.action_methods
+    end
- -
-
# File actionpack/lib/abstract_controller/base.rb, line 170
-def action_methods
-  self.class.action_methods
-end
-
-
- - + See on GitHub + + + +

@@ -498,21 +498,21 @@

- -
- - -
-
# File actionpack/lib/abstract_controller/base.rb, line 42
-attr_internal :action_name
+          
+            
+ + Source code + + +
# File actionpack/lib/abstract_controller/base.rb, line 42
+    attr_internal :action_name
 
-
-
- -

+ + See on GitHub + + + +

@@ -539,22 +539,22 @@

Parameters

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/base.rb, line 184
+    def available_action?(action_name)
+      _find_action_name(action_name)
+    end
- -
-
# File actionpack/lib/abstract_controller/base.rb, line 184
-def available_action?(action_name)
-  _find_action_name(action_name)
-end
-
-
- -
+ See on GitHub + + + +

@@ -574,22 +574,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/base.rb, line 165
+    def controller_path
+      self.class.controller_path
+    end
- -
-
# File actionpack/lib/abstract_controller/base.rb, line 165
-def controller_path
-  self.class.controller_path
-end
-
-
- -

+ See on GitHub + + + +

@@ -609,21 +609,21 @@

- -
- - -
-
# File actionpack/lib/abstract_controller/base.rb, line 46
-attr_internal :formats
+          
+            
+ + Source code + + +
# File actionpack/lib/abstract_controller/base.rb, line 46
+    attr_internal :formats
 
-
-
- -

+ + See on GitHub + + + +

@@ -643,22 +643,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/base.rb, line 191
+    def performed?
+      response_body
+    end
- -
-
# File actionpack/lib/abstract_controller/base.rb, line 191
-def performed?
-  response_body
-end
-
-
- -

+ See on GitHub + + + +

@@ -685,30 +685,30 @@

Returns

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/base.rb, line 151
+    def process(action, *args)
+      @_action_name = action.to_s
+
+      unless action_name = _find_action_name(@_action_name)
+        raise ActionNotFound.new("The action '#{action}' could not be found for #{self.class.name}", self, action)
+      end
+
+      @_response_body = nil
+
+      process_action(action_name, *args)
+    end
- -
-
# File actionpack/lib/abstract_controller/base.rb, line 151
-def process(action, *args)
-  @_action_name = action.to_s
-
-  unless action_name = _find_action_name(@_action_name)
-    raise ActionNotFound.new("The action '#{action}' could not be found for #{self.class.name}", self, action)
-  end
-
-  @_response_body = nil
-
-  process_action(action_name, *args)
-end
-
-
- -
+ See on GitHub + + + +

@@ -728,21 +728,21 @@

- -
- - -
-
# File actionpack/lib/abstract_controller/base.rb, line 38
-attr_internal :response_body
+          
+            
+ + Source code + + +
# File actionpack/lib/abstract_controller/base.rb, line 38
+    attr_internal :response_body
 
-
-
- -

+ + See on GitHub + + + + diff --git a/src/classes/AbstractController/Caching.html b/src/classes/AbstractController/Caching.html index eed036e8cd..494d857b45 100644 --- a/src/classes/AbstractController/Caching.html +++ b/src/classes/AbstractController/Caching.html @@ -120,22 +120,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/caching.rb, line 52
+    def view_cache_dependencies
+      self.class._view_cache_dependencies.filter_map { |dep| instance_exec(&dep) }
+    end
- -
-
# File actionpack/lib/abstract_controller/caching.rb, line 52
-def view_cache_dependencies
-  self.class._view_cache_dependencies.filter_map { |dep| instance_exec(&dep) }
-end
-
-
- - + See on GitHub + + + +

Instance Private methods

@@ -158,26 +158,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/caching.rb, line 58
+      def cache(key, options = {}, &block) # :doc:
+        if cache_configured?
+          cache_store.fetch(ActiveSupport::Cache.expand_cache_key(key, :controller), options, &block)
+        else
+          yield
+        end
+      end
- -
-
# File actionpack/lib/abstract_controller/caching.rb, line 58
-def cache(key, options = {}, &block) # :doc:
-  if cache_configured?
-    cache_store.fetch(ActiveSupport::Cache.expand_cache_key(key, :controller), options, &block)
-  else
-    yield
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/AbstractController/Caching/ClassMethods.html b/src/classes/AbstractController/Caching/ClassMethods.html index 8be3b1ec13..df2358a1df 100644 --- a/src/classes/AbstractController/Caching/ClassMethods.html +++ b/src/classes/AbstractController/Caching/ClassMethods.html @@ -75,22 +75,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/caching.rb, line 47
+      def view_cache_dependency(&dependency)
+        self._view_cache_dependencies += [dependency]
+      end
- -
-
# File actionpack/lib/abstract_controller/caching.rb, line 47
-def view_cache_dependency(&dependency)
-  self._view_cache_dependencies += [dependency]
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/AbstractController/Caching/ConfigMethods.html b/src/classes/AbstractController/Caching/ConfigMethods.html index aca5bca8bb..4538d1a338 100644 --- a/src/classes/AbstractController/Caching/ConfigMethods.html +++ b/src/classes/AbstractController/Caching/ConfigMethods.html @@ -79,22 +79,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/caching.rb, line 13
+      def cache_store
+        config.cache_store
+      end
- -
-
# File actionpack/lib/abstract_controller/caching.rb, line 13
-def cache_store
-  config.cache_store
-end
-
-
- - + See on GitHub + + + +

@@ -114,22 +114,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/caching.rb, line 17
+      def cache_store=(store)
+        config.cache_store = ActiveSupport::Cache.lookup_store(*store)
+      end
- -
-
# File actionpack/lib/abstract_controller/caching.rb, line 17
-def cache_store=(store)
-  config.cache_store = ActiveSupport::Cache.lookup_store(*store)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/AbstractController/Caching/Fragments.html b/src/classes/AbstractController/Caching/Fragments.html index dde293cde7..7300b1b25e 100644 --- a/src/classes/AbstractController/Caching/Fragments.html +++ b/src/classes/AbstractController/Caching/Fragments.html @@ -117,28 +117,28 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/caching/fragments.rb, line 70
+      def combined_fragment_cache_key(key)
+        head = self.class.fragment_cache_keys.map { |k| instance_exec(&k) }
+        tail = key.is_a?(Hash) ? url_for(key).split("://").last : key
+
+        cache_key = [:views, ENV["RAILS_CACHE_ID"] || ENV["RAILS_APP_VERSION"], head, tail]
+        cache_key.flatten!(1)
+        cache_key.compact!
+        cache_key
+      end
- -
-
# File actionpack/lib/abstract_controller/caching/fragments.rb, line 70
-def combined_fragment_cache_key(key)
-  head = self.class.fragment_cache_keys.map { |k| instance_exec(&k) }
-  tail = key.is_a?(Hash) ? url_for(key).split("://").last : key
-
-  cache_key = [:views, ENV["RAILS_CACHE_ID"] || ENV["RAILS_APP_VERSION"], head, tail]
-  cache_key.flatten!(1)
-  cache_key.compact!
-  cache_key
-end
-
-
- - + See on GitHub + + + +

@@ -169,31 +169,31 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/caching/fragments.rb, line 134
+      def expire_fragment(key, options = nil)
+        return unless cache_configured?
+        key = combined_fragment_cache_key(key) unless key.is_a?(Regexp)
+
+        instrument_fragment_cache :expire_fragment, key do
+          if key.is_a?(Regexp)
+            cache_store.delete_matched(key, options)
+          else
+            cache_store.delete(key, options)
+          end
+        end
+      end
- -
-
# File actionpack/lib/abstract_controller/caching/fragments.rb, line 134
-def expire_fragment(key, options = nil)
-  return unless cache_configured?
-  key = combined_fragment_cache_key(key) unless key.is_a?(Regexp)
-
-  instrument_fragment_cache :expire_fragment, key do
-    if key.is_a?(Regexp)
-      cache_store.delete_matched(key, options)
-    else
-      cache_store.delete(key, options)
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -213,27 +213,27 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/caching/fragments.rb, line 107
+      def fragment_exist?(key, options = nil)
+        return unless cache_configured?
+        key = combined_fragment_cache_key(key)
+
+        instrument_fragment_cache :exist_fragment?, key do
+          cache_store.exist?(key, options)
+        end
+      end
- -
-
# File actionpack/lib/abstract_controller/caching/fragments.rb, line 107
-def fragment_exist?(key, options = nil)
-  return unless cache_configured?
-  key = combined_fragment_cache_key(key)
-
-  instrument_fragment_cache :exist_fragment?, key do
-    cache_store.exist?(key, options)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -253,28 +253,28 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/caching/fragments.rb, line 95
+      def read_fragment(key, options = nil)
+        return unless cache_configured?
+
+        key = combined_fragment_cache_key(key)
+        instrument_fragment_cache :read_fragment, key do
+          result = cache_store.read(key, options)
+          result.respond_to?(:html_safe) ? result.html_safe : result
+        end
+      end
- -
-
# File actionpack/lib/abstract_controller/caching/fragments.rb, line 95
-def read_fragment(key, options = nil)
-  return unless cache_configured?
-
-  key = combined_fragment_cache_key(key)
-  instrument_fragment_cache :read_fragment, key do
-    result = cache_store.read(key, options)
-    result.respond_to?(:html_safe) ? result.html_safe : result
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -294,29 +294,29 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/caching/fragments.rb, line 82
+      def write_fragment(key, content, options = nil)
+        return content unless cache_configured?
+
+        key = combined_fragment_cache_key(key)
+        instrument_fragment_cache :write_fragment, key do
+          content = content.to_str
+          cache_store.write(key, content, options)
+        end
+        content
+      end
- -
-
# File actionpack/lib/abstract_controller/caching/fragments.rb, line 82
-def write_fragment(key, content, options = nil)
-  return content unless cache_configured?
-
-  key = combined_fragment_cache_key(key)
-  instrument_fragment_cache :write_fragment, key do
-    content = content.to_str
-    cache_store.write(key, content, options)
-  end
-  content
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html index b0b0a38f0f..4750217e48 100644 --- a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html +++ b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html @@ -91,22 +91,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/caching/fragments.rb, line 59
+        def fragment_cache_key(value = nil, &key)
+          self.fragment_cache_keys += [key || -> { value }]
+        end
- -
-
# File actionpack/lib/abstract_controller/caching/fragments.rb, line 59
-def fragment_cache_key(value = nil, &key)
-  self.fragment_cache_keys += [key || -> { value }]
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/AbstractController/Callbacks/ClassMethods.html b/src/classes/AbstractController/Callbacks/ClassMethods.html index 61cd30f6b9..b7b361fb90 100644 --- a/src/classes/AbstractController/Callbacks/ClassMethods.html +++ b/src/classes/AbstractController/Callbacks/ClassMethods.html @@ -141,29 +141,29 @@

Block Parameters

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/callbacks.rb, line 119
+      def _insert_callbacks(callbacks, block = nil)
+        options = callbacks.extract_options!
+        callbacks.push(block) if block
+        options[:filters] = callbacks
+        _normalize_callback_options(options)
+        options.delete(:filters)
+        callbacks.each do |callback|
+          yield callback, options
+        end
+      end
- -
-
# File actionpack/lib/abstract_controller/callbacks.rb, line 119
-def _insert_callbacks(callbacks, block = nil)
-  options = callbacks.extract_options!
-  callbacks.push(block) if block
-  options[:filters] = callbacks
-  _normalize_callback_options(options)
-  options.delete(:filters)
-  callbacks.each do |callback|
-    yield callback, options
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -202,23 +202,23 @@

Options

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/callbacks.rb, line 94
+      def _normalize_callback_options(options)
+        _normalize_callback_option(options, :only, :if)
+        _normalize_callback_option(options, :except, :unless)
+      end
- -
-
# File actionpack/lib/abstract_controller/callbacks.rb, line 94
-def _normalize_callback_options(options)
-  _normalize_callback_option(options, :only, :if)
-  _normalize_callback_option(options, :except, :unless)
-end
-
-
- -
+ See on GitHub + + + +

@@ -239,20 +239,10 @@

- -
- - -
-
# File actionpack/lib/abstract_controller/callbacks.rb, line 171
-      
-
-
- -

+ + See on GitHub + +

@@ -273,20 +263,10 @@

- -
- - -
-
# File actionpack/lib/abstract_controller/callbacks.rb, line 192
-      
-
-
- -

+ + See on GitHub + +

@@ -307,20 +287,10 @@

- -
- - -
-
# File actionpack/lib/abstract_controller/callbacks.rb, line 220
-      
-
-
- -

+ + See on GitHub + +

@@ -343,20 +313,10 @@

- -
- - -
-
# File actionpack/lib/abstract_controller/callbacks.rb, line 160
-      
-
-
- -

+ + See on GitHub + +

@@ -377,20 +337,10 @@

- -
- - -
-
# File actionpack/lib/abstract_controller/callbacks.rb, line 199
-      
-
-
- -

+ + See on GitHub + +

@@ -413,20 +363,10 @@

- -
- - -
-
# File actionpack/lib/abstract_controller/callbacks.rb, line 131
-      
-
-
- -

+ + See on GitHub + +

@@ -447,20 +387,10 @@

- -
- - -
-
# File actionpack/lib/abstract_controller/callbacks.rb, line 178
-      
-
-
- -

+ + See on GitHub + +

@@ -481,20 +411,10 @@

- -
- - -
-
# File actionpack/lib/abstract_controller/callbacks.rb, line 206
-      
-
-
- -

+ + See on GitHub + +

@@ -517,20 +437,10 @@

- -
- - -
-
# File actionpack/lib/abstract_controller/callbacks.rb, line 142
-      
-
-
- -

+ + See on GitHub + +

@@ -551,20 +461,10 @@

- -
- - -
-
# File actionpack/lib/abstract_controller/callbacks.rb, line 185
-      
-
-
- -

+ + See on GitHub + +

@@ -585,20 +485,10 @@

- -
- - -
-
# File actionpack/lib/abstract_controller/callbacks.rb, line 213
-      
-
-
- -

+ + See on GitHub + +

@@ -619,20 +509,10 @@

- -
- - -
-
# File actionpack/lib/abstract_controller/callbacks.rb, line 153
-      
-
-
- -

+ + See on GitHub + + diff --git a/src/classes/AbstractController/Collector.html b/src/classes/AbstractController/Collector.html index 4a253a2b0a..bb6fc3e5ac 100644 --- a/src/classes/AbstractController/Collector.html +++ b/src/classes/AbstractController/Collector.html @@ -74,28 +74,28 @@

- -
- - -
-
# File actionpack/lib/abstract_controller/collector.rb, line 7
-    def self.generate_method_for_mime(mime)
-      sym = mime.is_a?(Symbol) ? mime : mime.to_sym
-      class_eval <<-RUBY, __FILE__, __LINE__ + 1
-        def #{sym}(*args, &block)
-          custom(Mime[:#{sym}], *args, &block)
+          
+            
+ + Source code + + +
# File actionpack/lib/abstract_controller/collector.rb, line 7
+    def self.generate_method_for_mime(mime)
+      sym = mime.is_a?(Symbol) ? mime : mime.to_sym
+      class_eval <<-RUBY, __FILE__, __LINE__ + 1
+        def #{sym}(*args, &block)
+          custom(Mime[:#{sym}], *args, &block)
         end
         ruby2_keywords(:#{sym})
-      RUBY
-    end
-
-
- - + RUBY + end + + See on GitHub + + + + diff --git a/src/classes/AbstractController/DoubleRenderError.html b/src/classes/AbstractController/DoubleRenderError.html index 2200a4c1be..07db1e298b 100644 --- a/src/classes/AbstractController/DoubleRenderError.html +++ b/src/classes/AbstractController/DoubleRenderError.html @@ -98,22 +98,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/rendering.rb, line 12
+    def initialize(message = nil)
+      super(message || DEFAULT_MESSAGE)
+    end
- -
-
# File actionpack/lib/abstract_controller/rendering.rb, line 12
-def initialize(message = nil)
-  super(message || DEFAULT_MESSAGE)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/AbstractController/Helpers.html b/src/classes/AbstractController/Helpers.html index c70e8ad178..bd91dc39c7 100644 --- a/src/classes/AbstractController/Helpers.html +++ b/src/classes/AbstractController/Helpers.html @@ -109,22 +109,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/helpers.rb, line 44
+    def _helpers
+      self.class._helpers
+    end
- -
-
# File actionpack/lib/abstract_controller/helpers.rb, line 44
-def _helpers
-  self.class._helpers
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/AbstractController/Helpers/ClassMethods.html b/src/classes/AbstractController/Helpers/ClassMethods.html index c2b9d78e9b..ac49c21e2e 100644 --- a/src/classes/AbstractController/Helpers/ClassMethods.html +++ b/src/classes/AbstractController/Helpers/ClassMethods.html @@ -113,25 +113,25 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/helpers.rb, line 231
+      def _helpers_for_modification
+        unless @_helpers
+          self._helpers = define_helpers_module(self, superclass._helpers)
+        end
+        _helpers
+      end
- -
-
# File actionpack/lib/abstract_controller/helpers.rb, line 231
-def _helpers_for_modification
-  unless @_helpers
-    self._helpers = define_helpers_module(self, superclass._helpers)
-  end
-  _helpers
-end
-
-
- - + See on GitHub + + + +

@@ -156,20 +156,10 @@

- -
- - -
-
# File actionpack/lib/abstract_controller/helpers.rb, line 107
-      
-
-
- -

+ + See on GitHub + +

@@ -189,27 +179,27 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/helpers.rb, line 222
+      def clear_helpers
+        inherited_helper_methods = _helper_methods
+        self._helpers = Module.new
+        self._helper_methods = Array.new
+
+        inherited_helper_methods.each { |meth| helper_method meth }
+        default_helper_module! unless anonymous?
+      end
- -
-
# File actionpack/lib/abstract_controller/helpers.rb, line 222
-def clear_helpers
-  inherited_helper_methods = _helper_methods
-  self._helpers = Module.new
-  self._helper_methods = Array.new
-
-  inherited_helper_methods.each { |meth| helper_method meth }
-  default_helper_module! unless anonymous?
-end
-
-
- -

+ See on GitHub + + + +

@@ -277,27 +267,27 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/helpers.rb, line 211
+      def helper(*args, &block)
+        modules_for_helpers(args).each do |mod|
+          next if _helpers.include?(mod)
+          _helpers_for_modification.include(mod)
+        end
+
+        _helpers_for_modification.module_eval(&block) if block_given?
+      end
- -
-
# File actionpack/lib/abstract_controller/helpers.rb, line 211
-def helper(*args, &block)
-  modules_for_helpers(args).each do |mod|
-    next if _helpers.include?(mod)
-    _helpers_for_modification.include(mod)
-  end
-
-  _helpers_for_modification.module_eval(&block) if block_given?
-end
-
-
- -

+ See on GitHub + + + +

@@ -341,38 +331,38 @@

Parameters

- -
- - -
-
# File actionpack/lib/abstract_controller/helpers.rb, line 140
-      def helper_method(*methods)
-        methods.flatten!
-        self._helper_methods += methods
-
-        location = caller_locations(1, 1).first
-        file, line = location.path, location.lineno
-
-        methods.each do |method|
-          # def current_user(*args, &block)
-          #   controller.send(:'current_user', *args, &block)
-          # end
-          _helpers_for_modification.class_eval <<~ruby_eval.lines.map(&:strip).join(";"), file, line
-            def #{method}(*args, &block)
-              controller.send(:'#{method}', *args, &block)
+          
+            
+ + Source code + + +
# File actionpack/lib/abstract_controller/helpers.rb, line 140
+      def helper_method(*methods)
+        methods.flatten!
+        self._helper_methods += methods
+
+        location = caller_locations(1, 1).first
+        file, line = location.path, location.lineno
+
+        methods.each do |method|
+          # def current_user(*args, &block)
+          #   controller.send(:'current_user', *args, &block)
+          # end
+          _helpers_for_modification.class_eval <<~ruby_eval.lines.map(&:strip).join(";"), file, line
+            def #{method}(*args, &block)
+              controller.send(:'#{method}', *args, &block)
             end
-            ruby2_keywords(:'#{method}')
-          ruby_eval
-        end
-      end
-
-
- -
+ ruby2_keywords(:'#{method}') + ruby_eval + end + end + + See on GitHub + + + +

@@ -392,26 +382,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/helpers.rb, line 84
+      def inherited(klass)
+        # Inherited from parent by default
+        klass._helpers = nil
+
+        klass.class_eval { default_helper_module! } unless klass.anonymous?
+        super
+      end
- -
-
# File actionpack/lib/abstract_controller/helpers.rb, line 84
-def inherited(klass)
-  # Inherited from parent by default
-  klass._helpers = nil
-
-  klass.class_eval { default_helper_module! } unless klass.anonymous?
-  super
-end
-
-
- -

+ See on GitHub + + + +

@@ -432,20 +422,10 @@

- -
- - -
-
# File actionpack/lib/abstract_controller/helpers.rb, line 97
-      
-
-
- -

+ + See on GitHub + + diff --git a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html b/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html index ae6b58c9c0..7d7658e2d8 100644 --- a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html +++ b/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html @@ -80,30 +80,30 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/helpers.rb, line 28
+      def initialize(error, path)
+        @error = error
+        @path  = "helpers/#{path}.rb"
+        set_backtrace error.backtrace
+
+        if /^#{path}(\.rb)?$/.match?(error.path)
+          super("Missing helper file helpers/%s.rb" % path)
+        else
+          raise error
+        end
+      end
- -
-
# File actionpack/lib/abstract_controller/helpers.rb, line 28
-def initialize(error, path)
-  @error = error
-  @path  = "helpers/#{path}.rb"
-  set_backtrace error.backtrace
-
-  if /^#{path}(\.rb)?$/.match?(error.path)
-    super("Missing helper file helpers/%s.rb" % path)
-  else
-    raise error
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/AbstractController/Helpers/MissingHelperError.html b/src/classes/AbstractController/Helpers/MissingHelperError.html deleted file mode 100644 index dd8cab6735..0000000000 --- a/src/classes/AbstractController/Helpers/MissingHelperError.html +++ /dev/null @@ -1,115 +0,0 @@ ---- -title: AbstractController::Helpers::MissingHelperError -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

-
    - -
  • - new -
  • - -
- - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - new(error, path) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/abstract_controller/helpers.rb, line 27
-def initialize(error, path)
-  @error = error
-  @path  = "helpers/#{path}.rb"
-  set_backtrace error.backtrace
-
-  if /^#{path}(\.rb)?$/.match?(error.path)
-    super("Missing helper file helpers/%s.rb" % path)
-  else
-    raise error
-  end
-end
-
-
- -
- - - - - -
- -
-
diff --git a/src/classes/AbstractController/Railties/RoutesHelpers.html b/src/classes/AbstractController/Railties/RoutesHelpers.html index 0c355239b4..18c3f6fa47 100644 --- a/src/classes/AbstractController/Railties/RoutesHelpers.html +++ b/src/classes/AbstractController/Railties/RoutesHelpers.html @@ -74,32 +74,32 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/railties/routes_helpers.rb, line 8
+      def self.with(routes, include_path_helpers = true)
+        Module.new do
+          define_method(:inherited) do |klass|
+            super(klass)
+
+            if namespace = klass.module_parents.detect { |m| m.respond_to?(:railtie_routes_url_helpers) }
+              klass.include(namespace.railtie_routes_url_helpers(include_path_helpers))
+            else
+              klass.include(routes.url_helpers(include_path_helpers))
+            end
+          end
+        end
+      end
- -
-
# File actionpack/lib/abstract_controller/railties/routes_helpers.rb, line 8
-def self.with(routes, include_path_helpers = true)
-  Module.new do
-    define_method(:inherited) do |klass|
-      super(klass)
-
-      if namespace = klass.module_parents.detect { |m| m.respond_to?(:railtie_routes_url_helpers) }
-        klass.include(namespace.railtie_routes_url_helpers(include_path_helpers))
-      else
-        klass.include(routes.url_helpers(include_path_helpers))
-      end
-    end
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/AbstractController/Rendering.html b/src/classes/AbstractController/Rendering.html index ac4094f487..344165c1de 100644 --- a/src/classes/AbstractController/Rendering.html +++ b/src/classes/AbstractController/Rendering.html @@ -137,30 +137,30 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/rendering.rb, line 25
+    def render(*args, &block)
+      options = _normalize_render(*args, &block)
+      rendered_body = render_to_body(options)
+      if options[:html]
+        _set_html_content_type
+      else
+        _set_rendered_content_type rendered_format
+      end
+      _set_vary_header
+      self.response_body = rendered_body
+    end
- -
-
# File actionpack/lib/abstract_controller/rendering.rb, line 25
-def render(*args, &block)
-  options = _normalize_render(*args, &block)
-  rendered_body = render_to_body(options)
-  if options[:html]
-    _set_html_content_type
-  else
-    _set_rendered_content_type rendered_format
-  end
-  _set_vary_header
-  self.response_body = rendered_body
-end
-
-
- - + See on GitHub + + + +

@@ -180,21 +180,21 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/rendering.rb, line 49
+    def render_to_body(options = {})
+    end
- -
-
# File actionpack/lib/abstract_controller/rendering.rb, line 49
-def render_to_body(options = {})
-end
-
-
- -

+ See on GitHub + + + +

@@ -216,23 +216,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/rendering.rb, line 43
+    def render_to_string(*args, &block)
+      options = _normalize_render(*args, &block)
+      render_to_body(options)
+    end
- -
-
# File actionpack/lib/abstract_controller/rendering.rb, line 43
-def render_to_string(*args, &block)
-  options = _normalize_render(*args, &block)
-  render_to_body(options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -252,22 +252,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/rendering.rb, line 53
+    def rendered_format
+      Mime[:text]
+    end
- -
-
# File actionpack/lib/abstract_controller/rendering.rb, line 53
-def rendered_format
-  Mime[:text]
-end
-
-
- -

+ See on GitHub + + + +

@@ -287,26 +287,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/rendering.rb, line 61
+    def view_assigns
+      variables = instance_variables - _protected_ivars
+
+      variables.each_with_object({}) do |name, hash|
+        hash[name.slice(1, name.length)] = instance_variable_get(name)
+      end
+    end
- -
-
# File actionpack/lib/abstract_controller/rendering.rb, line 61
-def view_assigns
-  variables = instance_variables - _protected_ivars
-
-  variables.each_with_object({}) do |name, hash|
-    hash[name.slice(1, name.length)] = instance_variable_get(name)
-  end
-end
-
-
- -

+ See on GitHub + + + +

Instance Private methods

@@ -329,32 +329,32 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/rendering.rb, line 73
+    def _normalize_args(action = nil, options = {}) # :doc:
+      if action.respond_to?(:permitted?)
+        if action.permitted?
+          action
+        else
+          raise ArgumentError, "render parameters are not permitted"
+        end
+      elsif action.is_a?(Hash)
+        action
+      else
+        options
+      end
+    end
- -
-
# File actionpack/lib/abstract_controller/rendering.rb, line 73
-def _normalize_args(action = nil, options = {}) # :doc:
-  if action.respond_to?(:permitted?)
-    if action.permitted?
-      action
-    else
-      raise ArgumentError, "render parameters are not permitted"
-    end
-  elsif action.is_a?(Hash)
-    action
-  else
-    options
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -374,22 +374,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/rendering.rb, line 88
+    def _normalize_options(options) # :doc:
+      options
+    end
- -
-
# File actionpack/lib/abstract_controller/rendering.rb, line 88
-def _normalize_options(options) # :doc:
-  options
-end
-
-
- -

+ See on GitHub + + + +

@@ -409,22 +409,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/rendering.rb, line 93
+    def _process_options(options) # :doc:
+      options
+    end
- -
-
# File actionpack/lib/abstract_controller/rendering.rb, line 93
-def _process_options(options) # :doc:
-  options
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/AbstractController/Translation.html b/src/classes/AbstractController/Translation.html index 48320f02b4..825ac847f7 100644 --- a/src/classes/AbstractController/Translation.html +++ b/src/classes/AbstractController/Translation.html @@ -91,7 +91,8 @@

- + +

@@ -115,22 +116,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/translation.rb, line 29
+    def localize(object, **options)
+      I18n.localize(object, **options)
+    end
- -
-
# File actionpack/lib/abstract_controller/translation.rb, line 29
-def localize(object, **options)
-  I18n.localize(object, **options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -154,7 +155,8 @@

-

+ +

@@ -180,30 +182,30 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/translation.rb, line 15
+    def translate(key, **options)
+      if key&.start_with?(".")
+        path = controller_path.tr("/", ".")
+        defaults = [:"#{path}#{key}"]
+        defaults << options[:default] if options[:default]
+        options[:default] = defaults.flatten
+        key = "#{path}.#{action_name}#{key}"
+      end
+
+      ActiveSupport::HtmlSafeTranslation.translate(key, **options)
+    end
- -
-
# File actionpack/lib/abstract_controller/translation.rb, line 15
-def translate(key, **options)
-  if key&.start_with?(".")
-    path = controller_path.tr("/", ".")
-    defaults = [:"#{path}#{key}"]
-    defaults << options[:default] if options[:default]
-    options[:default] = defaults.flatten
-    key = "#{path}.#{action_name}#{key}"
-  end
-
-  ActiveSupport::HtmlSafeTranslation.translate(key, **options)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/AbstractController/UrlFor.html b/src/classes/AbstractController/UrlFor.html index 0c3e44b003..06f7c12193 100644 --- a/src/classes/AbstractController/UrlFor.html +++ b/src/classes/AbstractController/UrlFor.html @@ -112,23 +112,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/url_for.rb, line 16
+    def _routes
+      raise "In order to use #url_for, you must include routing helpers explicitly. " \
+            "For instance, `include Rails.application.routes.url_helpers`."
+    end
- -
-
# File actionpack/lib/abstract_controller/url_for.rb, line 16
-def _routes
-  raise "In order to use #url_for, you must include routing helpers explicitly. " \
-        "For instance, `include Rails.application.routes.url_helpers`."
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/AbstractController/UrlFor/ClassMethods.html b/src/classes/AbstractController/UrlFor/ClassMethods.html index 718c562e3e..69ad836afd 100644 --- a/src/classes/AbstractController/UrlFor/ClassMethods.html +++ b/src/classes/AbstractController/UrlFor/ClassMethods.html @@ -79,22 +79,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/url_for.rb, line 22
+      def _routes
+        nil
+      end
- -
-
# File actionpack/lib/abstract_controller/url_for.rb, line 22
-def _routes
-  nil
-end
-
-
- - + See on GitHub + + + +

@@ -114,26 +114,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/abstract_controller/url_for.rb, line 26
+      def action_methods
+        @action_methods ||= if _routes
+          super - _routes.named_routes.helper_names
+        else
+          super
+        end
+      end
- -
-
# File actionpack/lib/abstract_controller/url_for.rb, line 26
-def action_methods
-  @action_methods ||= if _routes
-    super - _routes.named_routes.helper_names
-  else
-    super
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionCable.html b/src/classes/ActionCable.html index 3eebec3eee..a3d0c42cf9 100644 --- a/src/classes/ActionCable.html +++ b/src/classes/ActionCable.html @@ -263,22 +263,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/gem_version.rb, line 5
+  def self.gem_version
+    Gem::Version.new VERSION::STRING
+  end
- -
-
# File actioncable/lib/action_cable/gem_version.rb, line 5
-def self.gem_version
-  Gem::Version.new VERSION::STRING
-end
-
-
- - + See on GitHub + + + +

@@ -298,22 +298,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/version.rb, line 7
+  def self.version
+    gem_version
+  end
- -
-
# File actioncable/lib/action_cable/version.rb, line 7
-def self.version
-  gem_version
-end
-
-
- -

+ See on GitHub + + + + @@ -337,22 +337,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable.rb, line 71
+                  def server
+    @server ||= ActionCable::Server::Base.new
+  end
- -
-
# File actioncable/lib/action_cable.rb, line 71
-                def server
-  @server ||= ActionCable::Server::Base.new
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html index 7c74bec23f..248675d53b 100644 --- a/src/classes/ActionCable/Channel/Base.html +++ b/src/classes/ActionCable/Channel/Base.html @@ -300,30 +300,30 @@

Returns

- -
- - -
-
# File actioncable/lib/action_cable/channel/base.rb, line 120
-def action_methods
-  @action_methods ||= begin
-    # All public instance methods of this class, including ancestors
-    methods = (public_instance_methods(true) -
-      # Except for public instance methods of Base and its ancestors
-      ActionCable::Channel::Base.public_instance_methods(true) +
-      # Be sure to include shadowed public instance methods of this class
-      public_instance_methods(false)).uniq.map(&:to_s)
-    methods.to_set
-  end
-end
-
-
- - + +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/base.rb, line 120
+        def action_methods
+          @action_methods ||= begin
+            # All public instance methods of this class, including ancestors
+            methods = (public_instance_methods(true) -
+              # Except for public instance methods of Base and its ancestors
+              ActionCable::Channel::Base.public_instance_methods(true) +
+              # Be sure to include shadowed public instance methods of this class
+              public_instance_methods(false)).uniq.map(&:to_s)
+            methods.to_set
+          end
+        end
+ + See on GitHub + +
+ +

@@ -343,35 +343,35 @@

- -
- - -
-
# File actioncable/lib/action_cable/channel/base.rb, line 147
-def initialize(connection, identifier, params = {})
-  @connection = connection
-  @identifier = identifier
-  @params     = params
+          
+            
+ + Source code + - # When a channel is streaming via pubsub, we want to delay the confirmation - # transmission until pubsub subscription is confirmed. - # - # The counter starts at 1 because it's awaiting a call to #subscribe_to_channel - @defer_subscription_confirmation_counter = Concurrent::AtomicFixnum.new(1) +
# File actioncable/lib/action_cable/channel/base.rb, line 147
+      def initialize(connection, identifier, params = {})
+        @connection = connection
+        @identifier = identifier
+        @params     = params
 
-  @reject_subscription = nil
-  @subscription_confirmation_sent = nil
+        # When a channel is streaming via pubsub, we want to delay the confirmation
+        # transmission until pubsub subscription is confirmed.
+        #
+        # The counter starts at 1 because it's awaiting a call to #subscribe_to_channel
+        @defer_subscription_confirmation_counter = Concurrent::AtomicFixnum.new(1)
 
-  delegate_connection_identifiers
-end
-
-
- -

+ @reject_subscription = nil + @subscription_confirmation_sent = nil + + delegate_connection_identifiers + end + + See on GitHub + + + +

Class Private methods

@@ -394,22 +394,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/base.rb, line 136
+          def clear_action_methods! # :doc:
+            @action_methods = nil
+          end
- -
-
# File actioncable/lib/action_cable/channel/base.rb, line 136
-def clear_action_methods! # :doc:
-  @action_methods = nil
-end
-
-
- - + See on GitHub + + + +

@@ -429,23 +429,23 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/base.rb, line 141
+          def method_added(name) # :doc:
+            super
+            clear_action_methods!
+          end
- -
-
# File actioncable/lib/action_cable/channel/base.rb, line 141
-def method_added(name) # :doc:
-  super
-  clear_action_methods!
-end
-
-
- -

+ See on GitHub + + + + @@ -469,31 +469,31 @@

- -
- - -
-
# File actioncable/lib/action_cable/channel/base.rb, line 167
-def perform_action(data)
-  action = extract_action(data)
+          
+            
+ + Source code + - if processable_action?(action) - payload = { channel_class: self.class.name, action: action, data: data } - ActiveSupport::Notifications.instrument("perform_action.action_cable", payload) do - dispatch_action(action, data) - end - else - logger.error "Unable to process #{action_signature(action, data)}" - end -end
-
-
- - +
# File actioncable/lib/action_cable/channel/base.rb, line 167
+      def perform_action(data)
+        action = extract_action(data)
+
+        if processable_action?(action)
+          payload = { channel_class: self.class.name, action: action, data: data }
+          ActiveSupport::Notifications.instrument("perform_action.action_cable", payload) do
+            dispatch_action(action, data)
+          end
+        else
+          logger.error "Unable to process #{action_signature(action, data)}"
+        end
+      end
+ + See on GitHub + + + +

@@ -513,27 +513,27 @@

- -
- - -
-
# File actioncable/lib/action_cable/channel/base.rb, line 182
-def subscribe_to_channel
-  run_callbacks :subscribe do
-    subscribed
-  end
+          
+            
+ + Source code + - reject_subscription if subscription_rejected? - ensure_confirmation_sent -end
-
-
- -

+
# File actioncable/lib/action_cable/channel/base.rb, line 182
+      def subscribe_to_channel
+        run_callbacks :subscribe do
+          subscribed
+        end
+
+        reject_subscription if subscription_rejected?
+        ensure_confirmation_sent
+      end
+ + See on GitHub + + + +

Instance Private methods

@@ -556,22 +556,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/base.rb, line 233
+        def defer_subscription_confirmation! # :doc:
+          @defer_subscription_confirmation_counter.increment
+        end
- -
-
# File actioncable/lib/action_cable/channel/base.rb, line 233
-def defer_subscription_confirmation! # :doc:
-  @defer_subscription_confirmation_counter.increment
-end
-
-
- - + See on GitHub + + + +

@@ -591,22 +591,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/base.rb, line 237
+        def defer_subscription_confirmation? # :doc:
+          @defer_subscription_confirmation_counter.value > 0
+        end
- -
-
# File actioncable/lib/action_cable/channel/base.rb, line 237
-def defer_subscription_confirmation? # :doc:
-  @defer_subscription_confirmation_counter.value > 0
-end
-
-
- -

+ See on GitHub + + + +

@@ -626,24 +626,24 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/base.rb, line 227
+        def ensure_confirmation_sent # :doc:
+          return if subscription_rejected?
+          @defer_subscription_confirmation_counter.decrement
+          transmit_subscription_confirmation unless defer_subscription_confirmation?
+        end
- -
-
# File actioncable/lib/action_cable/channel/base.rb, line 227
-def ensure_confirmation_sent # :doc:
-  return if subscription_rejected?
-  @defer_subscription_confirmation_counter.decrement
-  transmit_subscription_confirmation unless defer_subscription_confirmation?
-end
-
-
- -

+ See on GitHub + + + +

@@ -663,22 +663,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/base.rb, line 245
+        def reject # :doc:
+          @reject_subscription = true
+        end
- -
-
# File actioncable/lib/action_cable/channel/base.rb, line 245
-def reject # :doc:
-  @reject_subscription = true
-end
-
-
- -

+ See on GitHub + + + +

@@ -698,22 +698,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/base.rb, line 202
+        def subscribed # :doc:
+          # Override in subclasses
+        end
- -
-
# File actioncable/lib/action_cable/channel/base.rb, line 202
-def subscribed # :doc:
-  # Override in subclasses
-end
-
-
- -

+ See on GitHub + + + +

@@ -733,22 +733,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/base.rb, line 241
+        def subscription_confirmation_sent? # :doc:
+          @subscription_confirmation_sent
+        end
- -
-
# File actioncable/lib/action_cable/channel/base.rb, line 241
-def subscription_confirmation_sent? # :doc:
-  @subscription_confirmation_sent
-end
-
-
- -

+ See on GitHub + + + +

@@ -768,22 +768,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/base.rb, line 249
+        def subscription_rejected? # :doc:
+          @reject_subscription
+        end
- -
-
# File actioncable/lib/action_cable/channel/base.rb, line 249
-def subscription_rejected? # :doc:
-  @reject_subscription
-end
-
-
- -

+ See on GitHub + + + +

@@ -803,31 +803,31 @@

- -
- - -
-
# File actioncable/lib/action_cable/channel/base.rb, line 214
-def transmit(data, via: nil) # :doc:
-  logger.debug do
-    status = "#{self.class.name} transmitting #{data.inspect.truncate(300)}"
-    status += " (via #{via})" if via
-    status
-  end
+          
+            
+ + Source code + - payload = { channel_class: self.class.name, data: data, via: via } - ActiveSupport::Notifications.instrument("transmit.action_cable", payload) do - connection.transmit identifier: @identifier, message: data - end -end
-
-
- -

+
# File actioncable/lib/action_cable/channel/base.rb, line 214
+        def transmit(data, via: nil) # :doc:
+          logger.debug do
+            status = "#{self.class.name} transmitting #{data.inspect.truncate(300)}"
+            status += " (via #{via})" if via
+            status
+          end
+
+          payload = { channel_class: self.class.name, data: data, via: via }
+          ActiveSupport::Notifications.instrument("transmit.action_cable", payload) do
+            connection.transmit identifier: @identifier, message: data
+          end
+        end
+ + See on GitHub + + + +

@@ -847,22 +847,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/base.rb, line 208
+        def unsubscribed # :doc:
+          # Override in subclasses
+        end
- -
-
# File actioncable/lib/action_cable/channel/base.rb, line 208
-def unsubscribed # :doc:
-  # Override in subclasses
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html index 3ebd407945..dc7dea20d5 100644 --- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html +++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html @@ -79,22 +79,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/broadcasting.rb, line 16
+        def broadcast_to(model, message)
+          ActionCable.server.broadcast(broadcasting_for(model), message)
+        end
- -
-
# File actioncable/lib/action_cable/channel/broadcasting.rb, line 16
-def broadcast_to(model, message)
-  ActionCable.server.broadcast(broadcasting_for(model), message)
-end
-
-
- - + See on GitHub + + + +

@@ -119,22 +119,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/broadcasting.rb, line 26
+        def broadcasting_for(model)
+          serialize_broadcasting([ channel_name, model ])
+        end
- -
-
# File actioncable/lib/action_cable/channel/broadcasting.rb, line 26
-def broadcasting_for(model)
-  serialize_broadcasting([ channel_name, model ])
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html index ee24c60799..b0b642fa7d 100644 --- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html +++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html @@ -99,22 +99,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/callbacks.rb, line 37
+        def after_subscribe(*methods, &block)
+          set_callback(:subscribe, :after, *methods, &block)
+        end
- -
-
# File actioncable/lib/action_cable/channel/callbacks.rb, line 37
-def after_subscribe(*methods, &block)
-  set_callback(:subscribe, :after, *methods, &block)
-end
-
-
- - + See on GitHub + + + +

@@ -138,22 +138,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/callbacks.rb, line 46
+        def after_unsubscribe(*methods, &block)
+          set_callback(:unsubscribe, :after, *methods, &block)
+        end
- -
-
# File actioncable/lib/action_cable/channel/callbacks.rb, line 46
-def after_unsubscribe(*methods, &block)
-  set_callback(:unsubscribe, :after, *methods, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -173,22 +173,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/callbacks.rb, line 33
+        def before_subscribe(*methods, &block)
+          set_callback(:subscribe, :before, *methods, &block)
+        end
- -
-
# File actioncable/lib/action_cable/channel/callbacks.rb, line 33
-def before_subscribe(*methods, &block)
-  set_callback(:subscribe, :before, *methods, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -208,22 +208,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/callbacks.rb, line 42
+        def before_unsubscribe(*methods, &block)
+          set_callback(:unsubscribe, :before, *methods, &block)
+        end
- -
-
# File actioncable/lib/action_cable/channel/callbacks.rb, line 42
-def before_unsubscribe(*methods, &block)
-  set_callback(:unsubscribe, :before, *methods, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -247,7 +247,8 @@

-

+ +

@@ -271,7 +272,8 @@

-

+ + diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html index fe69693733..04b60309b3 100644 --- a/src/classes/ActionCable/Channel/ChannelStub.html +++ b/src/classes/ActionCable/Channel/ChannelStub.html @@ -107,22 +107,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/test_case.rb, line 24
+      def confirmed?
+        subscription_confirmation_sent?
+      end
- -
-
# File actioncable/lib/action_cable/channel/test_case.rb, line 24
-def confirmed?
-  subscription_confirmation_sent?
-end
-
-
- - + See on GitHub + + + +

@@ -142,22 +142,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/test_case.rb, line 28
+      def rejected?
+        subscription_rejected?
+      end
- -
-
# File actioncable/lib/action_cable/channel/test_case.rb, line 28
-def rejected?
-  subscription_rejected?
-end
-
-
- -

+ See on GitHub + + + +

@@ -181,20 +181,20 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
+      def start_periodic_timers; end
- -
-
# File actioncable/lib/action_cable/channel/test_case.rb, line 45
-def start_periodic_timers; end
-
-
- -

+ See on GitHub + + + +

@@ -214,22 +214,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/test_case.rb, line 36
+      def stop_all_streams
+        @_streams = []
+      end
- -
-
# File actioncable/lib/action_cable/channel/test_case.rb, line 36
-def stop_all_streams
-  @_streams = []
-end
-
-
- -

+ See on GitHub + + + +

@@ -253,7 +253,8 @@

-

+ +

@@ -273,22 +274,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/test_case.rb, line 32
+      def stream_from(broadcasting, *)
+        streams << broadcasting
+      end
- -
-
# File actioncable/lib/action_cable/channel/test_case.rb, line 32
-def stream_from(broadcasting, *)
-  streams << broadcasting
-end
-
-
- -

+ See on GitHub + + + +

@@ -308,22 +309,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/test_case.rb, line 40
+      def streams
+        @_streams ||= []
+      end
- -
-
# File actioncable/lib/action_cable/channel/test_case.rb, line 40
-def streams
-  @_streams ||= []
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html index 3052c26604..886c2c125c 100644 --- a/src/classes/ActionCable/Channel/ConnectionStub.html +++ b/src/classes/ActionCable/Channel/ConnectionStub.html @@ -134,31 +134,31 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/test_case.rb, line 54
+      def initialize(identifiers = {})
+        @server = ActionCable.server
+        @transmissions = []
+
+        identifiers.each do |identifier, val|
+          define_singleton_method(identifier) { val }
+        end
+
+        @subscriptions = ActionCable::Connection::Subscriptions.new(self)
+        @identifiers = identifiers.keys
+        @logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
+      end
- -
-
# File actioncable/lib/action_cable/channel/test_case.rb, line 54
-def initialize(identifiers = {})
-  @server = ActionCable.server
-  @transmissions = []
-
-  identifiers.each do |identifier, val|
-    define_singleton_method(identifier) { val }
-  end
-
-  @subscriptions = ActionCable::Connection::Subscriptions.new(self)
-  @identifiers = identifiers.keys
-  @logger = ActiveSupport::TaggedLogging.new ActiveSupport::Logger.new(StringIO.new)
-end
-
-
- - + See on GitHub + + + + @@ -182,22 +182,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/test_case.rb, line 71
+      def connection_identifier
+        @connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
+      end
- -
-
# File actioncable/lib/action_cable/channel/test_case.rb, line 71
-def connection_identifier
-  @connection_identifier ||= connection_gid(identifiers.filter_map { |id| send(id.to_sym) if id })
-end
-
-
- - + See on GitHub + + + +

@@ -217,22 +217,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/test_case.rb, line 67
+      def transmit(cable_message)
+        transmissions << cable_message.with_indifferent_access
+      end
- -
-
# File actioncable/lib/action_cable/channel/test_case.rb, line 67
-def transmit(cable_message)
-  transmissions << cable_message.with_indifferent_access
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html index 98ab161d3e..d3f62cac4f 100644 --- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html +++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html @@ -80,22 +80,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/naming.rb, line 16
+        def channel_name
+          @channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
+        end
- -
-
# File actioncable/lib/action_cable/channel/naming.rb, line 16
-def channel_name
-  @channel_name ||= name.delete_suffix("Channel").gsub("::", ":").underscore
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html index 2c00a82264..221cdd3802 100644 --- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html +++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html @@ -80,24 +80,24 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/test_case.rb, line 11
+      def initialize(name)
+        super "Unable to determine the channel to test from #{name}. " +
+          "You'll need to specify it using `tests YourChannel` in your " +
+          "test case definition."
+      end
- -
-
# File actioncable/lib/action_cable/channel/test_case.rb, line 11
-def initialize(name)
-  super "Unable to determine the channel to test from #{name}. " +
-    "You'll need to specify it using `tests YourChannel` in your " +
-    "test case definition."
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html index b0343fb277..b92e219d92 100644 --- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html +++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html @@ -84,41 +84,41 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/periodic_timers.rb, line 31
+        def periodically(callback_or_method_name = nil, every:, &block)
+          callback =
+            if block_given?
+              raise ArgumentError, "Pass a block or provide a callback arg, not both" if callback_or_method_name
+              block
+            else
+              case callback_or_method_name
+              when Proc
+                callback_or_method_name
+              when Symbol
+                -> { __send__ callback_or_method_name }
+              else
+                raise ArgumentError, "Expected a Symbol method name or a Proc, got #{callback_or_method_name.inspect}"
+              end
+            end
+
+          unless every.kind_of?(Numeric) && every > 0
+            raise ArgumentError, "Expected every: to be a positive number of seconds, got #{every.inspect}"
+          end
+
+          self.periodic_timers += [[ callback, every: every ]]
+        end
- -
-
# File actioncable/lib/action_cable/channel/periodic_timers.rb, line 31
-def periodically(callback_or_method_name = nil, every:, &block)
-  callback =
-    if block_given?
-      raise ArgumentError, "Pass a block or provide a callback arg, not both" if callback_or_method_name
-      block
-    else
-      case callback_or_method_name
-      when Proc
-        callback_or_method_name
-      when Symbol
-        -> { __send__ callback_or_method_name }
-      else
-        raise ArgumentError, "Expected a Symbol method name or a Proc, got #{callback_or_method_name.inspect}"
-      end
-    end
-
-  unless every.kind_of?(Numeric) && every > 0
-    raise ArgumentError, "Expected every: to be a positive number of seconds, got #{every.inspect}"
-  end
-
-  self.periodic_timers += [[ callback, every: every ]]
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html index 89cb05ad9e..b1a763a317 100644 --- a/src/classes/ActionCable/Channel/Streams.html +++ b/src/classes/ActionCable/Channel/Streams.html @@ -160,25 +160,25 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/streams.rb, line 122
+      def stop_all_streams
+        streams.each do |broadcasting, callback|
+          pubsub.unsubscribe broadcasting, callback
+          logger.info "#{self.class.name} stopped streaming from #{broadcasting}"
+        end.clear
+      end
- -
-
# File actioncable/lib/action_cable/channel/streams.rb, line 122
-def stop_all_streams
-  streams.each do |broadcasting, callback|
-    pubsub.unsubscribe broadcasting, callback
-    logger.info "#{self.class.name} stopped streaming from #{broadcasting}"
-  end.clear
-end
-
-
- - + See on GitHub + + + +

@@ -198,22 +198,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/streams.rb, line 117
+      def stop_stream_for(model)
+        stop_stream_from(broadcasting_for(model))
+      end
- -
-
# File actioncable/lib/action_cable/channel/streams.rb, line 117
-def stop_stream_for(model)
-  stop_stream_from(broadcasting_for(model))
-end
-
-
- -

+ See on GitHub + + + +

@@ -233,26 +233,26 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/streams.rb, line 108
+      def stop_stream_from(broadcasting)
+        callback = streams.delete(broadcasting)
+        if callback
+          pubsub.unsubscribe(broadcasting, callback)
+          logger.info "#{self.class.name} stopped streaming from #{broadcasting}"
+        end
+      end
- -
-
# File actioncable/lib/action_cable/channel/streams.rb, line 108
-def stop_stream_from(broadcasting)
-  callback = streams.delete(broadcasting)
-  if callback
-    pubsub.unsubscribe(broadcasting, callback)
-    logger.info "#{self.class.name} stopped streaming from #{broadcasting}"
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -274,22 +274,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/streams.rb, line 103
+      def stream_for(model, callback = nil, coder: nil, &block)
+        stream_from(broadcasting_for(model), callback || block, coder: coder)
+      end
- -
-
# File actioncable/lib/action_cable/channel/streams.rb, line 103
-def stream_for(model, callback = nil, coder: nil, &block)
-  stream_from(broadcasting_for(model), callback || block, coder: coder)
-end
-
-
- -

+ See on GitHub + + + +

@@ -309,37 +309,37 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/streams.rb, line 78
+      def stream_from(broadcasting, callback = nil, coder: nil, &block)
+        broadcasting = String(broadcasting)
+
+        # Don't send the confirmation until pubsub#subscribe is successful
+        defer_subscription_confirmation!
+
+        # Build a stream handler by wrapping the user-provided callback with
+        # a decoder or defaulting to a JSON-decoding retransmitter.
+        handler = worker_pool_stream_handler(broadcasting, callback || block, coder: coder)
+        streams[broadcasting] = handler
+
+        connection.server.event_loop.post do
+          pubsub.subscribe(broadcasting, handler, lambda do
+            ensure_confirmation_sent
+            logger.info "#{self.class.name} is streaming from #{broadcasting}"
+          end)
+        end
+      end
- -
-
# File actioncable/lib/action_cable/channel/streams.rb, line 78
-def stream_from(broadcasting, callback = nil, coder: nil, &block)
-  broadcasting = String(broadcasting)
-
-  # Don't send the confirmation until pubsub#subscribe is successful
-  defer_subscription_confirmation!
-
-  # Build a stream handler by wrapping the user-provided callback with
-  # a decoder or defaulting to a JSON-decoding retransmitter.
-  handler = worker_pool_stream_handler(broadcasting, callback || block, coder: coder)
-  streams[broadcasting] = handler
-
-  connection.server.event_loop.post do
-    pubsub.subscribe(broadcasting, handler, lambda do
-      ensure_confirmation_sent
-      logger.info "#{self.class.name} is streaming from #{broadcasting}"
-    end)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -359,26 +359,26 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/streams.rb, line 131
+      def stream_or_reject_for(model)
+        if model
+          stream_for model
+        else
+          reject
+        end
+      end
- -
-
# File actioncable/lib/action_cable/channel/streams.rb, line 131
-def stream_or_reject_for(model)
-  if model
-    stream_for model
-  else
-    reject
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html index d35abe568e..388b2b2da8 100644 --- a/src/classes/ActionCable/Channel/TestCase/Behavior.html +++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html @@ -186,22 +186,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/test_case.rb, line 278
+        def assert_broadcast_on(stream_or_object, *args)
+          super(broadcasting_for(stream_or_object), *args)
+        end
- -
-
# File actioncable/lib/action_cable/channel/test_case.rb, line 278
-def assert_broadcast_on(stream_or_object, *args)
-  super(broadcasting_for(stream_or_object), *args)
-end
-
-
- - + See on GitHub + + + +

@@ -221,22 +221,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/test_case.rb, line 274
+        def assert_broadcasts(stream_or_object, *args)
+          super(broadcasting_for(stream_or_object), *args)
+        end
- -
-
# File actioncable/lib/action_cable/channel/test_case.rb, line 274
-def assert_broadcasts(stream_or_object, *args)
-  super(broadcasting_for(stream_or_object), *args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -262,22 +262,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/test_case.rb, line 300
+        def assert_has_stream(stream)
+          assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
+        end
- -
-
# File actioncable/lib/action_cable/channel/test_case.rb, line 300
-def assert_has_stream(stream)
-  assert subscription.streams.include?(stream), "Stream #{stream} has not been started"
-end
-
-
- -

+ See on GitHub + + + +

@@ -303,22 +303,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/test_case.rb, line 311
+        def assert_has_stream_for(object)
+          assert_has_stream(broadcasting_for(object))
+        end
- -
-
# File actioncable/lib/action_cable/channel/test_case.rb, line 311
-def assert_has_stream_for(object)
-  assert_has_stream(broadcasting_for(object))
-end
-
-
- -

+ See on GitHub + + + +

@@ -344,22 +344,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/test_case.rb, line 289
+        def assert_no_streams
+          assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
+        end
- -
-
# File actioncable/lib/action_cable/channel/test_case.rb, line 289
-def assert_no_streams
-  assert subscription.streams.empty?, "No streams started was expected, but #{subscription.streams.count} found"
-end
-
-
- -

+ See on GitHub + + + +

@@ -381,23 +381,23 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/test_case.rb, line 261
+        def perform(action, data = {})
+          check_subscribed!
+          subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
+        end
- -
-
# File actioncable/lib/action_cable/channel/test_case.rb, line 261
-def perform(action, data = {})
-  check_subscribed!
-  subscription.perform_action(data.stringify_keys.merge("action" => action.to_s))
-end
-
-
- -

+ See on GitHub + + + +

@@ -424,22 +424,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/test_case.rb, line 239
+        def stub_connection(identifiers = {})
+          @connection = ConnectionStub.new(identifiers)
+        end
- -
-
# File actioncable/lib/action_cable/channel/test_case.rb, line 239
-def stub_connection(identifiers = {})
-  @connection = ConnectionStub.new(identifiers)
-end
-
-
- -

+ See on GitHub + + + +

@@ -459,26 +459,26 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/test_case.rb, line 244
+        def subscribe(params = {})
+          @connection ||= stub_connection
+          @subscription = self.class.channel_class.new(connection, CHANNEL_IDENTIFIER, params.with_indifferent_access)
+          @subscription.singleton_class.include(ChannelStub)
+          @subscription.subscribe_to_channel
+          @subscription
+        end
- -
-
# File actioncable/lib/action_cable/channel/test_case.rb, line 244
-def subscribe(params = {})
-  @connection ||= stub_connection
-  @subscription = self.class.channel_class.new(connection, CHANNEL_IDENTIFIER, params.with_indifferent_access)
-  @subscription.singleton_class.include(ChannelStub)
-  @subscription.subscribe_to_channel
-  @subscription
-end
-
-
- -

+ See on GitHub + + + +

@@ -498,23 +498,23 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/test_case.rb, line 267
+        def transmissions
+          # Return only directly sent message (via #transmit)
+          connection.transmissions.filter_map { |data| data["message"] }
+        end
- -
-
# File actioncable/lib/action_cable/channel/test_case.rb, line 267
-def transmissions
-  # Return only directly sent message (via #transmit)
-  connection.transmissions.filter_map { |data| data["message"] }
-end
-
-
- -

+ See on GitHub + + + +

@@ -534,23 +534,23 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/test_case.rb, line 253
+        def unsubscribe
+          check_subscribed!
+          subscription.unsubscribe_from_channel
+        end
- -
-
# File actioncable/lib/action_cable/channel/test_case.rb, line 253
-def unsubscribe
-  check_subscribed!
-  subscription.unsubscribe_from_channel
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html index 768e576c46..08685f49c8 100644 --- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html +++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html @@ -83,26 +83,26 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/test_case.rb, line 215
+          def channel_class
+            if channel = self._channel_class
+              channel
+            else
+              tests determine_default_channel(name)
+            end
+          end
- -
-
# File actioncable/lib/action_cable/channel/test_case.rb, line 215
-def channel_class
-  if channel = self._channel_class
-    channel
-  else
-    tests determine_default_channel(name)
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -122,26 +122,26 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/test_case.rb, line 223
+          def determine_default_channel(name)
+            channel = determine_constant_from_test_name(name) do |constant|
+              Class === constant && constant < ActionCable::Channel::Base
+            end
+            raise NonInferrableChannelError.new(name) if channel.nil?
+            channel
+          end
- -
-
# File actioncable/lib/action_cable/channel/test_case.rb, line 223
-def determine_default_channel(name)
-  channel = determine_constant_from_test_name(name) do |constant|
-    Class === constant && constant < ActionCable::Channel::Base
-  end
-  raise NonInferrableChannelError.new(name) if channel.nil?
-  channel
-end
-
-
- -

+ See on GitHub + + + +

@@ -161,29 +161,29 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/channel/test_case.rb, line 204
+          def tests(channel)
+            case channel
+            when String, Symbol
+              self._channel_class = channel.to_s.camelize.constantize
+            when Module
+              self._channel_class = channel
+            else
+              raise NonInferrableChannelError.new(channel)
+            end
+          end
- -
-
# File actioncable/lib/action_cable/channel/test_case.rb, line 204
-def tests(channel)
-  case channel
-  when String, Symbol
-    self._channel_class = channel.to_s.camelize.constantize
-  when Module
-    self._channel_class = channel
-  else
-    raise NonInferrableChannelError.new(channel)
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html index b771ad5a41..3056ef685d 100644 --- a/src/classes/ActionCable/Connection/Assertions.html +++ b/src/classes/ActionCable/Connection/Assertions.html @@ -79,22 +79,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/test_case.rb, line 25
+      def assert_reject_connection(&block)
+        assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
+      end
- -
-
# File actioncable/lib/action_cable/connection/test_case.rb, line 25
-def assert_reject_connection(&block)
-  assert_raises(Authorization::UnauthorizedError, "Expected to reject connection but no rejection was made", &block)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html index 08122ed889..464eb92691 100644 --- a/src/classes/ActionCable/Connection/Authorization.html +++ b/src/classes/ActionCable/Connection/Authorization.html @@ -90,23 +90,23 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/authorization.rb, line 9
+      def reject_unauthorized_connection
+        logger.error "An unauthorized connection attempt was rejected"
+        raise UnauthorizedError
+      end
- -
-
# File actioncable/lib/action_cable/connection/authorization.rb, line 9
-def reject_unauthorized_connection
-  logger.error "An unauthorized connection attempt was rejected"
-  raise UnauthorizedError
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html index cc417de92d..be29a2ae3b 100644 --- a/src/classes/ActionCable/Connection/Base.html +++ b/src/classes/ActionCable/Connection/Base.html @@ -248,32 +248,32 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/base.rb, line 58
+      def initialize(server, env, coder: ActiveSupport::JSON)
+        @server, @env, @coder = server, env, coder
+
+        @worker_pool = server.worker_pool
+        @logger = new_tagged_logger
+
+        @websocket      = ActionCable::Connection::WebSocket.new(env, self, event_loop)
+        @subscriptions  = ActionCable::Connection::Subscriptions.new(self)
+        @message_buffer = ActionCable::Connection::MessageBuffer.new(self)
+
+        @_internal_subscriptions = nil
+        @started_at = Time.now
+      end
- -
-
# File actioncable/lib/action_cable/connection/base.rb, line 58
-def initialize(server, env, coder: ActiveSupport::JSON)
-  @server, @env, @coder = server, env, coder
-
-  @worker_pool = server.worker_pool
-  @logger = new_tagged_logger
-
-  @websocket      = ActionCable::Connection::WebSocket.new(env, self, event_loop)
-  @subscriptions  = ActionCable::Connection::Subscriptions.new(self)
-  @message_buffer = ActionCable::Connection::MessageBuffer.new(self)
-
-  @_internal_subscriptions = nil
-  @started_at = Time.now
-end
-
-
- - + See on GitHub + + + + @@ -297,22 +297,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/base.rb, line 134
+      def beat
+        transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
+      end
- -
-
# File actioncable/lib/action_cable/connection/base.rb, line 134
-def beat
-  transmit type: ActionCable::INTERNAL[:message_types][:ping], message: Time.now.to_i
-end
-
-
- - + See on GitHub + + + +

@@ -332,27 +332,27 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/base.rb, line 109
+      def close(reason: nil, reconnect: true)
+        transmit(
+          type: ActionCable::INTERNAL[:message_types][:disconnect],
+          reason: reason,
+          reconnect: reconnect
+        )
+        websocket.close
+      end
- -
-
# File actioncable/lib/action_cable/connection/base.rb, line 109
-def close(reason: nil, reconnect: true)
-  transmit(
-    type: ActionCable::INTERNAL[:message_types][:disconnect],
-    reason: reason,
-    reconnect: reconnect
-  )
-  websocket.close
-end
-
-
- -

+ See on GitHub + + + +

@@ -372,24 +372,24 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/base.rb, line 98
+      def handle_channel_command(payload)
+        run_callbacks :command do
+          subscriptions.execute_command payload
+        end
+      end
- -
-
# File actioncable/lib/action_cable/connection/base.rb, line 98
-def handle_channel_command(payload)
-  run_callbacks :command do
-    subscriptions.execute_command payload
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -409,22 +409,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/base.rb, line 119
+      def send_async(method, *arguments)
+        worker_pool.async_invoke(self, method, *arguments)
+      end
- -
-
# File actioncable/lib/action_cable/connection/base.rb, line 119
-def send_async(method, *arguments)
-  worker_pool.async_invoke(self, method, *arguments)
-end
-
-
- -

+ See on GitHub + + + +

@@ -444,27 +444,27 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/base.rb, line 125
+      def statistics
+        {
+          identifier: connection_identifier,
+          started_at: @started_at,
+          subscriptions: subscriptions.identifiers,
+          request_id: @env["action_dispatch.request_id"]
+        }
+      end
- -
-
# File actioncable/lib/action_cable/connection/base.rb, line 125
-def statistics
-  {
-    identifier: connection_identifier,
-    started_at: @started_at,
-    subscriptions: subscriptions.identifiers,
-    request_id: @env["action_dispatch.request_id"]
-  }
-end
-
-
- -

+ See on GitHub + + + +

Instance Private methods

@@ -487,22 +487,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/base.rb, line 172
+        def cookies # :doc:
+          request.cookie_jar
+        end
- -
-
# File actioncable/lib/action_cable/connection/base.rb, line 172
-def cookies # :doc:
-  request.cookie_jar
-end
-
-
- - + See on GitHub + + + +

@@ -522,25 +522,25 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/base.rb, line 164
+        def request # :doc:
+          @request ||= begin
+            environment = Rails.application.env_config.merge(env) if defined?(Rails.application) && Rails.application
+            ActionDispatch::Request.new(environment || env)
+          end
+        end
- -
-
# File actioncable/lib/action_cable/connection/base.rb, line 164
-def request # :doc:
-  @request ||= begin
-    environment = Rails.application.env_config.merge(env) if defined?(Rails.application) && Rails.application
-    ActionDispatch::Request.new(environment || env)
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html index af1a1b77ae..b25422d587 100644 --- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html +++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html @@ -83,22 +83,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/callbacks.rb, line 41
+        def after_command(*methods, &block)
+          set_callback(:command, :after, *methods, &block)
+        end
- -
-
# File actioncable/lib/action_cable/connection/callbacks.rb, line 41
-def after_command(*methods, &block)
-  set_callback(:command, :after, *methods, &block)
-end
-
-
- - + See on GitHub + + + +

@@ -118,22 +118,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/callbacks.rb, line 45
+        def around_command(*methods, &block)
+          set_callback(:command, :around, *methods, &block)
+        end
- -
-
# File actioncable/lib/action_cable/connection/callbacks.rb, line 45
-def around_command(*methods, &block)
-  set_callback(:command, :around, *methods, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -153,22 +153,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/callbacks.rb, line 37
+        def before_command(*methods, &block)
+          set_callback(:command, :before, *methods, &block)
+        end
- -
-
# File actioncable/lib/action_cable/connection/callbacks.rb, line 37
-def before_command(*methods, &block)
-  set_callback(:command, :before, *methods, &block)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html index 9ef26db77b..38c4891b46 100644 --- a/src/classes/ActionCable/Connection/Identification.html +++ b/src/classes/ActionCable/Connection/Identification.html @@ -88,26 +88,26 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/identification.rb, line 27
+      def connection_identifier
+        unless defined? @connection_identifier
+          @connection_identifier = connection_gid identifiers.filter_map { |id| instance_variable_get("@#{id}") }
+        end
+
+        @connection_identifier
+      end
- -
-
# File actioncable/lib/action_cable/connection/identification.rb, line 27
-def connection_identifier
-  unless defined? @connection_identifier
-    @connection_identifier = connection_gid identifiers.filter_map { |id| instance_variable_get("@#{id}") }
-  end
-
-  @connection_identifier
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html index 936be4d588..47d159ad88 100644 --- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html +++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html @@ -77,23 +77,23 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/identification.rb, line 20
+        def identified_by(*identifiers)
+          Array(identifiers).each { |identifier| attr_accessor identifier }
+          self.identifiers += identifiers
+        end
- -
-
# File actioncable/lib/action_cable/connection/identification.rb, line 20
-def identified_by(*identifiers)
-  Array(identifiers).each { |identifier| attr_accessor identifier }
-  self.identifiers += identifiers
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html index f3b7ee1458..1f5bb35cf0 100644 --- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html +++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html @@ -80,24 +80,24 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/test_case.rb, line 13
+      def initialize(name)
+        super "Unable to determine the connection to test from #{name}. " +
+          "You'll need to specify it using `tests YourConnection` in your " +
+          "test case definition."
+      end
- -
-
# File actioncable/lib/action_cable/connection/test_case.rb, line 13
-def initialize(name)
-  super "Unable to determine the connection to test from #{name}. " +
-    "You'll need to specify it using `tests YourConnection` in your " +
-    "test case definition."
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html index daa0d90667..978333a9c5 100644 --- a/src/classes/ActionCable/Connection/StreamEventLoop.html +++ b/src/classes/ActionCable/Connection/StreamEventLoop.html @@ -104,27 +104,27 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/stream_event_loop.rb, line 8
+      def initialize
+        @nio = @executor = @thread = nil
+        @map = {}
+        @stopping = false
+        @todo = Queue.new
+
+        @spawn_mutex = Mutex.new
+      end
- -
-
# File actioncable/lib/action_cable/connection/stream_event_loop.rb, line 8
-def initialize
-  @nio = @executor = @thread = nil
-  @map = {}
-  @stopping = false
-  @todo = Queue.new
-
-  @spawn_mutex = Mutex.new
-end
-
-
- - + See on GitHub + + + + @@ -148,26 +148,26 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/stream_event_loop.rb, line 28
+      def attach(io, stream)
+        @todo << lambda do
+          @map[io] = @nio.register(io, :r)
+          @map[io].value = stream
+        end
+        wakeup
+      end
- -
-
# File actioncable/lib/action_cable/connection/stream_event_loop.rb, line 28
-def attach(io, stream)
-  @todo << lambda do
-    @map[io] = @nio.register(io, :r)
-    @map[io].value = stream
-  end
-  wakeup
-end
-
-
- - + See on GitHub + + + +

@@ -187,27 +187,27 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/stream_event_loop.rb, line 36
+      def detach(io, stream)
+        @todo << lambda do
+          @nio.deregister io
+          @map.delete io
+          io.close
+        end
+        wakeup
+      end
- -
-
# File actioncable/lib/action_cable/connection/stream_event_loop.rb, line 36
-def detach(io, stream)
-  @todo << lambda do
-    @nio.deregister io
-    @map.delete io
-    io.close
-  end
-  wakeup
-end
-
-
- -

+ See on GitHub + + + +

@@ -227,25 +227,25 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/stream_event_loop.rb, line 21
+      def post(task = nil, &block)
+        task ||= block
+
+        spawn
+        @executor << task
+      end
- -
-
# File actioncable/lib/action_cable/connection/stream_event_loop.rb, line 21
-def post(task = nil, &block)
-  task ||= block
-
-  spawn
-  @executor << task
-end
-
-
- -

+ See on GitHub + + + +

@@ -265,23 +265,23 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/stream_event_loop.rb, line 54
+      def stop
+        @stopping = true
+        wakeup if @nio
+      end
- -
-
# File actioncable/lib/action_cable/connection/stream_event_loop.rb, line 54
-def stop
-  @stopping = true
-  wakeup if @nio
-end
-
-
- -

+ See on GitHub + + + +

@@ -301,22 +301,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/stream_event_loop.rb, line 17
+      def timer(interval, &block)
+        Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
+      end
- -
-
# File actioncable/lib/action_cable/connection/stream_event_loop.rb, line 17
-def timer(interval, &block)
-  Concurrent::TimerTask.new(execution_interval: interval, &block).tap(&:execute)
-end
-
-
- -

+ See on GitHub + + + +

@@ -336,27 +336,27 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/stream_event_loop.rb, line 45
+      def writes_pending(io)
+        @todo << lambda do
+          if monitor = @map[io]
+            monitor.interests = :rw
+          end
+        end
+        wakeup
+      end
- -
-
# File actioncable/lib/action_cable/connection/stream_event_loop.rb, line 45
-def writes_pending(io)
-  @todo << lambda do
-    if monitor = @map[io]
-      monitor.interests = :rw
-    end
-  end
-  wakeup
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionCable/Connection/TaggedLoggerProxy.html b/src/classes/ActionCable/Connection/TaggedLoggerProxy.html index ed09f07c4d..0dd5fea242 100644 --- a/src/classes/ActionCable/Connection/TaggedLoggerProxy.html +++ b/src/classes/ActionCable/Connection/TaggedLoggerProxy.html @@ -114,23 +114,23 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/tagged_logger_proxy.rb, line 13
+      def initialize(logger, tags:)
+        @logger = logger
+        @tags = tags.flatten
+      end
- -
-
# File actioncable/lib/action_cable/connection/tagged_logger_proxy.rb, line 13
-def initialize(logger, tags:)
-  @logger = logger
-  @tags = tags.flatten
-end
-
-
- - + See on GitHub + + + + @@ -154,23 +154,23 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/tagged_logger_proxy.rb, line 18
+      def add_tags(*tags)
+        @tags += tags.flatten
+        @tags = @tags.uniq
+      end
- -
-
# File actioncable/lib/action_cable/connection/tagged_logger_proxy.rb, line 18
-def add_tags(*tags)
-  @tags += tags.flatten
-  @tags = @tags.uniq
-end
-
-
- - + See on GitHub + + + +

@@ -190,27 +190,27 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/tagged_logger_proxy.rb, line 23
+      def tag(logger, &block)
+        if logger.respond_to?(:tagged)
+          current_tags = tags - logger.formatter.current_tags
+          logger.tagged(*current_tags, &block)
+        else
+          yield
+        end
+      end
- -
-
# File actioncable/lib/action_cable/connection/tagged_logger_proxy.rb, line 23
-def tag(logger, &block)
-  if logger.respond_to?(:tagged)
-    current_tags = tags - logger.formatter.current_tags
-    logger.tagged(*current_tags, &block)
-  else
-    yield
-  end
-end
-
-
- -

+ See on GitHub + + + +

Instance Private methods

@@ -233,22 +233,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/tagged_logger_proxy.rb, line 39
+        def log(type, message, &block) # :doc:
+          tag(@logger) { @logger.send type, message, &block }
+        end
- -
-
# File actioncable/lib/action_cable/connection/tagged_logger_proxy.rb, line 39
-def log(type, message, &block) # :doc:
-  tag(@logger) { @logger.send type, message, &block }
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionCable/Connection/TestCase/Behavior.html b/src/classes/ActionCable/Connection/TestCase/Behavior.html index 390bd7244c..f13c066618 100644 --- a/src/classes/ActionCable/Connection/TestCase/Behavior.html +++ b/src/classes/ActionCable/Connection/TestCase/Behavior.html @@ -161,30 +161,30 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/test_case.rb, line 185
+        def connect(path = ActionCable.server.config.mount_path, **request_params)
+          path ||= DEFAULT_PATH
+
+          connection = self.class.connection_class.allocate
+          connection.singleton_class.include(TestConnection)
+          connection.send(:initialize, build_test_request(path, **request_params))
+          connection.connect if connection.respond_to?(:connect)
+
+          # Only set instance variable if connected successfully
+          @connection = connection
+        end
- -
-
# File actioncable/lib/action_cable/connection/test_case.rb, line 185
-def connect(path = ActionCable.server.config.mount_path, **request_params)
-  path ||= DEFAULT_PATH
-
-  connection = self.class.connection_class.allocate
-  connection.singleton_class.include(TestConnection)
-  connection.send(:initialize, build_test_request(path, **request_params))
-  connection.connect if connection.respond_to?(:connect)
-
-  # Only set instance variable if connected successfully
-  @connection = connection
-end
-
-
- - + See on GitHub + + + +

@@ -204,22 +204,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/test_case.rb, line 205
+        def cookies
+          @cookie_jar ||= TestCookieJar.new
+        end
- -
-
# File actioncable/lib/action_cable/connection/test_case.rb, line 205
-def cookies
-  @cookie_jar ||= TestCookieJar.new
-end
-
-
- -

+ See on GitHub + + + +

@@ -239,25 +239,25 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/test_case.rb, line 198
+        def disconnect
+          raise "Must be connected!" if connection.nil?
+
+          connection.disconnect if connection.respond_to?(:disconnect)
+          @connection = nil
+        end
- -
-
# File actioncable/lib/action_cable/connection/test_case.rb, line 198
-def disconnect
-  raise "Must be connected!" if connection.nil?
-
-  connection.disconnect if connection.respond_to?(:disconnect)
-  @connection = nil
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionCable/Connection/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Connection/TestCase/Behavior/ClassMethods.html index 8cfb7afcff..641ba2bcaa 100644 --- a/src/classes/ActionCable/Connection/TestCase/Behavior/ClassMethods.html +++ b/src/classes/ActionCable/Connection/TestCase/Behavior/ClassMethods.html @@ -83,26 +83,26 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/test_case.rb, line 160
+          def connection_class
+            if connection = self._connection_class
+              connection
+            else
+              tests determine_default_connection(name)
+            end
+          end
- -
-
# File actioncable/lib/action_cable/connection/test_case.rb, line 160
-def connection_class
-  if connection = self._connection_class
-    connection
-  else
-    tests determine_default_connection(name)
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -122,26 +122,26 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/test_case.rb, line 168
+          def determine_default_connection(name)
+            connection = determine_constant_from_test_name(name) do |constant|
+              Class === constant && constant < ActionCable::Connection::Base
+            end
+            raise NonInferrableConnectionError.new(name) if connection.nil?
+            connection
+          end
- -
-
# File actioncable/lib/action_cable/connection/test_case.rb, line 168
-def determine_default_connection(name)
-  connection = determine_constant_from_test_name(name) do |constant|
-    Class === constant && constant < ActionCable::Connection::Base
-  end
-  raise NonInferrableConnectionError.new(name) if connection.nil?
-  connection
-end
-
-
- -

+ See on GitHub + + + +

@@ -161,29 +161,29 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/test_case.rb, line 149
+          def tests(connection)
+            case connection
+            when String, Symbol
+              self._connection_class = connection.to_s.camelize.constantize
+            when Module
+              self._connection_class = connection
+            else
+              raise NonInferrableConnectionError.new(connection)
+            end
+          end
- -
-
# File actioncable/lib/action_cable/connection/test_case.rb, line 149
-def tests(connection)
-  case connection
-  when String, Symbol
-    self._connection_class = connection.to_s.camelize.constantize
-  when Module
-    self._connection_class = connection
-  else
-    raise NonInferrableConnectionError.new(connection)
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionCable/Connection/TestConnection.html b/src/classes/ActionCable/Connection/TestConnection.html index e83d289a26..f39b2ee4ea 100644 --- a/src/classes/ActionCable/Connection/TestConnection.html +++ b/src/classes/ActionCable/Connection/TestConnection.html @@ -96,26 +96,26 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/test_case.rb, line 50
+      def initialize(request)
+        inner_logger = ActiveSupport::Logger.new(StringIO.new)
+        tagged_logging = ActiveSupport::TaggedLogging.new(inner_logger)
+        @logger = ActionCable::Connection::TaggedLoggerProxy.new(tagged_logging, tags: [])
+        @request = request
+        @env = request.env
+      end
- -
-
# File actioncable/lib/action_cable/connection/test_case.rb, line 50
-def initialize(request)
-  inner_logger = ActiveSupport::Logger.new(StringIO.new)
-  tagged_logging = ActiveSupport::TaggedLogging.new(inner_logger)
-  @logger = ActionCable::Connection::TaggedLoggerProxy.new(tagged_logging, tags: [])
-  @request = request
-  @env = request.env
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionCable/Connection/TestCookieJar.html b/src/classes/ActionCable/Connection/TestCookieJar.html index 3474db51f2..717a27151a 100644 --- a/src/classes/ActionCable/Connection/TestCookieJar.html +++ b/src/classes/ActionCable/Connection/TestCookieJar.html @@ -91,22 +91,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/test_case.rb, line 38
+      def encrypted
+        self[:encrypted] ||= {}.with_indifferent_access
+      end
- -
-
# File actioncable/lib/action_cable/connection/test_case.rb, line 38
-def encrypted
-  self[:encrypted] ||= {}.with_indifferent_access
-end
-
-
- - + See on GitHub + + + +

@@ -126,22 +126,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/connection/test_case.rb, line 34
+      def signed
+        self[:signed] ||= {}.with_indifferent_access
+      end
- -
-
# File actioncable/lib/action_cable/connection/test_case.rb, line 34
-def signed
-  self[:signed] ||= {}.with_indifferent_access
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionCable/Helpers/ActionCableHelper.html b/src/classes/ActionCable/Helpers/ActionCableHelper.html index 5cbee142f0..a125328491 100644 --- a/src/classes/ActionCable/Helpers/ActionCableHelper.html +++ b/src/classes/ActionCable/Helpers/ActionCableHelper.html @@ -100,26 +100,26 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/helpers/action_cable_helper.rb, line 34
+      def action_cable_meta_tag
+        tag "meta", name: "action-cable-url", content: (
+          ActionCable.server.config.url ||
+          ActionCable.server.config.mount_path ||
+          raise("No Action Cable URL configured -- please configure this at config.action_cable.url")
+        )
+      end
- -
-
# File actioncable/lib/action_cable/helpers/action_cable_helper.rb, line 34
-def action_cable_meta_tag
-  tag "meta", name: "action-cable-url", content: (
-    ActionCable.server.config.url ||
-    ActionCable.server.config.mount_path ||
-    raise("No Action Cable URL configured -- please configure this at config.action_cable.url")
-  )
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionCable/RemoteConnections.html b/src/classes/ActionCable/RemoteConnections.html index 0896ef87fd..71d04a2cc3 100644 --- a/src/classes/ActionCable/RemoteConnections.html +++ b/src/classes/ActionCable/RemoteConnections.html @@ -136,22 +136,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/remote_connections.rb, line 32
+    def initialize(server)
+      @server = server
+    end
- -
-
# File actioncable/lib/action_cable/remote_connections.rb, line 32
-def initialize(server)
-  @server = server
-end
-
-
- - + See on GitHub + + + + @@ -175,22 +175,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/remote_connections.rb, line 36
+    def where(identifier)
+      RemoteConnection.new(server, identifier)
+    end
- -
-
# File actioncable/lib/action_cable/remote_connections.rb, line 36
-def where(identifier)
-  RemoteConnection.new(server, identifier)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionCable/RemoteConnections/RemoteConnection.html b/src/classes/ActionCable/RemoteConnections/RemoteConnection.html index 3276f9afff..56ccb21820 100644 --- a/src/classes/ActionCable/RemoteConnections/RemoteConnection.html +++ b/src/classes/ActionCable/RemoteConnections/RemoteConnection.html @@ -119,23 +119,23 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/remote_connections.rb, line 50
+        def initialize(server, ids)
+          @server = server
+          set_identifier_instance_vars(ids)
+        end
- -
-
# File actioncable/lib/action_cable/remote_connections.rb, line 50
-def initialize(server, ids)
-  @server = server
-  set_identifier_instance_vars(ids)
-end
-
-
- - + See on GitHub + + + + @@ -159,22 +159,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/remote_connections.rb, line 56
+        def disconnect(reconnect: true)
+          server.broadcast internal_channel, { type: "disconnect", reconnect: reconnect }
+        end
- -
-
# File actioncable/lib/action_cable/remote_connections.rb, line 56
-def disconnect(reconnect: true)
-  server.broadcast internal_channel, { type: "disconnect", reconnect: reconnect }
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionCable/Server/Base.html b/src/classes/ActionCable/Server/Base.html index 4483b41ccd..90dfe424a3 100644 --- a/src/classes/ActionCable/Server/Base.html +++ b/src/classes/ActionCable/Server/Base.html @@ -162,20 +162,20 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/server/base.rb, line 21
+      def self.logger; config.logger; end
- -
-
# File actioncable/lib/action_cable/server/base.rb, line 21
-def self.logger; config.logger; end
-
-
- - + See on GitHub + + + +

@@ -195,24 +195,24 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/server/base.rb, line 26
+      def initialize(config: self.class.config)
+        @config = config
+        @mutex = Monitor.new
+        @remote_connections = @event_loop = @worker_pool = @pubsub = nil
+      end
- -
-
# File actioncable/lib/action_cable/server/base.rb, line 26
-def initialize(config: self.class.config)
-  @config = config
-  @mutex = Monitor.new
-  @remote_connections = @event_loop = @worker_pool = @pubsub = nil
-end
-
-
- -

+ See on GitHub + + + + @@ -236,24 +236,24 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/server/base.rb, line 33
+      def call(env)
+        return config.health_check_application.call(env) if env["PATH_INFO"] == config.health_check_path
+        setup_heartbeat_timer
+        config.connection_class.call.new(self, env).process
+      end
- -
-
# File actioncable/lib/action_cable/server/base.rb, line 33
-def call(env)
-  return config.health_check_application.call(env) if env["PATH_INFO"] == config.health_check_path
-  setup_heartbeat_timer
-  config.connection_class.call.new(self, env).process
-end
-
-
- - + See on GitHub + + + +

@@ -273,22 +273,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/server/base.rb, line 90
+      def connection_identifiers
+        config.connection_class.call.identifiers
+      end
- -
-
# File actioncable/lib/action_cable/server/base.rb, line 90
-def connection_identifiers
-  config.connection_class.call.identifiers
-end
-
-
- -

+ See on GitHub + + + +

@@ -308,22 +308,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/server/base.rb, line 40
+      def disconnect(identifiers)
+        remote_connections.where(identifiers).disconnect
+      end
- -
-
# File actioncable/lib/action_cable/server/base.rb, line 40
-def disconnect(identifiers)
-  remote_connections.where(identifiers).disconnect
-end
-
-
- -

+ See on GitHub + + + +

@@ -343,22 +343,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/server/base.rb, line 65
+      def event_loop
+        @event_loop || @mutex.synchronize { @event_loop ||= ActionCable::Connection::StreamEventLoop.new }
+      end
- -
-
# File actioncable/lib/action_cable/server/base.rb, line 65
-def event_loop
-  @event_loop || @mutex.synchronize { @event_loop ||= ActionCable::Connection::StreamEventLoop.new }
-end
-
-
- -

+ See on GitHub + + + +

@@ -378,22 +378,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/server/base.rb, line 85
+      def pubsub
+        @pubsub || @mutex.synchronize { @pubsub ||= config.pubsub_adapter.new(self) }
+      end
- -
-
# File actioncable/lib/action_cable/server/base.rb, line 85
-def pubsub
-  @pubsub || @mutex.synchronize { @pubsub ||= config.pubsub_adapter.new(self) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -413,22 +413,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/server/base.rb, line 61
+      def remote_connections
+        @remote_connections || @mutex.synchronize { @remote_connections ||= RemoteConnections.new(self) }
+      end
- -
-
# File actioncable/lib/action_cable/server/base.rb, line 61
-def remote_connections
-  @remote_connections || @mutex.synchronize { @remote_connections ||= RemoteConnections.new(self) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -448,34 +448,34 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/server/base.rb, line 44
+      def restart
+        connections.each do |connection|
+          connection.close(reason: ActionCable::INTERNAL[:disconnect_reasons][:server_restart])
+        end
+
+        @mutex.synchronize do
+          # Shutdown the worker pool
+          @worker_pool.halt if @worker_pool
+          @worker_pool = nil
+
+          # Shutdown the pub/sub adapter
+          @pubsub.shutdown if @pubsub
+          @pubsub = nil
+        end
+      end
- -
-
# File actioncable/lib/action_cable/server/base.rb, line 44
-def restart
-  connections.each do |connection|
-    connection.close(reason: ActionCable::INTERNAL[:disconnect_reasons][:server_restart])
-  end
-
-  @mutex.synchronize do
-    # Shutdown the worker pool
-    @worker_pool.halt if @worker_pool
-    @worker_pool = nil
-
-    # Shutdown the pub/sub adapter
-    @pubsub.shutdown if @pubsub
-    @pubsub = nil
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -499,22 +499,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/server/base.rb, line 80
+      def worker_pool
+        @worker_pool || @mutex.synchronize { @worker_pool ||= ActionCable::Server::Worker.new(max_size: config.worker_pool_size) }
+      end
- -
-
# File actioncable/lib/action_cable/server/base.rb, line 80
-def worker_pool
-  @worker_pool || @mutex.synchronize { @worker_pool ||= ActionCable::Server::Worker.new(max_size: config.worker_pool_size) }
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionCable/Server/Broadcasting.html b/src/classes/ActionCable/Server/Broadcasting.html index f6b9858af1..50240f14b9 100644 --- a/src/classes/ActionCable/Server/Broadcasting.html +++ b/src/classes/ActionCable/Server/Broadcasting.html @@ -116,22 +116,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/server/broadcasting.rb, line 26
+      def broadcast(broadcasting, message, coder: ActiveSupport::JSON)
+        broadcaster_for(broadcasting, coder: coder).broadcast(message)
+      end
- -
-
# File actioncable/lib/action_cable/server/broadcasting.rb, line 26
-def broadcast(broadcasting, message, coder: ActiveSupport::JSON)
-  broadcaster_for(broadcasting, coder: coder).broadcast(message)
-end
-
-
- - + See on GitHub + + + +

@@ -151,22 +151,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/server/broadcasting.rb, line 32
+      def broadcaster_for(broadcasting, coder: ActiveSupport::JSON)
+        Broadcaster.new(self, String(broadcasting), coder: coder)
+      end
- -
-
# File actioncable/lib/action_cable/server/broadcasting.rb, line 32
-def broadcaster_for(broadcasting, coder: ActiveSupport::JSON)
-  Broadcaster.new(self, String(broadcasting), coder: coder)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionCable/Server/Broadcasting/Broadcaster.html b/src/classes/ActionCable/Server/Broadcasting/Broadcaster.html index bd63ed829b..d66affb5f0 100644 --- a/src/classes/ActionCable/Server/Broadcasting/Broadcaster.html +++ b/src/classes/ActionCable/Server/Broadcasting/Broadcaster.html @@ -114,22 +114,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/server/broadcasting.rb, line 40
+          def initialize(server, broadcasting, coder:)
+            @server, @broadcasting, @coder = server, broadcasting, coder
+          end
- -
-
# File actioncable/lib/action_cable/server/broadcasting.rb, line 40
-def initialize(server, broadcasting, coder:)
-  @server, @broadcasting, @coder = server, broadcasting, coder
-end
-
-
- - + See on GitHub + + + + @@ -153,28 +153,28 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/server/broadcasting.rb, line 44
+          def broadcast(message)
+            server.logger.debug { "[ActionCable] Broadcasting to #{broadcasting}: #{message.inspect.truncate(300)}" }
+
+            payload = { broadcasting: broadcasting, message: message, coder: coder }
+            ActiveSupport::Notifications.instrument("broadcast.action_cable", payload) do
+              encoded = coder ? coder.encode(message) : message
+              server.pubsub.broadcast broadcasting, encoded
+            end
+          end
- -
-
# File actioncable/lib/action_cable/server/broadcasting.rb, line 44
-def broadcast(message)
-  server.logger.debug { "[ActionCable] Broadcasting to #{broadcasting}: #{message.inspect.truncate(300)}" }
-
-  payload = { broadcasting: broadcasting, message: message, coder: coder }
-  ActiveSupport::Notifications.instrument("broadcast.action_cable", payload) do
-    encoded = coder ? coder.encode(message) : message
-    server.pubsub.broadcast broadcasting, encoded
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionCable/Server/Configuration.html b/src/classes/ActionCable/Server/Configuration.html index d0873b5060..d2c592d604 100644 --- a/src/classes/ActionCable/Server/Configuration.html +++ b/src/classes/ActionCable/Server/Configuration.html @@ -210,33 +210,33 @@

- -
- - -
-
# File actioncable/lib/action_cable/server/configuration.rb, line 19
-def initialize
-  @log_tags = []
+          
+            
+ + Source code + - @connection_class = -> { ActionCable::Connection::Base } - @worker_pool_size = 4 +
# File actioncable/lib/action_cable/server/configuration.rb, line 19
+      def initialize
+        @log_tags = []
 
-  @disable_request_forgery_protection = false
-  @allow_same_origin_as_host = true
-  @filter_parameters = []
+        @connection_class = -> { ActionCable::Connection::Base }
+        @worker_pool_size = 4
 
-  @health_check_application = ->(env) {
-    [200, { Rack::CONTENT_TYPE => "text/html", "date" => Time.now.httpdate }, []]
-  }
-end
-
-
- - + @disable_request_forgery_protection = false + @allow_same_origin_as_host = true + @filter_parameters = [] + + @health_check_application = ->(env) { + [200, { Rack::CONTENT_TYPE => "text/html", "date" => Time.now.httpdate }, []] + } + end + + See on GitHub + + + + @@ -260,47 +260,47 @@

- -
- - -
-
# File actioncable/lib/action_cable/server/configuration.rb, line 37
-def pubsub_adapter
-  adapter = (cable.fetch("adapter") { "redis" })
+          
+            
+ + Source code + - # Require the adapter itself and give useful feedback about - # 1. Missing adapter gems and - # 2. Adapter gems' missing dependencies. - path_to_adapter = "action_cable/subscription_adapter/#{adapter}" - begin - require path_to_adapter - rescue LoadError => e - # We couldn't require the adapter itself. Raise an exception that - # points out config typos and missing gems. - if e.path == path_to_adapter - # We can assume that a non-builtin adapter was specified, so it's - # either misspelled or missing from Gemfile. - raise e.class, "Could not load the '#{adapter}' Action Cable pubsub adapter. Ensure that the adapter is spelled correctly in config/cable.yml and that you've added the necessary adapter gem to your Gemfile.", e.backtrace +
# File actioncable/lib/action_cable/server/configuration.rb, line 37
+      def pubsub_adapter
+        adapter = (cable.fetch("adapter") { "redis" })
 
-    # Bubbled up from the adapter require. Prefix the exception message
-    # with some guidance about how to address it and reraise.
-    else
-      raise e.class, "Error loading the '#{adapter}' Action Cable pubsub adapter. Missing a gem it depends on? #{e.message}", e.backtrace
-    end
-  end
+        # Require the adapter itself and give useful feedback about
+        #   1. Missing adapter gems and
+        #   2. Adapter gems' missing dependencies.
+        path_to_adapter = "action_cable/subscription_adapter/#{adapter}"
+        begin
+          require path_to_adapter
+        rescue LoadError => e
+          # We couldn't require the adapter itself. Raise an exception that
+          # points out config typos and missing gems.
+          if e.path == path_to_adapter
+            # We can assume that a non-builtin adapter was specified, so it's
+            # either misspelled or missing from Gemfile.
+            raise e.class, "Could not load the '#{adapter}' Action Cable pubsub adapter. Ensure that the adapter is spelled correctly in config/cable.yml and that you've added the necessary adapter gem to your Gemfile.", e.backtrace
 
-  adapter = adapter.camelize
-  adapter = "PostgreSQL" if adapter == "Postgresql"
-  "ActionCable::SubscriptionAdapter::#{adapter}".constantize
-end
-
-
- - + # Bubbled up from the adapter require. Prefix the exception message + # with some guidance about how to address it and reraise. + else + raise e.class, "Error loading the '#{adapter}' Action Cable pubsub adapter. Missing a gem it depends on? #{e.message}", e.backtrace + end + end + + adapter = adapter.camelize + adapter = "PostgreSQL" if adapter == "Postgresql" + "ActionCable::SubscriptionAdapter::#{adapter}".constantize + end + + See on GitHub + + + + diff --git a/src/classes/ActionCable/Server/Worker/ActiveRecordConnectionManagement.html b/src/classes/ActionCable/Server/Worker/ActiveRecordConnectionManagement.html index e30657f592..bb35fdeb36 100644 --- a/src/classes/ActionCable/Server/Worker/ActiveRecordConnectionManagement.html +++ b/src/classes/ActionCable/Server/Worker/ActiveRecordConnectionManagement.html @@ -75,22 +75,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/server/worker/active_record_connection_management.rb, line 15
+        def with_database_connections(&block)
+          connection.logger.tag(ActiveRecord::Base.logger, &block)
+        end
- -
-
# File actioncable/lib/action_cable/server/worker/active_record_connection_management.rb, line 15
-def with_database_connections(&block)
-  connection.logger.tag(ActiveRecord::Base.logger, &block)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionCable/SubscriptionAdapter/Async/AsyncSubscriberMap.html b/src/classes/ActionCable/SubscriptionAdapter/Async/AsyncSubscriberMap.html index 700cc0fa08..88cc867462 100644 --- a/src/classes/ActionCable/SubscriptionAdapter/Async/AsyncSubscriberMap.html +++ b/src/classes/ActionCable/SubscriptionAdapter/Async/AsyncSubscriberMap.html @@ -88,23 +88,23 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/async.rb, line 12
+          def initialize(event_loop)
+            @event_loop = event_loop
+            super()
+          end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/async.rb, line 12
-def initialize(event_loop)
-  @event_loop = event_loop
-  super()
-end
-
-
- - + See on GitHub + + + + @@ -128,22 +128,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/async.rb, line 17
+          def add_subscriber(*)
+            @event_loop.post { super }
+          end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/async.rb, line 17
-def add_subscriber(*)
-  @event_loop.post { super }
-end
-
-
- - + See on GitHub + + + +

@@ -163,22 +163,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/async.rb, line 21
+          def invoke_callback(*)
+            @event_loop.post { super }
+          end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/async.rb, line 21
-def invoke_callback(*)
-  @event_loop.post { super }
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionCable/SubscriptionAdapter/Base.html b/src/classes/ActionCable/SubscriptionAdapter/Base.html index 84f29380ef..316831a14d 100644 --- a/src/classes/ActionCable/SubscriptionAdapter/Base.html +++ b/src/classes/ActionCable/SubscriptionAdapter/Base.html @@ -122,23 +122,23 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/base.rb, line 8
+      def initialize(server)
+        @server = server
+        @logger = @server.logger
+      end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/base.rb, line 8
-def initialize(server)
-  @server = server
-  @logger = @server.logger
-end
-
-
- - + See on GitHub + + + + @@ -162,22 +162,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/base.rb, line 13
+      def broadcast(channel, payload)
+        raise NotImplementedError
+      end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/base.rb, line 13
-def broadcast(channel, payload)
-  raise NotImplementedError
-end
-
-
- - + See on GitHub + + + +

@@ -197,22 +197,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/base.rb, line 29
+      def identifier
+        @server.config.cable[:id] ||= "ActionCable-PID-#{$$}"
+      end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/base.rb, line 29
-def identifier
-  @server.config.cable[:id] ||= "ActionCable-PID-#{$$}"
-end
-
-
- -

+ See on GitHub + + + +

@@ -232,22 +232,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/base.rb, line 25
+      def shutdown
+        raise NotImplementedError
+      end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/base.rb, line 25
-def shutdown
-  raise NotImplementedError
-end
-
-
- -

+ See on GitHub + + + +

@@ -267,22 +267,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/base.rb, line 17
+      def subscribe(channel, message_callback, success_callback = nil)
+        raise NotImplementedError
+      end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/base.rb, line 17
-def subscribe(channel, message_callback, success_callback = nil)
-  raise NotImplementedError
-end
-
-
- -

+ See on GitHub + + + +

@@ -302,22 +302,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/base.rb, line 21
+      def unsubscribe(channel, message_callback)
+        raise NotImplementedError
+      end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/base.rb, line 21
-def unsubscribe(channel, message_callback)
-  raise NotImplementedError
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionCable/SubscriptionAdapter/PostgreSQL/Listener.html b/src/classes/ActionCable/SubscriptionAdapter/PostgreSQL/Listener.html index 578ed653a6..0dd34c9cde 100644 --- a/src/classes/ActionCable/SubscriptionAdapter/PostgreSQL/Listener.html +++ b/src/classes/ActionCable/SubscriptionAdapter/PostgreSQL/Listener.html @@ -100,31 +100,31 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/postgresql.rb, line 74
+          def initialize(adapter, event_loop)
+            super()
+
+            @adapter = adapter
+            @event_loop = event_loop
+            @queue = Queue.new
+
+            @thread = Thread.new do
+              Thread.current.abort_on_exception = true
+              listen
+            end
+          end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/postgresql.rb, line 74
-def initialize(adapter, event_loop)
-  super()
-
-  @adapter = adapter
-  @event_loop = event_loop
-  @queue = Queue.new
-
-  @thread = Thread.new do
-    Thread.current.abort_on_exception = true
-    listen
-  end
-end
-
-
- - + See on GitHub + + + + @@ -148,22 +148,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/postgresql.rb, line 118
+          def add_channel(channel, on_success)
+            @queue.push([:listen, channel, on_success])
+          end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/postgresql.rb, line 118
-def add_channel(channel, on_success)
-  @queue.push([:listen, channel, on_success])
-end
-
-
- - + See on GitHub + + + +

@@ -183,22 +183,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/postgresql.rb, line 126
+          def invoke_callback(*)
+            @event_loop.post { super }
+          end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/postgresql.rb, line 126
-def invoke_callback(*)
-  @event_loop.post { super }
-end
-
-
- -

+ See on GitHub + + + +

@@ -218,44 +218,44 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/postgresql.rb, line 87
+          def listen
+            @adapter.with_subscriptions_connection do |pg_conn|
+              catch :shutdown do
+                loop do
+                  until @queue.empty?
+                    action, channel, callback = @queue.pop(true)
+
+                    case action
+                    when :listen
+                      pg_conn.exec("LISTEN #{pg_conn.escape_identifier channel}")
+                      @event_loop.post(&callback) if callback
+                    when :unlisten
+                      pg_conn.exec("UNLISTEN #{pg_conn.escape_identifier channel}")
+                    when :shutdown
+                      throw :shutdown
+                    end
+                  end
+
+                  pg_conn.wait_for_notify(1) do |chan, pid, message|
+                    broadcast(chan, message)
+                  end
+                end
+              end
+            end
+          end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/postgresql.rb, line 87
-def listen
-  @adapter.with_subscriptions_connection do |pg_conn|
-    catch :shutdown do
-      loop do
-        until @queue.empty?
-          action, channel, callback = @queue.pop(true)
-
-          case action
-          when :listen
-            pg_conn.exec("LISTEN #{pg_conn.escape_identifier channel}")
-            @event_loop.post(&callback) if callback
-          when :unlisten
-            pg_conn.exec("UNLISTEN #{pg_conn.escape_identifier channel}")
-          when :shutdown
-            throw :shutdown
-          end
-        end
-
-        pg_conn.wait_for_notify(1) do |chan, pid, message|
-          broadcast(chan, message)
-        end
-      end
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -275,22 +275,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/postgresql.rb, line 122
+          def remove_channel(channel)
+            @queue.push([:unlisten, channel])
+          end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/postgresql.rb, line 122
-def remove_channel(channel)
-  @queue.push([:unlisten, channel])
-end
-
-
- -

+ See on GitHub + + + +

@@ -310,23 +310,23 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/postgresql.rb, line 113
+          def shutdown
+            @queue.push([:shutdown])
+            Thread.pass while @thread.alive?
+          end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/postgresql.rb, line 113
-def shutdown
-  @queue.push([:shutdown])
-  Thread.pass while @thread.alive?
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionCable/SubscriptionAdapter/Redis/Listener.html b/src/classes/ActionCable/SubscriptionAdapter/Redis/Listener.html index 4c8b7dd92e..f9303e5137 100644 --- a/src/classes/ActionCable/SubscriptionAdapter/Redis/Listener.html +++ b/src/classes/ActionCable/SubscriptionAdapter/Redis/Listener.html @@ -131,39 +131,39 @@

- -
- - -
-
# File actioncable/lib/action_cable/subscription_adapter/redis.rb, line 65
-def initialize(adapter, config_options, event_loop)
-  super()
+          
+            
+ + Source code + - @adapter = adapter - @event_loop = event_loop +
# File actioncable/lib/action_cable/subscription_adapter/redis.rb, line 65
+          def initialize(adapter, config_options, event_loop)
+            super()
 
-  @subscribe_callbacks = Hash.new { |h, k| h[k] = [] }
-  @subscription_lock = Mutex.new
+            @adapter = adapter
+            @event_loop = event_loop
 
-  @reconnect_attempt = 0
-  # Use the same config as used by Redis conn
-  @reconnect_attempts = config_options.fetch(:reconnect_attempts, 1)
-  @reconnect_attempts = Array.new(@reconnect_attempts, 0) if @reconnect_attempts.is_a?(Integer)
+            @subscribe_callbacks = Hash.new { |h, k| h[k] = [] }
+            @subscription_lock = Mutex.new
 
-  @subscribed_client = nil
+            @reconnect_attempt = 0
+            # Use the same config as used by Redis conn
+            @reconnect_attempts = config_options.fetch(:reconnect_attempts, 1)
+            @reconnect_attempts = Array.new(@reconnect_attempts, 0) if @reconnect_attempts.is_a?(Integer)
 
-  @when_connected = []
+            @subscribed_client = nil
 
-  @thread = nil
-end
-
-
- - + @when_connected = [] + + @thread = nil + end + + See on GitHub + + + + @@ -187,26 +187,26 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/redis.rb, line 138
+          def add_channel(channel, on_success)
+            @subscription_lock.synchronize do
+              ensure_listener_running
+              @subscribe_callbacks[channel] << on_success
+              when_connected { @subscribed_client.subscribe(channel) }
+            end
+          end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/redis.rb, line 138
-def add_channel(channel, on_success)
-  @subscription_lock.synchronize do
-    ensure_listener_running
-    @subscribe_callbacks[channel] << on_success
-    when_connected { @subscribed_client.subscribe(channel) }
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -226,22 +226,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/redis.rb, line 152
+          def invoke_callback(*)
+            @event_loop.post { super }
+          end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/redis.rb, line 152
-def invoke_callback(*)
-  @event_loop.post { super }
-end
-
-
- -

+ See on GitHub + + + +

@@ -261,57 +261,57 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/redis.rb, line 86
+          def listen(conn)
+            conn.without_reconnect do
+              original_client = extract_subscribed_client(conn)
+
+              conn.subscribe("_action_cable_internal") do |on|
+                on.subscribe do |chan, count|
+                  @subscription_lock.synchronize do
+                    if count == 1
+                      @reconnect_attempt = 0
+                      @subscribed_client = original_client
+
+                      until @when_connected.empty?
+                        @when_connected.shift.call
+                      end
+                    end
+
+                    if callbacks = @subscribe_callbacks[chan]
+                      next_callback = callbacks.shift
+                      @event_loop.post(&next_callback) if next_callback
+                      @subscribe_callbacks.delete(chan) if callbacks.empty?
+                    end
+                  end
+                end
+
+                on.message do |chan, message|
+                  broadcast(chan, message)
+                end
+
+                on.unsubscribe do |chan, count|
+                  if count == 0
+                    @subscription_lock.synchronize do
+                      @subscribed_client = nil
+                    end
+                  end
+                end
+              end
+            end
+          end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/redis.rb, line 86
-def listen(conn)
-  conn.without_reconnect do
-    original_client = extract_subscribed_client(conn)
-
-    conn.subscribe("_action_cable_internal") do |on|
-      on.subscribe do |chan, count|
-        @subscription_lock.synchronize do
-          if count == 1
-            @reconnect_attempt = 0
-            @subscribed_client = original_client
-
-            until @when_connected.empty?
-              @when_connected.shift.call
-            end
-          end
-
-          if callbacks = @subscribe_callbacks[chan]
-            next_callback = callbacks.shift
-            @event_loop.post(&next_callback) if next_callback
-            @subscribe_callbacks.delete(chan) if callbacks.empty?
-          end
-        end
-      end
-
-      on.message do |chan, message|
-        broadcast(chan, message)
-      end
-
-      on.unsubscribe do |chan, count|
-        if count == 0
-          @subscription_lock.synchronize do
-            @subscribed_client = nil
-          end
-        end
-      end
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -331,24 +331,24 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/redis.rb, line 146
+          def remove_channel(channel)
+            @subscription_lock.synchronize do
+              when_connected { @subscribed_client.unsubscribe(channel) }
+            end
+          end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/redis.rb, line 146
-def remove_channel(channel)
-  @subscription_lock.synchronize do
-    when_connected { @subscribed_client.unsubscribe(channel) }
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -368,31 +368,31 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/redis.rb, line 125
+          def shutdown
+            @subscription_lock.synchronize do
+              return if @thread.nil?
+
+              when_connected do
+                @subscribed_client.unsubscribe
+                @subscribed_client = nil
+              end
+            end
+
+            Thread.pass while @thread.alive?
+          end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/redis.rb, line 125
-def shutdown
-  @subscription_lock.synchronize do
-    return if @thread.nil?
-
-    when_connected do
-      @subscribed_client.unsubscribe
-      @subscribed_client = nil
-    end
-  end
-
-  Thread.pass while @thread.alive?
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionCable/SubscriptionAdapter/Redis/Listener/SubscribedClient.html b/src/classes/ActionCable/SubscriptionAdapter/Redis/Listener/SubscribedClient.html index 50264ecad5..47ef3f5373 100644 --- a/src/classes/ActionCable/SubscriptionAdapter/Redis/Listener/SubscribedClient.html +++ b/src/classes/ActionCable/SubscriptionAdapter/Redis/Listener/SubscribedClient.html @@ -88,22 +88,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/redis.rb, line 213
+                def initialize(raw_client)
+                  @raw_client = raw_client
+                end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/redis.rb, line 213
-def initialize(raw_client)
-  @raw_client = raw_client
-end
-
-
- - + See on GitHub + + + + @@ -127,22 +127,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/redis.rb, line 217
+                def subscribe(*channel)
+                  send_command("subscribe", *channel)
+                end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/redis.rb, line 217
-def subscribe(*channel)
-  send_command("subscribe", *channel)
-end
-
-
- - + See on GitHub + + + +

@@ -162,22 +162,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/redis.rb, line 221
+                def unsubscribe(*channel)
+                  send_command("unsubscribe", *channel)
+                end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/redis.rb, line 221
-def unsubscribe(*channel)
-  send_command("unsubscribe", *channel)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionCable/SubscriptionAdapter/SubscriberMap.html b/src/classes/ActionCable/SubscriptionAdapter/SubscriberMap.html index 6eacc202e0..de1ae5cbe2 100644 --- a/src/classes/ActionCable/SubscriptionAdapter/SubscriberMap.html +++ b/src/classes/ActionCable/SubscriptionAdapter/SubscriberMap.html @@ -104,23 +104,23 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb, line 6
+      def initialize
+        @subscribers = Hash.new { |h, k| h[k] = [] }
+        @sync = Mutex.new
+      end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb, line 6
-def initialize
-  @subscribers = Hash.new { |h, k| h[k] = [] }
-  @sync = Mutex.new
-end
-
-
- - + See on GitHub + + + + @@ -144,22 +144,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb, line 47
+      def add_channel(channel, on_success)
+        on_success.call if on_success
+      end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb, line 47
-def add_channel(channel, on_success)
-  on_success.call if on_success
-end
-
-
- - + See on GitHub + + + +

@@ -179,32 +179,32 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb, line 11
+      def add_subscriber(channel, subscriber, on_success)
+        @sync.synchronize do
+          new_channel = !@subscribers.key?(channel)
+
+          @subscribers[channel] << subscriber
+
+          if new_channel
+            add_channel channel, on_success
+          elsif on_success
+            on_success.call
+          end
+        end
+      end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb, line 11
-def add_subscriber(channel, subscriber, on_success)
-  @sync.synchronize do
-    new_channel = !@subscribers.key?(channel)
-
-    @subscribers[channel] << subscriber
-
-    if new_channel
-      add_channel channel, on_success
-    elsif on_success
-      on_success.call
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -224,29 +224,29 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb, line 36
+      def broadcast(channel, message)
+        list = @sync.synchronize do
+          return if !@subscribers.key?(channel)
+          @subscribers[channel].dup
+        end
+
+        list.each do |subscriber|
+          invoke_callback(subscriber, message)
+        end
+      end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb, line 36
-def broadcast(channel, message)
-  list = @sync.synchronize do
-    return if !@subscribers.key?(channel)
-    @subscribers[channel].dup
-  end
-
-  list.each do |subscriber|
-    invoke_callback(subscriber, message)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -266,22 +266,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb, line 54
+      def invoke_callback(callback, message)
+        callback.call message
+      end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb, line 54
-def invoke_callback(callback, message)
-  callback.call message
-end
-
-
- -

+ See on GitHub + + + +

@@ -301,21 +301,21 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb, line 51
+      def remove_channel(channel)
+      end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb, line 51
-def remove_channel(channel)
-end
-
-
- -

+ See on GitHub + + + +

@@ -335,29 +335,29 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb, line 25
+      def remove_subscriber(channel, subscriber)
+        @sync.synchronize do
+          @subscribers[channel].delete(subscriber)
+
+          if @subscribers[channel].empty?
+            @subscribers.delete channel
+            remove_channel channel
+          end
+        end
+      end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb, line 25
-def remove_subscriber(channel, subscriber)
-  @sync.synchronize do
-    @subscribers[channel].delete(subscriber)
-
-    if @subscribers[channel].empty?
-      @subscribers.delete channel
-      remove_channel channel
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionCable/SubscriptionAdapter/Test.html b/src/classes/ActionCable/SubscriptionAdapter/Test.html index 3043607b23..33a3dbbd1a 100644 --- a/src/classes/ActionCable/SubscriptionAdapter/Test.html +++ b/src/classes/ActionCable/SubscriptionAdapter/Test.html @@ -105,23 +105,23 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/test.rb, line 15
+      def broadcast(channel, payload)
+        broadcasts(channel) << payload
+        super
+      end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/test.rb, line 15
-def broadcast(channel, payload)
-  broadcasts(channel) << payload
-  super
-end
-
-
- - + See on GitHub + + + +

@@ -141,22 +141,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/test.rb, line 20
+      def broadcasts(channel)
+        channels_data[channel] ||= []
+      end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/test.rb, line 20
-def broadcasts(channel)
-  channels_data[channel] ||= []
-end
-
-
- -

+ See on GitHub + + + +

@@ -176,22 +176,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/test.rb, line 28
+      def clear
+        @channels_data = nil
+      end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/test.rb, line 28
-def clear
-  @channels_data = nil
-end
-
-
- -

+ See on GitHub + + + +

@@ -211,22 +211,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/subscription_adapter/test.rb, line 24
+      def clear_messages(channel)
+        channels_data[channel] = []
+      end
- -
-
# File actioncable/lib/action_cable/subscription_adapter/test.rb, line 24
-def clear_messages(channel)
-  channels_data[channel] = []
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionCable/TestHelper.html b/src/classes/ActionCable/TestHelper.html index e7b1032b3f..18c0296e6b 100644 --- a/src/classes/ActionCable/TestHelper.html +++ b/src/classes/ActionCable/TestHelper.html @@ -108,45 +108,45 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/test_helper.rb, line 116
+    def assert_broadcast_on(stream, data, &block)
+      # Encode to JSON and back–we want to use this value to compare
+      # with decoded JSON.
+      # Comparing JSON strings doesn't work due to the order if the keys.
+      serialized_msg =
+        ActiveSupport::JSON.decode(ActiveSupport::JSON.encode(data))
+
+      new_messages = broadcasts(stream)
+      if block_given?
+        new_messages = new_broadcasts_from(new_messages, stream, "assert_broadcast_on", &block)
+      end
+
+      message = new_messages.find { |msg| ActiveSupport::JSON.decode(msg) == serialized_msg }
+
+      error_message = "No messages sent with #{data} to #{stream}"
+
+      if new_messages.any?
+        error_message = new_messages.inject("#{error_message}\nMessage(s) found:\n") do |error_message, new_message|
+          error_message + "#{ActiveSupport::JSON.decode(new_message)}\n"
+        end
+      else
+        error_message = "#{error_message}\nNo message found for #{stream}"
+      end
+
+      assert message, error_message
+    end
- -
-
# File actioncable/lib/action_cable/test_helper.rb, line 116
-def assert_broadcast_on(stream, data, &block)
-  # Encode to JSON and back–we want to use this value to compare
-  # with decoded JSON.
-  # Comparing JSON strings doesn't work due to the order if the keys.
-  serialized_msg =
-    ActiveSupport::JSON.decode(ActiveSupport::JSON.encode(data))
-
-  new_messages = broadcasts(stream)
-  if block_given?
-    new_messages = new_broadcasts_from(new_messages, stream, "assert_broadcast_on", &block)
-  end
-
-  message = new_messages.find { |msg| ActiveSupport::JSON.decode(msg) == serialized_msg }
-
-  error_message = "No messages sent with #{data} to #{stream}"
-
-  if new_messages.any?
-    error_message = new_messages.inject("#{error_message}\nMessage(s) found:\n") do |error_message, new_message|
-      error_message + "#{ActiveSupport::JSON.decode(new_message)}\n"
-    end
-  else
-    error_message = "#{error_message}\nNo message found for #{stream}"
-  end
-
-  assert message, error_message
-end
-
-
- - + See on GitHub + + + +

@@ -193,30 +193,30 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/test_helper.rb, line 49
+    def assert_broadcasts(stream, number, &block)
+      if block_given?
+        new_messages = new_broadcasts_from(broadcasts(stream), stream, "assert_broadcasts", &block)
+
+        actual_count = new_messages.size
+        assert_equal number, actual_count, "#{number} broadcasts to #{stream} expected, but #{actual_count} were sent"
+      else
+        actual_count = broadcasts(stream).size
+        assert_equal number, actual_count, "#{number} broadcasts to #{stream} expected, but #{actual_count} were sent"
+      end
+    end
- -
-
# File actioncable/lib/action_cable/test_helper.rb, line 49
-def assert_broadcasts(stream, number, &block)
-  if block_given?
-    new_messages = new_broadcasts_from(broadcasts(stream), stream, "assert_broadcasts", &block)
-
-    actual_count = new_messages.size
-    assert_equal number, actual_count, "#{number} broadcasts to #{stream} expected, but #{actual_count} were sent"
-  else
-    actual_count = broadcasts(stream).size
-    assert_equal number, actual_count, "#{number} broadcasts to #{stream} expected, but #{actual_count} were sent"
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -257,22 +257,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/test_helper.rb, line 81
+    def assert_no_broadcasts(stream, &block)
+      assert_broadcasts stream, 0, &block
+    end
- -
-
# File actioncable/lib/action_cable/test_helper.rb, line 81
-def assert_no_broadcasts(stream, &block)
-  assert_broadcasts stream, 0, &block
-end
-
-
- -

+ See on GitHub + + + +

@@ -303,22 +303,22 @@

- -
+ +
+ + Source code + + +
# File actioncable/lib/action_cable/test_helper.rb, line 97
+    def capture_broadcasts(stream, &block)
+      new_broadcasts_from(broadcasts(stream), stream, "capture_broadcasts", &block).map { |m| ActiveSupport::JSON.decode(m) }
+    end
- -
-
# File actioncable/lib/action_cable/test_helper.rb, line 97
-def capture_broadcasts(stream, &block)
-  new_broadcasts_from(broadcasts(stream), stream, "capture_broadcasts", &block).map { |m| ActiveSupport::JSON.decode(m) }
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionController.html b/src/classes/ActionController.html index b1adefa5d6..4753e45196 100644 --- a/src/classes/ActionController.html +++ b/src/classes/ActionController.html @@ -308,22 +308,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/renderers.rb, line 7
+  def self.add_renderer(key, &block)
+    Renderers.add(key, &block)
+  end
- -
-
# File actionpack/lib/action_controller/metal/renderers.rb, line 7
-def self.add_renderer(key, &block)
-  Renderers.add(key, &block)
-end
-
-
- - + See on GitHub + + + +

@@ -343,22 +343,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/renderers.rb, line 12
+  def self.remove_renderer(key)
+    Renderers.remove(key)
+  end
- -
-
# File actionpack/lib/action_controller/metal/renderers.rb, line 12
-def self.remove_renderer(key)
-  Renderers.remove(key)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionController/API.html b/src/classes/ActionController/API.html index 9015ca825f..c87c72d812 100644 --- a/src/classes/ActionController/API.html +++ b/src/classes/ActionController/API.html @@ -202,26 +202,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/api.rb, line 106
+    def self.without_modules(*modules)
+      modules = modules.map do |m|
+        m.is_a?(Symbol) ? ActionController.const_get(m) : m
+      end
+
+      MODULES - modules
+    end
- -
-
# File actionpack/lib/action_controller/api.rb, line 106
-def self.without_modules(*modules)
-  modules = modules.map do |m|
-    m.is_a?(Symbol) ? ActionController.const_get(m) : m
-  end
-
-  MODULES - modules
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionController/ApiRendering.html b/src/classes/ActionController/ApiRendering.html index 47e5b1939e..ad6953427a 100644 --- a/src/classes/ActionController/ApiRendering.html +++ b/src/classes/ActionController/ApiRendering.html @@ -89,23 +89,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/api/api_rendering.rb, line 11
+    def render_to_body(options = {})
+      _process_options(options)
+      super
+    end
- -
-
# File actionpack/lib/action_controller/api/api_rendering.rb, line 11
-def render_to_body(options = {})
-  _process_options(options)
-  super
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionController/Base.html b/src/classes/ActionController/Base.html index 7b858cb72c..1d6b1cc976 100644 --- a/src/classes/ActionController/Base.html +++ b/src/classes/ActionController/Base.html @@ -316,26 +316,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/base.rb, line 184
+    def self.without_modules(*modules)
+      modules = modules.map do |m|
+        m.is_a?(Symbol) ? ActionController.const_get(m) : m
+      end
+
+      MODULES - modules
+    end
- -
-
# File actionpack/lib/action_controller/base.rb, line 184
-def self.without_modules(*modules)
-  modules = modules.map do |m|
-    m.is_a?(Symbol) ? ActionController.const_get(m) : m
-  end
-
-  MODULES - modules
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionController/ConditionalGet.html b/src/classes/ActionController/ConditionalGet.html index c9e081f466..6a2f9ae309 100644 --- a/src/classes/ActionController/ConditionalGet.html +++ b/src/classes/ActionController/ConditionalGet.html @@ -162,33 +162,33 @@

Examples

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/conditional_get.rb, line 274
+    def expires_in(seconds, options = {})
+      response.cache_control.delete(:no_store)
+      response.cache_control.merge!(
+        max_age: seconds,
+        public: options.delete(:public),
+        must_revalidate: options.delete(:must_revalidate),
+        stale_while_revalidate: options.delete(:stale_while_revalidate),
+        stale_if_error: options.delete(:stale_if_error),
+      )
+      options.delete(:private)
+
+      response.cache_control[:extras] = options.map { |k, v| "#{k}=#{v}" }
+      response.date = Time.now unless response.date?
+    end
- -
-
# File actionpack/lib/action_controller/metal/conditional_get.rb, line 274
-def expires_in(seconds, options = {})
-  response.cache_control.delete(:no_store)
-  response.cache_control.merge!(
-    max_age: seconds,
-    public: options.delete(:public),
-    must_revalidate: options.delete(:must_revalidate),
-    stale_while_revalidate: options.delete(:stale_while_revalidate),
-    stale_if_error: options.delete(:stale_if_error),
-  )
-  options.delete(:private)
-
-  response.cache_control[:extras] = options.map { |k, v| "#{k}=#{v}" }
-  response.date = Time.now unless response.date?
-end
-
-
- - + See on GitHub + + + +

@@ -208,22 +208,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/conditional_get.rb, line 292
+    def expires_now
+      response.cache_control.replace(no_cache: true)
+    end
- -
-
# File actionpack/lib/action_controller/metal/conditional_get.rb, line 292
-def expires_now
-  response.cache_control.replace(no_cache: true)
-end
-
-
- -

+ See on GitHub + + + +

@@ -316,38 +316,38 @@

Examples

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/conditional_get.rb, line 128
+    def fresh_when(object = nil, etag: nil, weak_etag: nil, strong_etag: nil, last_modified: nil, public: false, cache_control: {}, template: nil)
+      response.cache_control.delete(:no_store)
+      weak_etag ||= etag || object unless strong_etag
+      last_modified ||= object.try(:updated_at) || object.try(:maximum, :updated_at)
+
+      if strong_etag
+        response.strong_etag = combine_etags strong_etag,
+          last_modified: last_modified, public: public, template: template
+      elsif weak_etag || template
+        response.weak_etag = combine_etags weak_etag,
+          last_modified: last_modified, public: public, template: template
+      end
+
+      response.last_modified = last_modified if last_modified
+      response.cache_control[:public] = true if public
+      response.cache_control.merge!(cache_control)
+
+      head :not_modified if request.fresh?(response)
+    end
- -
-
# File actionpack/lib/action_controller/metal/conditional_get.rb, line 128
-def fresh_when(object = nil, etag: nil, weak_etag: nil, strong_etag: nil, last_modified: nil, public: false, cache_control: {}, template: nil)
-  response.cache_control.delete(:no_store)
-  weak_etag ||= etag || object unless strong_etag
-  last_modified ||= object.try(:updated_at) || object.try(:maximum, :updated_at)
-
-  if strong_etag
-    response.strong_etag = combine_etags strong_etag,
-      last_modified: last_modified, public: public, template: template
-  elsif weak_etag || template
-    response.weak_etag = combine_etags weak_etag,
-      last_modified: last_modified, public: public, template: template
-  end
-
-  response.last_modified = last_modified if last_modified
-  response.cache_control[:public] = true if public
-  response.cache_control.merge!(cache_control)
-
-  head :not_modified if request.fresh?(response)
-end
-
-
- -
+ See on GitHub + + + +

@@ -372,26 +372,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/conditional_get.rb, line 304
+    def http_cache_forever(public: false)
+      expires_in 100.years, public: public
+
+      yield if stale?(etag: request.fullpath,
+                      last_modified: Time.new(2011, 1, 1).utc,
+                      public: public)
+    end
- -
-
# File actionpack/lib/action_controller/metal/conditional_get.rb, line 304
-def http_cache_forever(public: false)
-  expires_in 100.years, public: public
-
-  yield if stale?(etag: request.fullpath,
-                  last_modified: Time.new(2011, 1, 1).utc,
-                  public: public)
-end
-
-
- -

+ See on GitHub + + + +

@@ -411,22 +411,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/conditional_get.rb, line 314
+    def no_store
+      response.cache_control.replace(no_store: true)
+    end
- -
-
# File actionpack/lib/action_controller/metal/conditional_get.rb, line 314
-def no_store
-  response.cache_control.replace(no_store: true)
-end
-
-
- -

+ See on GitHub + + + +

@@ -519,23 +519,23 @@

Examples

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/conditional_get.rb, line 227
+    def stale?(object = nil, **freshness_kwargs)
+      fresh_when(object, **freshness_kwargs)
+      !request.fresh?(response)
+    end
- -
-
# File actionpack/lib/action_controller/metal/conditional_get.rb, line 227
-def stale?(object = nil, **freshness_kwargs)
-  fresh_when(object, **freshness_kwargs)
-  !request.fresh?(response)
-end
-
-
- -
+ See on GitHub + + + + diff --git a/src/classes/ActionController/ConditionalGet/ClassMethods.html b/src/classes/ActionController/ConditionalGet/ClassMethods.html index 41852c3f1d..01f6cc6fd0 100644 --- a/src/classes/ActionController/ConditionalGet/ClassMethods.html +++ b/src/classes/ActionController/ConditionalGet/ClassMethods.html @@ -86,22 +86,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/conditional_get.rb, line 31
+      def etag(&etagger)
+        self.etaggers += [etagger]
+      end
- -
-
# File actionpack/lib/action_controller/metal/conditional_get.rb, line 31
-def etag(&etagger)
-  self.etaggers += [etagger]
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionController/ContentSecurityPolicy/ClassMethods.html b/src/classes/ActionController/ContentSecurityPolicy/ClassMethods.html index 63a87db7c0..8dcbfe34e3 100644 --- a/src/classes/ActionController/ContentSecurityPolicy/ClassMethods.html +++ b/src/classes/ActionController/ContentSecurityPolicy/ClassMethods.html @@ -102,32 +102,32 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/content_security_policy.rb, line 39
+      def content_security_policy(enabled = true, **options, &block)
+        before_action(options) do
+          if block_given?
+            policy = current_content_security_policy
+            instance_exec(policy, &block)
+            request.content_security_policy = policy
+          end
+
+          unless enabled
+            request.content_security_policy = nil
+          end
+        end
+      end
- -
-
# File actionpack/lib/action_controller/metal/content_security_policy.rb, line 39
-def content_security_policy(enabled = true, **options, &block)
-  before_action(options) do
-    if block_given?
-      policy = current_content_security_policy
-      instance_exec(policy, &block)
-      request.content_security_policy = policy
-    end
-
-    unless enabled
-      request.content_security_policy = nil
-    end
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -159,24 +159,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/content_security_policy.rb, line 65
+      def content_security_policy_report_only(report_only = true, **options)
+        before_action(options) do
+          request.content_security_policy_report_only = report_only
+        end
+      end
- -
-
# File actionpack/lib/action_controller/metal/content_security_policy.rb, line 65
-def content_security_policy_report_only(report_only = true, **options)
-  before_action(options) do
-    request.content_security_policy_report_only = report_only
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionController/Cookies.html b/src/classes/ActionController/Cookies.html index 77bf359a6d..122d9ace6f 100644 --- a/src/classes/ActionController/Cookies.html +++ b/src/classes/ActionController/Cookies.html @@ -75,22 +75,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/cookies.rb, line 14
+      def cookies # :doc:
+        request.cookie_jar
+      end
- -
-
# File actionpack/lib/action_controller/metal/cookies.rb, line 14
-def cookies # :doc:
-  request.cookie_jar
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionController/DataStreaming.html b/src/classes/ActionController/DataStreaming.html index 0247e7291c..1ed963aa49 100644 --- a/src/classes/ActionController/DataStreaming.html +++ b/src/classes/ActionController/DataStreaming.html @@ -129,23 +129,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/data_streaming.rb, line 111
+      def send_data(data, options = {}) # :doc:
+        send_file_headers! options
+        render options.slice(:status, :content_type).merge(body: data)
+      end
- -
-
# File actionpack/lib/action_controller/metal/data_streaming.rb, line 111
-def send_data(data, options = {}) # :doc:
-  send_file_headers! options
-  render options.slice(:status, :content_type).merge(body: data)
-end
-
-
- - + See on GitHub + + + +

@@ -201,29 +201,29 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/data_streaming.rb, line 71
+      def send_file(path, options = {}) # :doc:
+        raise MissingFile, "Cannot read file #{path}" unless File.file?(path) && File.readable?(path)
+
+        options[:filename] ||= File.basename(path) unless options[:url_based_filename]
+        send_file_headers! options
+
+        self.status = options[:status] || 200
+        self.content_type = options[:content_type] if options.key?(:content_type)
+        response.send_file path
+      end
- -
-
# File actionpack/lib/action_controller/metal/data_streaming.rb, line 71
-def send_file(path, options = {}) # :doc:
-  raise MissingFile, "Cannot read file #{path}" unless File.file?(path) && File.readable?(path)
-
-  options[:filename] ||= File.basename(path) unless options[:url_based_filename]
-  send_file_headers! options
-
-  self.status = options[:status] || 200
-  self.content_type = options[:content_type] if options.key?(:content_type)
-  response.send_file path
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionController/DefaultHeaders/ClassMethods.html b/src/classes/ActionController/DefaultHeaders/ClassMethods.html index 987a77b21b..3584cb35fa 100644 --- a/src/classes/ActionController/DefaultHeaders/ClassMethods.html +++ b/src/classes/ActionController/DefaultHeaders/ClassMethods.html @@ -75,24 +75,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/default_headers.rb, line 12
+      def make_response!(request)
+        ActionDispatch::Response.create.tap do |res|
+          res.request = request
+        end
+      end
- -
-
# File actionpack/lib/action_controller/metal/default_headers.rb, line 12
-def make_response!(request)
-  ActionDispatch::Response.create.tap do |res|
-    res.request = request
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionController/Flash.html b/src/classes/ActionController/Flash.html index 94051f7863..931ccc857f 100644 --- a/src/classes/ActionController/Flash.html +++ b/src/classes/ActionController/Flash.html @@ -88,32 +88,32 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/flash.rb, line 51
+      def redirect_to(options = {}, response_options_and_flash = {}) # :doc:
+        self.class._flash_types.each do |flash_type|
+          if type = response_options_and_flash.delete(flash_type)
+            flash[flash_type] = type
+          end
+        end
+
+        if other_flashes = response_options_and_flash.delete(:flash)
+          flash.update(other_flashes)
+        end
+
+        super(options, response_options_and_flash)
+      end
- -
-
# File actionpack/lib/action_controller/metal/flash.rb, line 51
-def redirect_to(options = {}, response_options_and_flash = {}) # :doc:
-  self.class._flash_types.each do |flash_type|
-    if type = response_options_and_flash.delete(flash_type)
-      flash[flash_type] = type
-    end
-  end
-
-  if other_flashes = response_options_and_flash.delete(:flash)
-    flash.update(other_flashes)
-  end
-
-  super(options, response_options_and_flash)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionController/Flash/ClassMethods.html b/src/classes/ActionController/Flash/ClassMethods.html index 40495c2f1e..3980961389 100644 --- a/src/classes/ActionController/Flash/ClassMethods.html +++ b/src/classes/ActionController/Flash/ClassMethods.html @@ -89,31 +89,31 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/flash.rb, line 32
+      def add_flash_types(*types)
+        types.each do |type|
+          next if _flash_types.include?(type)
+
+          define_method(type) do
+            request.flash[type]
+          end
+          helper_method(type) if respond_to?(:helper_method)
+
+          self._flash_types += [type]
+        end
+      end
- -
-
# File actionpack/lib/action_controller/metal/flash.rb, line 32
-def add_flash_types(*types)
-  types.each do |type|
-    next if _flash_types.include?(type)
-
-    define_method(type) do
-      request.flash[type]
-    end
-    helper_method(type) if respond_to?(:helper_method)
-
-    self._flash_types += [type]
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionController/ForceSSL.html b/src/classes/ActionController/ForceSSL.html deleted file mode 100644 index afcd89abd6..0000000000 --- a/src/classes/ActionController/ForceSSL.html +++ /dev/null @@ -1,200 +0,0 @@ ---- -title: ActionController::ForceSSL -layout: default ---- -
- -
-
- -
- -

This module provides a method which will redirect the browser to use the secured HTTPS protocol. This will ensure that users' sensitive information will be transferred safely over the internet. You should always force the browser to use HTTPS when you're transferring sensitive information such as user authentication, account information, or credit card information.

- -

Note that if you are really concerned about your application security, you might consider using config.force_ssl in your config file instead. That will ensure all the data is transferred via HTTPS, and will prevent the user from getting their session hijacked when accessing the site over unsecured HTTP protocol.

- -
- - - - - - - - - -

Namespace

- - -

Module

- - - - - - - -

Methods

- - - - - -

Included Modules

- - - - - - - - - - -

Constants

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ACTION_OPTIONS=[:only, :except, :if, :unless]
 
REDIRECT_OPTIONS=[:status, :flash, :alert, :notice]
 
URL_OPTIONS=[:protocol, :host, :domain, :subdomain, :port, :path]
 
- - - - - - - -

Instance Public methods

- -
-

- - force_ssl_redirect(host_or_options = nil) - -

- - -
-

Redirect the existing request to use the HTTPS protocol.

- -

Parameters

-
  • -

    host_or_options - Either a host name or any of the URL and redirect options available to the force_ssl method.

    -
-
- - - - - - - - -
- - -
-
# File actionpack/lib/action_controller/metal/force_ssl.rb, line 78
-def force_ssl_redirect(host_or_options = nil)
-  unless request.ssl?
-    options = {
-      protocol: "https://",
-      host: request.host,
-      path: request.fullpath,
-      status: :moved_permanently
-    }
-
-    if host_or_options.is_a?(Hash)
-      options.merge!(host_or_options)
-    elsif host_or_options
-      options[:host] = host_or_options
-    end
-
-    secure_url = ActionDispatch::Http::URL.url_for(options.slice(*URL_OPTIONS))
-    flash.keep if respond_to?(:flash) && request.respond_to?(:flash)
-    redirect_to secure_url, options.slice(*REDIRECT_OPTIONS)
-  end
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActionController/ForceSSL/ClassMethods.html b/src/classes/ActionController/ForceSSL/ClassMethods.html deleted file mode 100644 index ee3865ebcb..0000000000 --- a/src/classes/ActionController/ForceSSL/ClassMethods.html +++ /dev/null @@ -1,157 +0,0 @@ ---- -title: ActionController::ForceSSL::ClassMethods -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - - -

Instance Public methods

- -
-

- - force_ssl(options = {}) - -

- - -
-

Force the request to this particular controller or specified actions to be through the HTTPS protocol.

- -

If you need to disable this for any reason (e.g. development) then you can use an :if or :unless condition.

- -
class AccountsController < ApplicationController
-  force_ssl if: :ssl_configured?
-
-  def ssl_configured?
-    !Rails.env.development?
-  end
-end
-
- -

URL Options

- -

You can pass any of the following options to affect the redirect URL

-
  • -

    host - Redirect to a different host name

    -
  • -

    subdomain - Redirect to a different subdomain

    -
  • -

    domain - Redirect to a different domain

    -
  • -

    port - Redirect to a non-standard port

    -
  • -

    path - Redirect to a different path

    -
- -

Redirect Options

- -

You can pass any of the following options to affect the redirect status and response

-
  • -

    status - Redirect with a custom status (default is 301 Moved Permanently)

    -
  • -

    flash - Set a flash message when redirecting

    -
  • -

    alert - Set an alert message when redirecting

    -
  • -

    notice - Set a notice message when redirecting

    -
- -

Action Options

- -

You can pass any of the following options to affect the before_action callback

-
  • -

    only - The callback should be run only for this action

    -
  • -

    except - The callback should be run for all actions except this action

    -
  • -

    if - A symbol naming an instance method or a proc; the callback will be called only when it returns a true value.

    -
  • -

    unless - A symbol naming an instance method or a proc; the callback will be called only when it returns a false value.

    -
-
- - - - - - - - -
- - -
-
# File actionpack/lib/action_controller/metal/force_ssl.rb, line 64
-def force_ssl(options = {})
-  action_options = options.slice(*ACTION_OPTIONS)
-  redirect_options = options.except(*ACTION_OPTIONS)
-  before_action(action_options) do
-    force_ssl_redirect(redirect_options)
-  end
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActionController/FormBuilder.html b/src/classes/ActionController/FormBuilder.html index 9bb0ef05d5..1a3233076f 100644 --- a/src/classes/ActionController/FormBuilder.html +++ b/src/classes/ActionController/FormBuilder.html @@ -118,22 +118,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/form_builder.rb, line 48
+    def default_form_builder
+      self.class._default_form_builder
+    end
- -
-
# File actionpack/lib/action_controller/form_builder.rb, line 48
-def default_form_builder
-  self.class._default_form_builder
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionController/FormBuilder/ClassMethods.html b/src/classes/ActionController/FormBuilder/ClassMethods.html index cf1db52f88..f2e05bac59 100644 --- a/src/classes/ActionController/FormBuilder/ClassMethods.html +++ b/src/classes/ActionController/FormBuilder/ClassMethods.html @@ -80,22 +80,22 @@

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/form_builder.rb, line 42
+      def default_form_builder(builder)
+        self._default_form_builder = builder
+      end
- -
-
# File actionpack/lib/action_controller/form_builder.rb, line 42
-def default_form_builder(builder)
-  self._default_form_builder = builder
-end
-
- - - +
See on GitHub + +
+ + diff --git a/src/classes/ActionController/Head.html b/src/classes/ActionController/Head.html index 6e550bf20e..76e0a0e488 100644 --- a/src/classes/ActionController/Head.html +++ b/src/classes/ActionController/Head.html @@ -89,50 +89,50 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/head.rb, line 21
+    def head(status, options = nil)
+      if status.is_a?(Hash)
+        raise ArgumentError, "#{status.inspect} is not a valid value for `status`."
+      end
+
+      status ||= :ok
+
+      if options
+        location = options.delete(:location)
+        content_type = options.delete(:content_type)
+
+        options.each do |key, value|
+          headers[key.to_s.split(/[-_]/).each { |v| v[0] = v[0].upcase }.join("-")] = value.to_s
+        end
+      end
+
+      self.status = status
+      self.location = url_for(location) if location
+
+      if include_content?(response_code)
+        unless self.media_type
+          self.content_type = content_type || ((f = formats) && Mime[f.first]) || Mime[:html]
+        end
+
+        response.charset = false
+      end
+
+      self.response_body = ""
+
+      true
+    end
- -
-
# File actionpack/lib/action_controller/metal/head.rb, line 21
-def head(status, options = nil)
-  if status.is_a?(Hash)
-    raise ArgumentError, "#{status.inspect} is not a valid value for `status`."
-  end
-
-  status ||= :ok
-
-  if options
-    location = options.delete(:location)
-    content_type = options.delete(:content_type)
-
-    options.each do |key, value|
-      headers[key.to_s.split(/[-_]/).each { |v| v[0] = v[0].upcase }.join("-")] = value.to_s
-    end
-  end
-
-  self.status = status
-  self.location = url_for(location) if location
-
-  if include_content?(response_code)
-    unless self.media_type
-      self.content_type = content_type || ((f = formats) && Mime[f.first]) || Mime[:html]
-    end
-
-    response.charset = false
-  end
-
-  self.response_body = ""
-
-  true
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionController/Helpers.html b/src/classes/ActionController/Helpers.html index 88426486ce..076e60dfd7 100644 --- a/src/classes/ActionController/Helpers.html +++ b/src/classes/ActionController/Helpers.html @@ -170,22 +170,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/helpers.rb, line 117
+    def helpers
+      @_helper_proxy ||= view_context
+    end
- -
-
# File actionpack/lib/action_controller/metal/helpers.rb, line 117
-def helpers
-  @_helper_proxy ||= view_context
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionController/Helpers/ClassMethods.html b/src/classes/ActionController/Helpers/ClassMethods.html index c644cf0111..d3c0201311 100644 --- a/src/classes/ActionController/Helpers/ClassMethods.html +++ b/src/classes/ActionController/Helpers/ClassMethods.html @@ -92,22 +92,22 @@

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/helpers.rb, line 78
+      def helper_attr(*attrs)
+        attrs.flatten.each { |attr| helper_method(attr, "#{attr}=") }
+      end
- -
-
# File actionpack/lib/action_controller/metal/helpers.rb, line 78
-def helper_attr(*attrs)
-  attrs.flatten.each { |attr| helper_method(attr, "#{attr}=") }
-end
-
- - - +
See on GitHub + +
+ +

@@ -129,26 +129,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/helpers.rb, line 88
+      def helpers
+        @helper_proxy ||= begin
+          proxy = ActionView::Base.empty
+          proxy.config = config.inheritable_copy
+          proxy.extend(_helpers)
+        end
+      end
- -
-
# File actionpack/lib/action_controller/metal/helpers.rb, line 88
-def helpers
-  @helper_proxy ||= begin
-    proxy = ActionView::Base.empty
-    proxy.config = config.inheritable_copy
-    proxy.extend(_helpers)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -178,23 +178,23 @@

Returns

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/helpers.rb, line 104
+      def modules_for_helpers(args)
+        args += all_application_helpers if args.delete(:all)
+        super(args)
+      end
- -
-
# File actionpack/lib/action_controller/metal/helpers.rb, line 104
-def modules_for_helpers(args)
-  args += all_application_helpers if args.delete(:all)
-  super(args)
-end
-
-
- -
+ See on GitHub + + + + diff --git a/src/classes/ActionController/HttpAuthentication/Basic.html b/src/classes/ActionController/HttpAuthentication/Basic.html index 7d3972ee98..107bae4bf1 100644 --- a/src/classes/ActionController/HttpAuthentication/Basic.html +++ b/src/classes/ActionController/HttpAuthentication/Basic.html @@ -179,22 +179,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 127
+      def auth_param(request)
+        request.authorization.to_s.split(" ", 2).second
+      end
- -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 127
-def auth_param(request)
-  request.authorization.to_s.split(" ", 2).second
-end
-
-
- - + See on GitHub + + + +

@@ -214,22 +214,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 123
+      def auth_scheme(request)
+        request.authorization.to_s.split(" ", 2).first
+      end
- -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 123
-def auth_scheme(request)
-  request.authorization.to_s.split(" ", 2).first
-end
-
-
- -

+ See on GitHub + + + +

@@ -249,24 +249,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 105
+      def authenticate(request, &login_procedure)
+        if has_basic_credentials?(request)
+          login_procedure.call(*user_name_and_password(request))
+        end
+      end
- -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 105
-def authenticate(request, &login_procedure)
-  if has_basic_credentials?(request)
-    login_procedure.call(*user_name_and_password(request))
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -286,25 +286,25 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 135
+      def authentication_request(controller, realm, message)
+        message ||= "HTTP Basic: Access denied.\n"
+        controller.headers["WWW-Authenticate"] = %(Basic realm="#{realm.tr('"', "")}")
+        controller.status = 401
+        controller.response_body = message
+      end
- -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 135
-def authentication_request(controller, realm, message)
-  message ||= "HTTP Basic: Access denied.\n"
-  controller.headers["WWW-Authenticate"] = %(Basic realm="#{realm.tr('"', "")}")
-  controller.status = 401
-  controller.response_body = message
-end
-
-
- -

+ See on GitHub + + + +

@@ -324,22 +324,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 119
+      def decode_credentials(request)
+        ::Base64.decode64(auth_param(request) || "")
+      end
- -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 119
-def decode_credentials(request)
-  ::Base64.decode64(auth_param(request) || "")
-end
-
-
- -

+ See on GitHub + + + +

@@ -359,22 +359,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 131
+      def encode_credentials(user_name, password)
+        "Basic #{::Base64.strict_encode64("#{user_name}:#{password}")}"
+      end
- -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 131
-def encode_credentials(user_name, password)
-  "Basic #{::Base64.strict_encode64("#{user_name}:#{password}")}"
-end
-
-
- -

+ See on GitHub + + + +

@@ -394,22 +394,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 111
+      def has_basic_credentials?(request)
+        request.authorization.present? && (auth_scheme(request).downcase == "basic")
+      end
- -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 111
-def has_basic_credentials?(request)
-  request.authorization.present? && (auth_scheme(request).downcase == "basic")
-end
-
-
- -

+ See on GitHub + + + +

@@ -429,22 +429,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 115
+      def user_name_and_password(request)
+        decode_credentials(request).split(":", 2)
+      end
- -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 115
-def user_name_and_password(request)
-  decode_credentials(request).split(":", 2)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionController/HttpAuthentication/Basic/ControllerMethods.html b/src/classes/ActionController/HttpAuthentication/Basic/ControllerMethods.html index b96e69f16f..b458e4360a 100644 --- a/src/classes/ActionController/HttpAuthentication/Basic/ControllerMethods.html +++ b/src/classes/ActionController/HttpAuthentication/Basic/ControllerMethods.html @@ -100,22 +100,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 92
+        def authenticate_or_request_with_http_basic(realm = nil, message = nil, &login_procedure)
+          authenticate_with_http_basic(&login_procedure) || request_http_basic_authentication(realm || "Application", message)
+        end
- -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 92
-def authenticate_or_request_with_http_basic(realm = nil, message = nil, &login_procedure)
-  authenticate_with_http_basic(&login_procedure) || request_http_basic_authentication(realm || "Application", message)
-end
-
-
- - + See on GitHub + + + +

@@ -135,22 +135,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 96
+        def authenticate_with_http_basic(&login_procedure)
+          HttpAuthentication::Basic.authenticate(request, &login_procedure)
+        end
- -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 96
-def authenticate_with_http_basic(&login_procedure)
-  HttpAuthentication::Basic.authenticate(request, &login_procedure)
-end
-
-
- -

+ See on GitHub + + + +

@@ -170,27 +170,27 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 83
+        def http_basic_authenticate_or_request_with(name:, password:, realm: nil, message: nil)
+          authenticate_or_request_with_http_basic(realm, message) do |given_name, given_password|
+            # This comparison uses & so that it doesn't short circuit and
+            # uses `secure_compare` so that length information isn't leaked.
+            ActiveSupport::SecurityUtils.secure_compare(given_name.to_s, name) &
+              ActiveSupport::SecurityUtils.secure_compare(given_password.to_s, password)
+          end
+        end
- -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 83
-def http_basic_authenticate_or_request_with(name:, password:, realm: nil, message: nil)
-  authenticate_or_request_with_http_basic(realm, message) do |given_name, given_password|
-    # This comparison uses & so that it doesn't short circuit and
-    # uses `secure_compare` so that length information isn't leaked.
-    ActiveSupport::SecurityUtils.secure_compare(given_name.to_s, name) &
-      ActiveSupport::SecurityUtils.secure_compare(given_password.to_s, password)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -210,22 +210,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 100
+        def request_http_basic_authentication(realm = "Application", message = nil)
+          HttpAuthentication::Basic.authentication_request(self, realm, message)
+        end
- -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 100
-def request_http_basic_authentication(realm = "Application", message = nil)
-  HttpAuthentication::Basic.authentication_request(self, realm, message)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionController/HttpAuthentication/Basic/ControllerMethods/ClassMethods.html b/src/classes/ActionController/HttpAuthentication/Basic/ControllerMethods/ClassMethods.html index 6e8938e6bb..1496ff2303 100644 --- a/src/classes/ActionController/HttpAuthentication/Basic/ControllerMethods/ClassMethods.html +++ b/src/classes/ActionController/HttpAuthentication/Basic/ControllerMethods/ClassMethods.html @@ -77,24 +77,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 76
+          def http_basic_authenticate_with(name:, password:, realm: nil, **options)
+            raise ArgumentError, "Expected name: to be a String, got #{name.class}" unless name.is_a?(String)
+            raise ArgumentError, "Expected password: to be a String, got #{password.class}" unless password.is_a?(String)
+            before_action(options) { http_basic_authenticate_or_request_with name: name, password: password, realm: realm }
+          end
- -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 76
-def http_basic_authenticate_with(name:, password:, realm: nil, **options)
-  raise ArgumentError, "Expected name: to be a String, got #{name.class}" unless name.is_a?(String)
-  raise ArgumentError, "Expected password: to be a String, got #{password.class}" unless password.is_a?(String)
-  before_action(options) { http_basic_authenticate_or_request_with name: name, password: password, realm: realm }
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionController/HttpAuthentication/Digest.html b/src/classes/ActionController/HttpAuthentication/Digest.html index 6d617fe0d3..a3c39384e9 100644 --- a/src/classes/ActionController/HttpAuthentication/Digest.html +++ b/src/classes/ActionController/HttpAuthentication/Digest.html @@ -177,22 +177,22 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 211
-def authenticate(request, realm, &password_procedure)
-  request.authorization && validate_digest_response(request, realm, &password_procedure)
-end
-
-
- - + +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 211
+      def authenticate(request, realm, &password_procedure)
+        request.authorization && validate_digest_response(request, realm, &password_procedure)
+      end
+ + See on GitHub + +
+ +

@@ -212,25 +212,25 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 269
-def authentication_header(controller, realm)
-  secret_key = secret_token(controller.request)
-  nonce = self.nonce(secret_key)
-  opaque = opaque(secret_key)
-  controller.headers["WWW-Authenticate"] = %(Digest realm="#{realm}", qop="auth", algorithm=MD5, nonce="#{nonce}", opaque="#{opaque}")
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 269
+      def authentication_header(controller, realm)
+        secret_key = secret_token(controller.request)
+        nonce = self.nonce(secret_key)
+        opaque = opaque(secret_key)
+        controller.headers["WWW-Authenticate"] = %(Digest realm="#{realm}", qop="auth", algorithm=MD5, nonce="#{nonce}", opaque="#{opaque}")
+      end
+ + See on GitHub + +
+ +

@@ -250,25 +250,25 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 276
-def authentication_request(controller, realm, message = nil)
-  message ||= "HTTP Digest: Access denied.\n"
-  authentication_header(controller, realm)
-  controller.status = 401
-  controller.response_body = message
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 276
+      def authentication_request(controller, realm, message = nil)
+        message ||= "HTTP Digest: Access denied.\n"
+        authentication_header(controller, realm)
+        controller.status = 401
+        controller.response_body = message
+      end
+ + See on GitHub + +
+ +

@@ -288,25 +288,25 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 262
-def decode_credentials(header)
-  ActiveSupport::HashWithIndifferentAccess[header.to_s.gsub(/^Digest\s+/, "").split(",").map do |pair|
-    key, value = pair.split("=", 2)
-    [key.strip, value.to_s.gsub(/^"|"$/, "").delete("'")]
-  end]
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 262
+      def decode_credentials(header)
+        ActiveSupport::HashWithIndifferentAccess[header.to_s.gsub(/^Digest\s+/, "").split(",").map do |pair|
+          key, value = pair.split("=", 2)
+          [key.strip, value.to_s.gsub(/^"|"$/, "").delete("'")]
+        end]
+      end
+ + See on GitHub + +
+ +

@@ -326,22 +326,22 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 258
-def decode_credentials_header(request)
-  decode_credentials(request.authorization)
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 258
+      def decode_credentials_header(request)
+        decode_credentials(request.authorization)
+      end
+ + See on GitHub + +
+ +

@@ -361,23 +361,23 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 253
-def encode_credentials(http_method, credentials, password, password_is_ha1)
-  credentials[:response] = expected_response(http_method, credentials[:uri], credentials, password, password_is_ha1)
-  "Digest " + credentials.sort_by { |x| x[0].to_s }.map { |v| "#{v[0]}='#{v[1]}'" }.join(", ")
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 253
+      def encode_credentials(http_method, credentials, password, password_is_ha1)
+        credentials[:response] = expected_response(http_method, credentials[:uri], credentials, password, password_is_ha1)
+        "Digest " + credentials.sort_by { |x| x[0].to_s }.map { |v| "#{v[0]}='#{v[1]}'" }.join(", ")
+      end
+ + See on GitHub + +
+ +

@@ -397,24 +397,24 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 243
-def expected_response(http_method, uri, credentials, password, password_is_ha1 = true)
-  ha1 = password_is_ha1 ? password : ha1(credentials, password)
-  ha2 = OpenSSL::Digest::MD5.hexdigest([http_method.to_s.upcase, uri].join(":"))
-  OpenSSL::Digest::MD5.hexdigest([ha1, credentials[:nonce], credentials[:nc], credentials[:cnonce], credentials[:qop], ha2].join(":"))
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 243
+      def expected_response(http_method, uri, credentials, password, password_is_ha1 = true)
+        ha1 = password_is_ha1 ? password : ha1(credentials, password)
+        ha2 = OpenSSL::Digest::MD5.hexdigest([http_method.to_s.upcase, uri].join(":"))
+        OpenSSL::Digest::MD5.hexdigest([ha1, credentials[:nonce], credentials[:nc], credentials[:cnonce], credentials[:qop], ha2].join(":"))
+      end
+ + See on GitHub + +
+ +

@@ -434,22 +434,22 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 249
-def ha1(credentials, password)
-  OpenSSL::Digest::MD5.hexdigest([credentials[:username], credentials[:realm], password].join(":"))
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 249
+      def ha1(credentials, password)
+        OpenSSL::Digest::MD5.hexdigest([credentials[:username], credentials[:realm], password].join(":"))
+      end
+ + See on GitHub + +
+ +

@@ -482,25 +482,25 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 321
-def nonce(secret_key, time = Time.now)
-  t = time.to_i
-  hashed = [t, secret_key]
-  digest = OpenSSL::Digest::MD5.hexdigest(hashed.join(":"))
-  ::Base64.strict_encode64("#{t}:#{digest}")
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 321
+      def nonce(secret_key, time = Time.now)
+        t = time.to_i
+        hashed = [t, secret_key]
+        digest = OpenSSL::Digest::MD5.hexdigest(hashed.join(":"))
+        ::Base64.strict_encode64("#{t}:#{digest}")
+      end
+ + See on GitHub + +
+ +

@@ -520,22 +520,22 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 340
-def opaque(secret_key)
-  OpenSSL::Digest::MD5.hexdigest(secret_key)
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 340
+      def opaque(secret_key)
+        OpenSSL::Digest::MD5.hexdigest(secret_key)
+      end
+ + See on GitHub + +
+ +

@@ -555,24 +555,24 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 283
-def secret_token(request)
-  key_generator  = request.key_generator
-  http_auth_salt = request.http_auth_salt
-  key_generator.generate_key(http_auth_salt)
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 283
+      def secret_token(request)
+        key_generator  = request.key_generator
+        http_auth_salt = request.http_auth_salt
+        key_generator.generate_key(http_auth_salt)
+      end
+ + See on GitHub + +
+ +

@@ -592,40 +592,40 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 218
-def validate_digest_response(request, realm, &password_procedure)
-  secret_key  = secret_token(request)
-  credentials = decode_credentials_header(request)
-  valid_nonce = validate_nonce(secret_key, request, credentials[:nonce])
-
-  if valid_nonce && realm == credentials[:realm] && opaque(secret_key) == credentials[:opaque]
-    password = password_procedure.call(credentials[:username])
-    return false unless password
-
-    method = request.get_header("rack.methodoverride.original_method") || request.get_header("REQUEST_METHOD")
-    uri    = credentials[:uri]
-
-    [true, false].any? do |trailing_question_mark|
-      [true, false].any? do |password_is_ha1|
-        _uri = trailing_question_mark ? uri + "?" : uri
-        expected = expected_response(method, _uri, credentials, password, password_is_ha1)
-        expected == credentials[:response]
-      end
-    end
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 218
+      def validate_digest_response(request, realm, &password_procedure)
+        secret_key  = secret_token(request)
+        credentials = decode_credentials_header(request)
+        valid_nonce = validate_nonce(secret_key, request, credentials[:nonce])
+
+        if valid_nonce && realm == credentials[:realm] && opaque(secret_key) == credentials[:opaque]
+          password = password_procedure.call(credentials[:username])
+          return false unless password
+
+          method = request.get_header("rack.methodoverride.original_method") || request.get_header("REQUEST_METHOD")
+          uri    = credentials[:uri]
+
+          [true, false].any? do |trailing_question_mark|
+            [true, false].any? do |password_is_ha1|
+              _uri = trailing_question_mark ? uri + "?" : uri
+              expected = expected_response(method, _uri, credentials, password, password_is_ha1)
+              expected == credentials[:response]
+            end
+          end
+        end
+      end
+ + See on GitHub + +
+ +

@@ -645,24 +645,24 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 333
-def validate_nonce(secret_key, request, value, seconds_to_timeout = 5 * 60)
-  return false if value.nil?
-  t = ::Base64.decode64(value).split(":").first.to_i
-  nonce(secret_key, t) == value && (t - Time.now.to_i).abs <= seconds_to_timeout
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 333
+      def validate_nonce(secret_key, request, value, seconds_to_timeout = 5 * 60)
+        return false if value.nil?
+        t = ::Base64.decode64(value).split(":").first.to_i
+        nonce(secret_key, t) == value && (t - Time.now.to_i).abs <= seconds_to_timeout
+      end
+ + See on GitHub + +
+ + diff --git a/src/classes/ActionController/HttpAuthentication/Digest/ControllerMethods.html b/src/classes/ActionController/HttpAuthentication/Digest/ControllerMethods.html index 8b94c1a254..d169862d31 100644 --- a/src/classes/ActionController/HttpAuthentication/Digest/ControllerMethods.html +++ b/src/classes/ActionController/HttpAuthentication/Digest/ControllerMethods.html @@ -85,22 +85,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 193
+        def authenticate_or_request_with_http_digest(realm = "Application", message = nil, &password_procedure)
+          authenticate_with_http_digest(realm, &password_procedure) || request_http_digest_authentication(realm, message)
+        end
- -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 193
-def authenticate_or_request_with_http_digest(realm = "Application", message = nil, &password_procedure)
-  authenticate_with_http_digest(realm, &password_procedure) || request_http_digest_authentication(realm, message)
-end
-
-
- - + See on GitHub + + + +

@@ -120,22 +120,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 199
+        def authenticate_with_http_digest(realm = "Application", &password_procedure)
+          HttpAuthentication::Digest.authenticate(request, realm, &password_procedure)
+        end
- -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 199
-def authenticate_with_http_digest(realm = "Application", &password_procedure)
-  HttpAuthentication::Digest.authenticate(request, realm, &password_procedure)
-end
-
-
- -

+ See on GitHub + + + +

@@ -155,22 +155,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 205
+        def request_http_digest_authentication(realm = "Application", message = nil)
+          HttpAuthentication::Digest.authentication_request(self, realm, message)
+        end
- -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 205
-def request_http_digest_authentication(realm = "Application", message = nil)
-  HttpAuthentication::Digest.authentication_request(self, realm, message)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionController/HttpAuthentication/Token.html b/src/classes/ActionController/HttpAuthentication/Token.html index 0dba230599..3c75b6527d 100644 --- a/src/classes/ActionController/HttpAuthentication/Token.html +++ b/src/classes/ActionController/HttpAuthentication/Token.html @@ -247,25 +247,25 @@

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 466
+      def authenticate(controller, &login_procedure)
+        token, options = token_and_options(controller.request)
+        unless token.blank?
+          login_procedure.call(token, options)
+        end
+      end
- -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 466
-def authenticate(controller, &login_procedure)
-  token, options = token_and_options(controller.request)
-  unless token.blank?
-    login_procedure.call(token, options)
-  end
-end
-
- - - +
See on GitHub + +
+ + - - + See on GitHub + + + + - - + See on GitHub + + + +

@@ -378,22 +378,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 501
+      def params_array_from(raw_params)
+        raw_params.map { |param| param.split %r/=(.+)?/ }
+      end
- -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 501
-def params_array_from(raw_params)
-  raw_params.map { |param| param.split %r/=(.+)?/ }
-end
-
-
- -

+ See on GitHub + + + +

@@ -413,29 +413,29 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 516
+      def raw_params(auth)
+        _raw_params = auth.sub(TOKEN_REGEX, "").split(WHITESPACED_AUTHN_PAIR_DELIMITERS)
+        _raw_params.reject!(&:empty?)
+
+        if !_raw_params.first&.start_with?(TOKEN_KEY)
+          _raw_params[0] = "#{TOKEN_KEY}#{_raw_params.first}"
+        end
+
+        _raw_params
+      end
- -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 516
-def raw_params(auth)
-  _raw_params = auth.sub(TOKEN_REGEX, "").split(WHITESPACED_AUTHN_PAIR_DELIMITERS)
-  _raw_params.reject!(&:empty?)
-
-  if !_raw_params.first&.start_with?(TOKEN_KEY)
-    _raw_params[0] = "#{TOKEN_KEY}#{_raw_params.first}"
-  end
-
-  _raw_params
-end
-
-
- -

+ See on GitHub + + + +

@@ -455,22 +455,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 506
+      def rewrite_param_values(array_params)
+        array_params.each { |param| (param[1] || +"").gsub! %r/^"|"$/, "" }
+      end
- -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 506
-def rewrite_param_values(array_params)
-  array_params.each { |param| (param[1] || +"").gsub! %r/^"|"$/, "" }
-end
-
-
- -

+ See on GitHub + + + + - - + See on GitHub + + + +

@@ -541,22 +541,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 496
+      def token_params_from(auth)
+        rewrite_param_values params_array_from raw_params auth
+      end
- -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 496
-def token_params_from(auth)
-  rewrite_param_values params_array_from raw_params auth
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionController/HttpAuthentication/Token/ControllerMethods.html b/src/classes/ActionController/HttpAuthentication/Token/ControllerMethods.html index 57316f8e49..2787208411 100644 --- a/src/classes/ActionController/HttpAuthentication/Token/ControllerMethods.html +++ b/src/classes/ActionController/HttpAuthentication/Token/ControllerMethods.html @@ -85,22 +85,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 432
+        def authenticate_or_request_with_http_token(realm = "Application", message = nil, &login_procedure)
+          authenticate_with_http_token(&login_procedure) || request_http_token_authentication(realm, message)
+        end
- -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 432
-def authenticate_or_request_with_http_token(realm = "Application", message = nil, &login_procedure)
-  authenticate_with_http_token(&login_procedure) || request_http_token_authentication(realm, message)
-end
-
-
- - + See on GitHub + + + +

@@ -122,22 +122,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 441
+        def authenticate_with_http_token(&login_procedure)
+          Token.authenticate(self, &login_procedure)
+        end
- -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 441
-def authenticate_with_http_token(&login_procedure)
-  Token.authenticate(self, &login_procedure)
-end
-
-
- -

+ See on GitHub + + + +

@@ -157,22 +157,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 447
+        def request_http_token_authentication(realm = "Application", message = nil)
+          Token.authentication_request(self, realm, message)
+        end
- -
-
# File actionpack/lib/action_controller/metal/http_authentication.rb, line 447
-def request_http_token_authentication(realm = "Application", message = nil)
-  Token.authentication_request(self, realm, message)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionController/Instrumentation.html b/src/classes/ActionController/Instrumentation.html index f31f1b0fcb..be9ff27b94 100644 --- a/src/classes/ActionController/Instrumentation.html +++ b/src/classes/ActionController/Instrumentation.html @@ -118,27 +118,27 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/instrumentation.rb, line 47
+    def redirect_to(*)
+      ActiveSupport::Notifications.instrument("redirect_to.action_controller", request: request) do |payload|
+        result = super
+        payload[:status]   = response.status
+        payload[:location] = response.filtered_location
+        result
+      end
+    end
- -
-
# File actionpack/lib/action_controller/metal/instrumentation.rb, line 47
-def redirect_to(*)
-  ActiveSupport::Notifications.instrument("redirect_to.action_controller", request: request) do |payload|
-    result = super
-    payload[:status]   = response.status
-    payload[:location] = response.filtered_location
-    result
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -158,26 +158,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/instrumentation.rb, line 26
+    def render(*)
+      render_output = nil
+      self.view_runtime = cleanup_view_runtime do
+        Benchmark.ms { render_output = super }
+      end
+      render_output
+    end
- -
-
# File actionpack/lib/action_controller/metal/instrumentation.rb, line 26
-def render(*)
-  render_output = nil
-  self.view_runtime = cleanup_view_runtime do
-    Benchmark.ms { render_output = super }
-  end
-  render_output
-end
-
-
- -

+ See on GitHub + + + +

@@ -197,24 +197,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/instrumentation.rb, line 41
+    def send_data(data, options = {})
+      ActiveSupport::Notifications.instrument("send_data.action_controller", options) do
+        super
+      end
+    end
- -
-
# File actionpack/lib/action_controller/metal/instrumentation.rb, line 41
-def send_data(data, options = {})
-  ActiveSupport::Notifications.instrument("send_data.action_controller", options) do
-    super
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -234,25 +234,25 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/instrumentation.rb, line 34
+    def send_file(path, options = {})
+      ActiveSupport::Notifications.instrument("send_file.action_controller",
+        options.merge(path: path)) do
+        super
+      end
+    end
- -
-
# File actionpack/lib/action_controller/metal/instrumentation.rb, line 34
-def send_file(path, options = {})
-  ActiveSupport::Notifications.instrument("send_file.action_controller",
-    options.merge(path: path)) do
-    super
-  end
-end
-
-
- -

+ See on GitHub + + + +

Instance Private methods

@@ -275,22 +275,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/instrumentation.rb, line 103
+      def append_info_to_payload(payload) # :doc:
+        payload[:view_runtime] = view_runtime
+      end
- -
-
# File actionpack/lib/action_controller/metal/instrumentation.rb, line 103
-def append_info_to_payload(payload) # :doc:
-  payload[:view_runtime] = view_runtime
-end
-
-
- - + See on GitHub + + + +

@@ -315,22 +315,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/instrumentation.rb, line 97
+      def cleanup_view_runtime # :doc:
+        yield
+      end
- -
-
# File actionpack/lib/action_controller/metal/instrumentation.rb, line 97
-def cleanup_view_runtime # :doc:
-  yield
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionController/Live.html b/src/classes/ActionController/Live.html index e2ab91f0fd..8b1be01191 100644 --- a/src/classes/ActionController/Live.html +++ b/src/classes/ActionController/Live.html @@ -147,64 +147,64 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/live.rb, line 273
+    def process(name)
+      t1 = Thread.current
+      locals = t1.keys.map { |key| [key, t1[key]] }
+
+      error = nil
+      # This processes the action in a child thread. It lets us return the
+      # response code and headers back up the Rack stack, and still process
+      # the body in parallel with sending data to the client.
+      new_controller_thread {
+        ActiveSupport::Dependencies.interlock.running do
+          t2 = Thread.current
+
+          # Since we're processing the view in a different thread, copy the
+          # thread locals from the main thread to the child thread. :'(
+          locals.each { |k, v| t2[k] = v }
+          ActiveSupport::IsolatedExecutionState.share_with(t1)
+
+          begin
+            super(name)
+          rescue => e
+            if @_response.committed?
+              begin
+                @_response.stream.write(ActionView::Base.streaming_completion_on_exception) if request.format == :html
+                @_response.stream.call_on_error
+              rescue => exception
+                log_error(exception)
+              ensure
+                log_error(e)
+                @_response.stream.close
+              end
+            else
+              error = e
+            end
+          ensure
+            @_response.commit!
+          end
+        end
+      }
+
+      ActiveSupport::Dependencies.interlock.permit_concurrent_loads do
+        @_response.await_commit
+      end
+
+      raise error if error
+    end
- -
-
# File actionpack/lib/action_controller/metal/live.rb, line 273
-def process(name)
-  t1 = Thread.current
-  locals = t1.keys.map { |key| [key, t1[key]] }
-
-  error = nil
-  # This processes the action in a child thread. It lets us return the
-  # response code and headers back up the Rack stack, and still process
-  # the body in parallel with sending data to the client.
-  new_controller_thread {
-    ActiveSupport::Dependencies.interlock.running do
-      t2 = Thread.current
-
-      # Since we're processing the view in a different thread, copy the
-      # thread locals from the main thread to the child thread. :'(
-      locals.each { |k, v| t2[k] = v }
-      ActiveSupport::IsolatedExecutionState.share_with(t1)
-
-      begin
-        super(name)
-      rescue => e
-        if @_response.committed?
-          begin
-            @_response.stream.write(ActionView::Base.streaming_completion_on_exception) if request.format == :html
-            @_response.stream.call_on_error
-          rescue => exception
-            log_error(exception)
-          ensure
-            log_error(e)
-            @_response.stream.close
-          end
-        else
-          error = e
-        end
-      ensure
-        @_response.commit!
-      end
-    end
-  }
-
-  ActiveSupport::Dependencies.interlock.permit_concurrent_loads do
-    @_response.await_commit
-  end
-
-  raise error if error
-end
-
-
- - + See on GitHub + + + +

@@ -224,23 +224,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/live.rb, line 319
+    def response_body=(body)
+      super
+      response.close if response
+    end
- -
-
# File actionpack/lib/action_controller/metal/live.rb, line 319
-def response_body=(body)
-  super
-  response.close if response
-end
-
-
- -

+ See on GitHub + + + +

@@ -280,32 +280,32 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/live.rb, line 345
+    def send_stream(filename:, disposition: "attachment", type: nil)
+      response.headers["Content-Type"] =
+        (type.is_a?(Symbol) ? Mime[type].to_s : type) ||
+        Mime::Type.lookup_by_extension(File.extname(filename).downcase.delete("."))&.to_s ||
+        "application/octet-stream"
+
+      response.headers["Content-Disposition"] =
+        ActionDispatch::Http::ContentDisposition.format(disposition: disposition, filename: filename)
+
+      yield response.stream
+    ensure
+      response.stream.close
+    end
- -
-
# File actionpack/lib/action_controller/metal/live.rb, line 345
-def send_stream(filename:, disposition: "attachment", type: nil)
-  response.headers["Content-Type"] =
-    (type.is_a?(Symbol) ? Mime[type].to_s : type) ||
-    Mime::Type.lookup_by_extension(File.extname(filename).downcase.delete("."))&.to_s ||
-    "application/octet-stream"
-
-  response.headers["Content-Disposition"] =
-    ActionDispatch::Http::ContentDisposition.format(disposition: disposition, filename: filename)
-
-  yield response.stream
-ensure
-  response.stream.close
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionController/Live/ClassMethods.html b/src/classes/ActionController/Live/ClassMethods.html index 1ddbccf385..23a989998f 100644 --- a/src/classes/ActionController/Live/ClassMethods.html +++ b/src/classes/ActionController/Live/ClassMethods.html @@ -75,28 +75,28 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/live.rb, line 58
+      def make_response!(request)
+        if request.get_header("HTTP_VERSION") == "HTTP/1.0"
+          super
+        else
+          Live::Response.new.tap do |res|
+            res.request = request
+          end
+        end
+      end
- -
-
# File actionpack/lib/action_controller/metal/live.rb, line 58
-def make_response!(request)
-  if request.get_header("HTTP_VERSION") == "HTTP/1.0"
-    super
-  else
-    Live::Response.new.tap do |res|
-      res.request = request
-    end
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionController/Live/SSE.html b/src/classes/ActionController/Live/SSE.html index 929afefdc9..0c633aa557 100644 --- a/src/classes/ActionController/Live/SSE.html +++ b/src/classes/ActionController/Live/SSE.html @@ -146,23 +146,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/live.rb, line 110
+      def initialize(stream, options = {})
+        @stream = stream
+        @options = options
+      end
- -
-
# File actionpack/lib/action_controller/metal/live.rb, line 110
-def initialize(stream, options = {})
-  @stream = stream
-  @options = options
-end
-
-
- - + See on GitHub + + + + @@ -186,22 +186,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/live.rb, line 115
+      def close
+        @stream.close
+      end
- -
-
# File actionpack/lib/action_controller/metal/live.rb, line 115
-def close
-  @stream.close
-end
-
-
- - + See on GitHub + + + +

@@ -221,27 +221,27 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/live.rb, line 119
+      def write(object, options = {})
+        case object
+        when String
+          perform_write(object, options)
+        else
+          perform_write(ActiveSupport::JSON.encode(object), options)
+        end
+      end
- -
-
# File actionpack/lib/action_controller/metal/live.rb, line 119
-def write(object, options = {})
-  case object
-  when String
-    perform_write(object, options)
-  else
-    perform_write(ActiveSupport::JSON.encode(object), options)
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionController/LogSubscriber.html b/src/classes/ActionController/LogSubscriber.html index 846b48ef21..530f8baafa 100644 --- a/src/classes/ActionController/LogSubscriber.html +++ b/src/classes/ActionController/LogSubscriber.html @@ -127,22 +127,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/log_subscriber.rb, line 45
+    def halted_callback(event)
+      info { "Filter chain halted as #{event.payload[:filter].inspect} rendered or redirected" }
+    end
- -
-
# File actionpack/lib/action_controller/log_subscriber.rb, line 45
-def halted_callback(event)
-  info { "Filter chain halted as #{event.payload[:filter].inspect} rendered or redirected" }
-end
-
-
- - + See on GitHub + + + +

@@ -162,22 +162,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/log_subscriber.rb, line 88
+    def logger
+      ActionController::Base.logger
+    end
- -
-
# File actionpack/lib/action_controller/log_subscriber.rb, line 88
-def logger
-  ActionController::Base.logger
-end
-
-
- -

+ See on GitHub + + + +

@@ -197,38 +197,38 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/log_subscriber.rb, line 24
+    def process_action(event)
+      info do
+        payload = event.payload
+        additions = ActionController::Base.log_process_action(payload)
+        status = payload[:status]
+
+        if status.nil? && (exception_class_name = payload[:exception]&.first)
+          status = ActionDispatch::ExceptionWrapper.status_code_for_exception(exception_class_name)
+        end
+
+        additions << "Allocations: #{event.allocations}"
+
+        message = +"Completed #{status} #{Rack::Utils::HTTP_STATUS_CODES[status]} in #{event.duration.round}ms" \
+                   " (#{additions.join(" | ")})"
+        message << "\n\n" if defined?(Rails.env) && Rails.env.development?
+
+        message
+      end
+    end
- -
-
# File actionpack/lib/action_controller/log_subscriber.rb, line 24
-def process_action(event)
-  info do
-    payload = event.payload
-    additions = ActionController::Base.log_process_action(payload)
-    status = payload[:status]
-
-    if status.nil? && (exception_class_name = payload[:exception]&.first)
-      status = ActionDispatch::ExceptionWrapper.status_code_for_exception(exception_class_name)
-    end
-
-    additions << "Allocations: #{event.allocations}"
-
-    message = +"Completed #{status} #{Rack::Utils::HTTP_STATUS_CODES[status]} in #{event.duration.round}ms" \
-               " (#{additions.join(" | ")})"
-    message << "\n\n" if defined?(Rails.env) && Rails.env.development?
-
-    message
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -248,22 +248,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/log_subscriber.rb, line 55
+    def redirect_to(event)
+      info { "Redirected to #{event.payload[:location]}" }
+    end
- -
-
# File actionpack/lib/action_controller/log_subscriber.rb, line 55
-def redirect_to(event)
-  info { "Redirected to #{event.payload[:location]}" }
-end
-
-
- -

+ See on GitHub + + + +

@@ -283,22 +283,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/log_subscriber.rb, line 60
+    def send_data(event)
+      info { "Sent data #{event.payload[:filename]} (#{event.duration.round(1)}ms)" }
+    end
- -
-
# File actionpack/lib/action_controller/log_subscriber.rb, line 60
-def send_data(event)
-  info { "Sent data #{event.payload[:filename]} (#{event.duration.round(1)}ms)" }
-end
-
-
- -

+ See on GitHub + + + +

@@ -318,22 +318,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/log_subscriber.rb, line 50
+    def send_file(event)
+      info { "Sent file #{event.payload[:path]} (#{event.duration.round(1)}ms)" }
+    end
- -
-
# File actionpack/lib/action_controller/log_subscriber.rb, line 50
-def send_file(event)
-  info { "Sent file #{event.payload[:path]} (#{event.duration.round(1)}ms)" }
-end
-
-
- -

+ See on GitHub + + + +

@@ -353,34 +353,34 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/log_subscriber.rb, line 7
+    def start_processing(event)
+      return unless logger.info?
+
+      payload = event.payload
+      params = {}
+      payload[:params].each_pair do |k, v|
+        params[k] = v unless INTERNAL_PARAMS.include?(k)
+      end
+      format  = payload[:format]
+      format  = format.to_s.upcase if format.is_a?(Symbol)
+      format  = "*/*" if format.nil?
+
+      info "Processing by #{payload[:controller]}##{payload[:action]} as #{format}"
+      info "  Parameters: #{params.inspect}" unless params.empty?
+    end
- -
-
# File actionpack/lib/action_controller/log_subscriber.rb, line 7
-def start_processing(event)
-  return unless logger.info?
-
-  payload = event.payload
-  params = {}
-  payload[:params].each_pair do |k, v|
-    params[k] = v unless INTERNAL_PARAMS.include?(k)
-  end
-  format  = payload[:format]
-  format  = format.to_s.upcase if format.is_a?(Symbol)
-  format  = "*/*" if format.nil?
-
-  info "Processing by #{payload[:controller]}##{payload[:action]} as #{format}"
-  info "  Parameters: #{params.inspect}" unless params.empty?
-end
-
-
- -

+ See on GitHub + + + +

@@ -400,27 +400,27 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/log_subscriber.rb, line 65
+    def unpermitted_parameters(event)
+      debug do
+        unpermitted_keys = event.payload[:keys]
+        display_unpermitted_keys = unpermitted_keys.map { |e| ":#{e}" }.join(", ")
+        context = event.payload[:context].map { |k, v| "#{k}: #{v}" }.join(", ")
+        color("Unpermitted parameter#{'s' if unpermitted_keys.size > 1}: #{display_unpermitted_keys}. Context: { #{context} }", RED)
+      end
+    end
- -
-
# File actionpack/lib/action_controller/log_subscriber.rb, line 65
-def unpermitted_parameters(event)
-  debug do
-    unpermitted_keys = event.payload[:keys]
-    display_unpermitted_keys = unpermitted_keys.map { |e| ":#{e}" }.join(", ")
-    context = event.payload[:context].map { |k, v| "#{k}: #{v}" }.join(", ")
-    color("Unpermitted parameter#{'s' if unpermitted_keys.size > 1}: #{display_unpermitted_keys}. Context: { #{context} }", RED)
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionController/Logging/ClassMethods.html b/src/classes/ActionController/Logging/ClassMethods.html index bae96c00d2..280631e950 100644 --- a/src/classes/ActionController/Logging/ClassMethods.html +++ b/src/classes/ActionController/Logging/ClassMethods.html @@ -81,22 +81,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/logging.rb, line 15
+      def log_at(level, **options)
+        around_action ->(_, action) { logger.log_at(level, &action) }, **options
+      end
- -
-
# File actionpack/lib/action_controller/metal/logging.rb, line 15
-def log_at(level, **options)
-  around_action ->(_, action) { logger.log_at(level, &action) }, **options
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionController/Metal.html b/src/classes/ActionController/Metal.html index ca24171cfe..3b35f2d3a6 100644 --- a/src/classes/ActionController/Metal.html +++ b/src/classes/ActionController/Metal.html @@ -225,32 +225,32 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal.rb, line 289
-def self.action(name)
-  app = lambda { |env|
-    req = ActionDispatch::Request.new(env)
-    res = make_response! req
-    new.dispatch(name, req, res)
-  }
-
-  if middleware_stack.any?
-    middleware_stack.build(name, app)
-  else
-    app
-  end
-end
-
-
- - + +
+ + Source code + + +
# File actionpack/lib/action_controller/metal.rb, line 289
+    def self.action(name)
+      app = lambda { |env|
+        req = ActionDispatch::Request.new(env)
+        res = make_response! req
+        new.dispatch(name, req, res)
+      }
+
+      if middleware_stack.any?
+        middleware_stack.build(name, app)
+      else
+        app
+      end
+    end
+ + See on GitHub + +
+ +

@@ -275,22 +275,22 @@

Returns

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal.rb, line 130
+    def self.controller_name
+      @controller_name ||= (name.demodulize.delete_suffix("Controller").underscore unless anonymous?)
+    end
- -
-
# File actionpack/lib/action_controller/metal.rb, line 130
-def self.controller_name
-  @controller_name ||= (name.demodulize.delete_suffix("Controller").underscore unless anonymous?)
-end
-
-
- -
+ See on GitHub + + + +

@@ -310,26 +310,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal.rb, line 305
+    def self.dispatch(name, req, res)
+      if middleware_stack.any?
+        middleware_stack.build(name) { |env| new.dispatch(name, req, res) }.call req.env
+      else
+        new.dispatch(name, req, res)
+      end
+    end
- -
-
# File actionpack/lib/action_controller/metal.rb, line 305
-def self.dispatch(name, req, res)
-  if middleware_stack.any?
-    middleware_stack.build(name) { |env| new.dispatch(name, req, res) }.call req.env
-  else
-    new.dispatch(name, req, res)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -349,24 +349,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal.rb, line 134
+    def self.make_response!(request)
+      ActionDispatch::Response.new.tap do |res|
+        res.request = request
+      end
+    end
- -
-
# File actionpack/lib/action_controller/metal.rb, line 134
-def self.make_response!(request)
-  ActionDispatch::Response.new.tap do |res|
-    res.request = request
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -395,22 +395,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal.rb, line 284
+    def self.middleware
+      middleware_stack
+    end
- -
-
# File actionpack/lib/action_controller/metal.rb, line 284
-def self.middleware
-  middleware_stack
-end
-
-
- -

+ See on GitHub + + + +

@@ -430,27 +430,27 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal.rb, line 185
+    def initialize
+      @_request = nil
+      @_response = nil
+      @_response_body = nil
+      @_routes = nil
+      @_params = nil
+      super
+    end
- -
-
# File actionpack/lib/action_controller/metal.rb, line 185
-def initialize
-  @_request = nil
-  @_response = nil
-  @_response_body = nil
-  @_routes = nil
-  @_params = nil
-  super
-end
-
-
- -

+ See on GitHub + + + +

@@ -470,22 +470,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal.rb, line 267
+      def use(...)
+        middleware_stack.use(...)
+      end
- -
-
# File actionpack/lib/action_controller/metal.rb, line 267
-def use(...)
-  middleware_stack.use(...)
-end
-
-
- -

+ See on GitHub + + + + @@ -509,22 +509,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal.rb, line 156
+    def controller_name
+      self.class.controller_name
+    end
- -
-
# File actionpack/lib/action_controller/metal.rb, line 156
-def controller_name
-  self.class.controller_name
-end
-
-
- - + See on GitHub + + + +

@@ -544,21 +544,21 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal.rb, line 180
-delegate :headers, to: "@_response"
+          
+            
+ + Source code + + +
# File actionpack/lib/action_controller/metal.rb, line 180
+    delegate :headers, to: "@_response"
 
-
-
- -

+ + See on GitHub + + + +

@@ -578,22 +578,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal.rb, line 194
+    def params
+      @_params ||= request.parameters
+    end
- -
-
# File actionpack/lib/action_controller/metal.rb, line 194
-def params
-  @_params ||= request.parameters
-end
-
-
- -

+ See on GitHub + + + +

@@ -613,22 +613,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal.rb, line 198
+    def params=(val)
+      @_params = val
+    end
- -
-
# File actionpack/lib/action_controller/metal.rb, line 198
-def params=(val)
-  @_params = val
-end
-
-
- -

+ See on GitHub + + + +

@@ -648,22 +648,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal.rb, line 220
+    def performed?
+      response_body || response.committed?
+    end
- -
-
# File actionpack/lib/action_controller/metal.rb, line 220
-def performed?
-  response_body || response.committed?
-end
-
-
- -

+ See on GitHub + + + +

@@ -683,22 +683,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal.rb, line 258
+    def reset_session
+      @_request.reset_session
+    end
- -
-
# File actionpack/lib/action_controller/metal.rb, line 258
-def reset_session
-  @_request.reset_session
-end
-
-
- -

+ See on GitHub + + + +

@@ -718,25 +718,25 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal.rb, line 242
-def response=(response)
-  set_response!(response)
+          
+            
+ + Source code + - # Force `performed?` to return true: - @_response_body = true -end
-
-
- -

+
# File actionpack/lib/action_controller/metal.rb, line 242
+    def response=(response)
+      set_response!(response)
+
+      # Force `performed?` to return true:
+      @_response_body = true
+    end
+ + See on GitHub + + + +

@@ -756,28 +756,28 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal.rb, line 209
+    def response_body=(body)
+      if body
+        body = [body] if body.is_a?(String)
+        response.body = body
+        super
+      else
+        response.reset_body!
+      end
+    end
- -
-
# File actionpack/lib/action_controller/metal.rb, line 209
-def response_body=(body)
-  if body
-    body = [body] if body.is_a?(String)
-    response.body = body
-    super
-  else
-    response.reset_body!
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -797,21 +797,21 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal.rb, line 176
-delegate :session, to: "@_request"
+          
+            
+ + Source code + + +
# File actionpack/lib/action_controller/metal.rb, line 176
+    delegate :session, to: "@_request"
 
-
-
- -

+ + See on GitHub + + + +

@@ -831,22 +831,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal.rb, line 205
+    def url_for(string)
+      string
+    end
- -
-
# File actionpack/lib/action_controller/metal.rb, line 205
-def url_for(string)
-  string
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionController/MimeResponds.html b/src/classes/ActionController/MimeResponds.html index 2f772ce827..df3c66af48 100644 --- a/src/classes/ActionController/MimeResponds.html +++ b/src/classes/ActionController/MimeResponds.html @@ -285,37 +285,37 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/mime_responds.rb, line 201
+    def respond_to(*mimes)
+      raise ArgumentError, "respond_to takes either types or a block, never both" if mimes.any? && block_given?
+
+      collector = Collector.new(mimes, request.variant)
+      yield collector if block_given?
+
+      if format = collector.negotiate_format(request)
+        if media_type && media_type != format
+          raise ActionController::RespondToMismatchError
+        end
+        _process_format(format)
+        _set_rendered_content_type(format) unless collector.any_response?
+        response = collector.response
+        response.call if response
+      else
+        raise ActionController::UnknownFormat
+      end
+    end
- -
-
# File actionpack/lib/action_controller/metal/mime_responds.rb, line 201
-def respond_to(*mimes)
-  raise ArgumentError, "respond_to takes either types or a block, never both" if mimes.any? && block_given?
-
-  collector = Collector.new(mimes, request.variant)
-  yield collector if block_given?
-
-  if format = collector.negotiate_format(request)
-    if media_type && media_type != format
-      raise ActionController::RespondToMismatchError
-    end
-    _process_format(format)
-    _set_rendered_content_type(format) unless collector.any_response?
-    response = collector.response
-    response.call if response
-  else
-    raise ActionController::UnknownFormat
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionController/MimeResponds/Collector.html b/src/classes/ActionController/MimeResponds/Collector.html index 4ac296c14c..81ef84bbc9 100644 --- a/src/classes/ActionController/MimeResponds/Collector.html +++ b/src/classes/ActionController/MimeResponds/Collector.html @@ -150,25 +150,25 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/mime_responds.rb, line 246
+      def initialize(mimes, variant = nil)
+        @responses = {}
+        @variant = variant
+
+        mimes.each { |mime| @responses[Mime[mime]] = nil }
+      end
- -
-
# File actionpack/lib/action_controller/metal/mime_responds.rb, line 246
-def initialize(mimes, variant = nil)
-  @responses = {}
-  @variant = variant
-
-  mimes.each { |mime| @responses[Mime[mime]] = nil }
-end
-
-
- - + See on GitHub + + + + @@ -196,7 +196,8 @@

- + +

@@ -220,26 +221,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/mime_responds.rb, line 253
+      def any(*args, &block)
+        if args.any?
+          args.each { |type| send(type, &block) }
+        else
+          custom(Mime::ALL, &block)
+        end
+      end
- -
-
# File actionpack/lib/action_controller/metal/mime_responds.rb, line 253
-def any(*args, &block)
-  if args.any?
-    args.each { |type| send(type, &block) }
-  else
-    custom(Mime::ALL, &block)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -259,22 +260,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/mime_responds.rb, line 271
+      def any_response?
+        !@responses.fetch(format, false) && @responses[Mime::ALL]
+      end
- -
-
# File actionpack/lib/action_controller/metal/mime_responds.rb, line 271
-def any_response?
-  !@responses.fetch(format, false) && @responses[Mime::ALL]
-end
-
-
- -

+ See on GitHub + + + +

@@ -294,27 +295,27 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/mime_responds.rb, line 262
+      def custom(mime_type, &block)
+        mime_type = Mime::Type.lookup(mime_type.to_s) unless mime_type.is_a?(Mime::Type)
+        @responses[mime_type] ||= if block_given?
+          block
+        else
+          VariantCollector.new(@variant)
+        end
+      end
- -
-
# File actionpack/lib/action_controller/metal/mime_responds.rb, line 262
-def custom(mime_type, &block)
-  mime_type = Mime::Type.lookup(mime_type.to_s) unless mime_type.is_a?(Mime::Type)
-  @responses[mime_type] ||= if block_given?
-    block
-  else
-    VariantCollector.new(@variant)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -334,22 +335,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/mime_responds.rb, line 288
+      def negotiate_format(request)
+        @format = request.negotiate_mime(@responses.keys)
+      end
- -
-
# File actionpack/lib/action_controller/metal/mime_responds.rb, line 288
-def negotiate_format(request)
-  @format = request.negotiate_mime(@responses.keys)
-end
-
-
- -

+ See on GitHub + + + +

@@ -369,31 +370,31 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/mime_responds.rb, line 275
+      def response
+        response = @responses.fetch(format, @responses[Mime::ALL])
+        if response.is_a?(VariantCollector) # `format.html.phone` - variant inline syntax
+          response.variant
+        elsif response.nil? || response.arity == 0 # `format.html` - just a format, call its block
+          response
+        else # `format.html{ |variant| variant.phone }` - variant block syntax
+          variant_collector = VariantCollector.new(@variant)
+          response.call(variant_collector) # call format block with variants collector
+          variant_collector.variant
+        end
+      end
- -
-
# File actionpack/lib/action_controller/metal/mime_responds.rb, line 275
-def response
-  response = @responses.fetch(format, @responses[Mime::ALL])
-  if response.is_a?(VariantCollector) # `format.html.phone` - variant inline syntax
-    response.variant
-  elsif response.nil? || response.arity == 0 # `format.html` - just a format, call its block
-    response
-  else # `format.html{ |variant| variant.phone }` - variant block syntax
-    variant_collector = VariantCollector.new(@variant)
-    response.call(variant_collector) # call format block with variants collector
-    variant_collector.variant
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionController/MissingRenderer.html b/src/classes/ActionController/MissingRenderer.html index 66ac949a90..7557b2805d 100644 --- a/src/classes/ActionController/MissingRenderer.html +++ b/src/classes/ActionController/MissingRenderer.html @@ -86,22 +86,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/renderers.rb, line 18
+    def initialize(format)
+      super "No renderer defined for format: #{format}"
+    end
- -
-
# File actionpack/lib/action_controller/metal/renderers.rb, line 18
-def initialize(format)
-  super "No renderer defined for format: #{format}"
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionController/ParameterEncoding/ClassMethods.html b/src/classes/ActionController/ParameterEncoding/ClassMethods.html index 21e00ba5d6..2d6c66401f 100644 --- a/src/classes/ActionController/ParameterEncoding/ClassMethods.html +++ b/src/classes/ActionController/ParameterEncoding/ClassMethods.html @@ -100,22 +100,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/parameter_encoding.rb, line 77
+      def param_encoding(action, param, encoding)
+        @_parameter_encodings[action.to_s][param.to_s] = encoding
+      end
- -
-
# File actionpack/lib/action_controller/metal/parameter_encoding.rb, line 77
-def param_encoding(action, param, encoding)
-  @_parameter_encodings[action.to_s][param.to_s] = encoding
-end
-
-
- - + See on GitHub + + + +

@@ -156,22 +156,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/parameter_encoding.rb, line 48
+      def skip_parameter_encoding(action)
+        @_parameter_encodings[action.to_s] = Hash.new { Encoding::ASCII_8BIT }
+      end
- -
-
# File actionpack/lib/action_controller/metal/parameter_encoding.rb, line 48
-def skip_parameter_encoding(action)
-  @_parameter_encodings[action.to_s] = Hash.new { Encoding::ASCII_8BIT }
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionController/ParameterMissing/Correction.html b/src/classes/ActionController/ParameterMissing/Correction.html deleted file mode 100644 index d7aae94d52..0000000000 --- a/src/classes/ActionController/ParameterMissing/Correction.html +++ /dev/null @@ -1,157 +0,0 @@ ---- -title: ActionController::ParameterMissing::Correction -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - new(error) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 31
-def initialize(error)
-  @error = error
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - corrections() - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 35
-def corrections
-  if @error.param && @error.keys
-    maybe_these = @error.keys
-
-    maybe_these.sort_by { |n|
-      DidYouMean::Jaro.distance(@error.param.to_s, n)
-    }.reverse.first(4)
-  else
-    []
-  end
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActionController/Parameters.html b/src/classes/ActionController/Parameters.html index 34838cf11c..88208bbadd 100644 --- a/src/classes/ActionController/Parameters.html +++ b/src/classes/ActionController/Parameters.html @@ -504,30 +504,30 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 269
-def initialize(parameters = {}, logging_context = {})
-  parameters.each_key do |key|
-    unless key.is_a?(String) || key.is_a?(Symbol)
-      raise InvalidParameterKey, "all keys must be Strings or Symbols, got: #{key.class}"
-    end
-  end
+          
+            
+ + Source code + - @parameters = parameters.with_indifferent_access - @logging_context = logging_context - @permitted = self.class.permit_all_parameters -end
-
-
- - +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 269
+    def initialize(parameters = {}, logging_context = {})
+      parameters.each_key do |key|
+        unless key.is_a?(String) || key.is_a?(Symbol)
+          raise InvalidParameterKey, "all keys must be Strings or Symbols, got: #{key.class}"
+        end
+      end
+
+      @parameters = parameters.with_indifferent_access
+      @logging_context = logging_context
+      @permitted = self.class.permit_all_parameters
+    end
+ + See on GitHub + + + + @@ -551,39 +551,39 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 283
-    def ==(other)
-      if other.respond_to?(:permitted?)
-        permitted? == other.permitted? && parameters == other.parameters
-      else
-        if self.class.allow_deprecated_parameters_hash_equality && Hash === other
-          ActionController.deprecator.warn <<-WARNING.squish
-            Comparing equality between `ActionController::Parameters` and a
+          
+            
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 283
+    def ==(other)
+      if other.respond_to?(:permitted?)
+        permitted? == other.permitted? && parameters == other.parameters
+      else
+        if self.class.allow_deprecated_parameters_hash_equality && Hash === other
+          ActionController.deprecator.warn <<-WARNING.squish
+            Comparing equality between `ActionController::Parameters` and a
             `Hash` is deprecated and will be removed in Rails 7.2. Please only do
             comparisons between instances of `ActionController::Parameters`. If
             you need to compare to a hash, first convert it using
             `ActionController::Parameters#new`.
             To disable the deprecated behavior set
             `Rails.application.config.action_controller.allow_deprecated_parameters_hash_equality = false`.
-          WARNING
-          @parameters == other
-        else
-          super
-        end
-      end
-    end
-
-
- - + WARNING + @parameters == other + else + super + end + end + end + + See on GitHub + + + +

@@ -608,22 +608,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 665
+    def [](key)
+      convert_hashes_to_parameters(key, @parameters[key])
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 665
-def [](key)
-  convert_hashes_to_parameters(key, @parameters[key])
-end
-
-
- -

+ See on GitHub + + + +

@@ -643,22 +643,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 671
+    def []=(key, value)
+      @parameters[key] = value
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 671
-def []=(key, value)
-  @parameters[key] = value
-end
-
-
- -

+ See on GitHub + + + +

@@ -679,20 +679,10 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 173
-    
-
-
- -

+ + See on GitHub + +

@@ -712,22 +702,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 842
+    def compact
+      new_instance_with_inherited_permitted_status(@parameters.compact)
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 842
-def compact
-  new_instance_with_inherited_permitted_status(@parameters.compact)
-end
-
-
- -

+ See on GitHub + + + +

@@ -747,22 +737,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 847
+    def compact!
+      self if @parameters.compact!
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 847
-def compact!
-  self if @parameters.compact!
-end
-
-
- -

+ See on GitHub + + + +

@@ -782,22 +772,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 853
+    def compact_blank
+      reject { |_k, v| v.blank? }
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 853
-def compact_blank
-  reject { |_k, v| v.blank? }
-end
-
-
- -

+ See on GitHub + + + +

@@ -817,22 +807,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 859
+    def compact_blank!
+      reject! { |_k, v| v.blank? }
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 859
-def compact_blank!
-  reject! { |_k, v| v.blank? }
-end
-
-
- -

+ See on GitHub + + + +

@@ -854,22 +844,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 430
+    def converted_arrays
+      @converted_arrays ||= Set.new
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 430
-def converted_arrays
-  @converted_arrays ||= Set.new
-end
-
-
- -

+ See on GitHub + + + +

@@ -889,24 +879,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 958
+    def deep_dup
+      self.class.new(@parameters.deep_dup, @logging_context).tap do |duplicate|
+        duplicate.permitted = @permitted
+      end
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 958
-def deep_dup
-  self.class.new(@parameters.deep_dup, @logging_context).tap do |duplicate|
-    duplicate.permitted = @permitted
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -929,20 +919,10 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 148
-    
-
-
- -

+ + See on GitHub + +

@@ -963,20 +943,10 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 162
-    
-
-
- -

+ + See on GitHub + +

@@ -996,24 +966,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 793
+    def deep_transform_keys(&block)
+      new_instance_with_inherited_permitted_status(
+        @parameters.deep_transform_keys(&block)
+      )
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 793
-def deep_transform_keys(&block)
-  new_instance_with_inherited_permitted_status(
-    @parameters.deep_transform_keys(&block)
-  )
-end
-
-
- -

+ See on GitHub + + + +

@@ -1033,23 +1003,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 802
+    def deep_transform_keys!(&block)
+      @parameters.deep_transform_keys!(&block)
+      self
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 802
-def deep_transform_keys!(&block)
-  @parameters.deep_transform_keys!(&block)
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -1069,22 +1039,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 811
+    def delete(key, &block)
+      convert_value_to_parameters(@parameters.delete(key, &block))
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 811
-def delete(key, &block)
-  convert_value_to_parameters(@parameters.delete(key, &block))
-end
-
-
- -

+ See on GitHub + + + +

@@ -1108,7 +1078,8 @@

-

+ +

@@ -1136,23 +1107,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 709
+    def dig(*keys)
+      convert_hashes_to_parameters(keys.first, @parameters[keys.first])
+      @parameters.dig(*keys)
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 709
-def dig(*keys)
-  convert_hashes_to_parameters(keys.first, @parameters[keys.first])
-  @parameters.dig(*keys)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1176,7 +1147,8 @@

-

+ +

@@ -1197,20 +1169,10 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 181
-    
-
-
- -

+ + See on GitHub + +

@@ -1234,27 +1196,27 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 397
-def each_pair(&block)
-  return to_enum(__callee__) unless block_given?
-  @parameters.each_pair do |key, value|
-    yield [key, convert_hashes_to_parameters(key, value)]
-  end
+          
+            
+ + Source code + - self -end
-
-
- -

+
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 397
+    def each_pair(&block)
+      return to_enum(__callee__) unless block_given?
+      @parameters.each_pair do |key, value|
+        yield [key, convert_hashes_to_parameters(key, value)]
+      end
+
+      self
+    end
+ + See on GitHub + + + +

@@ -1274,27 +1236,27 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 409
-def each_value(&block)
-  return to_enum(:each_value) unless block_given?
-  @parameters.each_pair do |key, value|
-    yield convert_hashes_to_parameters(key, value)
-  end
+          
+            
+ + Source code + - self -end
-
-
- -

+
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 409
+    def each_value(&block)
+      return to_enum(:each_value) unless block_given?
+      @parameters.each_pair do |key, value|
+        yield convert_hashes_to_parameters(key, value)
+      end
+
+      self
+    end
+ + See on GitHub + + + +

@@ -1315,20 +1277,10 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 190
-    
-
-
- -

+ + See on GitHub + +

@@ -1348,24 +1300,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 304
+    def eql?(other)
+      self.class == other.class &&
+        permitted? == other.permitted? &&
+        parameters.eql?(other.parameters)
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 304
-def eql?(other)
-  self.class == other.class &&
-    permitted? == other.permitted? &&
-    parameters.eql?(other.parameters)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1394,22 +1346,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 738
+    def except(*keys)
+      new_instance_with_inherited_permitted_status(@parameters.except(*keys))
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 738
-def except(*keys)
-  new_instance_with_inherited_permitted_status(@parameters.except(*keys))
-end
-
-
- -

+ See on GitHub + + + +

@@ -1430,20 +1382,10 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 198
-    
-
-
- -

+ + See on GitHub + +

@@ -1468,22 +1410,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 748
+    def extract!(*keys)
+      new_instance_with_inherited_permitted_status(@parameters.extract!(*keys))
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 748
-def extract!(*keys)
-  new_instance_with_inherited_permitted_status(@parameters.extract!(*keys))
-end
-
-
- -

+ See on GitHub + + + +

@@ -1509,22 +1451,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 970
+    def extract_value(key, delimiter: "_")
+      @parameters[key]&.split(delimiter)
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 970
-def extract_value(key, delimiter: "_")
-  @parameters[key]&.split(delimiter)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1552,30 +1494,30 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 688
+    def fetch(key, *args)
+      convert_value_to_parameters(
+        @parameters.fetch(key) {
+          if block_given?
+            yield
+          else
+            args.fetch(0) { raise ActionController::ParameterMissing.new(key, @parameters.keys) }
+          end
+        }
+      )
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 688
-def fetch(key, *args)
-  convert_value_to_parameters(
-    @parameters.fetch(key) {
-      if block_given?
-        yield
-      else
-        args.fetch(0) { raise ActionController::ParameterMissing.new(key, @parameters.keys) }
-      end
-    }
-  )
-end
-
-
- -

+ See on GitHub + + + +

@@ -1599,7 +1541,8 @@

-

+ +

@@ -1623,22 +1566,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 864
+    def has_value?(value)
+      each_value.include?(convert_value_to_parameters(value))
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 864
-def has_value?(value)
-  each_value.include?(convert_value_to_parameters(value))
-end
-
-
- -

+ See on GitHub + + + +

@@ -1658,22 +1601,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 310
+    def hash
+      [self.class, @parameters, @permitted].hash
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 310
-def hash
-  [self.class, @parameters, @permitted].hash
-end
-
-
- -

+ See on GitHub + + + +

@@ -1697,20 +1640,10 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 206
-    
-
-
- -

+ + See on GitHub + +

@@ -1730,22 +1663,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 922
+    def inspect
+      "#<#{self.class} #{@parameters} permitted: #{@permitted}>"
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 922
-def inspect
-  "#<#{self.class} #{@parameters} permitted: #{@permitted}>"
-end
-
-
- -

+ See on GitHub + + + +

@@ -1769,7 +1702,8 @@

-

+ +

@@ -1793,7 +1727,8 @@

-

+ +

@@ -1814,20 +1749,10 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 214
-    
-
-
- -

+ + See on GitHub + +

@@ -1851,7 +1776,8 @@

-

+ +

@@ -1871,24 +1797,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 878
+    def merge(other_hash)
+      new_instance_with_inherited_permitted_status(
+        @parameters.merge(other_hash.to_h)
+      )
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 878
-def merge(other_hash)
-  new_instance_with_inherited_permitted_status(
-    @parameters.merge(other_hash.to_h)
-  )
-end
-
-
- -

+ See on GitHub + + + +

@@ -1909,23 +1835,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 889
+    def merge!(other_hash, &block)
+      @parameters.merge!(other_hash.to_h, &block)
+      self
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 889
-def merge!(other_hash, &block)
-  @parameters.merge!(other_hash.to_h, &block)
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -2051,35 +1977,35 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 642
-def permit(*filters)
-  params = self.class.new
+          
+            
+ + Source code + - filters.flatten.each do |filter| - case filter - when Symbol, String - permitted_scalar_filter(params, filter) - when Hash - hash_filter(params, filter) - end - end +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 642
+    def permit(*filters)
+      params = self.class.new
 
-  unpermitted_parameters!(params) if self.class.action_on_unpermitted_parameters
+      filters.flatten.each do |filter|
+        case filter
+        when Symbol, String
+          permitted_scalar_filter(params, filter)
+        when Hash
+          hash_filter(params, filter)
+        end
+      end
 
-  params.permit!
-end
-
-
- -

+ unpermitted_parameters!(params) if self.class.action_on_unpermitted_parameters + + params.permit! + end + + See on GitHub + + + +

@@ -2110,29 +2036,29 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 456
-def permit!
-  each_pair do |key, value|
-    Array.wrap(value).flatten.each do |v|
-      v.permit! if v.respond_to? :permit!
-    end
-  end
+          
+            
+ + Source code + - @permitted = true - self -end
-
-
- -

+
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 456
+    def permit!
+      each_pair do |key, value|
+        Array.wrap(value).flatten.each do |v|
+          v.permit! if v.respond_to? :permit!
+        end
+      end
+
+      @permitted = true
+      self
+    end
+ + See on GitHub + + + +

@@ -2158,22 +2084,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 440
+    def permitted?
+      @permitted
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 440
-def permitted?
-  @permitted
-end
-
-
- -

+ See on GitHub + + + +

@@ -2193,22 +2119,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 830
+    def reject(&block)
+      new_instance_with_inherited_permitted_status(@parameters.reject(&block))
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 830
-def reject(&block)
-  new_instance_with_inherited_permitted_status(@parameters.reject(&block))
-end
-
-
- -

+ See on GitHub + + + +

@@ -2232,23 +2158,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 835
+    def reject!(&block)
+      @parameters.reject!(&block)
+      self
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 835
-def reject!(&block)
-  @parameters.reject!(&block)
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -2324,28 +2250,28 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 517
+    def require(key)
+      return key.map { |k| require(k) } if key.is_a?(Array)
+      value = self[key]
+      if value.present? || value == false
+        value
+      else
+        raise ParameterMissing.new(key, @parameters.keys)
+      end
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 517
-def require(key)
-  return key.map { |k| require(k) } if key.is_a?(Array)
-  value = self[key]
-  if value.present? || value == false
-    value
-  else
-    raise ParameterMissing.new(key, @parameters.keys)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -2369,7 +2295,8 @@

-

+ +

@@ -2393,24 +2320,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 900
+    def reverse_merge(other_hash)
+      new_instance_with_inherited_permitted_status(
+        other_hash.to_h.merge(@parameters)
+      )
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 900
-def reverse_merge(other_hash)
-  new_instance_with_inherited_permitted_status(
-    other_hash.to_h.merge(@parameters)
-  )
-end
-
-
- -

+ See on GitHub + + + +

@@ -2434,23 +2361,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 909
+    def reverse_merge!(other_hash)
+      @parameters.merge!(other_hash.to_h) { |key, left, right| left }
+      self
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 909
-def reverse_merge!(other_hash)
-  @parameters.merge!(other_hash.to_h) { |key, left, right| left }
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -2470,22 +2397,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 817
+    def select(&block)
+      new_instance_with_inherited_permitted_status(@parameters.select(&block))
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 817
-def select(&block)
-  new_instance_with_inherited_permitted_status(@parameters.select(&block))
-end
-
-
- -

+ See on GitHub + + + +

@@ -2509,23 +2436,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 822
+    def select!(&block)
+      @parameters.select!(&block)
+      self
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 822
-def select!(&block)
-  @parameters.select!(&block)
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -2550,22 +2477,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 721
+    def slice(*keys)
+      new_instance_with_inherited_permitted_status(@parameters.slice(*keys))
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 721
-def slice(*keys)
-  new_instance_with_inherited_permitted_status(@parameters.slice(*keys))
-end
-
-
- -

+ See on GitHub + + + +

@@ -2585,23 +2512,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 727
+    def slice!(*keys)
+      @parameters.slice!(*keys)
+      self
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 727
-def slice!(*keys)
-  @parameters.slice!(*keys)
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -2632,26 +2559,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 326
+    def to_h(&block)
+      if permitted?
+        convert_parameters_to_hashes(@parameters, :to_h, &block)
+      else
+        raise UnfilteredParameters
+      end
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 326
-def to_h(&block)
-  if permitted?
-    convert_parameters_to_hashes(@parameters, :to_h, &block)
-  else
-    raise UnfilteredParameters
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -2682,22 +2609,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 346
+    def to_hash
+      to_h.to_hash
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 346
-def to_hash
-  to_h.to_hash
-end
-
-
- -

+ See on GitHub + + + +

@@ -2721,7 +2648,8 @@

-

+ +

@@ -2770,22 +2698,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 376
+    def to_query(*args)
+      to_h.to_query(*args)
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 376
-def to_query(*args)
-  to_h.to_query(*args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2806,22 +2734,22 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 229
-delegate :keys, :empty?, :exclude?, :include?,
-  :as_json, :to_s, :each_key, to: :@parameters
+          
+            
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 229
+    delegate :keys, :empty?, :exclude?, :include?,
+      :as_json, :to_s, :each_key, to: :@parameters
 
-
-
- -

+ + See on GitHub + + + +

@@ -2853,22 +2781,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 390
+    def to_unsafe_h
+      convert_parameters_to_hashes(@parameters, :to_unsafe_h)
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 390
-def to_unsafe_h
-  convert_parameters_to_hashes(@parameters, :to_unsafe_h)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2892,7 +2820,8 @@

-

+ +

@@ -2912,25 +2841,25 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 775
+    def transform_keys(&block)
+      return to_enum(:transform_keys) unless block_given?
+      new_instance_with_inherited_permitted_status(
+        @parameters.transform_keys(&block)
+      )
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 775
-def transform_keys(&block)
-  return to_enum(:transform_keys) unless block_given?
-  new_instance_with_inherited_permitted_status(
-    @parameters.transform_keys(&block)
-  )
-end
-
-
- -

+ See on GitHub + + + +

@@ -2950,24 +2879,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 784
+    def transform_keys!(&block)
+      return to_enum(:transform_keys!) unless block_given?
+      @parameters.transform_keys!(&block)
+      self
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 784
-def transform_keys!(&block)
-  return to_enum(:transform_keys!) unless block_given?
-  @parameters.transform_keys!(&block)
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -2992,25 +2921,25 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 758
+    def transform_values
+      return to_enum(:transform_values) unless block_given?
+      new_instance_with_inherited_permitted_status(
+        @parameters.transform_values { |v| yield convert_value_to_parameters(v) }
+      )
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 758
-def transform_values
-  return to_enum(:transform_values) unless block_given?
-  new_instance_with_inherited_permitted_status(
-    @parameters.transform_values { |v| yield convert_value_to_parameters(v) }
-  )
-end
-
-
- -

+ See on GitHub + + + +

@@ -3030,24 +2959,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 767
+    def transform_values!
+      return to_enum(:transform_values!) unless block_given?
+      @parameters.transform_values! { |v| yield convert_value_to_parameters(v) }
+      self
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 767
-def transform_values!
-  return to_enum(:transform_values!) unless block_given?
-  @parameters.transform_values! { |v| yield convert_value_to_parameters(v) }
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -3071,7 +3000,8 @@

-

+ +

@@ -3091,22 +3021,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 419
+    def values
+      to_enum(:each_value).to_a
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 419
-def values
-  to_enum(:each_value).to_a
-end
-
-
- -

+ See on GitHub + + + +

@@ -3126,22 +3056,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 872
+    def values_at(*keys)
+      convert_value_to_parameters(@parameters.values_at(*keys))
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 872
-def values_at(*keys)
-  convert_value_to_parameters(@parameters.values_at(*keys))
-end
-
-
- -

+ See on GitHub + + + +

@@ -3165,7 +3095,8 @@

-

+ +

@@ -3189,7 +3120,8 @@

-

+ +

@@ -3213,7 +3145,8 @@

-

+ +

Instance Protected methods

@@ -3236,24 +3169,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 983
+      def each_nested_attribute
+        hash = self.class.new
+        self.each { |k, v| hash[k] = yield v if Parameters.nested_attribute?(k, v) }
+        hash
+      end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 983
-def each_nested_attribute
-  hash = self.class.new
-  self.each { |k, v| hash[k] = yield v if Parameters.nested_attribute?(k, v) }
-  hash
-end
-
-
- - + See on GitHub + + + +

@@ -3273,22 +3206,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 979
+      def nested_attributes?
+        @parameters.any? { |k, v| Parameters.nested_attribute?(k, v) }
+      end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 979
-def nested_attributes?
-  @parameters.any? { |k, v| Parameters.nested_attribute?(k, v) }
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionController/ParamsWrapper/Options/ClassMethods.html b/src/classes/ActionController/ParamsWrapper/Options/ClassMethods.html index 21c8f67e50..bdc6b47254 100644 --- a/src/classes/ActionController/ParamsWrapper/Options/ClassMethods.html +++ b/src/classes/ActionController/ParamsWrapper/Options/ClassMethods.html @@ -83,22 +83,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/params_wrapper.rb, line 191
+      def _set_wrapper_options(options)
+        self._wrapper_options = Options.from_hash(options)
+      end
- -
-
# File actionpack/lib/action_controller/metal/params_wrapper.rb, line 191
-def _set_wrapper_options(options)
-  self._wrapper_options = Options.from_hash(options)
-end
-
-
- - + See on GitHub + + + +

@@ -118,27 +118,27 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/params_wrapper.rb, line 246
+      def inherited(klass)
+        if klass._wrapper_options.format.any?
+          params = klass._wrapper_options.dup
+          params.klass = klass
+          klass._wrapper_options = params
+        end
+        super
+      end
- -
-
# File actionpack/lib/action_controller/metal/params_wrapper.rb, line 246
-def inherited(klass)
-  if klass._wrapper_options.format.any?
-    params = klass._wrapper_options.dup
-    params.klass = klass
-    klass._wrapper_options = params
-  end
-  super
-end
-
-
- -

+ See on GitHub + + + + + See on GitHub + + + + diff --git a/src/classes/ActionController/PermissionsPolicy/ClassMethods.html b/src/classes/ActionController/PermissionsPolicy/ClassMethods.html index 00275da7b9..26fb16fedc 100644 --- a/src/classes/ActionController/PermissionsPolicy/ClassMethods.html +++ b/src/classes/ActionController/PermissionsPolicy/ClassMethods.html @@ -91,28 +91,28 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/permissions_policy.rb, line 26
+      def permissions_policy(**options, &block)
+        before_action(options) do
+          if block_given?
+            policy = request.permissions_policy.clone
+            instance_exec(policy, &block)
+            request.permissions_policy = policy
+          end
+        end
+      end
- -
-
# File actionpack/lib/action_controller/metal/permissions_policy.rb, line 26
-def permissions_policy(**options, &block)
-  before_action(options) do
-    if block_given?
-      policy = request.permissions_policy.clone
-      instance_exec(policy, &block)
-      request.permissions_policy = policy
-    end
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionController/Railties/Helpers.html b/src/classes/ActionController/Railties/Helpers.html index cc96c9ebae..00d0ef25ec 100644 --- a/src/classes/ActionController/Railties/Helpers.html +++ b/src/classes/ActionController/Railties/Helpers.html @@ -75,35 +75,35 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/railties/helpers.rb, line 6
+      def inherited(klass)
+        super
+        return unless klass.respond_to?(:helpers_path=)
+
+        if namespace = klass.module_parents.detect { |m| m.respond_to?(:railtie_helpers_paths) }
+          paths = namespace.railtie_helpers_paths
+        else
+          paths = ActionController::Helpers.helpers_path
+        end
+
+        klass.helpers_path = paths
+
+        if klass.superclass == ActionController::Base && ActionController::Base.include_all_helpers
+          klass.helper :all
+        end
+      end
- -
-
# File actionpack/lib/action_controller/railties/helpers.rb, line 6
-def inherited(klass)
-  super
-  return unless klass.respond_to?(:helpers_path=)
-
-  if namespace = klass.module_parents.detect { |m| m.respond_to?(:railtie_helpers_paths) }
-    paths = namespace.railtie_helpers_paths
-  else
-    paths = ActionController::Helpers.helpers_path
-  end
-
-  klass.helpers_path = paths
-
-  if klass.superclass == ActionController::Base && ActionController::Base.include_all_helpers
-    klass.helper :all
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionController/Redirecting.html b/src/classes/ActionController/Redirecting.html index 47cda11c3c..b538f3611b 100644 --- a/src/classes/ActionController/Redirecting.html +++ b/src/classes/ActionController/Redirecting.html @@ -132,22 +132,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/redirecting.rb, line 101
+    def redirect_back(fallback_location:, allow_other_host: _allow_other_host, **args)
+      redirect_back_or_to fallback_location, allow_other_host: allow_other_host, **args
+    end
- -
-
# File actionpack/lib/action_controller/metal/redirecting.rb, line 101
-def redirect_back(fallback_location:, allow_other_host: _allow_other_host, **args)
-  redirect_back_or_to fallback_location, allow_other_host: allow_other_host, **args
-end
-
-
- - + See on GitHub + + + +

@@ -185,27 +185,27 @@

Options

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/redirecting.rb, line 127
+    def redirect_back_or_to(fallback_location, allow_other_host: _allow_other_host, **options)
+      if request.referer && (allow_other_host || _url_host_allowed?(request.referer))
+        redirect_to request.referer, allow_other_host: allow_other_host, **options
+      else
+        # The method level `allow_other_host` doesn't apply in the fallback case, omit and let the `redirect_to` handling take over.
+        redirect_to fallback_location, **options
+      end
+    end
- -
-
# File actionpack/lib/action_controller/metal/redirecting.rb, line 127
-def redirect_back_or_to(fallback_location, allow_other_host: _allow_other_host, **options)
-  if request.referer && (allow_other_host || _url_host_allowed?(request.referer))
-    redirect_to request.referer, allow_other_host: allow_other_host, **options
-  else
-    # The method level `allow_other_host` doesn't apply in the fallback case, omit and let the `redirect_to` handling take over.
-    redirect_to fallback_location, **options
-  end
-end
-
-
- -
+ See on GitHub + + + +

@@ -293,33 +293,33 @@

Open Redirect prote - -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/redirecting.rb, line 84
+    def redirect_to(options = {}, response_options = {})
+      raise ActionControllerError.new("Cannot redirect to nil!") unless options
+      raise AbstractController::DoubleRenderError if response_body
+
+      allow_other_host = response_options.delete(:allow_other_host) { _allow_other_host }
+
+      self.status = _extract_redirect_to_status(options, response_options)
+
+      redirect_to_location = _compute_redirect_to_location(request, options)
+      _ensure_url_is_http_header_safe(redirect_to_location)
+
+      self.location      = _enforce_open_redirect_protection(redirect_to_location, allow_other_host: allow_other_host)
+      self.response_body = ""
+    end
- -
-
# File actionpack/lib/action_controller/metal/redirecting.rb, line 84
-def redirect_to(options = {}, response_options = {})
-  raise ActionControllerError.new("Cannot redirect to nil!") unless options
-  raise AbstractController::DoubleRenderError if response_body
-
-  allow_other_host = response_options.delete(:allow_other_host) { _allow_other_host }
-
-  self.status = _extract_redirect_to_status(options, response_options)
-
-  redirect_to_location = _compute_redirect_to_location(request, options)
-  _ensure_url_is_http_header_safe(redirect_to_location)
-
-  self.location      = _enforce_open_redirect_protection(redirect_to_location, allow_other_host: allow_other_host)
-  self.response_body = ""
-end
-
-
- -

+ See on GitHub + + + +

@@ -358,23 +358,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/redirecting.rb, line 175
+    def url_from(location)
+      location = location.presence
+      location if location && _url_host_allowed?(location)
+    end
- -
-
# File actionpack/lib/action_controller/metal/redirecting.rb, line 175
-def url_from(location)
-  location = location.presence
-  location if location && _url_host_allowed?(location)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionController/Renderer.html b/src/classes/ActionController/Renderer.html index e78714b3e6..b496374843 100644 --- a/src/classes/ActionController/Renderer.html +++ b/src/classes/ActionController/Renderer.html @@ -183,22 +183,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/renderer.rb, line 61
+    def self.for(controller, env = nil, defaults = DEFAULTS)
+      new(controller, env, defaults)
+    end
- -
-
# File actionpack/lib/action_controller/renderer.rb, line 61
-def self.for(controller, env = nil, defaults = DEFAULTS)
-  new(controller, env, defaults)
-end
-
-
- - + See on GitHub + + + + + See on GitHub + + + + @@ -286,23 +286,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/renderer.rb, line 117
+    def defaults
+      @defaults = @defaults.dup if @defaults.frozen?
+      @defaults
+    end
- -
-
# File actionpack/lib/action_controller/renderer.rb, line 117
-def defaults
-  @defaults = @defaults.dup if @defaults.frozen?
-  @defaults
-end
-
-
- - + See on GitHub + + + +

@@ -325,22 +325,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/renderer.rb, line 69
+    def new(env = nil)
+      self.class.new controller, env, @defaults
+    end
- -
-
# File actionpack/lib/action_controller/renderer.rb, line 69
-def new(env = nil)
-  self.class.new controller, env, @defaults
-end
-
-
- -

+ See on GitHub + + + +

@@ -364,28 +364,28 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/renderer.rb, line 123
+    def render(*args)
+      request = ActionDispatch::Request.new(env_for_request)
+      request.routes = controller._routes
+
+      instance = controller.new
+      instance.set_request! request
+      instance.set_response! controller.make_response!(request)
+      instance.render_to_string(*args)
+    end
- -
-
# File actionpack/lib/action_controller/renderer.rb, line 123
-def render(*args)
-  request = ActionDispatch::Request.new(env_for_request)
-  request.routes = controller._routes
-
-  instance = controller.new
-  instance.set_request! request
-  instance.set_response! controller.make_response!(request)
-  instance.render_to_string(*args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -409,7 +409,8 @@

-

+ +

@@ -429,22 +430,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/renderer.rb, line 75
+    def with_defaults(defaults)
+      self.class.new controller, @env, @defaults.merge(defaults)
+    end
- -
-
# File actionpack/lib/action_controller/renderer.rb, line 75
-def with_defaults(defaults)
-  self.class.new controller, @env, @defaults.merge(defaults)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionController/Renderers.html b/src/classes/ActionController/Renderers.html index 89703f7183..c870c247ae 100644 --- a/src/classes/ActionController/Renderers.html +++ b/src/classes/ActionController/Renderers.html @@ -123,22 +123,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/renderers.rb, line 90
+    def self._render_with_renderer_method_name(key)
+      "_render_with_renderer_#{key}"
+    end
- -
-
# File actionpack/lib/action_controller/metal/renderers.rb, line 90
-def self._render_with_renderer_method_name(key)
-  "_render_with_renderer_#{key}"
-end
-
-
- - + See on GitHub + + + +

@@ -181,23 +181,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/renderers.rb, line 74
+    def self.add(key, &block)
+      define_method(_render_with_renderer_method_name(key), &block)
+      RENDERERS << key.to_sym
+    end
- -
-
# File actionpack/lib/action_controller/metal/renderers.rb, line 74
-def self.add(key, &block)
-  define_method(_render_with_renderer_method_name(key), &block)
-  RENDERERS << key.to_sym
-end
-
-
- -

+ See on GitHub + + + +

@@ -222,24 +222,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/renderers.rb, line 84
+    def self.remove(key)
+      RENDERERS.delete(key.to_sym)
+      method_name = _render_with_renderer_method_name(key)
+      remove_possible_method(method_name)
+    end
- -
-
# File actionpack/lib/action_controller/metal/renderers.rb, line 84
-def self.remove(key)
-  RENDERERS.delete(key.to_sym)
-  method_name = _render_with_renderer_method_name(key)
-  remove_possible_method(method_name)
-end
-
-
- -

+ See on GitHub + + + + @@ -263,29 +263,29 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/renderers.rb, line 144
+    def _render_to_body_with_renderer(options)
+      _renderers.each do |name|
+        if options.key?(name)
+          _process_options(options)
+          method_name = Renderers._render_with_renderer_method_name(name)
+          return send(method_name, options.delete(name), options)
+        end
+      end
+      nil
+    end
- -
-
# File actionpack/lib/action_controller/metal/renderers.rb, line 144
-def _render_to_body_with_renderer(options)
-  _renderers.each do |name|
-    if options.key?(name)
-      _process_options(options)
-      method_name = Renderers._render_with_renderer_method_name(name)
-      return send(method_name, options.delete(name), options)
-    end
-  end
-  nil
-end
-
-
- - + See on GitHub + + + +

@@ -307,22 +307,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/renderers.rb, line 140
+    def render_to_body(options)
+      _render_to_body_with_renderer(options) || super
+    end
- -
-
# File actionpack/lib/action_controller/metal/renderers.rb, line 140
-def render_to_body(options)
-  _render_to_body_with_renderer(options) || super
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionController/Renderers/ClassMethods.html b/src/classes/ActionController/Renderers/ClassMethods.html index 2110a14806..51e3fa9ce7 100644 --- a/src/classes/ActionController/Renderers/ClassMethods.html +++ b/src/classes/ActionController/Renderers/ClassMethods.html @@ -83,7 +83,8 @@

- + +

@@ -130,23 +131,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/renderers.rb, line 128
+      def use_renderers(*args)
+        renderers = _renderers + args
+        self._renderers = renderers.freeze
+      end
- -
-
# File actionpack/lib/action_controller/metal/renderers.rb, line 128
-def use_renderers(*args)
-  renderers = _renderers + args
-  self._renderers = renderers.freeze
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionController/Rendering.html b/src/classes/ActionController/Rendering.html index d0f0ffb414..fc91f297cb 100644 --- a/src/classes/ActionController/Rendering.html +++ b/src/classes/ActionController/Rendering.html @@ -220,23 +220,23 @@

Options

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/rendering.rb, line 137
+    def render(*args)
+      raise ::AbstractController::DoubleRenderError if response_body
+      super
+    end
- -
-
# File actionpack/lib/action_controller/metal/rendering.rb, line 137
-def render(*args)
-  raise ::AbstractController::DoubleRenderError if response_body
-  super
-end
-
-
- - + See on GitHub + + + +

@@ -256,29 +256,29 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/rendering.rb, line 146
+    def render_to_string(*)
+      result = super
+      if result.respond_to?(:each)
+        string = +""
+        result.each { |r| string << r }
+        string
+      else
+        result
+      end
+    end
- -
-
# File actionpack/lib/action_controller/metal/rendering.rb, line 146
-def render_to_string(*)
-  result = super
-  if result.respond_to?(:each)
-    string = +""
-    result.each { |r| string << r }
-    string
-  else
-    result
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionController/Rendering/ClassMethods.html b/src/classes/ActionController/Rendering/ClassMethods.html index 1780f91f57..d59636de00 100644 --- a/src/classes/ActionController/Rendering/ClassMethods.html +++ b/src/classes/ActionController/Rendering/ClassMethods.html @@ -89,23 +89,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/rendering.rb, line 21
+      def inherited(klass)
+        klass.setup_renderer!
+        super
+      end
- -
-
# File actionpack/lib/action_controller/metal/rendering.rb, line 21
-def inherited(klass)
-  klass.setup_renderer!
-  super
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionController/RequestForgeryProtection.html b/src/classes/ActionController/RequestForgeryProtection.html index 093ea30997..20dfba07f5 100644 --- a/src/classes/ActionController/RequestForgeryProtection.html +++ b/src/classes/ActionController/RequestForgeryProtection.html @@ -297,23 +297,23 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 345
-def initialize(...)
-  super
-  @marked_for_same_origin_verification = nil
-end
-
-
- - + +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 345
+    def initialize(...)
+      super
+      @marked_for_same_origin_verification = nil
+    end
+ + See on GitHub + +
+ + @@ -337,23 +337,23 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 355
-def commit_csrf_token(request) # :doc:
-  csrf_token = request.env[CSRF_TOKEN]
-  csrf_token_storage_strategy.store(request, csrf_token) unless csrf_token.nil?
-end
-
-
- - + +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 355
+    def commit_csrf_token(request) # :doc:
+      csrf_token = request.env[CSRF_TOKEN]
+      csrf_token_storage_strategy.store(request, csrf_token) unless csrf_token.nil?
+    end
+ + See on GitHub + +
+ +

@@ -373,23 +373,23 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 350
-def reset_csrf_token(request) # :doc:
-  request.env.delete(CSRF_TOKEN)
-  csrf_token_storage_strategy.reset(request)
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 350
+    def reset_csrf_token(request) # :doc:
+      request.env.delete(CSRF_TOKEN)
+      csrf_token_storage_strategy.reset(request)
+    end
+ + See on GitHub + +
+ +

Instance Private methods

@@ -412,24 +412,24 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 448
-def any_authenticity_token_valid? # :doc:
-  request_authenticity_tokens.any? do |token|
-    valid_authenticity_token?(session, token)
-  end
-end
-
-
- - + +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 448
+      def any_authenticity_token_valid? # :doc:
+        request_authenticity_tokens.any? do |token|
+          valid_authenticity_token?(session, token)
+        end
+      end
+ + See on GitHub + +
+ +

@@ -449,22 +449,22 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 534
-def compare_with_global_token(token, session = nil) # :doc:
-  ActiveSupport::SecurityUtils.fixed_length_secure_compare(token, global_csrf_token(session))
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 534
+      def compare_with_global_token(token, session = nil) # :doc:
+        ActiveSupport::SecurityUtils.fixed_length_secure_compare(token, global_csrf_token(session))
+      end
+ + See on GitHub + +
+ +

@@ -484,22 +484,22 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 530
-def compare_with_real_token(token, session = nil) # :doc:
-  ActiveSupport::SecurityUtils.fixed_length_secure_compare(token, real_csrf_token(session))
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 530
+      def compare_with_real_token(token, session = nil) # :doc:
+        ActiveSupport::SecurityUtils.fixed_length_secure_compare(token, real_csrf_token(session))
+      end
+ + See on GitHub + +
+ +

@@ -519,26 +519,26 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 571
-def csrf_token_hmac(session, identifier) # :doc:
-  OpenSSL::HMAC.digest(
-    OpenSSL::Digest::SHA256.new,
-    real_csrf_token(session),
-    identifier
-  )
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 571
+      def csrf_token_hmac(session, identifier) # :doc:
+        OpenSSL::HMAC.digest(
+          OpenSSL::Digest::SHA256.new,
+          real_csrf_token(session),
+          identifier
+        )
+      end
+ + See on GitHub + +
+ +

@@ -558,22 +558,22 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 591
-def form_authenticity_param # :doc:
-  params[request_forgery_protection_token]
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 591
+      def form_authenticity_param # :doc:
+        params[request_forgery_protection_token]
+      end
+ + See on GitHub + +
+ +

@@ -593,22 +593,22 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 460
-def form_authenticity_token(form_options: {}) # :doc:
-  masked_authenticity_token(form_options: form_options)
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 460
+      def form_authenticity_token(form_options: {}) # :doc:
+        masked_authenticity_token(form_options: form_options)
+      end
+ + See on GitHub + +
+ +

@@ -628,22 +628,22 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 567
-def global_csrf_token(session = nil) # :doc:
-  csrf_token_hmac(session, GLOBAL_CSRF_TOKEN_IDENTIFIER)
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 567
+      def global_csrf_token(session = nil) # :doc:
+        csrf_token_hmac(session, GLOBAL_CSRF_TOKEN_IDENTIFIER)
+      end
+ + See on GitHub + +
+ +

@@ -663,28 +663,28 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 381
-def handle_unverified_request # :doc:
-  protection_strategy = forgery_protection_strategy.new(self)
-
-  if protection_strategy.respond_to?(:warning_message)
-    protection_strategy.warning_message = unverified_request_warning_message
-  end
-
-  protection_strategy.handle_unverified_request
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 381
+      def handle_unverified_request # :doc:
+        protection_strategy = forgery_protection_strategy.new(self)
+
+        if protection_strategy.respond_to?(:warning_message)
+          protection_strategy.warning_message = unverified_request_warning_message
+        end
+
+        protection_strategy.handle_unverified_request
+      end
+ + See on GitHub + +
+ +

@@ -704,22 +704,22 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 420
-def mark_for_same_origin_verification! # :doc:
-  @marked_for_same_origin_verification = request.get?
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 420
+      def mark_for_same_origin_verification! # :doc:
+        @marked_for_same_origin_verification = request.get?
+      end
+ + See on GitHub + +
+ +

@@ -739,22 +739,22 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 426
-def marked_for_same_origin_verification? # :doc:
-  @marked_for_same_origin_verification ||= false
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 426
+      def marked_for_same_origin_verification? # :doc:
+        @marked_for_same_origin_verification ||= false
+      end
+ + See on GitHub + +
+ +

@@ -774,25 +774,25 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 523
-def mask_token(raw_token) # :doc:
-  one_time_pad = SecureRandom.random_bytes(AUTHENTICITY_TOKEN_LENGTH)
-  encrypted_csrf_token = xor_byte_strings(one_time_pad, raw_token)
-  masked_token = one_time_pad + encrypted_csrf_token
-  encode_csrf_token(masked_token)
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 523
+      def mask_token(raw_token) # :doc:
+        one_time_pad = SecureRandom.random_bytes(AUTHENTICITY_TOKEN_LENGTH)
+        encrypted_csrf_token = xor_byte_strings(one_time_pad, raw_token)
+        masked_token = one_time_pad + encrypted_csrf_token
+        encode_csrf_token(masked_token)
+      end
+ + See on GitHub + +
+ +

@@ -812,22 +812,22 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 431
-def non_xhr_javascript_response? # :doc:
-  %r(\A(?:text|application)/javascript).match?(media_type) && !request.xhr?
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 431
+      def non_xhr_javascript_response? # :doc:
+        %r(\A(?:text|application)/javascript).match?(media_type) && !request.xhr?
+      end
+ + See on GitHub + +
+ +

@@ -847,23 +847,23 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 621
-def normalize_action_path(action_path) # :doc:
-  uri = URI.parse(action_path)
-  uri.path.chomp("/")
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 621
+      def normalize_action_path(action_path) # :doc:
+        uri = URI.parse(action_path)
+        uri.path.chomp("/")
+      end
+ + See on GitHub + +
+ +

@@ -883,22 +883,22 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 560
-def per_form_csrf_token(session, action_path, method) # :doc:
-  csrf_token_hmac(session, [action_path, method.downcase].join("#"))
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 560
+      def per_form_csrf_token(session, action_path, method) # :doc:
+        csrf_token_hmac(session, [action_path, method.downcase].join("#"))
+      end
+ + See on GitHub + +
+ +

@@ -918,22 +918,22 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 596
-def protect_against_forgery? # :doc:
-  allow_forgery_protection && (!session.respond_to?(:enabled?) || session.enabled?)
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 596
+      def protect_against_forgery? # :doc:
+        allow_forgery_protection && (!session.respond_to?(:enabled?) || session.enabled?)
+      end
+ + See on GitHub + +
+ +

@@ -953,26 +953,26 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 552
-def real_csrf_token(_session = nil) # :doc:
-  csrf_token = request.env.fetch(CSRF_TOKEN) do
-    request.env[CSRF_TOKEN] = csrf_token_storage_strategy.fetch(request) || generate_csrf_token
-  end
-
-  decode_csrf_token(csrf_token)
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 552
+      def real_csrf_token(_session = nil) # :doc:
+        csrf_token = request.env.fetch(CSRF_TOKEN) do
+          request.env[CSRF_TOKEN] = csrf_token_storage_strategy.fetch(request) || generate_csrf_token
+        end
+
+        decode_csrf_token(csrf_token)
+      end
+ + See on GitHub + +
+ +

@@ -992,22 +992,22 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 455
-def request_authenticity_tokens # :doc:
-  [form_authenticity_param, request.x_csrf_token]
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 455
+      def request_authenticity_tokens # :doc:
+        [form_authenticity_param, request.x_csrf_token]
+      end
+ + See on GitHub + +
+ +

@@ -1027,26 +1027,26 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 515
-def unmask_token(masked_token) # :doc:
-  # Split the token into the one-time pad and the encrypted
-  # value and decrypt it.
-  one_time_pad = masked_token[0...AUTHENTICITY_TOKEN_LENGTH]
-  encrypted_csrf_token = masked_token[AUTHENTICITY_TOKEN_LENGTH..-1]
-  xor_byte_strings(one_time_pad, encrypted_csrf_token)
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 515
+      def unmask_token(masked_token) # :doc:
+        # Split the token into the one-time pad and the encrypted
+        # value and decrypt it.
+        one_time_pad = masked_token[0...AUTHENTICITY_TOKEN_LENGTH]
+        encrypted_csrf_token = masked_token[AUTHENTICITY_TOKEN_LENGTH..-1]
+        xor_byte_strings(one_time_pad, encrypted_csrf_token)
+      end
+ + See on GitHub + +
+ +

@@ -1066,50 +1066,50 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 483
-def valid_authenticity_token?(session, encoded_masked_token) # :doc:
-  if encoded_masked_token.nil? || encoded_masked_token.empty? || !encoded_masked_token.is_a?(String)
-    return false
-  end
-
-  begin
-    masked_token = decode_csrf_token(encoded_masked_token)
-  rescue ArgumentError # encoded_masked_token is invalid Base64
-    return false
-  end
-
-  # See if it's actually a masked token or not. In order to
-  # deploy this code, we should be able to handle any unmasked
-  # tokens that we've issued without error.
-
-  if masked_token.length == AUTHENTICITY_TOKEN_LENGTH
-    # This is actually an unmasked token. This is expected if
-    # you have just upgraded to masked tokens, but should stop
-    # happening shortly after installing this gem.
-    compare_with_real_token masked_token
-
-  elsif masked_token.length == AUTHENTICITY_TOKEN_LENGTH * 2
-    csrf_token = unmask_token(masked_token)
-
-    compare_with_global_token(csrf_token) ||
-      compare_with_real_token(csrf_token) ||
-      valid_per_form_csrf_token?(csrf_token)
-  else
-    false # Token is malformed.
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 483
+      def valid_authenticity_token?(session, encoded_masked_token) # :doc:
+        if encoded_masked_token.nil? || encoded_masked_token.empty? || !encoded_masked_token.is_a?(String)
+          return false
+        end
+
+        begin
+          masked_token = decode_csrf_token(encoded_masked_token)
+        rescue ArgumentError # encoded_masked_token is invalid Base64
+          return false
+        end
+
+        # See if it's actually a masked token or not. In order to
+        # deploy this code, we should be able to handle any unmasked
+        # tokens that we've issued without error.
+
+        if masked_token.length == AUTHENTICITY_TOKEN_LENGTH
+          # This is actually an unmasked token. This is expected if
+          # you have just upgraded to masked tokens, but should stop
+          # happening shortly after installing this gem.
+          compare_with_real_token masked_token
+
+        elsif masked_token.length == AUTHENTICITY_TOKEN_LENGTH * 2
+          csrf_token = unmask_token(masked_token)
+
+          compare_with_global_token(csrf_token) ||
+            compare_with_real_token(csrf_token) ||
+            valid_per_form_csrf_token?(csrf_token)
+        else
+          false # Token is malformed.
+        end
+      end
+ + See on GitHub + +
+ +

@@ -1129,32 +1129,32 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 538
-def valid_per_form_csrf_token?(token, session = nil) # :doc:
-  if per_form_csrf_tokens
-    correct_token = per_form_csrf_token(
-      session,
-      request.path.chomp("/"),
-      request.request_method
-    )
-
-    ActiveSupport::SecurityUtils.fixed_length_secure_compare(token, correct_token)
-  else
-    false
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 538
+      def valid_per_form_csrf_token?(token, session = nil) # :doc:
+        if per_form_csrf_tokens
+          correct_token = per_form_csrf_token(
+            session,
+            request.path.chomp("/"),
+            request.request_method
+          )
+
+          ActiveSupport::SecurityUtils.fixed_length_secure_compare(token, correct_token)
+        else
+          false
+        end
+      end
+ + See on GitHub + +
+ +

@@ -1174,28 +1174,28 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 611
-def valid_request_origin? # :doc:
-  if forgery_protection_origin_check
-    # We accept blank origin headers because some user agents don't send it.
-    raise InvalidAuthenticityToken, NULL_ORIGIN_MESSAGE if request.origin == "null"
-    request.origin.nil? || request.origin == request.base_url
-  else
-    true
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 611
+      def valid_request_origin? # :doc:
+        if forgery_protection_origin_check
+          # We accept blank origin headers because some user agents don't send it.
+          raise InvalidAuthenticityToken, NULL_ORIGIN_MESSAGE if request.origin == "null"
+          request.origin.nil? || request.origin == request.base_url
+        else
+          true
+        end
+      end
+ + See on GitHub + +
+ +

@@ -1222,23 +1222,23 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 442
-def verified_request? # :doc:
-  !protect_against_forgery? || request.get? || request.head? ||
-    (valid_request_origin? && any_authenticity_token_valid?)
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 442
+      def verified_request? # :doc:
+        !protect_against_forgery? || request.get? || request.head? ||
+          (valid_request_origin? && any_authenticity_token_valid?)
+      end
+ + See on GitHub + +
+ +

@@ -1260,28 +1260,28 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 371
-def verify_authenticity_token # :doc:
-  mark_for_same_origin_verification!
-
-  if !verified_request?
-    logger.warn unverified_request_warning_message if logger && log_warning_on_csrf_failure
-
-    handle_unverified_request
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 371
+      def verify_authenticity_token # :doc:
+        mark_for_same_origin_verification!
+
+        if !verified_request?
+          logger.warn unverified_request_warning_message if logger && log_warning_on_csrf_failure
+
+          handle_unverified_request
+        end
+      end
+ + See on GitHub + +
+ +

@@ -1301,27 +1301,27 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 410
-def verify_same_origin_request # :doc:
-  if marked_for_same_origin_verification? && non_xhr_javascript_response?
-    if logger && log_warning_on_csrf_failure
-      logger.warn CROSS_ORIGIN_JAVASCRIPT_WARNING
-    end
-    raise ActionController::InvalidCrossOriginRequest, CROSS_ORIGIN_JAVASCRIPT_WARNING
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 410
+      def verify_same_origin_request # :doc:
+        if marked_for_same_origin_verification? && non_xhr_javascript_response?
+          if logger && log_warning_on_csrf_failure
+            logger.warn CROSS_ORIGIN_JAVASCRIPT_WARNING
+          end
+          raise ActionController::InvalidCrossOriginRequest, CROSS_ORIGIN_JAVASCRIPT_WARNING
+        end
+      end
+ + See on GitHub + +
+ +

@@ -1341,29 +1341,29 @@

- -
- - -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 579
-def xor_byte_strings(s1, s2) # :doc:
-  s2 = s2.dup
-  size = s1.bytesize
-  i = 0
-  while i < size
-    s2.setbyte(i, s1.getbyte(i) ^ s2.getbyte(i))
-    i += 1
-  end
-  s2
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 579
+      def xor_byte_strings(s1, s2) # :doc:
+        s2 = s2.dup
+        size = s1.bytesize
+        i = 0
+        while i < size
+          s2.setbyte(i, s1.getbyte(i) ^ s2.getbyte(i))
+          i += 1
+        end
+        s2
+      end
+ + See on GitHub + +
+ + diff --git a/src/classes/ActionController/RequestForgeryProtection/ClassMethods.html b/src/classes/ActionController/RequestForgeryProtection/ClassMethods.html index 6421b148f9..3071767aa6 100644 --- a/src/classes/ActionController/RequestForgeryProtection/ClassMethods.html +++ b/src/classes/ActionController/RequestForgeryProtection/ClassMethods.html @@ -165,30 +165,30 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 179
+      def protect_from_forgery(options = {})
+        options = options.reverse_merge(prepend: false)
+
+        self.forgery_protection_strategy = protection_method_class(options[:with] || :null_session)
+        self.request_forgery_protection_token ||= :authenticity_token
+
+        self.csrf_token_storage_strategy = storage_strategy(options[:store] || SessionStore.new)
+
+        before_action :verify_authenticity_token, options
+        append_after_action :verify_same_origin_request
+      end
- -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 179
-def protect_from_forgery(options = {})
-  options = options.reverse_merge(prepend: false)
-
-  self.forgery_protection_strategy = protection_method_class(options[:with] || :null_session)
-  self.request_forgery_protection_token ||= :authenticity_token
-
-  self.csrf_token_storage_strategy = storage_strategy(options[:store] || SessionStore.new)
-
-  before_action :verify_authenticity_token, options
-  append_after_action :verify_same_origin_request
-end
-
-
- - + See on GitHub + + + +

@@ -213,22 +213,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 196
+      def skip_forgery_protection(options = {})
+        skip_before_action :verify_authenticity_token, options.reverse_merge(raise: false)
+      end
- -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 196
-def skip_forgery_protection(options = {})
-  skip_before_action :verify_authenticity_token, options.reverse_merge(raise: false)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionController/RequestForgeryProtection/CookieStore.html b/src/classes/ActionController/RequestForgeryProtection/CookieStore.html index 8c44ba873f..914f00e853 100644 --- a/src/classes/ActionController/RequestForgeryProtection/CookieStore.html +++ b/src/classes/ActionController/RequestForgeryProtection/CookieStore.html @@ -92,22 +92,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 313
+      def initialize(cookie = :csrf_token)
+        @cookie_name = cookie
+      end
- -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 313
-def initialize(cookie = :csrf_token)
-  @cookie_name = cookie
-end
-
-
- - + See on GitHub + + + + @@ -131,30 +131,30 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 317
+      def fetch(request)
+        contents = request.cookie_jar.encrypted[@cookie_name]
+        return nil if contents.nil?
+
+        value = JSON.parse(contents)
+        return nil unless value.dig("session_id", "public_id") == request.session.id_was&.public_id
+
+        value["token"]
+      rescue JSON::ParserError
+        nil
+      end
- -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 317
-def fetch(request)
-  contents = request.cookie_jar.encrypted[@cookie_name]
-  return nil if contents.nil?
-
-  value = JSON.parse(contents)
-  return nil unless value.dig("session_id", "public_id") == request.session.id_was&.public_id
-
-  value["token"]
-rescue JSON::ParserError
-  nil
-end
-
-
- - + See on GitHub + + + +

@@ -174,22 +174,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 340
+      def reset(request)
+        request.cookie_jar.delete(@cookie_name)
+      end
- -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 340
-def reset(request)
-  request.cookie_jar.delete(@cookie_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -209,29 +209,29 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 329
+      def store(request, csrf_token)
+        request.cookie_jar.encrypted.permanent[@cookie_name] = {
+          value: {
+            token: csrf_token,
+            session_id: request.session.id,
+          }.to_json,
+          httponly: true,
+          same_site: :lax,
+        }
+      end
- -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 329
-def store(request, csrf_token)
-  request.cookie_jar.encrypted.permanent[@cookie_name] = {
-    value: {
-      token: csrf_token,
-      session_id: request.session.id,
-    }.to_json,
-    httponly: true,
-    same_site: :lax,
-  }
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionController/RequestForgeryProtection/DisabledSessionError.html b/src/classes/ActionController/RequestForgeryProtection/DisabledSessionError.html deleted file mode 100644 index 2fdf133baa..0000000000 --- a/src/classes/ActionController/RequestForgeryProtection/DisabledSessionError.html +++ /dev/null @@ -1,125 +0,0 @@ ---- -title: ActionController::RequestForgeryProtection::DisabledSessionError -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

-
    - -
  • - new -
  • - -
- - - - - - - - - - - -

Constants

- - - - - - - - - - - - - - -
MESSAGE=<<~EOS.squish
 
- - - - - - -

Class Public methods

- -
-

- - new(message = MESSAGE) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 66
-def initialize(message = MESSAGE)
-  super
-end
-
-
- -
- - - - - -
- -
-
diff --git a/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/Exception.html b/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/Exception.html index 917110f19f..aa36c1b860 100644 --- a/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/Exception.html +++ b/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/Exception.html @@ -98,22 +98,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 288
+        def initialize(controller)
+          @controller = controller
+        end
- -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 288
-def initialize(controller)
-  @controller = controller
-end
-
-
- - + See on GitHub + + + + @@ -137,22 +137,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 292
+        def handle_unverified_request
+          raise ActionController::InvalidAuthenticityToken, warning_message
+        end
- -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 292
-def handle_unverified_request
-  raise ActionController::InvalidAuthenticityToken, warning_message
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/NullSession.html b/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/NullSession.html index 9a27026c6f..2d28bb79f2 100644 --- a/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/NullSession.html +++ b/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/NullSession.html @@ -84,22 +84,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 235
+        def initialize(controller)
+          @controller = controller
+        end
- -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 235
-def initialize(controller)
-  @controller = controller
-end
-
-
- - + See on GitHub + + + + @@ -123,26 +123,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 240
+        def handle_unverified_request
+          request = @controller.request
+          request.session = NullSessionHash.new(request)
+          request.flash = nil
+          request.session_options = { skip: true }
+          request.cookie_jar = NullCookieJar.build(request, {})
+        end
- -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 240
-def handle_unverified_request
-  request = @controller.request
-  request.session = NullSessionHash.new(request)
-  request.flash = nil
-  request.session_options = { skip: true }
-  request.cookie_jar = NullCookieJar.build(request, {})
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/ResetSession.html b/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/ResetSession.html index 6474b2e443..596a819437 100644 --- a/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/ResetSession.html +++ b/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/ResetSession.html @@ -84,22 +84,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 276
+        def initialize(controller)
+          @controller = controller
+        end
- -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 276
-def initialize(controller)
-  @controller = controller
-end
-
-
- - + See on GitHub + + + + @@ -123,22 +123,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 280
+        def handle_unverified_request
+          @controller.reset_session
+        end
- -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 280
-def handle_unverified_request
-  @controller.reset_session
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionController/RequestForgeryProtection/SessionStore.html b/src/classes/ActionController/RequestForgeryProtection/SessionStore.html index 358038a80f..67784afff5 100644 --- a/src/classes/ActionController/RequestForgeryProtection/SessionStore.html +++ b/src/classes/ActionController/RequestForgeryProtection/SessionStore.html @@ -89,22 +89,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 299
+      def fetch(request)
+        request.session[:_csrf_token]
+      end
- -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 299
-def fetch(request)
-  request.session[:_csrf_token]
-end
-
-
- - + See on GitHub + + + +

@@ -124,22 +124,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 307
+      def reset(request)
+        request.session.delete(:_csrf_token)
+      end
- -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 307
-def reset(request)
-  request.session.delete(:_csrf_token)
-end
-
-
- -

+ See on GitHub + + + +

@@ -159,22 +159,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 303
+      def store(request, csrf_token)
+        request.session[:_csrf_token] = csrf_token
+      end
- -
-
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 303
-def store(request, csrf_token)
-  request.session[:_csrf_token] = csrf_token
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionController/Rescue.html b/src/classes/ActionController/Rescue.html index f7941baf2b..79362deb48 100644 --- a/src/classes/ActionController/Rescue.html +++ b/src/classes/ActionController/Rescue.html @@ -97,22 +97,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/rescue.rb, line 19
+    def show_detailed_exceptions?
+      false
+    end
- -
-
# File actionpack/lib/action_controller/metal/rescue.rb, line 19
-def show_detailed_exceptions?
-  false
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionController/RespondToMismatchError.html b/src/classes/ActionController/RespondToMismatchError.html index 288aad1eb5..be937dd632 100644 --- a/src/classes/ActionController/RespondToMismatchError.html +++ b/src/classes/ActionController/RespondToMismatchError.html @@ -113,22 +113,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/exceptions.rb, line 89
+    def initialize(message = nil)
+      super(message || DEFAULT_MESSAGE)
+    end
- -
-
# File actionpack/lib/action_controller/metal/exceptions.rb, line 89
-def initialize(message = nil)
-  super(message || DEFAULT_MESSAGE)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionController/StrongParameters.html b/src/classes/ActionController/StrongParameters.html index 24347d1a2f..f7ea8dafa0 100644 --- a/src/classes/ActionController/StrongParameters.html +++ b/src/classes/ActionController/StrongParameters.html @@ -146,30 +146,30 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 1275
+    def params
+      @_params ||= begin
+        context = {
+          controller: self.class.name,
+          action: action_name,
+          request: request,
+          params: request.filtered_parameters
+        }
+        Parameters.new(request.parameters, context)
+      end
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 1275
-def params
-  @_params ||= begin
-    context = {
-      controller: self.class.name,
-      action: action_name,
-      request: request,
-      params: request.filtered_parameters
-    }
-    Parameters.new(request.parameters, context)
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -189,22 +189,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 1290
+    def params=(value)
+      @_params = value.is_a?(Hash) ? Parameters.new(value) : value
+    end
- -
-
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 1290
-def params=(value)
-  @_params = value.is_a?(Hash) ? Parameters.new(value) : value
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionController/TemplateAssertions.html b/src/classes/ActionController/TemplateAssertions.html deleted file mode 100644 index 4bd84719c4..0000000000 --- a/src/classes/ActionController/TemplateAssertions.html +++ /dev/null @@ -1,103 +0,0 @@ ---- -title: ActionController::TemplateAssertions -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - - -

Instance Public methods

- -
-

- - assert_template(options = {}, message = nil) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/action_controller/template_assertions.rb, line 5
-def assert_template(options = {}, message = nil)
-  raise NoMethodError,
-    "assert_template has been extracted to a gem. To continue using it,
-    add `gem 'rails-controller-testing'` to your Gemfile."
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActionController/TestCase/Behavior.html b/src/classes/ActionController/TestCase/Behavior.html index af536f183c..a0c83a69b4 100644 --- a/src/classes/ActionController/TestCase/Behavior.html +++ b/src/classes/ActionController/TestCase/Behavior.html @@ -190,22 +190,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/test_case.rb, line 564
+      def build_response(klass)
+        klass.create
+      end
- -
-
# File actionpack/lib/action_controller/test_case.rb, line 564
-def build_response(klass)
-  klass.create
-end
-
-
- - + See on GitHub + + + +

@@ -225,22 +225,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/test_case.rb, line 524
+      def controller_class_name
+        @controller.class.anonymous? ? "anonymous" : @controller.class.controller_path
+      end
- -
-
# File actionpack/lib/action_controller/test_case.rb, line 524
-def controller_class_name
-  @controller.class.anonymous? ? "anonymous" : @controller.class.controller_path
-end
-
-
- -

+ See on GitHub + + + +

@@ -260,22 +260,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/test_case.rb, line 439
+      def delete(action, **args)
+        process(action, method: "DELETE", **args)
+      end
- -
-
# File actionpack/lib/action_controller/test_case.rb, line 439
-def delete(action, **args)
-  process(action, method: "DELETE", **args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -295,22 +295,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/test_case.rb, line 528
+      def generated_path(generated_extras)
+        generated_extras[0]
+      end
- -
-
# File actionpack/lib/action_controller/test_case.rb, line 528
-def generated_path(generated_extras)
-  generated_extras[0]
-end
-
-
- -

+ See on GitHub + + + +

@@ -351,24 +351,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/test_case.rb, line 413
+      def get(action, **args)
+        res = process(action, method: "GET", **args)
+        cookies.update res.cookies
+        res
+      end
- -
-
# File actionpack/lib/action_controller/test_case.rb, line 413
-def get(action, **args)
-  res = process(action, method: "GET", **args)
-  cookies.update res.cookies
-  res
-end
-
-
- -

+ See on GitHub + + + +

@@ -388,22 +388,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/test_case.rb, line 445
+      def head(action, **args)
+        process(action, method: "HEAD", **args)
+      end
- -
-
# File actionpack/lib/action_controller/test_case.rb, line 445
-def head(action, **args)
-  process(action, method: "HEAD", **args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -423,22 +423,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/test_case.rb, line 427
+      def patch(action, **args)
+        process(action, method: "PATCH", **args)
+      end
- -
-
# File actionpack/lib/action_controller/test_case.rb, line 427
-def patch(action, **args)
-  process(action, method: "PATCH", **args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -458,22 +458,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/test_case.rb, line 421
+      def post(action, **args)
+        process(action, method: "POST", **args)
+      end
- -
-
# File actionpack/lib/action_controller/test_case.rb, line 421
-def post(action, **args)
-  process(action, method: "POST", **args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -527,58 +527,58 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/test_case.rb, line 484
+      def process(action, method: "GET", params: nil, session: nil, body: nil, flash: {}, format: nil, xhr: false, as: nil)
+        check_required_ivars
+        @controller.clear_instance_variables_between_requests
+
+        action = +action.to_s
+        http_method = method.to_s.upcase
+
+        @html_document = nil
+
+        cookies.update(@request.cookies)
+        cookies.update_cookies_from_jar
+        @request.set_header "HTTP_COOKIE", cookies.to_header
+        @request.delete_header "action_dispatch.cookies"
+
+        @request          = TestRequest.new scrub_env!(@request.env), @request.session, @controller.class
+        @response         = build_response @response_klass
+        @response.request = @request
+        @controller.recycle!
+
+        if body
+          @request.set_header "RAW_POST_DATA", body
+        end
+
+        @request.set_header "REQUEST_METHOD", http_method
+
+        if as
+          @request.content_type = Mime[as].to_s
+          format ||= as
+        end
+
+        parameters = (params || {}).symbolize_keys
+
+        if format
+          parameters[:format] = format
+        end
+
+        setup_request(controller_class_name, action, parameters, session, flash, xhr)
+        process_controller_response(action, cookies, xhr)
+      end
- -
-
# File actionpack/lib/action_controller/test_case.rb, line 484
-def process(action, method: "GET", params: nil, session: nil, body: nil, flash: {}, format: nil, xhr: false, as: nil)
-  check_required_ivars
-  @controller.clear_instance_variables_between_requests
-
-  action = +action.to_s
-  http_method = method.to_s.upcase
-
-  @html_document = nil
-
-  cookies.update(@request.cookies)
-  cookies.update_cookies_from_jar
-  @request.set_header "HTTP_COOKIE", cookies.to_header
-  @request.delete_header "action_dispatch.cookies"
-
-  @request          = TestRequest.new scrub_env!(@request.env), @request.session, @controller.class
-  @response         = build_response @response_klass
-  @response.request = @request
-  @controller.recycle!
-
-  if body
-    @request.set_header "RAW_POST_DATA", body
-  end
-
-  @request.set_header "REQUEST_METHOD", http_method
-
-  if as
-    @request.content_type = Mime[as].to_s
-    format ||= as
-  end
-
-  parameters = (params || {}).symbolize_keys
-
-  if format
-    parameters[:format] = format
-  end
-
-  setup_request(controller_class_name, action, parameters, session, flash, xhr)
-  process_controller_response(action, cookies, xhr)
-end
-
-
- -

+ See on GitHub + + + +

@@ -598,22 +598,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/test_case.rb, line 433
+      def put(action, **args)
+        process(action, method: "PUT", **args)
+      end
- -
-
# File actionpack/lib/action_controller/test_case.rb, line 433
-def put(action, **args)
-  process(action, method: "PUT", **args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -633,22 +633,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/test_case.rb, line 532
+      def query_parameter_names(generated_extras)
+        generated_extras[1] + [:controller, :action]
+      end
- -
-
# File actionpack/lib/action_controller/test_case.rb, line 532
-def query_parameter_names(generated_extras)
-  generated_extras[1] + [:controller, :action]
-end
-
-
- -

+ See on GitHub + + + +

@@ -668,46 +668,46 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/test_case.rb, line 536
+      def setup_controller_request_and_response
+        @controller = nil unless defined? @controller
+
+        @response_klass = ActionDispatch::TestResponse
+
+        if klass = self.class.controller_class
+          if klass < ActionController::Live
+            @response_klass = LiveTestResponse
+          end
+          unless @controller
+            begin
+              @controller = klass.new
+            rescue
+              warn "could not construct controller #{klass}" if $VERBOSE
+            end
+          end
+        end
+
+        @request          = TestRequest.create(@controller.class)
+        @response         = build_response @response_klass
+        @response.request = @request
+
+        if @controller
+          @controller.request = @request
+          @controller.params = {}
+        end
+      end
- -
-
# File actionpack/lib/action_controller/test_case.rb, line 536
-def setup_controller_request_and_response
-  @controller = nil unless defined? @controller
-
-  @response_klass = ActionDispatch::TestResponse
-
-  if klass = self.class.controller_class
-    if klass < ActionController::Live
-      @response_klass = LiveTestResponse
-    end
-    unless @controller
-      begin
-        @controller = klass.new
-      rescue
-        warn "could not construct controller #{klass}" if $VERBOSE
-      end
-    end
-  end
-
-  @request          = TestRequest.create(@controller.class)
-  @response         = build_response @response_klass
-  @response.request = @request
-
-  if @controller
-    @controller.request = @request
-    @controller.params = {}
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionController/TestCase/Behavior/ClassMethods.html b/src/classes/ActionController/TestCase/Behavior/ClassMethods.html index f33e4562ef..a2385953c9 100644 --- a/src/classes/ActionController/TestCase/Behavior/ClassMethods.html +++ b/src/classes/ActionController/TestCase/Behavior/ClassMethods.html @@ -87,26 +87,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/test_case.rb, line 378
+        def controller_class
+          if current_controller_class = _controller_class
+            current_controller_class
+          else
+            self.controller_class = determine_default_controller_class(name)
+          end
+        end
- -
-
# File actionpack/lib/action_controller/test_case.rb, line 378
-def controller_class
-  if current_controller_class = _controller_class
-    current_controller_class
-  else
-    self.controller_class = determine_default_controller_class(name)
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -126,22 +126,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/test_case.rb, line 374
+        def controller_class=(new_class)
+          self._controller_class = new_class
+        end
- -
-
# File actionpack/lib/action_controller/test_case.rb, line 374
-def controller_class=(new_class)
-  self._controller_class = new_class
-end
-
-
- -

+ See on GitHub + + + +

@@ -161,24 +161,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/test_case.rb, line 386
+        def determine_default_controller_class(name)
+          determine_constant_from_test_name(name) do |constant|
+            Class === constant && constant < ActionController::Metal
+          end
+        end
- -
-
# File actionpack/lib/action_controller/test_case.rb, line 386
-def determine_default_controller_class(name)
-  determine_constant_from_test_name(name) do |constant|
-    Class === constant && constant < ActionController::Metal
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -203,29 +203,29 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/test_case.rb, line 363
+        def tests(controller_class)
+          case controller_class
+          when String, Symbol
+            self.controller_class = "#{controller_class.to_s.camelize}Controller".constantize
+          when Class
+            self.controller_class = controller_class
+          else
+            raise ArgumentError, "controller class must be a String, Symbol, or Class"
+          end
+        end
- -
-
# File actionpack/lib/action_controller/test_case.rb, line 363
-def tests(controller_class)
-  case controller_class
-  when String, Symbol
-    self.controller_class = "#{controller_class.to_s.camelize}Controller".constantize
-  when Class
-    self.controller_class = controller_class
-  else
-    raise ArgumentError, "controller class must be a String, Symbol, or Class"
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionController/UrlFor.html b/src/classes/ActionController/UrlFor.html index f589671bce..67a522246a 100644 --- a/src/classes/ActionController/UrlFor.html +++ b/src/classes/ActionController/UrlFor.html @@ -115,23 +115,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/url_for.rb, line 30
+    def initialize(...)
+      super
+      @_url_options = nil
+    end
- -
-
# File actionpack/lib/action_controller/metal/url_for.rb, line 30
-def initialize(...)
-  super
-  @_url_options = nil
-end
-
-
- - + See on GitHub + + + + @@ -155,46 +155,46 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_controller/metal/url_for.rb, line 35
+    def url_options
+      @_url_options ||= {
+        host: request.host,
+        port: request.optional_port,
+        protocol: request.protocol,
+        _recall: request.path_parameters
+      }.merge!(super).freeze
+
+      if (same_origin = _routes.equal?(request.routes)) ||
+         (script_name = request.engine_script_name(_routes)) ||
+         (original_script_name = request.original_script_name)
+
+        options = @_url_options.dup
+        if original_script_name
+          options[:original_script_name] = original_script_name
+        else
+          if same_origin
+            options[:script_name] = request.script_name.empty? ? "" : request.script_name.dup
+          else
+            options[:script_name] = script_name
+          end
+        end
+        options.freeze
+      else
+        @_url_options
+      end
+    end
- -
-
# File actionpack/lib/action_controller/metal/url_for.rb, line 35
-def url_options
-  @_url_options ||= {
-    host: request.host,
-    port: request.optional_port,
-    protocol: request.protocol,
-    _recall: request.path_parameters
-  }.merge!(super).freeze
-
-  if (same_origin = _routes.equal?(request.routes)) ||
-     (script_name = request.engine_script_name(_routes)) ||
-     (original_script_name = request.original_script_name)
-
-    options = @_url_options.dup
-    if original_script_name
-      options[:original_script_name] = original_script_name
-    else
-      if same_origin
-        options[:script_name] = request.script_name.empty? ? "" : request.script_name.dup
-      else
-        options[:script_name] = script_name
-      end
-    end
-    options.freeze
-  else
-    @_url_options
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionController/UrlGenerationError.html b/src/classes/ActionController/UrlGenerationError.html deleted file mode 100644 index a69dea5c54..0000000000 --- a/src/classes/ActionController/UrlGenerationError.html +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: ActionController::UrlGenerationError -layout: default ---- -
- -
-
- - - - - - - - - -

Namespace

- - - - -

Class

- - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActionController/UrlGenerationError/Correction.html b/src/classes/ActionController/UrlGenerationError/Correction.html deleted file mode 100644 index e11005503a..0000000000 --- a/src/classes/ActionController/UrlGenerationError/Correction.html +++ /dev/null @@ -1,158 +0,0 @@ ---- -title: ActionController::UrlGenerationError::Correction -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - new(error) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/action_controller/metal/exceptions.rb, line 37
-def initialize(error)
-  @error = error
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - corrections() - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/action_controller/metal/exceptions.rb, line 41
-def corrections
-  if @error.method_name
-    maybe_these = @error.routes.named_routes.helper_names.grep(/#{@error.route_name}/)
-    maybe_these -= [@error.method_name.to_s] # remove exact match
-
-    maybe_these.sort_by { |n|
-      DidYouMean::Jaro.distance(@error.route_name, n)
-    }.reverse.first(4)
-  else
-    []
-  end
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActionDispatch.html b/src/classes/ActionDispatch.html index c70b7bd7ba..2275231b4b 100644 --- a/src/classes/ActionDispatch.html +++ b/src/classes/ActionDispatch.html @@ -403,23 +403,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch.rb, line 141
+  def eager_load!
+    super
+    Routing.eager_load!
+  end
- -
-
# File actionpack/lib/action_dispatch.rb, line 141
-def eager_load!
-  super
-  Routing.eager_load!
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/AssertionResponse.html b/src/classes/ActionDispatch/AssertionResponse.html index b978c5f02f..9270b4c7a9 100644 --- a/src/classes/ActionDispatch/AssertionResponse.html +++ b/src/classes/ActionDispatch/AssertionResponse.html @@ -112,31 +112,31 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/assertion_response.rb, line 20
+    def initialize(code_or_name)
+      if code_or_name.is_a?(Symbol)
+        @name = code_or_name
+        @code = code_from_name(code_or_name)
+      else
+        @name = name_from_code(code_or_name)
+        @code = code_or_name
+      end
+
+      raise ArgumentError, "Invalid response name: #{name}" if @code.nil?
+      raise ArgumentError, "Invalid response code: #{code}" if @name.nil?
+    end
- -
-
# File actionpack/lib/action_dispatch/testing/assertion_response.rb, line 20
-def initialize(code_or_name)
-  if code_or_name.is_a?(Symbol)
-    @name = code_or_name
-    @code = code_from_name(code_or_name)
-  else
-    @name = name_from_code(code_or_name)
-    @code = code_or_name
-  end
-
-  raise ArgumentError, "Invalid response name: #{name}" if @code.nil?
-  raise ArgumentError, "Invalid response code: #{code}" if @name.nil?
-end
-
-
- - + See on GitHub + + + + @@ -160,22 +160,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/assertion_response.rb, line 33
+    def code_and_name
+      "#{code}: #{name}"
+    end
- -
-
# File actionpack/lib/action_dispatch/testing/assertion_response.rb, line 33
-def code_and_name
-  "#{code}: #{name}"
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Assertions.html b/src/classes/ActionDispatch/Assertions.html index 3fc8507bfc..444d802497 100644 --- a/src/classes/ActionDispatch/Assertions.html +++ b/src/classes/ActionDispatch/Assertions.html @@ -122,26 +122,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/assertions.rb, line 15
+    def html_document
+      @html_document ||= if @response.media_type&.end_with?("xml")
+        Nokogiri::XML::Document.parse(@response.body)
+      else
+        Rails::Dom::Testing.html_document.parse(@response.body)
+      end
+    end
- -
-
# File actionpack/lib/action_dispatch/testing/assertions.rb, line 15
-def html_document
-  @html_document ||= if @response.media_type&.end_with?("xml")
-    Nokogiri::XML::Document.parse(@response.body)
-  else
-    Rails::Dom::Testing.html_document.parse(@response.body)
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Assertions/ResponseAssertions.html b/src/classes/ActionDispatch/Assertions/ResponseAssertions.html index 2c38d6a459..8d390ae8cb 100644 --- a/src/classes/ActionDispatch/Assertions/ResponseAssertions.html +++ b/src/classes/ActionDispatch/Assertions/ResponseAssertions.html @@ -102,32 +102,32 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/assertions/response.rb, line 57
+      def assert_redirected_to(url_options = {}, options = {}, message = nil)
+        options, message = {}, options unless options.is_a?(Hash)
+
+        status = options[:status] || :redirect
+        assert_response(status, message)
+        return true if url_options === @response.location
+
+        redirect_is       = normalize_argument_to_redirection(@response.location)
+        redirect_expected = normalize_argument_to_redirection(url_options)
+
+        message ||= "Expected response to be a redirect to <#{redirect_expected}> but was a redirect to <#{redirect_is}>"
+        assert_operator redirect_expected, :===, redirect_is, message
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/assertions/response.rb, line 57
-def assert_redirected_to(url_options = {}, options = {}, message = nil)
-  options, message = {}, options unless options.is_a?(Hash)
-
-  status = options[:status] || :redirect
-  assert_response(status, message)
-  return true if url_options === @response.location
-
-  redirect_is       = normalize_argument_to_redirection(@response.location)
-  redirect_expected = normalize_argument_to_redirection(url_options)
-
-  message ||= "Expected response to be a redirect to <#{redirect_expected}> but was a redirect to <#{redirect_is}>"
-  assert_operator redirect_expected, :===, redirect_is, message
-end
-
-
- - + See on GitHub + + + +

@@ -165,28 +165,28 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/assertions/response.rb, line 30
+      def assert_response(type, message = nil)
+        message ||= generate_response_message(type)
+
+        if RESPONSE_PREDICATES.key?(type)
+          assert @response.public_send(RESPONSE_PREDICATES[type]), message
+        else
+          assert_equal AssertionResponse.new(type).code, @response.response_code, message
+        end
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/assertions/response.rb, line 30
-def assert_response(type, message = nil)
-  message ||= generate_response_message(type)
-
-  if RESPONSE_PREDICATES.key?(type)
-    assert @response.public_send(RESPONSE_PREDICATES[type]), message
-  else
-    assert_equal AssertionResponse.new(type).code, @response.response_code, message
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Assertions/RoutingAssertions.html b/src/classes/ActionDispatch/Assertions/RoutingAssertions.html index 3a3a38fc5e..be3a2c8046 100644 --- a/src/classes/ActionDispatch/Assertions/RoutingAssertions.html +++ b/src/classes/ActionDispatch/Assertions/RoutingAssertions.html @@ -125,40 +125,40 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/assertions/routing.rb, line 115
+      def assert_generates(expected_path, options, defaults = {}, extras = {}, message = nil)
+        if expected_path.include?("://")
+          fail_on(URI::InvalidURIError, message) do
+            uri = URI.parse(expected_path)
+            expected_path = uri.path.to_s.empty? ? "/" : uri.path
+          end
+        else
+          expected_path = "/#{expected_path}" unless expected_path.start_with?("/")
+        end
+
+        options = options.clone
+        generated_path, query_string_keys = @routes.generate_extras(options, defaults)
+        found_extras = options.reject { |k, _| ! query_string_keys.include? k }
+
+        msg = message || sprintf("found extras <%s>, not <%s>", found_extras, extras)
+        assert_equal(extras, found_extras, msg)
+
+        msg = message || sprintf("The generated path <%s> did not match <%s>", generated_path,
+            expected_path)
+        assert_equal(expected_path, generated_path, msg)
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/assertions/routing.rb, line 115
-def assert_generates(expected_path, options, defaults = {}, extras = {}, message = nil)
-  if expected_path.include?("://")
-    fail_on(URI::InvalidURIError, message) do
-      uri = URI.parse(expected_path)
-      expected_path = uri.path.to_s.empty? ? "/" : uri.path
-    end
-  else
-    expected_path = "/#{expected_path}" unless expected_path.start_with?("/")
-  end
-
-  options = options.clone
-  generated_path, query_string_keys = @routes.generate_extras(options, defaults)
-  found_extras = options.reject { |k, _| ! query_string_keys.include? k }
-
-  msg = message || sprintf("found extras <%s>, not <%s>", found_extras, extras)
-  assert_equal(extras, found_extras, msg)
-
-  msg = message || sprintf("The generated path <%s> did not match <%s>", generated_path,
-      expected_path)
-  assert_equal(expected_path, generated_path, msg)
-end
-
-
- - + See on GitHub + + + +

@@ -205,39 +205,39 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/assertions/routing.rb, line 77
+      def assert_recognizes(expected_options, path, extras = {}, msg = nil)
+        if path.is_a?(Hash) && path[:method].to_s == "all"
+          [:get, :post, :put, :delete].each do |method|
+            assert_recognizes(expected_options, path.merge(method: method), extras, msg)
+          end
+        else
+          request = recognized_request_for(path, extras, msg)
+
+          expected_options = expected_options.clone
+
+          expected_options.stringify_keys!
+
+          msg = message(msg, "") {
+            sprintf("The recognized options <%s> did not match <%s>, difference:",
+                    request.path_parameters, expected_options)
+          }
+
+          assert_equal(expected_options, request.path_parameters, msg)
+        end
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/assertions/routing.rb, line 77
-def assert_recognizes(expected_options, path, extras = {}, msg = nil)
-  if path.is_a?(Hash) && path[:method].to_s == "all"
-    [:get, :post, :put, :delete].each do |method|
-      assert_recognizes(expected_options, path.merge(method: method), extras, msg)
-    end
-  else
-    request = recognized_request_for(path, extras, msg)
-
-    expected_options = expected_options.clone
-
-    expected_options.stringify_keys!
-
-    msg = message(msg, "") {
-      sprintf("The recognized options <%s> did not match <%s>, difference:",
-              request.path_parameters, expected_options)
-    }
-
-    assert_equal(expected_options, request.path_parameters, msg)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -275,30 +275,30 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/assertions/routing.rb, line 158
+      def assert_routing(path, options, defaults = {}, extras = {}, message = nil)
+        assert_recognizes(options, path, extras, message)
+
+        controller, default_controller = options[:controller], defaults[:controller]
+        if controller && controller.include?(?/) && default_controller && default_controller.include?(?/)
+          options[:controller] = "/#{controller}"
+        end
+
+        generate_options = options.dup.delete_if { |k, _| defaults.key?(k) }
+        assert_generates(path.is_a?(Hash) ? path[:path] : path, generate_options, defaults, extras, message)
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/assertions/routing.rb, line 158
-def assert_routing(path, options, defaults = {}, extras = {}, message = nil)
-  assert_recognizes(options, path, extras, message)
-
-  controller, default_controller = options[:controller], defaults[:controller]
-  if controller && controller.include?(?/) && default_controller && default_controller.include?(?/)
-    options[:controller] = "/#{controller}"
-  end
-
-  generate_options = options.dup.delete_if { |k, _| defaults.key?(k) }
-  assert_generates(path.is_a?(Hash) ? path[:path] : path, generate_options, defaults, extras, message)
-end
-
-
- -

+ See on GitHub + + + +

@@ -318,26 +318,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/assertions/routing.rb, line 191
+      def method_missing(selector, *args, &block)
+        if defined?(@controller) && @controller && defined?(@routes) && @routes && @routes.named_routes.route_defined?(selector)
+          @controller.public_send(selector, *args, &block)
+        else
+          super
+        end
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/assertions/routing.rb, line 191
-def method_missing(selector, *args, &block)
-  if defined?(@controller) && @controller && defined?(@routes) && @routes && @routes.named_routes.route_defined?(selector)
-    @controller.public_send(selector, *args, &block)
-  else
-    super
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -367,25 +367,25 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/assertions/routing.rb, line 183
+      def with_routing(&block)
+        old_routes, old_controller = @routes, @controller
+        create_routes(&block)
+      ensure
+        reset_routes(old_routes, old_controller)
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/assertions/routing.rb, line 183
-def with_routing(&block)
-  old_routes, old_controller = @routes, @controller
-  create_routes(&block)
-ensure
-  reset_routes(old_routes, old_controller)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Assertions/RoutingAssertions/ClassMethods.html b/src/classes/ActionDispatch/Assertions/RoutingAssertions/ClassMethods.html index 8a9d2af786..42fbbeafbf 100644 --- a/src/classes/ActionDispatch/Assertions/RoutingAssertions/ClassMethods.html +++ b/src/classes/ActionDispatch/Assertions/RoutingAssertions/ClassMethods.html @@ -84,31 +84,31 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/assertions/routing.rb, line 28
+        def with_routing(&block)
+          old_routes, old_controller = nil
+
+          setup do
+            old_routes, old_controller = @routes, @controller
+            create_routes(&block)
+          end
+
+          teardown do
+            reset_routes(old_routes, old_controller)
+          end
+        end
- -
-
# File actionpack/lib/action_dispatch/testing/assertions/routing.rb, line 28
-def with_routing(&block)
-  old_routes, old_controller = nil
-
-  setup do
-    old_routes, old_controller = @routes, @controller
-    create_routes(&block)
-  end
-
-  teardown do
-    reset_routes(old_routes, old_controller)
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/AssumeSSL.html b/src/classes/ActionDispatch/AssumeSSL.html index ab13cb565b..7d25a019d3 100644 --- a/src/classes/ActionDispatch/AssumeSSL.html +++ b/src/classes/ActionDispatch/AssumeSSL.html @@ -92,22 +92,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/assume_ssl.rb, line 11
+    def initialize(app)
+      @app = app
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/assume_ssl.rb, line 11
-def initialize(app)
-  @app = app
-end
-
-
- - + See on GitHub + + + + @@ -131,27 +131,27 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/assume_ssl.rb, line 15
+    def call(env)
+      env["HTTPS"] = "on"
+      env["HTTP_X_FORWARDED_PORT"] = "443"
+      env["HTTP_X_FORWARDED_PROTO"] = "https"
+      env["rack.url_scheme"] = "https"
+
+      @app.call(env)
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/assume_ssl.rb, line 15
-def call(env)
-  env["HTTPS"] = "on"
-  env["HTTP_X_FORWARDED_PORT"] = "443"
-  env["HTTP_X_FORWARDED_PROTO"] = "https"
-  env["rack.url_scheme"] = "https"
-
-  @app.call(env)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Callbacks.html b/src/classes/ActionDispatch/Callbacks.html index c52f038722..a490212358 100644 --- a/src/classes/ActionDispatch/Callbacks.html +++ b/src/classes/ActionDispatch/Callbacks.html @@ -114,22 +114,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/callbacks.rb, line 17
+      def after(*args, &block)
+        set_callback(:call, :after, *args, &block)
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/callbacks.rb, line 17
-def after(*args, &block)
-  set_callback(:call, :after, *args, &block)
-end
-
-
- - + See on GitHub + + + +

@@ -149,22 +149,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/callbacks.rb, line 13
+      def before(*args, &block)
+        set_callback(:call, :before, *args, &block)
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/callbacks.rb, line 13
-def before(*args, &block)
-  set_callback(:call, :before, *args, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -184,22 +184,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/callbacks.rb, line 22
+    def initialize(app)
+      @app = app
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/callbacks.rb, line 22
-def initialize(app)
-  @app = app
-end
-
-
- -

+ See on GitHub + + + + @@ -223,28 +223,28 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/callbacks.rb, line 26
+    def call(env)
+      error = nil
+      result = run_callbacks :call do
+        @app.call(env)
+      rescue => error
+      end
+      raise error if error
+      result
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/callbacks.rb, line 26
-def call(env)
-  error = nil
-  result = run_callbacks :call do
-    @app.call(env)
-  rescue => error
-  end
-  raise error if error
-  result
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/ContentSecurityPolicy.html b/src/classes/ActionDispatch/ContentSecurityPolicy.html index 06520a32dc..3a2fc7e38b 100644 --- a/src/classes/ActionDispatch/ContentSecurityPolicy.html +++ b/src/classes/ActionDispatch/ContentSecurityPolicy.html @@ -171,23 +171,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 174
+    def initialize
+      @directives = {}
+      yield self if block_given?
+    end
- -
-
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 174
-def initialize
-  @directives = {}
-  yield self if block_given?
-end
-
-
- - + See on GitHub + + + + @@ -219,26 +219,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 202
+    def block_all_mixed_content(enabled = true)
+      if enabled
+        @directives["block-all-mixed-content"] = true
+      else
+        @directives.delete("block-all-mixed-content")
+      end
+    end
- -
-
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 202
-def block_all_mixed_content(enabled = true)
-  if enabled
-    @directives["block-all-mixed-content"] = true
-  else
-    @directives.delete("block-all-mixed-content")
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -258,23 +258,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 291
+    def build(context = nil, nonce = nil, nonce_directives = nil)
+      nonce_directives = DEFAULT_NONCE_DIRECTIVES if nonce_directives.nil?
+      build_directives(context, nonce, nonce_directives).compact.join("; ")
+    end
- -
-
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 291
-def build(context = nil, nonce = nil, nonce_directives = nil)
-  nonce_directives = DEFAULT_NONCE_DIRECTIVES if nonce_directives.nil?
-  build_directives(context, nonce, nonce_directives).compact.join("; ")
-end
-
-
- -

+ See on GitHub + + + +

@@ -294,22 +294,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 179
+    def initialize_copy(other)
+      @directives = other.directives.deep_dup
+    end
- -
-
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 179
-def initialize_copy(other)
-  @directives = other.directives.deep_dup
-end
-
-
- -

+ See on GitHub + + + +

@@ -337,26 +337,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 218
+    def plugin_types(*types)
+      if types.first
+        @directives["plugin-types"] = types
+      else
+        @directives.delete("plugin-types")
+      end
+    end
- -
-
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 218
-def plugin_types(*types)
-  if types.first
-    @directives["plugin-types"] = types
-  else
-    @directives.delete("plugin-types")
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -379,22 +379,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 231
+    def report_uri(uri)
+      @directives["report-uri"] = [uri]
+    end
- -
-
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 231
-def report_uri(uri)
-  @directives["report-uri"] = [uri]
-end
-
-
- -

+ See on GitHub + + + +

@@ -422,26 +422,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 244
+    def require_sri_for(*types)
+      if types.first
+        @directives["require-sri-for"] = types
+      else
+        @directives.delete("require-sri-for")
+      end
+    end
- -
-
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 244
-def require_sri_for(*types)
-  if types.first
-    @directives["require-sri-for"] = types
-  else
-    @directives.delete("require-sri-for")
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -474,28 +474,28 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 265
+    def sandbox(*values)
+      if values.empty?
+        @directives["sandbox"] = true
+      elsif values.first
+        @directives["sandbox"] = values
+      else
+        @directives.delete("sandbox")
+      end
+    end
- -
-
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 265
-def sandbox(*values)
-  if values.empty?
-    @directives["sandbox"] = true
-  elsif values.first
-    @directives["sandbox"] = values
-  else
-    @directives.delete("sandbox")
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -523,26 +523,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 283
+    def upgrade_insecure_requests(enabled = true)
+      if enabled
+        @directives["upgrade-insecure-requests"] = true
+      else
+        @directives.delete("upgrade-insecure-requests")
+      end
+    end
- -
-
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 283
-def upgrade_insecure_requests(enabled = true)
-  if enabled
-    @directives["upgrade-insecure-requests"] = true
-  else
-    @directives.delete("upgrade-insecure-requests")
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/ContentSecurityPolicy/Middleware.html b/src/classes/ActionDispatch/ContentSecurityPolicy/Middleware.html index e18a97d494..8bf3692051 100644 --- a/src/classes/ActionDispatch/ContentSecurityPolicy/Middleware.html +++ b/src/classes/ActionDispatch/ContentSecurityPolicy/Middleware.html @@ -84,22 +84,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 28
+      def initialize(app)
+        @app = app
+      end
- -
-
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 28
-def initialize(app)
-  @app = app
-end
-
-
- - + See on GitHub + + + + @@ -123,39 +123,39 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 32
+      def call(env)
+        status, headers, _ = response = @app.call(env)
+
+        # Returning CSP headers with a 304 Not Modified is harmful, since nonces in the new
+        # CSP headers might not match nonces in the cached HTML.
+        return response if status == 304
+
+        return response if policy_present?(headers)
+
+        request = ActionDispatch::Request.new env
+
+        if policy = request.content_security_policy
+          nonce = request.content_security_policy_nonce
+          nonce_directives = request.content_security_policy_nonce_directives
+          context = request.controller_instance || request
+          headers[header_name(request)] = policy.build(context, nonce, nonce_directives)
+        end
+
+        response
+      end
- -
-
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 32
-def call(env)
-  status, headers, _ = response = @app.call(env)
-
-  # Returning CSP headers with a 304 Not Modified is harmful, since nonces in the new
-  # CSP headers might not match nonces in the cached HTML.
-  return response if status == 304
-
-  return response if policy_present?(headers)
-
-  request = ActionDispatch::Request.new env
-
-  if policy = request.content_security_policy
-    nonce = request.content_security_policy_nonce
-    nonce_directives = request.content_security_policy_nonce_directives
-    context = request.controller_instance || request
-    headers[header_name(request)] = policy.build(context, nonce, nonce_directives)
-  end
-
-  response
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/ContentSecurityPolicy/Request.html b/src/classes/ActionDispatch/ContentSecurityPolicy/Request.html index 5745260b51..c9b49b5f66 100644 --- a/src/classes/ActionDispatch/ContentSecurityPolicy/Request.html +++ b/src/classes/ActionDispatch/ContentSecurityPolicy/Request.html @@ -173,22 +173,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 75
+      def content_security_policy
+        get_header(POLICY)
+      end
- -
-
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 75
-def content_security_policy
-  get_header(POLICY)
-end
-
-
- - + See on GitHub + + + +

@@ -208,22 +208,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 79
+      def content_security_policy=(policy)
+        set_header(POLICY, policy)
+      end
- -
-
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 79
-def content_security_policy=(policy)
-  set_header(POLICY, policy)
-end
-
-
- -

+ See on GitHub + + + +

@@ -243,28 +243,28 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 107
+      def content_security_policy_nonce
+        if content_security_policy_nonce_generator
+          if nonce = get_header(NONCE)
+            nonce
+          else
+            set_header(NONCE, generate_content_security_policy_nonce)
+          end
+        end
+      end
- -
-
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 107
-def content_security_policy_nonce
-  if content_security_policy_nonce_generator
-    if nonce = get_header(NONCE)
-      nonce
-    else
-      set_header(NONCE, generate_content_security_policy_nonce)
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -284,22 +284,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 99
+      def content_security_policy_nonce_directives
+        get_header(NONCE_DIRECTIVES)
+      end
- -
-
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 99
-def content_security_policy_nonce_directives
-  get_header(NONCE_DIRECTIVES)
-end
-
-
- -

+ See on GitHub + + + +

@@ -319,22 +319,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 103
+      def content_security_policy_nonce_directives=(generator)
+        set_header(NONCE_DIRECTIVES, generator)
+      end
- -
-
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 103
-def content_security_policy_nonce_directives=(generator)
-  set_header(NONCE_DIRECTIVES, generator)
-end
-
-
- -

+ See on GitHub + + + +

@@ -354,22 +354,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 91
+      def content_security_policy_nonce_generator
+        get_header(NONCE_GENERATOR)
+      end
- -
-
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 91
-def content_security_policy_nonce_generator
-  get_header(NONCE_GENERATOR)
-end
-
-
- -

+ See on GitHub + + + +

@@ -389,22 +389,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 95
+      def content_security_policy_nonce_generator=(generator)
+        set_header(NONCE_GENERATOR, generator)
+      end
- -
-
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 95
-def content_security_policy_nonce_generator=(generator)
-  set_header(NONCE_GENERATOR, generator)
-end
-
-
- -

+ See on GitHub + + + +

@@ -424,22 +424,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 83
+      def content_security_policy_report_only
+        get_header(POLICY_REPORT_ONLY)
+      end
- -
-
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 83
-def content_security_policy_report_only
-  get_header(POLICY_REPORT_ONLY)
-end
-
-
- -

+ See on GitHub + + + +

@@ -459,22 +459,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 87
+      def content_security_policy_report_only=(value)
+        set_header(POLICY_REPORT_ONLY, value)
+      end
- -
-
# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 87
-def content_security_policy_report_only=(value)
-  set_header(POLICY_REPORT_ONLY, value)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Cookies.html b/src/classes/ActionDispatch/Cookies.html index 32a3df07a0..cebf724f19 100644 --- a/src/classes/ActionDispatch/Cookies.html +++ b/src/classes/ActionDispatch/Cookies.html @@ -403,22 +403,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/cookies.rb, line 683
+    def initialize(app)
+      @app = app
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/cookies.rb, line 683
-def initialize(app)
-  @app = app
-end
-
-
- - + See on GitHub + + + + @@ -442,33 +442,33 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/cookies.rb, line 687
+    def call(env)
+      request = ActionDispatch::Request.new(env)
+      response = @app.call(env)
+
+      if request.have_cookie_jar?
+        cookie_jar = request.cookie_jar
+        unless cookie_jar.committed?
+          response = Rack::Response[*response]
+          cookie_jar.write(response)
+        end
+      end
+
+      response.to_a
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/cookies.rb, line 687
-def call(env)
-  request = ActionDispatch::Request.new(env)
-  response = @app.call(env)
-
-  if request.have_cookie_jar?
-    cookie_jar = request.cookie_jar
-    unless cookie_jar.committed?
-      response = Rack::Response[*response]
-      cookie_jar.write(response)
-    end
-  end
-
-  response.to_a
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Cookies/ChainedCookieJars.html b/src/classes/ActionDispatch/Cookies/ChainedCookieJars.html index 666eac20fa..43eda5f5d9 100644 --- a/src/classes/ActionDispatch/Cookies/ChainedCookieJars.html +++ b/src/classes/ActionDispatch/Cookies/ChainedCookieJars.html @@ -105,22 +105,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/cookies.rb, line 258
+      def encrypted
+        @encrypted ||= EncryptedKeyRotatingCookieJar.new(self)
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/cookies.rb, line 258
-def encrypted
-  @encrypted ||= EncryptedKeyRotatingCookieJar.new(self)
-end
-
-
- - + See on GitHub + + + +

@@ -152,22 +152,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/cookies.rb, line 224
+      def permanent
+        @permanent ||= PermanentCookieJar.new(self)
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/cookies.rb, line 224
-def permanent
-  @permanent ||= PermanentCookieJar.new(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -197,22 +197,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/cookies.rb, line 240
+      def signed
+        @signed ||= SignedKeyRotatingCookieJar.new(self)
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/cookies.rb, line 240
-def signed
-  @signed ||= SignedKeyRotatingCookieJar.new(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -232,27 +232,27 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/cookies.rb, line 264
+      def signed_or_encrypted
+        @signed_or_encrypted ||=
+          if request.secret_key_base.present?
+            encrypted
+          else
+            signed
+          end
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/cookies.rb, line 264
-def signed_or_encrypted
-  @signed_or_encrypted ||=
-    if request.secret_key_base.present?
-      encrypted
-    else
-      signed
-    end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/DebugExceptions.html b/src/classes/ActionDispatch/DebugExceptions.html index 8d70525923..a0c1d36351 100644 --- a/src/classes/ActionDispatch/DebugExceptions.html +++ b/src/classes/ActionDispatch/DebugExceptions.html @@ -96,25 +96,25 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/debug_exceptions.rb, line 21
+    def initialize(app, routes_app = nil, response_format = :default, interceptors = self.class.interceptors)
+      @app             = app
+      @routes_app      = routes_app
+      @response_format = response_format
+      @interceptors    = interceptors
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/debug_exceptions.rb, line 21
-def initialize(app, routes_app = nil, response_format = :default, interceptors = self.class.interceptors)
-  @app             = app
-  @routes_app      = routes_app
-  @response_format = response_format
-  @interceptors    = interceptors
-end
-
-
- - + See on GitHub + + + +

@@ -134,23 +134,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/debug_exceptions.rb, line 16
+    def self.register_interceptor(object = nil, &block)
+      interceptor = object || block
+      interceptors << interceptor
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/debug_exceptions.rb, line 16
-def self.register_interceptor(object = nil, &block)
-  interceptor = object || block
-  interceptors << interceptor
-end
-
-
- -

+ See on GitHub + + + + @@ -174,37 +174,37 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/debug_exceptions.rb, line 28
+    def call(env)
+      _, headers, body = response = @app.call(env)
+
+      if headers[Constants::X_CASCADE] == "pass"
+        body.close if body.respond_to?(:close)
+        raise ActionController::RoutingError, "No route matches [#{env['REQUEST_METHOD']}] #{env['PATH_INFO'].inspect}"
+      end
+
+      response
+    rescue Exception => exception
+      request = ActionDispatch::Request.new env
+      backtrace_cleaner = request.get_header("action_dispatch.backtrace_cleaner")
+      wrapper = ExceptionWrapper.new(backtrace_cleaner, exception)
+
+      invoke_interceptors(request, exception, wrapper)
+      raise exception unless wrapper.show?(request)
+      render_exception(request, exception, wrapper)
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/debug_exceptions.rb, line 28
-def call(env)
-  _, headers, body = response = @app.call(env)
-
-  if headers[Constants::X_CASCADE] == "pass"
-    body.close if body.respond_to?(:close)
-    raise ActionController::RoutingError, "No route matches [#{env['REQUEST_METHOD']}] #{env['PATH_INFO'].inspect}"
-  end
-
-  response
-rescue Exception => exception
-  request = ActionDispatch::Request.new env
-  backtrace_cleaner = request.get_header("action_dispatch.backtrace_cleaner")
-  wrapper = ExceptionWrapper.new(backtrace_cleaner, exception)
-
-  invoke_interceptors(request, exception, wrapper)
-  raise exception unless wrapper.show?(request)
-  render_exception(request, exception, wrapper)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/DebugLocks.html b/src/classes/ActionDispatch/DebugLocks.html index 57cb7f1eba..f4041c9e23 100644 --- a/src/classes/ActionDispatch/DebugLocks.html +++ b/src/classes/ActionDispatch/DebugLocks.html @@ -105,23 +105,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/debug_locks.rb, line 28
+    def initialize(app, path = "/rails/locks")
+      @app = app
+      @path = path
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/debug_locks.rb, line 28
-def initialize(app, path = "/rails/locks")
-  @app = app
-  @path = path
-end
-
-
- - + See on GitHub + + + + @@ -145,31 +145,31 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/debug_locks.rb, line 33
+    def call(env)
+      req = ActionDispatch::Request.new env
+
+      if req.get?
+        path = req.path_info.chomp("/")
+        if path == @path
+          return render_details(req)
+        end
+      end
+
+      @app.call(env)
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/debug_locks.rb, line 33
-def call(env)
-  req = ActionDispatch::Request.new env
-
-  if req.get?
-    path = req.path_info.chomp("/")
-    if path == @path
-      return render_details(req)
-    end
-  end
-
-  @app.call(env)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/ExceptionWrapper.html b/src/classes/ActionDispatch/ExceptionWrapper.html index ace307d74a..804eb91332 100644 --- a/src/classes/ActionDispatch/ExceptionWrapper.html +++ b/src/classes/ActionDispatch/ExceptionWrapper.html @@ -242,29 +242,29 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 48
-def initialize(backtrace_cleaner, exception)
-  @backtrace_cleaner = backtrace_cleaner
-  @exception_class_name = exception.class.name
-  @wrapped_causes = wrapped_causes_for(exception, backtrace_cleaner)
-  @exception = exception
-  if exception.is_a?(SyntaxError)
-    @exception = ActiveSupport::SyntaxErrorProxy.new(exception)
-  end
-  @backtrace = build_backtrace
-end
-
-
- - + +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 48
+    def initialize(backtrace_cleaner, exception)
+      @backtrace_cleaner = backtrace_cleaner
+      @exception_class_name = exception.class.name
+      @wrapped_causes = wrapped_causes_for(exception, backtrace_cleaner)
+      @exception = exception
+      if exception.is_a?(SyntaxError)
+        @exception = ActiveSupport::SyntaxErrorProxy.new(exception)
+      end
+      @backtrace = build_backtrace
+    end
+ + See on GitHub + +
+ +

@@ -284,22 +284,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 173
+    def self.status_code_for_exception(class_name)
+      Rack::Utils.status_code(@@rescue_responses[class_name])
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 173
-def self.status_code_for_exception(class_name)
-  Rack::Utils.status_code(@@rescue_responses[class_name])
-end
-
-
- -

+ See on GitHub + + + + @@ -323,22 +323,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 99
+    def actions
+      ActiveSupport::ActionableError.actions(@exception)
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 99
-def actions
-  ActiveSupport::ActionableError.actions(@exception)
-end
-
-
- - + See on GitHub + + + +

@@ -358,26 +358,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 111
+    def annotated_source_code
+      if exception.respond_to?(:annotated_source_code)
+        exception.annotated_source_code
+      else
+        []
+      end
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 111
-def annotated_source_code
-  if exception.respond_to?(:annotated_source_code)
-    exception.annotated_source_code
-  else
-    []
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -397,22 +397,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 133
+    def application_trace
+      clean_backtrace(:silent)
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 133
-def application_trace
-  clean_backtrace(:silent)
-end
-
-
- -

+ See on GitHub + + + +

@@ -432,22 +432,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 87
+    def corrections
+      @exception.corrections
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 87
-def corrections
-  @exception.corrections
-end
-
-
- -

+ See on GitHub + + + +

@@ -467,23 +467,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 210
+    def error_highlight_available?
+      # ErrorHighlight.spot with backtrace_location keyword is available since error_highlight 0.4.0
+      defined?(ErrorHighlight) && Gem::Version.new(ErrorHighlight::VERSION) >= Gem::Version.new("0.4.0")
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 210
-def error_highlight_available?
-  # ErrorHighlight.spot with backtrace_location keyword is available since error_highlight 0.4.0
-  defined?(ErrorHighlight) && Gem::Version.new(ErrorHighlight::VERSION) >= Gem::Version.new("0.4.0")
-end
-
-
- -

+ See on GitHub + + + +

@@ -503,22 +503,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 239
+    def exception_id
+      exception.object_id
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 239
-def exception_id
-  exception.object_id
-end
-
-
- -

+ See on GitHub + + + +

@@ -538,22 +538,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 235
+    def exception_inspect
+      exception.inspect
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 235
-def exception_inspect
-  exception.inspect
-end
-
-
- -

+ See on GitHub + + + +

@@ -573,22 +573,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 227
+    def exception_name
+      exception.cause.class.to_s
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 227
-def exception_name
-  exception.cause.class.to_s
-end
-
-
- -

+ See on GitHub + + + +

@@ -608,24 +608,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 127
+    def exception_trace
+      trace = application_trace
+      trace = framework_trace if trace.empty? && !silent_exceptions.include?(@exception_class_name)
+      trace
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 127
-def exception_trace
-  trace = application_trace
-  trace = framework_trace if trace.empty? && !silent_exceptions.include?(@exception_class_name)
-  trace
-end
-
-
- -

+ See on GitHub + + + +

@@ -645,22 +645,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 75
+    def failures
+      @exception.failures
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 75
-def failures
-  @exception.failures
-end
-
-
- -

+ See on GitHub + + + +

@@ -680,22 +680,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 91
+    def file_name
+      @exception.file_name
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 91
-def file_name
-  @exception.file_name
-end
-
-
- -

+ See on GitHub + + + +

@@ -715,22 +715,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 137
+    def framework_trace
+      clean_backtrace(:noise)
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 137
-def framework_trace
-  clean_backtrace(:noise)
-end
-
-
- -

+ See on GitHub + + + +

@@ -750,22 +750,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 141
+    def full_trace
+      clean_backtrace(:all)
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 141
-def full_trace
-  clean_backtrace(:all)
-end
-
-
- -

+ See on GitHub + + + +

@@ -785,22 +785,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 71
+    def has_cause?
+      @exception.cause
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 71
-def has_cause?
-  @exception.cause
-end
-
-
- -

+ See on GitHub + + + +

@@ -820,22 +820,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 79
+    def has_corrections?
+      @exception.respond_to?(:original_message) && @exception.respond_to?(:corrections)
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 79
-def has_corrections?
-  @exception.respond_to?(:original_message) && @exception.respond_to?(:corrections)
-end
-
-
- -

+ See on GitHub + + + +

@@ -855,22 +855,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 95
+    def line_number
+      @exception.line_number
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 95
-def line_number
-  @exception.line_number
-end
-
-
- -

+ See on GitHub + + + +

@@ -890,22 +890,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 231
+    def message
+      exception.message
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 231
-def message
-  exception.message
-end
-
-
- -

+ See on GitHub + + + +

@@ -925,22 +925,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 83
+    def original_message
+      @exception.original_message
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 83
-def original_message
-  @exception.original_message
-end
-
-
- -

+ See on GitHub + + + +

@@ -960,22 +960,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 200
+    def rescue_response?
+      @@rescue_responses.key?(exception.class.name)
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 200
-def rescue_response?
-  @@rescue_responses.key?(exception.class.name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -995,22 +995,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 119
+    def rescue_template
+      @@rescue_templates[@exception_class_name]
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 119
-def rescue_template
-  @@rescue_templates[@exception_class_name]
-end
-
-
- -

+ See on GitHub + + + +

@@ -1030,22 +1030,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 59
+    def routing_error?
+      @exception.is_a?(ActionController::RoutingError)
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 59
-def routing_error?
-  @exception.is_a?(ActionController::RoutingError)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1065,41 +1065,41 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 177
-def show?(request)
-  # We're treating `nil` as "unset", and we want the default setting to be
-  # `:all`. This logic should be extracted to `env_config` and calculated
-  # once.
-  config = request.get_header("action_dispatch.show_exceptions")
+          
+            
+ + Source code + - # Include true and false for backwards compatibility. - case config - when :none - false - when :rescuable - rescue_response? - when true - ActionDispatch.deprecator.warn("Setting action_dispatch.show_exceptions to true is deprecated. Set to :all instead.") - true - when false - ActionDispatch.deprecator.warn("Setting action_dispatch.show_exceptions to false is deprecated. Set to :none instead.") - false - else - true - end -end
-
-
- -

+
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 177
+    def show?(request)
+      # We're treating `nil` as "unset", and we want the default setting to be
+      # `:all`. This logic should be extracted to `env_config` and calculated
+      # once.
+      config = request.get_header("action_dispatch.show_exceptions")
+
+      # Include true and false for backwards compatibility.
+      case config
+      when :none
+        false
+      when :rescuable
+        rescue_response?
+      when true
+        ActionDispatch.deprecator.warn("Setting action_dispatch.show_exceptions to true is deprecated. Set to :all instead.")
+        true
+      when false
+        ActionDispatch.deprecator.warn("Setting action_dispatch.show_exceptions to false is deprecated. Set to :none instead.")
+        false
+      else
+        true
+      end
+    end
+ + See on GitHub + + + +

@@ -1119,24 +1119,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 204
+    def source_extracts
+      backtrace.map do |trace|
+        extract_source(trace)
+      end
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 204
-def source_extracts
-  backtrace.map do |trace|
-    extract_source(trace)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1156,22 +1156,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 223
+    def source_to_show_id
+      (traces[trace_to_show].first || {})[:id]
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 223
-def source_to_show_id
-  (traces[trace_to_show].first || {})[:id]
-end
-
-
- -

+ See on GitHub + + + +

@@ -1191,22 +1191,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 123
+    def status_code
+      self.class.status_code_for_exception(unwrapped_exception.class.name)
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 123
-def status_code
-  self.class.status_code_for_exception(unwrapped_exception.class.name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1226,22 +1226,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 67
+    def sub_template_message
+      @exception.sub_template_message
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 67
-def sub_template_message
-  @exception.sub_template_message
-end
-
-
- -

+ See on GitHub + + + +

@@ -1261,22 +1261,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 63
+    def template_error?
+      @exception.is_a?(ActionView::Template::Error)
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 63
-def template_error?
-  @exception.is_a?(ActionView::Template::Error)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1296,26 +1296,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 215
+    def trace_to_show
+      if traces["Application Trace"].empty? && rescue_template != "routing_error"
+        "Full Trace"
+      else
+        "Application Trace"
+      end
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 215
-def trace_to_show
-  if traces["Application Trace"].empty? && rescue_template != "routing_error"
-    "Full Trace"
-  else
-    "Application Trace"
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1335,46 +1335,46 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 145
-def traces
-  application_trace_with_ids = []
-  framework_trace_with_ids = []
-  full_trace_with_ids = []
+          
+            
+ + Source code + - full_trace.each_with_index do |trace, idx| - trace_with_id = { - exception_object_id: @exception.object_id, - id: idx, - trace: trace - } +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 145
+    def traces
+      application_trace_with_ids = []
+      framework_trace_with_ids = []
+      full_trace_with_ids = []
 
-    if application_trace.include?(trace)
-      application_trace_with_ids << trace_with_id
-    else
-      framework_trace_with_ids << trace_with_id
-    end
+      full_trace.each_with_index do |trace, idx|
+        trace_with_id = {
+          exception_object_id: @exception.object_id,
+          id: idx,
+          trace: trace
+        }
 
-    full_trace_with_ids << trace_with_id
-  end
+        if application_trace.include?(trace)
+          application_trace_with_ids << trace_with_id
+        else
+          framework_trace_with_ids << trace_with_id
+        end
 
-  {
-    "Application Trace" => application_trace_with_ids,
-    "Framework Trace" => framework_trace_with_ids,
-    "Full Trace" => full_trace_with_ids
-  }
-end
-
-
- -

+ full_trace_with_ids << trace_with_id + end + + { + "Application Trace" => application_trace_with_ids, + "Framework Trace" => framework_trace_with_ids, + "Full Trace" => full_trace_with_ids + } + end + + See on GitHub + + + +

@@ -1394,26 +1394,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 103
+    def unwrapped_exception
+      if wrapper_exceptions.include?(@exception_class_name)
+        @exception.cause
+      else
+        @exception
+      end
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 103
-def unwrapped_exception
-  if wrapper_exceptions.include?(@exception_class_name)
-    @exception.cause
-  else
-    @exception
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Executor.html b/src/classes/ActionDispatch/Executor.html index 79b5d16fda..c22a52a333 100644 --- a/src/classes/ActionDispatch/Executor.html +++ b/src/classes/ActionDispatch/Executor.html @@ -84,22 +84,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/executor.rb, line 7
+    def initialize(app, executor)
+      @app, @executor = app, executor
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/executor.rb, line 7
-def initialize(app, executor)
-  @app, @executor = app, executor
-end
-
-
- - + See on GitHub + + + + @@ -123,31 +123,31 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/executor.rb, line 11
+    def call(env)
+      state = @executor.run!(reset: true)
+      begin
+        response = @app.call(env)
+        returned = response << ::Rack::BodyProxy.new(response.pop) { state.complete! }
+      rescue => error
+        @executor.error_reporter.report(error, handled: false, source: "application.action_dispatch")
+        raise
+      ensure
+        state.complete! unless returned
+      end
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/executor.rb, line 11
-def call(env)
-  state = @executor.run!(reset: true)
-  begin
-    response = @app.call(env)
-    returned = response << ::Rack::BodyProxy.new(response.pop) { state.complete! }
-  rescue => error
-    @executor.error_reporter.report(error, handled: false, source: "application.action_dispatch")
-    raise
-  ensure
-    state.complete! unless returned
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/FileHandler.html b/src/classes/ActionDispatch/FileHandler.html index b270e652a4..b1958c0c1a 100644 --- a/src/classes/ActionDispatch/FileHandler.html +++ b/src/classes/ActionDispatch/FileHandler.html @@ -126,28 +126,28 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/static.rb, line 53
+    def initialize(root, index: "index", headers: {}, precompressed: %i[ br gzip ], compressible_content_types: /\A(?:text\/|application\/javascript)/)
+      @root = root.chomp("/").b
+      @index = index
+
+      @precompressed = Array(precompressed).map(&:to_s) | %w[ identity ]
+      @compressible_content_types = compressible_content_types
+
+      @file_server = ::Rack::Files.new(@root, headers)
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/static.rb, line 53
-def initialize(root, index: "index", headers: {}, precompressed: %i[ br gzip ], compressible_content_types: /\A(?:text\/|application\/javascript)/)
-  @root = root.chomp("/").b
-  @index = index
-
-  @precompressed = Array(precompressed).map(&:to_s) | %w[ identity ]
-  @compressible_content_types = compressible_content_types
-
-  @file_server = ::Rack::Files.new(@root, headers)
-end
-
-
- - + See on GitHub + + + + @@ -171,28 +171,28 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/static.rb, line 67
+    def attempt(env)
+      request = Rack::Request.new env
+
+      if request.get? || request.head?
+        if found = find_file(request.path_info, accept_encoding: request.accept_encoding)
+          serve request, *found
+        end
+      end
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/static.rb, line 67
-def attempt(env)
-  request = Rack::Request.new env
-
-  if request.get? || request.head?
-    if found = find_file(request.path_info, accept_encoding: request.accept_encoding)
-      serve request, *found
-    end
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -212,22 +212,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/static.rb, line 63
+    def call(env)
+      attempt(env) || @file_server.call(env)
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/static.rb, line 63
-def call(env)
-  attempt(env) || @file_server.call(env)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Flash.html b/src/classes/ActionDispatch/Flash.html index 2434eebc67..a7dda06843 100644 --- a/src/classes/ActionDispatch/Flash.html +++ b/src/classes/ActionDispatch/Flash.html @@ -158,20 +158,20 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 300
+    def self.new(app) app; end
- -
-
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 300
-def self.new(app) app; end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Flash/FlashHash.html b/src/classes/ActionDispatch/Flash/FlashHash.html index d74992ce74..ed1b06715d 100644 --- a/src/classes/ActionDispatch/Flash/FlashHash.html +++ b/src/classes/ActionDispatch/Flash/FlashHash.html @@ -167,22 +167,22 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 162
-def [](k)
-  @flashes[k.to_s]
-end
-
-
- - + +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 162
+      def [](k)
+        @flashes[k.to_s]
+      end
+ + See on GitHub + +
+ +

@@ -202,24 +202,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 156
+      def []=(k, v)
+        k = k.to_s
+        @discard.delete k
+        @flashes[k] = v
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 156
-def []=(k, v)
-  k = k.to_s
-  @discard.delete k
-  @flashes[k] = v
-end
-
-
- -

+ See on GitHub + + + +

@@ -239,22 +239,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 268
+      def alert
+        self[:alert]
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 268
-def alert
-  self[:alert]
-end
-
-
- -

+ See on GitHub + + + +

@@ -274,22 +274,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 273
+      def alert=(message)
+        self[:alert] = message
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 273
-def alert=(message)
-  self[:alert] = message
-end
-
-
- -

+ See on GitHub + + + +

@@ -309,23 +309,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 197
+      def clear
+        @discard.clear
+        @flashes.clear
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 197
-def clear
-  @discard.clear
-  @flashes.clear
-end
-
-
- -

+ See on GitHub + + + +

@@ -345,25 +345,25 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 182
+      def delete(key)
+        key = key.to_s
+        @discard.delete key
+        @flashes.delete key
+        self
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 182
-def delete(key)
-  key = key.to_s
-  @discard.delete key
-  @flashes.delete key
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -389,24 +389,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 253
+      def discard(k = nil)
+        k = k.to_s if k
+        @discard.merge Array(k || keys)
+        k ? self[k] : self
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 253
-def discard(k = nil)
-  k = k.to_s if k
-  @discard.merge Array(k || keys)
-  k ? self[k] : self
-end
-
-
- -

+ See on GitHub + + + +

@@ -426,22 +426,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 202
+      def each(&block)
+        @flashes.each(&block)
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 202
-def each(&block)
-  @flashes.each(&block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -461,22 +461,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 193
+      def empty?
+        @flashes.empty?
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 193
-def empty?
-  @flashes.empty?
-end
-
-
- -

+ See on GitHub + + + +

@@ -496,26 +496,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 148
+      def initialize_copy(other)
+        if other.now_is_loaded?
+          @now = other.now.dup
+          @now.flash = self
+        end
+        super
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 148
-def initialize_copy(other)
-  if other.now_is_loaded?
-    @now = other.now.dup
-    @now.flash = self
-  end
-  super
-end
-
-
- -

+ See on GitHub + + + +

@@ -539,24 +539,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 240
+      def keep(k = nil)
+        k = k.to_s if k
+        @discard.subtract Array(k || keys)
+        k ? self[k] : self
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 240
-def keep(k = nil)
-  k = k.to_s if k
-  @discard.subtract Array(k || keys)
-  k ? self[k] : self
-end
-
-
- -

+ See on GitHub + + + +

@@ -576,22 +576,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 176
+      def key?(name)
+        @flashes.key? name.to_s
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 176
-def key?(name)
-  @flashes.key? name.to_s
-end
-
-
- -

+ See on GitHub + + + +

@@ -611,22 +611,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 172
+      def keys
+        @flashes.keys
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 172
-def keys
-  @flashes.keys
-end
-
-
- -

+ See on GitHub + + + +

@@ -646,22 +646,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 278
+      def notice
+        self[:notice]
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 278
-def notice
-  self[:notice]
-end
-
-
- -

+ See on GitHub + + + +

@@ -681,22 +681,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 283
+      def notice=(message)
+        self[:notice] = message
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 283
-def notice=(message)
-  self[:notice] = message
-end
-
-
- -

+ See on GitHub + + + +

@@ -732,22 +732,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 232
+      def now
+        @now ||= FlashNow.new(self)
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 232
-def now
-  @now ||= FlashNow.new(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -767,22 +767,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 189
+      def to_hash
+        @flashes.dup
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 189
-def to_hash
-  @flashes.dup
-end
-
-
- -

+ See on GitHub + + + +

Instance Protected methods

@@ -805,22 +805,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 288
+        def now_is_loaded?
+          @now
+        end
- -
-
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 288
-def now_is_loaded?
-  @now
-end
-
-
- - + See on GitHub + + + +

Instance Private methods

@@ -843,24 +843,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 293
+        def stringify_array(array) # :doc:
+          array.map do |item|
+            item.kind_of?(Symbol) ? item.to_s : item
+          end
+        end
- -
-
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 293
-def stringify_array(array) # :doc:
-  array.map do |item|
-    item.kind_of?(Symbol) ? item.to_s : item
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Flash/RequestMethods.html b/src/classes/ActionDispatch/Flash/RequestMethods.html index 93c96787bf..378ce89a82 100644 --- a/src/classes/ActionDispatch/Flash/RequestMethods.html +++ b/src/classes/ActionDispatch/Flash/RequestMethods.html @@ -81,24 +81,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 50
+      def flash
+        flash = flash_hash
+        return flash if flash
+        self.flash = Flash::FlashHash.from_session_value(session["flash"])
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 50
-def flash
-  flash = flash_hash
-  return flash if flash
-  self.flash = Flash::FlashHash.from_session_value(session["flash"])
-end
-
-
- - + See on GitHub + + + +

@@ -118,22 +118,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 56
+      def flash=(flash)
+        set_header Flash::KEY, flash
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/flash.rb, line 56
-def flash=(flash)
-  set_header Flash::KEY, flash
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/HostAuthorization.html b/src/classes/ActionDispatch/HostAuthorization.html index 0babef6459..063a7d5744 100644 --- a/src/classes/ActionDispatch/HostAuthorization.html +++ b/src/classes/ActionDispatch/HostAuthorization.html @@ -119,26 +119,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/host_authorization.rb, line 125
+    def initialize(app, hosts, exclude: nil, response_app: nil)
+      @app = app
+      @permissions = Permissions.new(hosts)
+      @exclude = exclude
+
+      @response_app = response_app || DefaultResponseApp.new
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/host_authorization.rb, line 125
-def initialize(app, hosts, exclude: nil, response_app: nil)
-  @app = app
-  @permissions = Permissions.new(hosts)
-  @exclude = exclude
-
-  @response_app = response_app || DefaultResponseApp.new
-end
-
-
- - + See on GitHub + + + + @@ -162,33 +162,33 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/host_authorization.rb, line 133
+    def call(env)
+      return @app.call(env) if @permissions.empty?
+
+      request = Request.new(env)
+      hosts = blocked_hosts(request)
+
+      if hosts.empty? || excluded?(request)
+        mark_as_authorized(request)
+        @app.call(env)
+      else
+        env["action_dispatch.blocked_hosts"] = hosts
+        @response_app.call(env)
+      end
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/host_authorization.rb, line 133
-def call(env)
-  return @app.call(env) if @permissions.empty?
-
-  request = Request.new(env)
-  hosts = blocked_hosts(request)
-
-  if hosts.empty? || excluded?(request)
-    mark_as_authorized(request)
-    @app.call(env)
-  else
-    env["action_dispatch.blocked_hosts"] = hosts
-    @response_app.call(env)
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Http/Cache/Request.html b/src/classes/ActionDispatch/Http/Cache/Request.html index 1244475836..7382d852be 100644 --- a/src/classes/ActionDispatch/Http/Cache/Request.html +++ b/src/classes/ActionDispatch/Http/Cache/Request.html @@ -125,25 +125,25 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/cache.rb, line 28
+        def etag_matches?(etag)
+          if etag
+            validators = if_none_match_etags
+            validators.include?(etag) || validators.include?("*")
+          end
+        end
- -
-
# File actionpack/lib/action_dispatch/http/cache.rb, line 28
-def etag_matches?(etag)
-  if etag
-    validators = if_none_match_etags
-    validators.include?(etag) || validators.include?("*")
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -163,30 +163,30 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/cache.rb, line 38
+        def fresh?(response)
+          last_modified = if_modified_since
+          etag          = if_none_match
+
+          return false unless last_modified || etag
+
+          success = true
+          success &&= not_modified?(response.last_modified) if last_modified
+          success &&= etag_matches?(response.etag) if etag
+          success
+        end
- -
-
# File actionpack/lib/action_dispatch/http/cache.rb, line 38
-def fresh?(response)
-  last_modified = if_modified_since
-  etag          = if_none_match
-
-  return false unless last_modified || etag
-
-  success = true
-  success &&= not_modified?(response.last_modified) if last_modified
-  success &&= etag_matches?(response.etag) if etag
-  success
-end
-
-
- -

+ See on GitHub + + + +

@@ -206,24 +206,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/cache.rb, line 10
+        def if_modified_since
+          if since = get_header(HTTP_IF_MODIFIED_SINCE)
+            Time.rfc2822(since) rescue nil
+          end
+        end
- -
-
# File actionpack/lib/action_dispatch/http/cache.rb, line 10
-def if_modified_since
-  if since = get_header(HTTP_IF_MODIFIED_SINCE)
-    Time.rfc2822(since) rescue nil
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -243,22 +243,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/cache.rb, line 16
+        def if_none_match
+          get_header HTTP_IF_NONE_MATCH
+        end
- -
-
# File actionpack/lib/action_dispatch/http/cache.rb, line 16
-def if_none_match
-  get_header HTTP_IF_NONE_MATCH
-end
-
-
- -

+ See on GitHub + + + +

@@ -278,22 +278,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/cache.rb, line 20
+        def if_none_match_etags
+          if_none_match ? if_none_match.split(",").each(&:strip!) : []
+        end
- -
-
# File actionpack/lib/action_dispatch/http/cache.rb, line 20
-def if_none_match_etags
-  if_none_match ? if_none_match.split(",").each(&:strip!) : []
-end
-
-
- -

+ See on GitHub + + + +

@@ -313,22 +313,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/cache.rb, line 24
+        def not_modified?(modified_at)
+          if_modified_since && modified_at && if_modified_since >= modified_at
+        end
- -
-
# File actionpack/lib/action_dispatch/http/cache.rb, line 24
-def not_modified?(modified_at)
-  if_modified_since && modified_at && if_modified_since >= modified_at
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Http/Cache/Response.html b/src/classes/ActionDispatch/Http/Cache/Response.html index ac4f9aa30f..3d39afe18a 100644 --- a/src/classes/ActionDispatch/Http/Cache/Response.html +++ b/src/classes/ActionDispatch/Http/Cache/Response.html @@ -247,24 +247,24 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/http/cache.rb, line 68
-def date
-  if date_header = get_header(DATE)
-    Time.httpdate(date_header)
-  end
-end
-
-
- - + +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/cache.rb, line 68
+        def date
+          if date_header = get_header(DATE)
+            Time.httpdate(date_header)
+          end
+        end
+ + See on GitHub + +
+ +

@@ -284,22 +284,22 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/http/cache.rb, line 78
-def date=(utc_time)
-  set_header DATE, utc_time.httpdate
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/cache.rb, line 78
+        def date=(utc_time)
+          set_header DATE, utc_time.httpdate
+        end
+ + See on GitHub + +
+ +

@@ -319,22 +319,22 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/http/cache.rb, line 74
-def date?
-  has_header? DATE
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/cache.rb, line 74
+        def date?
+          has_header? DATE
+        end
+ + See on GitHub + +
+ +

@@ -360,22 +360,22 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/http/cache.rb, line 101
-def etag=(weak_validators)
-  self.weak_etag = weak_validators
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/cache.rb, line 101
+        def etag=(weak_validators)
+          self.weak_etag = weak_validators
+        end
+ + See on GitHub + +
+ +

@@ -395,20 +395,20 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/http/cache.rb, line 113
-def etag?; etag; end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/cache.rb, line 113
+        def etag?; etag; end
+ + See on GitHub + +
+ +

@@ -428,24 +428,24 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/http/cache.rb, line 54
-def last_modified
-  if last = get_header(LAST_MODIFIED)
-    Time.httpdate(last)
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/cache.rb, line 54
+        def last_modified
+          if last = get_header(LAST_MODIFIED)
+            Time.httpdate(last)
+          end
+        end
+ + See on GitHub + +
+ +

@@ -465,22 +465,22 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/http/cache.rb, line 64
-def last_modified=(utc_time)
-  set_header LAST_MODIFIED, utc_time.httpdate
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/cache.rb, line 64
+        def last_modified=(utc_time)
+          set_header LAST_MODIFIED, utc_time.httpdate
+        end
+ + See on GitHub + +
+ +

@@ -500,22 +500,22 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/http/cache.rb, line 60
-def last_modified?
-  has_header? LAST_MODIFIED
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/cache.rb, line 60
+        def last_modified?
+          has_header? LAST_MODIFIED
+        end
+ + See on GitHub + +
+ +

@@ -535,22 +535,22 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/http/cache.rb, line 109
-def strong_etag=(strong_validators)
-  set_header "ETag", generate_strong_etag(strong_validators)
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/cache.rb, line 109
+        def strong_etag=(strong_validators)
+          set_header "ETag", generate_strong_etag(strong_validators)
+        end
+ + See on GitHub + +
+ +

@@ -570,22 +570,22 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/http/cache.rb, line 121
-def strong_etag?
-  etag? && !weak_etag?
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/cache.rb, line 121
+        def strong_etag?
+          etag? && !weak_etag?
+        end
+ + See on GitHub + +
+ +

@@ -605,22 +605,22 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/http/cache.rb, line 105
-def weak_etag=(weak_validators)
-  set_header "ETag", generate_weak_etag(weak_validators)
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/cache.rb, line 105
+        def weak_etag=(weak_validators)
+          set_header "ETag", generate_weak_etag(weak_validators)
+        end
+ + See on GitHub + +
+ +

@@ -640,22 +640,22 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/http/cache.rb, line 116
-def weak_etag?
-  etag? && etag.start_with?('W/"')
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/cache.rb, line 116
+        def weak_etag?
+          etag? && etag.start_with?('W/"')
+        end
+ + See on GitHub + +
+ + diff --git a/src/classes/ActionDispatch/Http/FilterParameters.html b/src/classes/ActionDispatch/Http/FilterParameters.html index ee65fe0e9e..ad9bf3f4ce 100644 --- a/src/classes/ActionDispatch/Http/FilterParameters.html +++ b/src/classes/ActionDispatch/Http/FilterParameters.html @@ -146,26 +146,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/filter_parameters.rb, line 21
+      def initialize
+        super
+        @filtered_parameters = nil
+        @filtered_env        = nil
+        @filtered_path       = nil
+        @parameter_filter    = nil
+      end
- -
-
# File actionpack/lib/action_dispatch/http/filter_parameters.rb, line 21
-def initialize
-  super
-  @filtered_parameters = nil
-  @filtered_env        = nil
-  @filtered_path       = nil
-  @parameter_filter    = nil
-end
-
-
- - + See on GitHub + + + + @@ -189,22 +189,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/filter_parameters.rb, line 37
+      def filtered_env
+        @filtered_env ||= env_filter.filter(@env)
+      end
- -
-
# File actionpack/lib/action_dispatch/http/filter_parameters.rb, line 37
-def filtered_env
-  @filtered_env ||= env_filter.filter(@env)
-end
-
-
- - + See on GitHub + + + +

@@ -224,24 +224,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/filter_parameters.rb, line 30
+      def filtered_parameters
+        @filtered_parameters ||= parameter_filter.filter(parameters)
+      rescue ActionDispatch::Http::Parameters::ParseError
+        @filtered_parameters = {}
+      end
- -
-
# File actionpack/lib/action_dispatch/http/filter_parameters.rb, line 30
-def filtered_parameters
-  @filtered_parameters ||= parameter_filter.filter(parameters)
-rescue ActionDispatch::Http::Parameters::ParseError
-  @filtered_parameters = {}
-end
-
-
- -

+ See on GitHub + + + +

@@ -261,22 +261,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/filter_parameters.rb, line 42
+      def filtered_path
+        @filtered_path ||= query_string.empty? ? path : "#{path}?#{filtered_query_string}"
+      end
- -
-
# File actionpack/lib/action_dispatch/http/filter_parameters.rb, line 42
-def filtered_path
-  @filtered_path ||= query_string.empty? ? path : "#{path}?#{filtered_query_string}"
-end
-
-
- -

+ See on GitHub + + + +

@@ -296,26 +296,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/filter_parameters.rb, line 47
+      def parameter_filter
+        @parameter_filter ||= if has_header?("action_dispatch.parameter_filter")
+          parameter_filter_for get_header("action_dispatch.parameter_filter")
+        else
+          NULL_PARAM_FILTER
+        end
+      end
- -
-
# File actionpack/lib/action_dispatch/http/filter_parameters.rb, line 47
-def parameter_filter
-  @parameter_filter ||= if has_header?("action_dispatch.parameter_filter")
-    parameter_filter_for get_header("action_dispatch.parameter_filter")
-  else
-    NULL_PARAM_FILTER
-  end
-end
-
-
- -

+ See on GitHub + + + +

Instance Private methods

@@ -338,25 +338,25 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/filter_parameters.rb, line 56
+      def env_filter # :doc:
+        user_key = fetch_header("action_dispatch.parameter_filter") {
+          return NULL_ENV_FILTER
+        }
+        parameter_filter_for(Array(user_key) + ENV_MATCH)
+      end
- -
-
# File actionpack/lib/action_dispatch/http/filter_parameters.rb, line 56
-def env_filter # :doc:
-  user_key = fetch_header("action_dispatch.parameter_filter") {
-    return NULL_ENV_FILTER
-  }
-  parameter_filter_for(Array(user_key) + ENV_MATCH)
-end
-
-
- - + See on GitHub + + + +

@@ -376,24 +376,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/filter_parameters.rb, line 69
+      def filtered_query_string # :doc:
+        query_string.gsub(PAIR_RE) do |_|
+          parameter_filter.filter($1 => $2).first.join("=")
+        end
+      end
- -
-
# File actionpack/lib/action_dispatch/http/filter_parameters.rb, line 69
-def filtered_query_string # :doc:
-  query_string.gsub(PAIR_RE) do |_|
-    parameter_filter.filter($1 => $2).first.join("=")
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -413,22 +413,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/filter_parameters.rb, line 63
+      def parameter_filter_for(filters) # :doc:
+        ActiveSupport::ParameterFilter.new(filters)
+      end
- -
-
# File actionpack/lib/action_dispatch/http/filter_parameters.rb, line 63
-def parameter_filter_for(filters) # :doc:
-  ActiveSupport::ParameterFilter.new(filters)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Http/Headers.html b/src/classes/ActionDispatch/Http/Headers.html index 4bace6b43c..856ea32edf 100644 --- a/src/classes/ActionDispatch/Http/Headers.html +++ b/src/classes/ActionDispatch/Http/Headers.html @@ -208,22 +208,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/headers.rb, line 52
+      def self.from_hash(hash)
+        new ActionDispatch::Request.new hash
+      end
- -
-
# File actionpack/lib/action_dispatch/http/headers.rb, line 52
-def self.from_hash(hash)
-  new ActionDispatch::Request.new hash
-end
-
-
- - + See on GitHub + + + + @@ -247,22 +247,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/headers.rb, line 61
+      def [](key)
+        @req.get_header env_name(key)
+      end
- -
-
# File actionpack/lib/action_dispatch/http/headers.rb, line 61
-def [](key)
-  @req.get_header env_name(key)
-end
-
-
- - + See on GitHub + + + +

@@ -282,22 +282,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/headers.rb, line 66
+      def []=(key, value)
+        @req.set_header env_name(key), value
+      end
- -
-
# File actionpack/lib/action_dispatch/http/headers.rb, line 66
-def []=(key, value)
-  @req.set_header env_name(key), value
-end
-
-
- -

+ See on GitHub + + + +

@@ -317,22 +317,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/headers.rb, line 71
+      def add(key, value)
+        @req.add_header env_name(key), value
+      end
- -
-
# File actionpack/lib/action_dispatch/http/headers.rb, line 71
-def add(key, value)
-  @req.add_header env_name(key), value
-end
-
-
- -

+ See on GitHub + + + +

@@ -352,22 +352,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/headers.rb, line 97
+      def each(&block)
+        @req.each_header(&block)
+      end
- -
-
# File actionpack/lib/action_dispatch/http/headers.rb, line 97
-def each(&block)
-  @req.each_header(&block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -387,20 +387,20 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/headers.rb, line 118
+      def env; @req.env.dup; end
- -
-
# File actionpack/lib/action_dispatch/http/headers.rb, line 118
-def env; @req.env.dup; end
-
-
- -

+ See on GitHub + + + +

@@ -424,26 +424,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/headers.rb, line 89
+      def fetch(key, default = DEFAULT)
+        @req.fetch_header(env_name(key)) do
+          return default unless default == DEFAULT
+          return yield if block_given?
+          raise KeyError, key
+        end
+      end
- -
-
# File actionpack/lib/action_dispatch/http/headers.rb, line 89
-def fetch(key, default = DEFAULT)
-  @req.fetch_header(env_name(key)) do
-    return default unless default == DEFAULT
-    return yield if block_given?
-    raise KeyError, key
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -467,7 +467,8 @@

-

+ +

@@ -491,22 +492,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/headers.rb, line 75
+      def key?(key)
+        @req.has_header? env_name(key)
+      end
- -
-
# File actionpack/lib/action_dispatch/http/headers.rb, line 75
-def key?(key)
-  @req.has_header? env_name(key)
-end
-
-
- -

+ See on GitHub + + + +

@@ -526,24 +527,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/headers.rb, line 103
+      def merge(headers_or_env)
+        headers = @req.dup.headers
+        headers.merge!(headers_or_env)
+        headers
+      end
- -
-
# File actionpack/lib/action_dispatch/http/headers.rb, line 103
-def merge(headers_or_env)
-  headers = @req.dup.headers
-  headers.merge!(headers_or_env)
-  headers
-end
-
-
- -

+ See on GitHub + + + +

@@ -563,24 +564,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/headers.rb, line 112
+      def merge!(headers_or_env)
+        headers_or_env.each do |key, value|
+          @req.set_header env_name(key), value
+        end
+      end
- -
-
# File actionpack/lib/action_dispatch/http/headers.rb, line 112
-def merge!(headers_or_env)
-  headers_or_env.each do |key, value|
-    @req.set_header env_name(key), value
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Http/MimeNegotiation.html b/src/classes/ActionDispatch/Http/MimeNegotiation.html index 9fd885faa8..c9a9b7a775 100644 --- a/src/classes/ActionDispatch/Http/MimeNegotiation.html +++ b/src/classes/ActionDispatch/Http/MimeNegotiation.html @@ -165,33 +165,33 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_negotiation.rb, line 54
+      def accepts
+        fetch_header("action_dispatch.request.accepts") do |k|
+          header = get_header("HTTP_ACCEPT").to_s.strip
+
+          v = if header.empty?
+            [content_mime_type]
+          else
+            Mime::Type.parse(header)
+          end
+          set_header k, v
+        rescue ::Mime::Type::InvalidMimeType => e
+          raise InvalidType, e.message
+        end
+      end
- -
-
# File actionpack/lib/action_dispatch/http/mime_negotiation.rb, line 54
-def accepts
-  fetch_header("action_dispatch.request.accepts") do |k|
-    header = get_header("HTTP_ACCEPT").to_s.strip
-
-    v = if header.empty?
-      [content_mime_type]
-    else
-      Mime::Type.parse(header)
-    end
-    set_header k, v
-  rescue ::Mime::Type::InvalidMimeType => e
-    raise InvalidType, e.message
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -211,31 +211,31 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_negotiation.rb, line 36
+      def content_mime_type
+        fetch_header("action_dispatch.request.content_type") do |k|
+          v = if get_header("CONTENT_TYPE") =~ /^([^,;]*)/
+            Mime::Type.lookup($1.strip.downcase)
+          else
+            nil
+          end
+          set_header k, v
+        rescue ::Mime::Type::InvalidMimeType => e
+          raise InvalidType, e.message
+        end
+      end
- -
-
# File actionpack/lib/action_dispatch/http/mime_negotiation.rb, line 36
-def content_mime_type
-  fetch_header("action_dispatch.request.content_type") do |k|
-    v = if get_header("CONTENT_TYPE") =~ /^([^,;]*)/
-      Mime::Type.lookup($1.strip.downcase)
-    else
-      nil
-    end
-    set_header k, v
-  rescue ::Mime::Type::InvalidMimeType => e
-    raise InvalidType, e.message
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -260,22 +260,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_negotiation.rb, line 75
+      def format(_view_path = nil)
+        formats.first || Mime::NullType.instance
+      end
- -
-
# File actionpack/lib/action_dispatch/http/mime_negotiation.rb, line 75
-def format(_view_path = nil)
-  formats.first || Mime::NullType.instance
-end
-
-
- -

+ See on GitHub + + + +

@@ -305,23 +305,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_negotiation.rb, line 127
+      def format=(extension)
+        parameters[:format] = extension.to_s
+        set_header "action_dispatch.request.formats", [Mime::Type.lookup_by_extension(parameters[:format])]
+      end
- -
-
# File actionpack/lib/action_dispatch/http/mime_negotiation.rb, line 127
-def format=(extension)
-  parameters[:format] = extension.to_s
-  set_header "action_dispatch.request.formats", [Mime::Type.lookup_by_extension(parameters[:format])]
-end
-
-
- -

+ See on GitHub + + + +

@@ -341,40 +341,40 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_negotiation.rb, line 79
+      def formats
+        fetch_header("action_dispatch.request.formats") do |k|
+          v = if params_readable?
+            Array(Mime[parameters[:format]])
+          elsif use_accept_header && valid_accept_header
+            accepts.dup
+          elsif extension_format = format_from_path_extension
+            [extension_format]
+          elsif xhr?
+            [Mime[:js]]
+          else
+            [Mime[:html]]
+          end
+
+          v.select! do |format|
+            format.symbol || format.ref == "*/*"
+          end
+
+          set_header k, v
+        end
+      end
- -
-
# File actionpack/lib/action_dispatch/http/mime_negotiation.rb, line 79
-def formats
-  fetch_header("action_dispatch.request.formats") do |k|
-    v = if params_readable?
-      Array(Mime[parameters[:format]])
-    elsif use_accept_header && valid_accept_header
-      accepts.dup
-    elsif extension_format = format_from_path_extension
-      [extension_format]
-    elsif xhr?
-      [Mime[:js]]
-    else
-      [Mime[:html]]
-    end
-
-    v.select! do |format|
-      format.symbol || format.ref == "*/*"
-    end
-
-    set_header k, v
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -406,25 +406,25 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_negotiation.rb, line 146
+      def formats=(extensions)
+        parameters[:format] = extensions.first.to_s
+        set_header "action_dispatch.request.formats", extensions.collect { |extension|
+          Mime::Type.lookup_by_extension(extension)
+        }
+      end
- -
-
# File actionpack/lib/action_dispatch/http/mime_negotiation.rb, line 146
-def formats=(extensions)
-  parameters[:format] = extensions.first.to_s
-  set_header "action_dispatch.request.formats", extensions.collect { |extension|
-    Mime::Type.lookup_by_extension(extension)
-  }
-end
-
-
- -

+ See on GitHub + + + +

@@ -444,30 +444,30 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_negotiation.rb, line 154
+      def negotiate_mime(order)
+        formats.each do |priority|
+          if priority == Mime::ALL
+            return order.first
+          elsif order.include?(priority)
+            return priority
+          end
+        end
+
+        order.include?(Mime::ALL) ? format : nil
+      end
- -
-
# File actionpack/lib/action_dispatch/http/mime_negotiation.rb, line 154
-def negotiate_mime(order)
-  formats.each do |priority|
-    if priority == Mime::ALL
-      return order.first
-    elsif order.include?(priority)
-      return priority
-    end
-  end
-
-  order.include?(Mime::ALL) ? format : nil
-end
-
-
- -

+ See on GitHub + + + +

@@ -487,25 +487,25 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_negotiation.rb, line 27
+        def return_only_media_type_on_content_type
+          ActionDispatch.deprecator.warn(
+            "`config.action_dispatch.return_only_request_media_type_on_content_type` is deprecated and will" \
+            " be removed in Rails 7.2."
+          )
+        end
- -
-
# File actionpack/lib/action_dispatch/http/mime_negotiation.rb, line 27
-def return_only_media_type_on_content_type
-  ActionDispatch.deprecator.warn(
-    "`config.action_dispatch.return_only_request_media_type_on_content_type` is deprecated and will" \
-    " be removed in Rails 7.2."
-  )
-end
-
-
- -

+ See on GitHub + + + +

@@ -525,25 +525,25 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_negotiation.rb, line 20
+        def return_only_media_type_on_content_type=(value)
+          ActionDispatch.deprecator.warn(
+            "`config.action_dispatch.return_only_request_media_type_on_content_type` is deprecated and will" \
+              " be removed in Rails 7.2."
+          )
+        end
- -
-
# File actionpack/lib/action_dispatch/http/mime_negotiation.rb, line 20
-def return_only_media_type_on_content_type=(value)
-  ActionDispatch.deprecator.warn(
-    "`config.action_dispatch.return_only_request_media_type_on_content_type` is deprecated and will" \
-      " be removed in Rails 7.2."
-  )
-end
-
-
- -

+ See on GitHub + + + +

@@ -563,22 +563,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_negotiation.rb, line 166
+      def should_apply_vary_header?
+        !params_readable? && use_accept_header && valid_accept_header
+      end
- -
-
# File actionpack/lib/action_dispatch/http/mime_negotiation.rb, line 166
-def should_apply_vary_header?
-  !params_readable? && use_accept_header && valid_accept_header
-end
-
-
- -

+ See on GitHub + + + +

@@ -598,22 +598,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_negotiation.rb, line 112
+      def variant
+        @variant ||= ActiveSupport::ArrayInquirer.new
+      end
- -
-
# File actionpack/lib/action_dispatch/http/mime_negotiation.rb, line 112
-def variant
-  @variant ||= ActiveSupport::ArrayInquirer.new
-end
-
-
- -

+ See on GitHub + + + +

@@ -633,28 +633,28 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_negotiation.rb, line 102
+      def variant=(variant)
+        variant = Array(variant)
+
+        if variant.all?(Symbol)
+          @variant = ActiveSupport::ArrayInquirer.new(variant)
+        else
+          raise ArgumentError, "request.variant must be set to a Symbol or an Array of Symbols."
+        end
+      end
- -
-
# File actionpack/lib/action_dispatch/http/mime_negotiation.rb, line 102
-def variant=(variant)
-  variant = Array(variant)
-
-  if variant.all?(Symbol)
-    @variant = ActiveSupport::ArrayInquirer.new(variant)
-  else
-    raise ArgumentError, "request.variant must be set to a Symbol or an Array of Symbols."
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Http/ParameterFilter.html b/src/classes/ActionDispatch/Http/ParameterFilter.html deleted file mode 100644 index 5d5fae4009..0000000000 --- a/src/classes/ActionDispatch/Http/ParameterFilter.html +++ /dev/null @@ -1,149 +0,0 @@ ---- -title: ActionDispatch::Http::ParameterFilter -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - new(filters = []) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/action_dispatch/http/parameter_filter.rb, line 10
-def initialize(filters = [])
-  @filters = filters
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - filter(params) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/action_dispatch/http/parameter_filter.rb, line 14
-def filter(params)
-  compiled_filter.call(params)
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActionDispatch/Http/Parameters.html b/src/classes/ActionDispatch/Http/Parameters.html index 934e96212e..c01a744b25 100644 --- a/src/classes/ActionDispatch/Http/Parameters.html +++ b/src/classes/ActionDispatch/Http/Parameters.html @@ -156,32 +156,32 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/parameters.rb, line 50
+      def parameters
+        params = get_header("action_dispatch.request.parameters")
+        return params if params
+
+        params = begin
+                   request_parameters.merge(query_parameters)
+                 rescue EOFError
+                   query_parameters.dup
+                 end
+        params.merge!(path_parameters)
+        set_header("action_dispatch.request.parameters", params)
+        params
+      end
- -
-
# File actionpack/lib/action_dispatch/http/parameters.rb, line 50
-def parameters
-  params = get_header("action_dispatch.request.parameters")
-  return params if params
-
-  params = begin
-             request_parameters.merge(query_parameters)
-           rescue EOFError
-             query_parameters.dup
-           end
-  params.merge!(path_parameters)
-  set_header("action_dispatch.request.parameters", params)
-  params
-end
-
-
- - + See on GitHub + + + +

@@ -205,7 +205,8 @@

-

+ +

@@ -228,22 +229,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/parameters.rb, line 82
+      def path_parameters
+        get_header(PARAMETERS_KEY) || set_header(PARAMETERS_KEY, {})
+      end
- -
-
# File actionpack/lib/action_dispatch/http/parameters.rb, line 82
-def path_parameters
-  get_header(PARAMETERS_KEY) || set_header(PARAMETERS_KEY, {})
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Http/Parameters/ClassMethods.html b/src/classes/ActionDispatch/Http/Parameters/ClassMethods.html index afc24132b7..e96b151c30 100644 --- a/src/classes/ActionDispatch/Http/Parameters/ClassMethods.html +++ b/src/classes/ActionDispatch/Http/Parameters/ClassMethods.html @@ -83,22 +83,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/parameters.rb, line 44
+        def parameter_parsers=(parsers)
+          @parameter_parsers = parsers.transform_keys { |key| key.respond_to?(:symbol) ? key.symbol : key }
+        end
- -
-
# File actionpack/lib/action_dispatch/http/parameters.rb, line 44
-def parameter_parsers=(parsers)
-  @parameter_parsers = parsers.transform_keys { |key| key.respond_to?(:symbol) ? key.symbol : key }
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Http/Parameters/ParseError.html b/src/classes/ActionDispatch/Http/Parameters/ParseError.html index 368f5c4821..7373550117 100644 --- a/src/classes/ActionDispatch/Http/Parameters/ParseError.html +++ b/src/classes/ActionDispatch/Http/Parameters/ParseError.html @@ -86,22 +86,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/parameters.rb, line 20
+        def initialize(message = $!.message)
+          super(message)
+        end
- -
-
# File actionpack/lib/action_dispatch/http/parameters.rb, line 20
-def initialize(message = $!.message)
-  super(message)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Http/URL.html b/src/classes/ActionDispatch/Http/URL.html index 5e69ed4b4e..5aa4625de2 100644 --- a/src/classes/ActionDispatch/Http/URL.html +++ b/src/classes/ActionDispatch/Http/URL.html @@ -202,22 +202,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/url.rb, line 22
+        def extract_domain(host, tld_length)
+          extract_domain_from(host, tld_length) if named_host?(host)
+        end
- -
-
# File actionpack/lib/action_dispatch/http/url.rb, line 22
-def extract_domain(host, tld_length)
-  extract_domain_from(host, tld_length) if named_host?(host)
-end
-
-
- - + See on GitHub + + + +

@@ -243,22 +243,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/url.rb, line 46
+        def extract_subdomain(host, tld_length)
+          extract_subdomains(host, tld_length).join(".")
+        end
- -
-
# File actionpack/lib/action_dispatch/http/url.rb, line 46
-def extract_subdomain(host, tld_length)
-  extract_subdomains(host, tld_length).join(".")
-end
-
-
- -

+ See on GitHub + + + +

@@ -284,26 +284,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/url.rb, line 32
+        def extract_subdomains(host, tld_length)
+          if named_host?(host)
+            extract_subdomains_from(host, tld_length)
+          else
+            []
+          end
+        end
- -
-
# File actionpack/lib/action_dispatch/http/url.rb, line 32
-def extract_subdomains(host, tld_length)
-  if named_host?(host)
-    extract_subdomains_from(host, tld_length)
-  else
-    []
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -323,30 +323,30 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/url.rb, line 58
+        def full_url_for(options)
+          host     = options[:host]
+          protocol = options[:protocol]
+          port     = options[:port]
+
+          unless host
+            raise ArgumentError, "Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true"
+          end
+
+          build_host_url(host, port, protocol, options, path_for(options))
+        end
- -
-
# File actionpack/lib/action_dispatch/http/url.rb, line 58
-def full_url_for(options)
-  host     = options[:host]
-  protocol = options[:protocol]
-  port     = options[:port]
-
-  unless host
-    raise ArgumentError, "Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true"
-  end
-
-  build_host_url(host, port, protocol, options, path_for(options))
-end
-
-
- -

+ See on GitHub + + + +

@@ -366,24 +366,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/url.rb, line 179
+      def initialize
+        super
+        @protocol = nil
+        @port     = nil
+      end
- -
-
# File actionpack/lib/action_dispatch/http/url.rb, line 179
-def initialize
-  super
-  @protocol = nil
-  @port     = nil
-end
-
-
- -

+ See on GitHub + + + +

@@ -403,30 +403,30 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/url.rb, line 70
+        def path_for(options)
+          path = options[:script_name].to_s.chomp("/")
+          path << options[:path] if options.key?(:path)
+
+          path = "/" if options[:trailing_slash] && path.blank?
+
+          add_params(path, options[:params]) if options.key?(:params)
+          add_anchor(path, options[:anchor]) if options.key?(:anchor)
+
+          path
+        end
- -
-
# File actionpack/lib/action_dispatch/http/url.rb, line 70
-def path_for(options)
-  path = options[:script_name].to_s.chomp("/")
-  path << options[:path] if options.key?(:path)
-
-  path = "/" if options[:trailing_slash] && path.blank?
-
-  add_params(path, options[:params]) if options.key?(:params)
-  add_anchor(path, options[:anchor]) if options.key?(:anchor)
-
-  path
-end
-
-
- -

+ See on GitHub + + + +

@@ -446,26 +446,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/url.rb, line 50
+        def url_for(options)
+          if options[:only_path]
+            path_for options
+          else
+            full_url_for options
+          end
+        end
- -
-
# File actionpack/lib/action_dispatch/http/url.rb, line 50
-def url_for(options)
-  if options[:only_path]
-    path_for options
-  else
-    full_url_for options
-  end
-end
-
-
- -

+ See on GitHub + + + + @@ -489,22 +489,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/url.rb, line 321
+      def domain(tld_length = @@tld_length)
+        ActionDispatch::Http::URL.extract_domain(host, tld_length)
+      end
- -
-
# File actionpack/lib/action_dispatch/http/url.rb, line 321
-def domain(tld_length = @@tld_length)
-  ActionDispatch::Http::URL.extract_domain(host, tld_length)
-end
-
-
- - + See on GitHub + + + +

@@ -528,22 +528,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/url.rb, line 226
+      def host
+        raw_host_with_port.sub(/:\d+$/, "")
+      end
- -
-
# File actionpack/lib/action_dispatch/http/url.rb, line 226
-def host
-  raw_host_with_port.sub(/:\d+$/, "")
-end
-
-
- -

+ See on GitHub + + + +

@@ -573,22 +573,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/url.rb, line 242
+      def host_with_port
+        "#{host}#{port_string}"
+      end
- -
-
# File actionpack/lib/action_dispatch/http/url.rb, line 242
-def host_with_port
-  "#{host}#{port_string}"
-end
-
-
- -

+ See on GitHub + + + +

@@ -615,22 +615,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/url.rb, line 292
+      def optional_port
+        standard_port? ? nil : port
+      end
- -
-
# File actionpack/lib/action_dispatch/http/url.rb, line 292
-def optional_port
-  standard_port? ? nil : port
-end
-
-
- -

+ See on GitHub + + + +

@@ -657,26 +657,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/url.rb, line 253
+      def port
+        @port ||= if raw_host_with_port =~ /:(\d+)$/
+          $1.to_i
+        else
+          standard_port
+        end
+      end
- -
-
# File actionpack/lib/action_dispatch/http/url.rb, line 253
-def port
-  @port ||= if raw_host_with_port =~ /:(\d+)$/
-    $1.to_i
-  else
-    standard_port
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -703,22 +703,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/url.rb, line 304
+      def port_string
+        standard_port? ? "" : ":#{port}"
+      end
- -
-
# File actionpack/lib/action_dispatch/http/url.rb, line 304
-def port_string
-  standard_port? ? "" : ":#{port}"
-end
-
-
- -

+ See on GitHub + + + +

@@ -745,22 +745,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/url.rb, line 200
+      def protocol
+        @protocol ||= ssl? ? "https://" : "http://"
+      end
- -
-
# File actionpack/lib/action_dispatch/http/url.rb, line 200
-def protocol
-  @protocol ||= ssl? ? "https://" : "http://"
-end
-
-
- -

+ See on GitHub + + + +

@@ -790,26 +790,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/url.rb, line 214
+      def raw_host_with_port
+        if forwarded = x_forwarded_host.presence
+          forwarded.split(/,\s?/).last
+        else
+          get_header("HTTP_HOST") || "#{server_name}:#{get_header('SERVER_PORT')}"
+        end
+      end
- -
-
# File actionpack/lib/action_dispatch/http/url.rb, line 214
-def raw_host_with_port
-  if forwarded = x_forwarded_host.presence
-    forwarded.split(/,\s?/).last
-  else
-    get_header("HTTP_HOST") || "#{server_name}:#{get_header('SERVER_PORT')}"
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -836,22 +836,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/url.rb, line 315
+      def server_port
+        get_header("SERVER_PORT").to_i
+      end
- -
-
# File actionpack/lib/action_dispatch/http/url.rb, line 315
-def server_port
-  get_header("SERVER_PORT").to_i
-end
-
-
- -

+ See on GitHub + + + +

@@ -875,26 +875,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/url.rb, line 265
+      def standard_port
+        if "https://" == protocol
+          443
+        else
+          80
+        end
+      end
- -
-
# File actionpack/lib/action_dispatch/http/url.rb, line 265
-def standard_port
-  if "https://" == protocol
-    443
-  else
-    80
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -921,22 +921,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/url.rb, line 280
+      def standard_port?
+        port == standard_port
+      end
- -
-
# File actionpack/lib/action_dispatch/http/url.rb, line 280
-def standard_port?
-  port == standard_port
-end
-
-
- -

+ See on GitHub + + + +

@@ -956,22 +956,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/url.rb, line 337
+      def subdomain(tld_length = @@tld_length)
+        ActionDispatch::Http::URL.extract_subdomain(host, tld_length)
+      end
- -
-
# File actionpack/lib/action_dispatch/http/url.rb, line 337
-def subdomain(tld_length = @@tld_length)
-  ActionDispatch::Http::URL.extract_subdomain(host, tld_length)
-end
-
-
- -

+ See on GitHub + + + +

@@ -991,22 +991,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/url.rb, line 329
+      def subdomains(tld_length = @@tld_length)
+        ActionDispatch::Http::URL.extract_subdomains(host, tld_length)
+      end
- -
-
# File actionpack/lib/action_dispatch/http/url.rb, line 329
-def subdomains(tld_length = @@tld_length)
-  ActionDispatch::Http::URL.extract_subdomains(host, tld_length)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1030,22 +1030,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/url.rb, line 189
+      def url
+        protocol + host_with_port + fullpath
+      end
- -
-
# File actionpack/lib/action_dispatch/http/url.rb, line 189
-def url
-  protocol + host_with_port + fullpath
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Http/UploadedFile.html b/src/classes/ActionDispatch/Http/UploadedFile.html index 7505d70463..3abe5ff277 100644 --- a/src/classes/ActionDispatch/Http/UploadedFile.html +++ b/src/classes/ActionDispatch/Http/UploadedFile.html @@ -163,22 +163,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/upload.rb, line 71
+      def close(unlink_now = false)
+        @tempfile.close(unlink_now)
+      end
- -
-
# File actionpack/lib/action_dispatch/http/upload.rb, line 71
-def close(unlink_now = false)
-  @tempfile.close(unlink_now)
-end
-
-
- - + See on GitHub + + + +

@@ -198,22 +198,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/upload.rb, line 96
+      def eof?
+        @tempfile.eof?
+      end
- -
-
# File actionpack/lib/action_dispatch/http/upload.rb, line 96
-def eof?
-  @tempfile.eof?
-end
-
-
- -

+ See on GitHub + + + +

@@ -233,22 +233,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/upload.rb, line 66
+      def open
+        @tempfile.open
+      end
- -
-
# File actionpack/lib/action_dispatch/http/upload.rb, line 66
-def open
-  @tempfile.open
-end
-
-
- -

+ See on GitHub + + + +

@@ -268,22 +268,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/upload.rb, line 76
+      def path
+        @tempfile.path
+      end
- -
-
# File actionpack/lib/action_dispatch/http/upload.rb, line 76
-def path
-  @tempfile.path
-end
-
-
- -

+ See on GitHub + + + +

@@ -303,22 +303,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/upload.rb, line 61
+      def read(length = nil, buffer = nil)
+        @tempfile.read(length, buffer)
+      end
- -
-
# File actionpack/lib/action_dispatch/http/upload.rb, line 61
-def read(length = nil, buffer = nil)
-  @tempfile.read(length, buffer)
-end
-
-
- -

+ See on GitHub + + + +

@@ -338,22 +338,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/upload.rb, line 86
+      def rewind
+        @tempfile.rewind
+      end
- -
-
# File actionpack/lib/action_dispatch/http/upload.rb, line 86
-def rewind
-  @tempfile.rewind
-end
-
-
- -

+ See on GitHub + + + +

@@ -373,22 +373,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/upload.rb, line 91
+      def size
+        @tempfile.size
+      end
- -
-
# File actionpack/lib/action_dispatch/http/upload.rb, line 91
-def size
-  @tempfile.size
-end
-
-
- -

+ See on GitHub + + + +

@@ -408,22 +408,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/upload.rb, line 100
+      def to_io
+        @tempfile.to_io
+      end
- -
-
# File actionpack/lib/action_dispatch/http/upload.rb, line 100
-def to_io
-  @tempfile.to_io
-end
-
-
- -

+ See on GitHub + + + +

@@ -443,22 +443,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/upload.rb, line 81
+      def to_path
+        @tempfile.to_path
+      end
- -
-
# File actionpack/lib/action_dispatch/http/upload.rb, line 81
-def to_path
-  @tempfile.to_path
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Integration/RequestHelpers.html b/src/classes/ActionDispatch/Integration/RequestHelpers.html index 3c83637634..26eaad5e68 100644 --- a/src/classes/ActionDispatch/Integration/RequestHelpers.html +++ b/src/classes/ActionDispatch/Integration/RequestHelpers.html @@ -103,22 +103,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/integration.rb, line 39
+      def delete(path, **args)
+        process(:delete, path, **args)
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/integration.rb, line 39
-def delete(path, **args)
-  process(:delete, path, **args)
-end
-
-
- - + See on GitHub + + + +

@@ -140,36 +140,36 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/integration.rb, line 63
+      def follow_redirect!(headers: {}, **args)
+        raise "not a redirect! #{status} #{status_message}" unless redirect?
+
+        method =
+          if [307, 308].include?(response.status)
+            request.method.downcase
+          else
+            :get
+          end
+
+        if [ :HTTP_REFERER, "HTTP_REFERER" ].none? { |key| headers.key? key }
+          headers["HTTP_REFERER"] = request.url
+        end
+
+        public_send(method, response.location, headers: headers, **args)
+        status
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/integration.rb, line 63
-def follow_redirect!(headers: {}, **args)
-  raise "not a redirect! #{status} #{status_message}" unless redirect?
-
-  method =
-    if [307, 308].include?(response.status)
-      request.method.downcase
-    else
-      :get
-    end
-
-  if [ :HTTP_REFERER, "HTTP_REFERER" ].none? { |key| headers.key? key }
-    headers["HTTP_REFERER"] = request.url
-  end
-
-  public_send(method, response.location, headers: headers, **args)
-  status
-end
-
-
- -

+ See on GitHub + + + +

@@ -189,22 +189,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/integration.rb, line 15
+      def get(path, **args)
+        process(:get, path, **args)
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/integration.rb, line 15
-def get(path, **args)
-  process(:get, path, **args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -224,22 +224,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/integration.rb, line 45
+      def head(path, **args)
+        process(:head, path, **args)
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/integration.rb, line 45
-def head(path, **args)
-  process(:head, path, **args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -259,22 +259,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/integration.rb, line 51
+      def options(path, **args)
+        process(:options, path, **args)
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/integration.rb, line 51
-def options(path, **args)
-  process(:options, path, **args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -294,22 +294,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/integration.rb, line 27
+      def patch(path, **args)
+        process(:patch, path, **args)
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/integration.rb, line 27
-def patch(path, **args)
-  process(:patch, path, **args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -329,22 +329,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/integration.rb, line 21
+      def post(path, **args)
+        process(:post, path, **args)
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/integration.rb, line 21
-def post(path, **args)
-  process(:post, path, **args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -364,22 +364,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/integration.rb, line 33
+      def put(path, **args)
+        process(:put, path, **args)
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/integration.rb, line 33
-def put(path, **args)
-  process(:put, path, **args)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Integration/Runner.html b/src/classes/ActionDispatch/Integration/Runner.html index ecaf88f587..f04ea4c395 100644 --- a/src/classes/ActionDispatch/Integration/Runner.html +++ b/src/classes/ActionDispatch/Integration/Runner.html @@ -144,23 +144,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/integration.rb, line 333
+      def initialize(*args, &blk)
+        super(*args, &blk)
+        @integration_session = nil
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/integration.rb, line 333
-def initialize(*args, &blk)
-  super(*args, &blk)
-  @integration_session = nil
-end
-
-
- - + See on GitHub + + + + @@ -184,30 +184,30 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/integration.rb, line 353
+      def create_session(app)
+        klass = APP_SESSIONS[app] ||= Class.new(Integration::Session) {
+          # If the app is a Rails app, make url_helpers available on the session.
+          # This makes app.url_for and app.foo_path available in the console.
+          if app.respond_to?(:routes) && app.routes.is_a?(ActionDispatch::Routing::RouteSet)
+            include app.routes.url_helpers
+            include app.routes.mounted_helpers
+          end
+        }
+        klass.new(app)
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/integration.rb, line 353
-def create_session(app)
-  klass = APP_SESSIONS[app] ||= Class.new(Integration::Session) {
-    # If the app is a Rails app, make url_helpers available on the session.
-    # This makes app.url_for and app.foo_path available in the console.
-    if app.respond_to?(:routes) && app.routes.is_a?(ActionDispatch::Routing::RouteSet)
-      include app.routes.url_helpers
-      include app.routes.mounted_helpers
-    end
-  }
-  klass.new(app)
-end
-
-
- - + See on GitHub + + + +

@@ -227,22 +227,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/integration.rb, line 420
+      def default_url_options
+        integration_session.default_url_options
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/integration.rb, line 420
-def default_url_options
-  integration_session.default_url_options
-end
-
-
- -

+ See on GitHub + + + +

@@ -262,22 +262,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/integration.rb, line 424
+      def default_url_options=(options)
+        integration_session.default_url_options = options
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/integration.rb, line 424
-def default_url_options=(options)
-  integration_session.default_url_options = options
-end
-
-
- -

+ See on GitHub + + + +

@@ -297,22 +297,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/integration.rb, line 343
+      def integration_session
+        @integration_session ||= create_session(app)
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/integration.rb, line 343
-def integration_session
-  @integration_session ||= create_session(app)
-end
-
-
- -

+ See on GitHub + + + +

@@ -339,26 +339,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/integration.rb, line 396
+      def open_session
+        dup.tap do |session|
+          session.reset!
+          session.root_session = self.root_session || self
+          yield session if block_given?
+        end
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/integration.rb, line 396
-def open_session
-  dup.tap do |session|
-    session.reset!
-    session.root_session = self.root_session || self
-    yield session if block_given?
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -378,22 +378,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/integration.rb, line 349
+      def reset!
+        @integration_session = create_session(app)
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/integration.rb, line 349
-def reset!
-  @integration_session = create_session(app)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Integration/Session.html b/src/classes/ActionDispatch/Integration/Session.html index 97d156df2a..4ef812cf8d 100644 --- a/src/classes/ActionDispatch/Integration/Session.html +++ b/src/classes/ActionDispatch/Integration/Session.html @@ -224,25 +224,25 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/integration.rb, line 131
+      def initialize(app)
+        super()
+        @app = app
+
+        reset!
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/integration.rb, line 131
-def initialize(app)
-  super()
-  @app = app
-
-  reset!
-end
-
-
- - + See on GitHub + + + + @@ -266,22 +266,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/integration.rb, line 112
+      def cookies
+        _mock_session.cookie_jar
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/integration.rb, line 112
-def cookies
-  _mock_session.cookie_jar
-end
-
-
- - + See on GitHub + + + +

@@ -301,22 +301,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/integration.rb, line 99
+      def host
+        @host || DEFAULT_HOST
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/integration.rb, line 99
-def host
-  @host || DEFAULT_HOST
-end
-
-
- -

+ See on GitHub + + + +

@@ -340,22 +340,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/integration.rb, line 179
+      def https!(flag = true)
+        @https = flag
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/integration.rb, line 179
-def https!(flag = true)
-  @https = flag
-end
-
-
- -

+ See on GitHub + + + +

@@ -380,22 +380,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/integration.rb, line 188
+      def https?
+        @https
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/integration.rb, line 188
-def https?
-  @https
-end
-
-
- -

+ See on GitHub + + + +

@@ -439,95 +439,95 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/integration.rb, line 226
+      def process(method, path, params: nil, headers: nil, env: nil, xhr: false, as: nil)
+        request_encoder = RequestEncoder.encoder(as)
+        headers ||= {}
+
+        if method == :get && as == :json && params
+          headers["X-Http-Method-Override"] = "GET"
+          method = :post
+        end
+
+        if path.include?("://")
+          path = build_expanded_path(path) do |location|
+            https! URI::HTTPS === location if location.scheme
+
+            if url_host = location.host
+              default = Rack::Request::DEFAULT_PORTS[location.scheme]
+              url_host += ":#{location.port}" if default != location.port
+              host! url_host
+            end
+          end
+        end
+
+        hostname, port = host.split(":")
+
+        request_env = {
+          :method => method,
+          :params => request_encoder.encode_params(params),
+
+          "SERVER_NAME"     => hostname,
+          "SERVER_PORT"     => port || (https? ? "443" : "80"),
+          "HTTPS"           => https? ? "on" : "off",
+          "rack.url_scheme" => https? ? "https" : "http",
+
+          "REQUEST_URI"    => path,
+          "HTTP_HOST"      => host,
+          "REMOTE_ADDR"    => remote_addr,
+          "HTTP_ACCEPT"    => request_encoder.accept_header || accept
+        }
+
+        if request_encoder.content_type
+          request_env["CONTENT_TYPE"] = request_encoder.content_type
+        end
+
+        wrapped_headers = Http::Headers.from_hash({})
+        wrapped_headers.merge!(headers) if headers
+
+        if xhr
+          wrapped_headers["HTTP_X_REQUESTED_WITH"] = "XMLHttpRequest"
+          wrapped_headers["HTTP_ACCEPT"] ||= [Mime[:js], Mime[:html], Mime[:xml], "text/xml", "*/*"].join(", ")
+        end
+
+        # This modifies the passed request_env directly.
+        if wrapped_headers.present?
+          Http::Headers.from_hash(request_env).merge!(wrapped_headers)
+        end
+        if env.present?
+          Http::Headers.from_hash(request_env).merge!(env)
+        end
+
+        session = Rack::Test::Session.new(_mock_session)
+
+        # NOTE: rack-test v0.5 doesn't build a default uri correctly
+        # Make sure requested path is always a full URI.
+        session.request(build_full_uri(path, request_env), request_env)
+
+        @request_count += 1
+        @request = ActionDispatch::Request.new(session.last_request.env)
+        response = _mock_session.last_response
+        @response = ActionDispatch::TestResponse.from_response(response)
+        @response.request = @request
+        @html_document = nil
+        @url_options = nil
+
+        @controller = @request.controller_instance
+
+        response.status
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/integration.rb, line 226
-def process(method, path, params: nil, headers: nil, env: nil, xhr: false, as: nil)
-  request_encoder = RequestEncoder.encoder(as)
-  headers ||= {}
-
-  if method == :get && as == :json && params
-    headers["X-Http-Method-Override"] = "GET"
-    method = :post
-  end
-
-  if path.include?("://")
-    path = build_expanded_path(path) do |location|
-      https! URI::HTTPS === location if location.scheme
-
-      if url_host = location.host
-        default = Rack::Request::DEFAULT_PORTS[location.scheme]
-        url_host += ":#{location.port}" if default != location.port
-        host! url_host
-      end
-    end
-  end
-
-  hostname, port = host.split(":")
-
-  request_env = {
-    :method => method,
-    :params => request_encoder.encode_params(params),
-
-    "SERVER_NAME"     => hostname,
-    "SERVER_PORT"     => port || (https? ? "443" : "80"),
-    "HTTPS"           => https? ? "on" : "off",
-    "rack.url_scheme" => https? ? "https" : "http",
-
-    "REQUEST_URI"    => path,
-    "HTTP_HOST"      => host,
-    "REMOTE_ADDR"    => remote_addr,
-    "HTTP_ACCEPT"    => request_encoder.accept_header || accept
-  }
-
-  if request_encoder.content_type
-    request_env["CONTENT_TYPE"] = request_encoder.content_type
-  end
-
-  wrapped_headers = Http::Headers.from_hash({})
-  wrapped_headers.merge!(headers) if headers
-
-  if xhr
-    wrapped_headers["HTTP_X_REQUESTED_WITH"] = "XMLHttpRequest"
-    wrapped_headers["HTTP_ACCEPT"] ||= [Mime[:js], Mime[:html], Mime[:xml], "text/xml", "*/*"].join(", ")
-  end
-
-  # This modifies the passed request_env directly.
-  if wrapped_headers.present?
-    Http::Headers.from_hash(request_env).merge!(wrapped_headers)
-  end
-  if env.present?
-    Http::Headers.from_hash(request_env).merge!(env)
-  end
-
-  session = Rack::Test::Session.new(_mock_session)
-
-  # NOTE: rack-test v0.5 doesn't build a default uri correctly
-  # Make sure requested path is always a full URI.
-  session.request(build_full_uri(path, request_env), request_env)
-
-  @request_count += 1
-  @request = ActionDispatch::Request.new(session.last_request.env)
-  response = _mock_session.last_response
-  @response = ActionDispatch::TestResponse.from_response(response)
-  @response.request = @request
-  @html_document = nil
-  @url_options = nil
-
-  @controller = @request.controller_instance
-
-  response.status
-end
-
-
- -

+ See on GitHub + + + +

@@ -550,38 +550,38 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/integration.rb, line 155
+      def reset!
+        @https = false
+        @controller = @request = @response = nil
+        @_mock_session = nil
+        @request_count = 0
+        @url_options = nil
+
+        self.host        = DEFAULT_HOST
+        self.remote_addr = "127.0.0.1"
+        self.accept      = "text/xml,application/xml,application/xhtml+xml," \
+                           "text/html;q=0.9,text/plain;q=0.8,image/png," \
+                           "*/*;q=0.5"
+
+        unless defined? @named_routes_configured
+          # the helpers are made protected by default--we make them public for
+          # easier access during testing and troubleshooting.
+          @named_routes_configured = true
+        end
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/integration.rb, line 155
-def reset!
-  @https = false
-  @controller = @request = @response = nil
-  @_mock_session = nil
-  @request_count = 0
-  @url_options = nil
-
-  self.host        = DEFAULT_HOST
-  self.remote_addr = "127.0.0.1"
-  self.accept      = "text/xml,application/xml,application/xhtml+xml," \
-                     "text/html;q=0.9,text/plain;q=0.8,image/png," \
-                     "*/*;q=0.5"
-
-  unless defined? @named_routes_configured
-    # the helpers are made protected by default--we make them public for
-    # easier access during testing and troubleshooting.
-    @named_routes_configured = true
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -601,30 +601,30 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/integration.rb, line 138
+      def url_options
+        @url_options ||= default_url_options.dup.tap do |url_options|
+          url_options.reverse_merge!(controller.url_options) if controller.respond_to?(:url_options)
+
+          if @app.respond_to?(:routes)
+            url_options.reverse_merge!(@app.routes.default_url_options)
+          end
+
+          url_options.reverse_merge!(host: host, protocol: https? ? "https" : "http")
+        end
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/integration.rb, line 138
-def url_options
-  @url_options ||= default_url_options.dup.tap do |url_options|
-    url_options.reverse_merge!(controller.url_options) if controller.respond_to?(:url_options)
-
-    if @app.respond_to?(:routes)
-      url_options.reverse_merge!(@app.routes.default_url_options)
-    end
-
-    url_options.reverse_merge!(host: host, protocol: https? ? "https" : "http")
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/IntegrationTest/Behavior.html b/src/classes/ActionDispatch/IntegrationTest/Behavior.html index b5584e47e3..849dd3f313 100644 --- a/src/classes/ActionDispatch/IntegrationTest/Behavior.html +++ b/src/classes/ActionDispatch/IntegrationTest/Behavior.html @@ -114,22 +114,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/integration.rb, line 682
+      def app
+        super || self.class.app
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/integration.rb, line 682
-def app
-  super || self.class.app
-end
-
-
- - + See on GitHub + + + +

@@ -149,22 +149,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/integration.rb, line 686
+      def document_root_element
+        html_document.root
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/integration.rb, line 686
-def document_root_element
-  html_document.root
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/IntegrationTest/Behavior/ClassMethods.html b/src/classes/ActionDispatch/IntegrationTest/Behavior/ClassMethods.html index d82adfb5d4..e64cf02c9e 100644 --- a/src/classes/ActionDispatch/IntegrationTest/Behavior/ClassMethods.html +++ b/src/classes/ActionDispatch/IntegrationTest/Behavior/ClassMethods.html @@ -83,26 +83,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/integration.rb, line 665
+        def app
+          if defined?(@@app) && @@app
+            @@app
+          else
+            ActionDispatch.test_app
+          end
+        end
- -
-
# File actionpack/lib/action_dispatch/testing/integration.rb, line 665
-def app
-  if defined?(@@app) && @@app
-    @@app
-  else
-    ActionDispatch.test_app
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -122,22 +122,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/integration.rb, line 673
+        def app=(app)
+          @@app = app
+        end
- -
-
# File actionpack/lib/action_dispatch/testing/integration.rb, line 673
-def app=(app)
-  @@app = app
-end
-
-
- -

+ See on GitHub + + + +

@@ -157,22 +157,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/integration.rb, line 677
+        def register_encoder(*args, **options)
+          RequestEncoder.register_encoder(*args, **options)
+        end
- -
-
# File actionpack/lib/action_dispatch/testing/integration.rb, line 677
-def register_encoder(*args, **options)
-  RequestEncoder.register_encoder(*args, **options)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/IntegrationTest/UrlOptions.html b/src/classes/ActionDispatch/IntegrationTest/UrlOptions.html index 52d225a198..bd4ccf38d1 100644 --- a/src/classes/ActionDispatch/IntegrationTest/UrlOptions.html +++ b/src/classes/ActionDispatch/IntegrationTest/UrlOptions.html @@ -75,22 +75,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/integration.rb, line 646
+      def url_options
+        integration_session.url_options
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/integration.rb, line 646
-def url_options
-  integration_session.url_options
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Journey/Formatter/RegexCaseComparator.html b/src/classes/ActionDispatch/Journey/Formatter/RegexCaseComparator.html deleted file mode 100644 index c698c2fda5..0000000000 --- a/src/classes/ActionDispatch/Journey/Formatter/RegexCaseComparator.html +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: ActionDispatch::Journey::Formatter::RegexCaseComparator -layout: default ---- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActionDispatch/LogSubscriber.html b/src/classes/ActionDispatch/LogSubscriber.html index ff04361d95..5ee9adf574 100644 --- a/src/classes/ActionDispatch/LogSubscriber.html +++ b/src/classes/ActionDispatch/LogSubscriber.html @@ -81,33 +81,33 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/log_subscriber.rb, line 5
+    def redirect(event)
+      payload = event.payload
+
+      info { "Redirected to #{payload[:location]}" }
+
+      info do
+        status = payload[:status]
+
+        message = +"Completed #{status} #{Rack::Utils::HTTP_STATUS_CODES[status]} in #{event.duration.round}ms"
+        message << "\n\n" if defined?(Rails.env) && Rails.env.development?
+
+        message
+      end
+    end
- -
-
# File actionpack/lib/action_dispatch/log_subscriber.rb, line 5
-def redirect(event)
-  payload = event.payload
-
-  info { "Redirected to #{payload[:location]}" }
-
-  info do
-    status = payload[:status]
-
-    message = +"Completed #{status} #{Rack::Utils::HTTP_STATUS_CODES[status]} in #{event.duration.round}ms"
-    message << "\n\n" if defined?(Rails.env) && Rails.env.development?
-
-    message
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/MiddlewareStack.html b/src/classes/ActionDispatch/MiddlewareStack.html index 1ff9e0e284..92fc87f14b 100644 --- a/src/classes/ActionDispatch/MiddlewareStack.html +++ b/src/classes/ActionDispatch/MiddlewareStack.html @@ -199,23 +199,23 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 75
-def initialize(*args)
-  @middlewares = []
-  yield(self) if block_given?
-end
-
-
- - + +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 75
+    def initialize(*args)
+      @middlewares = []
+      yield(self) if block_given?
+    end
+ + See on GitHub + +
+ + @@ -239,22 +239,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 92
+    def [](i)
+      middlewares[i]
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 92
-def [](i)
-  middlewares[i]
-end
-
-
- - + See on GitHub + + + +

@@ -274,29 +274,29 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 165
+    def build(app = nil, &block)
+      instrumenting = ActiveSupport::Notifications.notifier.listening?(InstrumentationProxy::EVENT_NAME)
+      middlewares.freeze.reverse.inject(app || block) do |a, e|
+        if instrumenting
+          e.build_instrumented(a)
+        else
+          e.build(a)
+        end
+      end
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 165
-def build(app = nil, &block)
-  instrumenting = ActiveSupport::Notifications.notifier.listening?(InstrumentationProxy::EVENT_NAME)
-  middlewares.freeze.reverse.inject(app || block) do |a, e|
-    if instrumenting
-      e.build_instrumented(a)
-    else
-      e.build(a)
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -318,22 +318,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 130
+    def delete(target)
+      middlewares.reject! { |m| m.name == target.name }
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 130
-def delete(target)
-  middlewares.reject! { |m| m.name == target.name }
-end
-
-
- -

+ See on GitHub + + + +

@@ -355,22 +355,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 138
+    def delete!(target)
+      delete(target) || (raise "No such middleware to remove: #{target.inspect}")
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 138
-def delete!(target)
-  delete(target) || (raise "No such middleware to remove: #{target.inspect}")
-end
-
-
- -

+ See on GitHub + + + +

@@ -390,22 +390,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 80
+    def each(&block)
+      @middlewares.each(&block)
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 80
-def each(&block)
-  @middlewares.each(&block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -425,22 +425,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 101
+    def initialize_copy(other)
+      self.middlewares = other.middlewares.dup
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 101
-def initialize_copy(other)
-  self.middlewares = other.middlewares.dup
-end
-
-
- -

+ See on GitHub + + + +

@@ -464,23 +464,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 105
+    def insert(index, klass, *args, &block)
+      index = assert_index(index, :before)
+      middlewares.insert(index, build_middleware(klass, args, block))
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 105
-def insert(index, klass, *args, &block)
-  index = assert_index(index, :before)
-  middlewares.insert(index, build_middleware(klass, args, block))
-end
-
-
- -

+ See on GitHub + + + +

@@ -500,23 +500,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 113
+    def insert_after(index, *args, &block)
+      index = assert_index(index, :after)
+      insert(index + 1, *args, &block)
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 113
-def insert_after(index, *args, &block)
-  index = assert_index(index, :after)
-  insert(index + 1, *args, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -540,7 +540,8 @@

-

+ +

@@ -560,22 +561,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 88
+    def last
+      middlewares.last
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 88
-def last
-  middlewares.last
-end
-
-
- -

+ See on GitHub + + + +

@@ -599,26 +600,26 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 142
-def move(target, source)
-  source_index = assert_index(source, :before)
-  source_middleware = middlewares.delete_at(source_index)
+          
+            
+ + Source code + - target_index = assert_index(target, :before) - middlewares.insert(target_index, source_middleware) -end
-
-
- -

+
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 142
+    def move(target, source)
+      source_index = assert_index(source, :before)
+      source_middleware = middlewares.delete_at(source_index)
+
+      target_index = assert_index(target, :before)
+      middlewares.insert(target_index, source_middleware)
+    end
+ + See on GitHub + + + +

@@ -638,26 +639,26 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 152
-def move_after(target, source)
-  source_index = assert_index(source, :after)
-  source_middleware = middlewares.delete_at(source_index)
+          
+            
+ + Source code + - target_index = assert_index(target, :after) - middlewares.insert(target_index + 1, source_middleware) -end
-
-
- -

+
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 152
+    def move_after(target, source)
+      source_index = assert_index(source, :after)
+      source_middleware = middlewares.delete_at(source_index)
+
+      target_index = assert_index(target, :after)
+      middlewares.insert(target_index + 1, source_middleware)
+    end
+ + See on GitHub + + + +

@@ -681,7 +682,8 @@

-

+ +

@@ -701,22 +703,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 84
+    def size
+      middlewares.size
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 84
-def size
-  middlewares.size
-end
-
-
- -

+ See on GitHub + + + +

@@ -736,24 +738,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 119
+    def swap(target, *args, &block)
+      index = assert_index(target, :before)
+      insert(index, *args, &block)
+      middlewares.delete_at(index + 1)
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 119
-def swap(target, *args, &block)
-  index = assert_index(target, :before)
-  insert(index, *args, &block)
-  middlewares.delete_at(index + 1)
-end
-
-
- -

+ See on GitHub + + + +

@@ -773,22 +775,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 96
+    def unshift(klass, *args, &block)
+      middlewares.unshift(build_middleware(klass, args, block))
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 96
-def unshift(klass, *args, &block)
-  middlewares.unshift(build_middleware(klass, args, block))
-end
-
-
- -

+ See on GitHub + + + +

@@ -808,22 +810,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 160
+    def use(klass, *args, &block)
+      middlewares.push(build_middleware(klass, args, block))
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 160
-def use(klass, *args, &block)
-  middlewares.push(build_middleware(klass, args, block))
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/MiddlewareStack/InstrumentationProxy.html b/src/classes/ActionDispatch/MiddlewareStack/InstrumentationProxy.html index ee15cb5ac8..cf3510698c 100644 --- a/src/classes/ActionDispatch/MiddlewareStack/InstrumentationProxy.html +++ b/src/classes/ActionDispatch/MiddlewareStack/InstrumentationProxy.html @@ -108,26 +108,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 56
+      def initialize(middleware, class_name)
+        @middleware = middleware
+
+        @payload = {
+          middleware: class_name,
+        }
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 56
-def initialize(middleware, class_name)
-  @middleware = middleware
-
-  @payload = {
-    middleware: class_name,
-  }
-end
-
-
- - + See on GitHub + + + + @@ -151,24 +151,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 64
+      def call(env)
+        ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
+          @middleware.call(env)
+        end
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 64
-def call(env)
-  ActiveSupport::Notifications.instrument(EVENT_NAME, @payload) do
-    @middleware.call(env)
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/MiddlewareStack/Middleware.html b/src/classes/ActionDispatch/MiddlewareStack/Middleware.html index 87fa989945..e62772d5dd 100644 --- a/src/classes/ActionDispatch/MiddlewareStack/Middleware.html +++ b/src/classes/ActionDispatch/MiddlewareStack/Middleware.html @@ -130,24 +130,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 16
+      def initialize(klass, args, block)
+        @klass = klass
+        @args  = args
+        @block = block
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 16
-def initialize(klass, args, block)
-  @klass = klass
-  @args  = args
-  @block = block
-end
-
-
- - + See on GitHub + + + + @@ -171,27 +171,27 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 24
+      def ==(middleware)
+        case middleware
+        when Middleware
+          klass == middleware.klass
+        when Module
+          klass == middleware
+        end
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 24
-def ==(middleware)
-  case middleware
-  when Middleware
-    klass == middleware.klass
-  when Module
-    klass == middleware
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -211,22 +211,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 41
+      def build(app)
+        klass.new(app, *args, &block)
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 41
-def build(app)
-  klass.new(app, *args, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -246,22 +246,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 45
+      def build_instrumented(app)
+        InstrumentationProxy.new(build(app), inspect)
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 45
-def build_instrumented(app)
-  InstrumentationProxy.new(build(app), inspect)
-end
-
-
- -

+ See on GitHub + + + +

@@ -281,26 +281,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 33
+      def inspect
+        if klass.is_a?(Module)
+          klass.to_s
+        else
+          klass.class.to_s
+        end
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 33
-def inspect
-  if klass.is_a?(Module)
-    klass.to_s
-  else
-    klass.class.to_s
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -320,20 +320,20 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 22
+      def name; klass.name; end
- -
-
# File actionpack/lib/action_dispatch/middleware/stack.rb, line 22
-def name; klass.name; end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/PermissionsPolicy.html b/src/classes/ActionDispatch/PermissionsPolicy.html index 6e0abaabfd..794bf0edc0 100644 --- a/src/classes/ActionDispatch/PermissionsPolicy.html +++ b/src/classes/ActionDispatch/PermissionsPolicy.html @@ -146,23 +146,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/permissions_policy.rb, line 116
+    def initialize
+      @directives = {}
+      yield self if block_given?
+    end
- -
-
# File actionpack/lib/action_dispatch/http/permissions_policy.rb, line 116
-def initialize
-  @directives = {}
-  yield self if block_given?
-end
-
-
- - + See on GitHub + + + + @@ -186,22 +186,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/permissions_policy.rb, line 154
+    def build(context = nil)
+      build_directives(context).compact.join("; ")
+    end
- -
-
# File actionpack/lib/action_dispatch/http/permissions_policy.rb, line 154
-def build(context = nil)
-  build_directives(context).compact.join("; ")
-end
-
-
- - + See on GitHub + + + +

@@ -221,22 +221,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/permissions_policy.rb, line 121
+    def initialize_copy(other)
+      @directives = other.directives.deep_dup
+    end
- -
-
# File actionpack/lib/action_dispatch/http/permissions_policy.rb, line 121
-def initialize_copy(other)
-  @directives = other.directives.deep_dup
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/PermissionsPolicy/Middleware.html b/src/classes/ActionDispatch/PermissionsPolicy/Middleware.html index a1004e7572..78d9555bd3 100644 --- a/src/classes/ActionDispatch/PermissionsPolicy/Middleware.html +++ b/src/classes/ActionDispatch/PermissionsPolicy/Middleware.html @@ -84,22 +84,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/permissions_policy.rb, line 31
+      def initialize(app)
+        @app = app
+      end
- -
-
# File actionpack/lib/action_dispatch/http/permissions_policy.rb, line 31
-def initialize(app)
-  @app = app
-end
-
-
- - + See on GitHub + + + + @@ -123,37 +123,37 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/permissions_policy.rb, line 35
+      def call(env)
+        _, headers, _ = response = @app.call(env)
+
+        return response unless html_response?(headers)
+        return response if policy_present?(headers)
+
+        request = ActionDispatch::Request.new(env)
+
+        if policy = request.permissions_policy
+          headers[ActionDispatch::Constants::FEATURE_POLICY] = policy.build(request.controller_instance)
+        end
+
+        if policy_empty?(policy)
+          headers.delete(ActionDispatch::Constants::FEATURE_POLICY)
+        end
+
+        response
+      end
- -
-
# File actionpack/lib/action_dispatch/http/permissions_policy.rb, line 35
-def call(env)
-  _, headers, _ = response = @app.call(env)
-
-  return response unless html_response?(headers)
-  return response if policy_present?(headers)
-
-  request = ActionDispatch::Request.new(env)
-
-  if policy = request.permissions_policy
-    headers[ActionDispatch::Constants::FEATURE_POLICY] = policy.build(request.controller_instance)
-  end
-
-  if policy_empty?(policy)
-    headers.delete(ActionDispatch::Constants::FEATURE_POLICY)
-  end
-
-  response
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/PermissionsPolicy/Request.html b/src/classes/ActionDispatch/PermissionsPolicy/Request.html index e241e17f3c..ec16e781ff 100644 --- a/src/classes/ActionDispatch/PermissionsPolicy/Request.html +++ b/src/classes/ActionDispatch/PermissionsPolicy/Request.html @@ -97,22 +97,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/permissions_policy.rb, line 73
+      def permissions_policy
+        get_header(POLICY)
+      end
- -
-
# File actionpack/lib/action_dispatch/http/permissions_policy.rb, line 73
-def permissions_policy
-  get_header(POLICY)
-end
-
-
- - + See on GitHub + + + +

@@ -132,22 +132,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/permissions_policy.rb, line 77
+      def permissions_policy=(policy)
+        set_header(POLICY, policy)
+      end
- -
-
# File actionpack/lib/action_dispatch/http/permissions_policy.rb, line 77
-def permissions_policy=(policy)
-  set_header(POLICY, policy)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/PublicExceptions.html b/src/classes/ActionDispatch/PublicExceptions.html index 717c30393f..31d0f8bf24 100644 --- a/src/classes/ActionDispatch/PublicExceptions.html +++ b/src/classes/ActionDispatch/PublicExceptions.html @@ -108,22 +108,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/public_exceptions.rb, line 19
+    def initialize(public_path)
+      @public_path = public_path
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/public_exceptions.rb, line 19
-def initialize(public_path)
-  @public_path = public_path
-end
-
-
- - + See on GitHub + + + + @@ -147,31 +147,31 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/public_exceptions.rb, line 23
+    def call(env)
+      request      = ActionDispatch::Request.new(env)
+      status       = request.path_info[1..-1].to_i
+      begin
+        content_type = request.formats.first
+      rescue ActionDispatch::Http::MimeNegotiation::InvalidType
+        content_type = Mime[:text]
+      end
+      body = { status: status, error: Rack::Utils::HTTP_STATUS_CODES.fetch(status, Rack::Utils::HTTP_STATUS_CODES[500]) }
+
+      render(status, content_type, body)
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/public_exceptions.rb, line 23
-def call(env)
-  request      = ActionDispatch::Request.new(env)
-  status       = request.path_info[1..-1].to_i
-  begin
-    content_type = request.formats.first
-  rescue ActionDispatch::Http::MimeNegotiation::InvalidType
-    content_type = Mime[:text]
-  end
-  body = { status: status, error: Rack::Utils::HTTP_STATUS_CODES.fetch(status, Rack::Utils::HTTP_STATUS_CODES[500]) }
-
-  render(status, content_type, body)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/RailsEntityStore.html b/src/classes/ActionDispatch/RailsEntityStore.html deleted file mode 100644 index fc41058323..0000000000 --- a/src/classes/ActionDispatch/RailsEntityStore.html +++ /dev/null @@ -1,322 +0,0 @@ ---- -title: ActionDispatch::RailsEntityStore -layout: default ---- -
- -
-
- - - - - - - - - -

Namespace

- - -

Module

- - - - - - - -

Methods

- - - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - new(store = Rails.cache) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/action_dispatch/http/rack_cache.rb, line 37
-def initialize(store = Rails.cache)
-  @store = store
-end
-
-
- -
- -
-

- - resolve(uri) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/action_dispatch/http/rack_cache.rb, line 33
-def self.resolve(uri)
-  new
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - exist?(key) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/action_dispatch/http/rack_cache.rb, line 41
-def exist?(key)
-  @store.exist?(key)
-end
-
-
- -
- -
-

- - open(key) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/action_dispatch/http/rack_cache.rb, line 45
-def open(key)
-  @store.read(key)
-end
-
-
- -
- -
-

- - read(key) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/action_dispatch/http/rack_cache.rb, line 49
-def read(key)
-  body = open(key)
-  body.join if body
-end
-
-
- -
- -
-

- - write(body) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/action_dispatch/http/rack_cache.rb, line 54
-def write(body)
-  buf = []
-  key, size = slurp(body) { |part| buf << part }
-  @store.write(key, buf)
-  [key, size]
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActionDispatch/RailsEntityStore/Rack.html b/src/classes/ActionDispatch/RailsEntityStore/Rack.html deleted file mode 100644 index 87a76bcc6d..0000000000 --- a/src/classes/ActionDispatch/RailsEntityStore/Rack.html +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: ActionDispatch::RailsEntityStore::Rack -layout: default ---- -
- -
-
- - - - - - - - - -

Namespace

- - -

Module

- - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActionDispatch/RailsEntityStore/Rack/Cache.html b/src/classes/ActionDispatch/RailsEntityStore/Rack/Cache.html deleted file mode 100644 index 64defef17e..0000000000 --- a/src/classes/ActionDispatch/RailsEntityStore/Rack/Cache.html +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: ActionDispatch::RailsEntityStore::Rack::Cache -layout: default ---- -
- -
-
- - - - - - - - - -

Namespace

- - -

Module

- - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActionDispatch/RailsEntityStore/Rack/Cache/EntityStore.html b/src/classes/ActionDispatch/RailsEntityStore/Rack/Cache/EntityStore.html deleted file mode 100644 index 69f91d9277..0000000000 --- a/src/classes/ActionDispatch/RailsEntityStore/Rack/Cache/EntityStore.html +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: ActionDispatch::RailsEntityStore::Rack::Cache::EntityStore -layout: default ---- -
- -
-
- - - - - - - - - - - - - - - - - - - - - -

Constants

- - - - - - - - - - - - - - -
RAILS=self
 
- - - - - - - - - -
- -
-
diff --git a/src/classes/ActionDispatch/RailsMetaStore.html b/src/classes/ActionDispatch/RailsMetaStore.html deleted file mode 100644 index febcec84ec..0000000000 --- a/src/classes/ActionDispatch/RailsMetaStore.html +++ /dev/null @@ -1,244 +0,0 @@ ---- -title: ActionDispatch::RailsMetaStore -layout: default ---- -
- -
-
- - - - - - - - - -

Namespace

- - -

Module

- - - - - - - -

Methods

- - - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - new(store = Rails.cache) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/action_dispatch/http/rack_cache.rb, line 13
-def initialize(store = Rails.cache)
-  @store = store
-end
-
-
- -
- -
-

- - resolve(uri) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/action_dispatch/http/rack_cache.rb, line 9
-def self.resolve(uri)
-  new
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - read(key) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/action_dispatch/http/rack_cache.rb, line 17
-def read(key)
-  if data = @store.read(key)
-    Marshal.load(data)
-  else
-    []
-  end
-end
-
-
- -
- -
-

- - write(key, value) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/action_dispatch/http/rack_cache.rb, line 25
-def write(key, value)
-  @store.write(key, Marshal.dump(value))
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActionDispatch/RailsMetaStore/Rack.html b/src/classes/ActionDispatch/RailsMetaStore/Rack.html deleted file mode 100644 index 11236e06d1..0000000000 --- a/src/classes/ActionDispatch/RailsMetaStore/Rack.html +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: ActionDispatch::RailsMetaStore::Rack -layout: default ---- -
- -
-
- - - - - - - - - -

Namespace

- - -

Module

- - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActionDispatch/RailsMetaStore/Rack/Cache.html b/src/classes/ActionDispatch/RailsMetaStore/Rack/Cache.html deleted file mode 100644 index efe5ee07b5..0000000000 --- a/src/classes/ActionDispatch/RailsMetaStore/Rack/Cache.html +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: ActionDispatch::RailsMetaStore::Rack::Cache -layout: default ---- -
- -
-
- - - - - - - - - -

Namespace

- - -

Module

- - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActionDispatch/RailsMetaStore/Rack/Cache/MetaStore.html b/src/classes/ActionDispatch/RailsMetaStore/Rack/Cache/MetaStore.html deleted file mode 100644 index 472df70d74..0000000000 --- a/src/classes/ActionDispatch/RailsMetaStore/Rack/Cache/MetaStore.html +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: ActionDispatch::RailsMetaStore::Rack::Cache::MetaStore -layout: default ---- -
- -
-
- - - - - - - - - - - - - - - - - - - - - -

Constants

- - - - - - - - - - - - - - -
RAILS=self
 
- - - - - - - - - -
- -
-
diff --git a/src/classes/ActionDispatch/RemoteIp.html b/src/classes/ActionDispatch/RemoteIp.html index 576636ef79..e3da58b796 100644 --- a/src/classes/ActionDispatch/RemoteIp.html +++ b/src/classes/ActionDispatch/RemoteIp.html @@ -162,42 +162,42 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/middleware/remote_ip.rb, line 61
-    def initialize(app, ip_spoofing_check = true, custom_proxies = nil)
-      @app = app
-      @check_ip = ip_spoofing_check
-      @proxies = if custom_proxies.blank?
-        TRUSTED_PROXIES
-      elsif custom_proxies.respond_to?(:any?)
-        custom_proxies
-      else
-        raise(ArgumentError, <<~EOM)
-          Setting config.action_dispatch.trusted_proxies to a single value isn't
+          
+            
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/remote_ip.rb, line 61
+    def initialize(app, ip_spoofing_check = true, custom_proxies = nil)
+      @app = app
+      @check_ip = ip_spoofing_check
+      @proxies = if custom_proxies.blank?
+        TRUSTED_PROXIES
+      elsif custom_proxies.respond_to?(:any?)
+        custom_proxies
+      else
+        raise(ArgumentError, <<~EOM)
+          Setting config.action_dispatch.trusted_proxies to a single value isn't
           supported. Please set this to an enumerable instead. For
           example, instead of:
 
-          config.action_dispatch.trusted_proxies = IPAddr.new("10.0.0.0/8")
+          config.action_dispatch.trusted_proxies = IPAddr.new("10.0.0.0/8")
 
           Wrap the value in an Array:
 
-          config.action_dispatch.trusted_proxies = [IPAddr.new("10.0.0.0/8")]
+          config.action_dispatch.trusted_proxies = [IPAddr.new("10.0.0.0/8")]
 
           Note that passing an enumerable will *replace* the default set of trusted proxies.
-        EOM
-      end
-    end
-
-
- - + EOM + end + end + + See on GitHub + + + + @@ -221,24 +221,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/remote_ip.rb, line 89
+    def call(env)
+      req = ActionDispatch::Request.new env
+      req.remote_ip = GetIp.new(req, check_ip, proxies)
+      @app.call(req.env)
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/remote_ip.rb, line 89
-def call(env)
-  req = ActionDispatch::Request.new env
-  req.remote_ip = GetIp.new(req, check_ip, proxies)
-  @app.call(req.env)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/RemoteIp/GetIp.html b/src/classes/ActionDispatch/RemoteIp/GetIp.html index 95019c3023..e1ab8ba496 100644 --- a/src/classes/ActionDispatch/RemoteIp/GetIp.html +++ b/src/classes/ActionDispatch/RemoteIp/GetIp.html @@ -102,24 +102,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/remote_ip.rb, line 99
+      def initialize(req, check_ip, proxies)
+        @req      = req
+        @check_ip = check_ip
+        @proxies  = proxies
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/remote_ip.rb, line 99
-def initialize(req, check_ip, proxies)
-  @req      = req
-  @check_ip = check_ip
-  @proxies  = proxies
-end
-
-
- - + See on GitHub + + + + @@ -149,60 +149,60 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/remote_ip.rb, line 123
+      def calculate_ip
+        # Set by the Rack web server, this is a single value.
+        remote_addr = ips_from(@req.remote_addr).last
+
+        # Could be a CSV list and/or repeated headers that were concatenated.
+        client_ips    = ips_from(@req.client_ip).reverse!
+        forwarded_ips = ips_from(@req.x_forwarded_for).reverse!
+
+        # +Client-Ip+ and +X-Forwarded-For+ should not, generally, both be set.
+        # If they are both set, it means that either:
+        #
+        # 1) This request passed through two proxies with incompatible IP header
+        #    conventions.
+        # 2) The client passed one of +Client-Ip+ or +X-Forwarded-For+
+        #    (whichever the proxy servers weren't using) themselves.
+        #
+        # Either way, there is no way for us to determine which header is the
+        # right one after the fact. Since we have no idea, if we are concerned
+        # about IP spoofing we need to give up and explode. (If you're not
+        # concerned about IP spoofing you can turn the +ip_spoofing_check+
+        # option off.)
+        should_check_ip = @check_ip && client_ips.last && forwarded_ips.last
+        if should_check_ip && !forwarded_ips.include?(client_ips.last)
+          # We don't know which came from the proxy, and which from the user
+          raise IpSpoofAttackError, "IP spoofing attack?! " \
+            "HTTP_CLIENT_IP=#{@req.client_ip.inspect} " \
+            "HTTP_X_FORWARDED_FOR=#{@req.x_forwarded_for.inspect}"
+        end
+
+        # We assume these things about the IP headers:
+        #
+        #   - X-Forwarded-For will be a list of IPs, one per proxy, or blank
+        #   - Client-Ip is propagated from the outermost proxy, or is blank
+        #   - REMOTE_ADDR will be the IP that made the request to Rack
+        ips = forwarded_ips + client_ips
+        ips.compact!
+
+        # If every single IP option is in the trusted list, return the IP
+        # that's furthest away
+        filter_proxies(ips + [remote_addr]).first || ips.last || remote_addr
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/remote_ip.rb, line 123
-def calculate_ip
-  # Set by the Rack web server, this is a single value.
-  remote_addr = ips_from(@req.remote_addr).last
-
-  # Could be a CSV list and/or repeated headers that were concatenated.
-  client_ips    = ips_from(@req.client_ip).reverse!
-  forwarded_ips = ips_from(@req.x_forwarded_for).reverse!
-
-  # +Client-Ip+ and +X-Forwarded-For+ should not, generally, both be set.
-  # If they are both set, it means that either:
-  #
-  # 1) This request passed through two proxies with incompatible IP header
-  #    conventions.
-  # 2) The client passed one of +Client-Ip+ or +X-Forwarded-For+
-  #    (whichever the proxy servers weren't using) themselves.
-  #
-  # Either way, there is no way for us to determine which header is the
-  # right one after the fact. Since we have no idea, if we are concerned
-  # about IP spoofing we need to give up and explode. (If you're not
-  # concerned about IP spoofing you can turn the +ip_spoofing_check+
-  # option off.)
-  should_check_ip = @check_ip && client_ips.last && forwarded_ips.last
-  if should_check_ip && !forwarded_ips.include?(client_ips.last)
-    # We don't know which came from the proxy, and which from the user
-    raise IpSpoofAttackError, "IP spoofing attack?! " \
-      "HTTP_CLIENT_IP=#{@req.client_ip.inspect} " \
-      "HTTP_X_FORWARDED_FOR=#{@req.x_forwarded_for.inspect}"
-  end
-
-  # We assume these things about the IP headers:
-  #
-  #   - X-Forwarded-For will be a list of IPs, one per proxy, or blank
-  #   - Client-Ip is propagated from the outermost proxy, or is blank
-  #   - REMOTE_ADDR will be the IP that made the request to Rack
-  ips = forwarded_ips + client_ips
-  ips.compact!
-
-  # If every single IP option is in the trusted list, return the IP
-  # that's furthest away
-  filter_proxies(ips + [remote_addr]).first || ips.last || remote_addr
-end
-
-
- - + See on GitHub + + + +

@@ -222,22 +222,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/remote_ip.rb, line 167
+      def to_s
+        @ip ||= calculate_ip
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/remote_ip.rb, line 167
-def to_s
-  @ip ||= calculate_ip
-end
-
-
- -

+ See on GitHub + + + +

Instance Private methods

@@ -260,24 +260,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/remote_ip.rb, line 187
+      def filter_proxies(ips) # :doc:
+        ips.reject do |ip|
+          @proxies.any? { |proxy| proxy === ip }
+        end
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/remote_ip.rb, line 187
-def filter_proxies(ips) # :doc:
-  ips.reject do |ip|
-    @proxies.any? { |proxy| proxy === ip }
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -297,33 +297,33 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/remote_ip.rb, line 172
+      def ips_from(header) # :doc:
+        return [] unless header
+        # Split the comma-separated list into an array of strings.
+        ips = header.strip.split(/[,\s]+/)
+        ips.select! do |ip|
+          # Only return IPs that are valid according to the IPAddr#new method.
+          range = IPAddr.new(ip).to_range
+          # We want to make sure nobody is sneaking a netmask in.
+          range.begin == range.end
+        rescue ArgumentError
+          nil
+        end
+        ips
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/remote_ip.rb, line 172
-def ips_from(header) # :doc:
-  return [] unless header
-  # Split the comma-separated list into an array of strings.
-  ips = header.strip.split(/[,\s]+/)
-  ips.select! do |ip|
-    # Only return IPs that are valid according to the IPAddr#new method.
-    range = IPAddr.new(ip).to_range
-    # We want to make sure nobody is sneaking a netmask in.
-    range.begin == range.end
-  rescue ArgumentError
-    nil
-  end
-  ips
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Request.html b/src/classes/ActionDispatch/Request.html index 008928dc5e..927fb993c7 100644 --- a/src/classes/ActionDispatch/Request.html +++ b/src/classes/ActionDispatch/Request.html @@ -493,22 +493,22 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 56
-def self.empty
-  new({})
-end
-
-
- - + +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 56
+    def self.empty
+      new({})
+    end
+ + See on GitHub + +
+ +

@@ -528,28 +528,28 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 60
+    def initialize(env)
+      super
+      @method            = nil
+      @request_method    = nil
+      @remote_ip         = nil
+      @original_fullpath = nil
+      @fullpath          = nil
+      @ip                = nil
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 60
-def initialize(env)
-  super
-  @method            = nil
-  @request_method    = nil
-  @remote_ip         = nil
-  @original_fullpath = nil
-  @fullpath          = nil
-  @ip                = nil
-end
-
-
- -

+ See on GitHub + + + + @@ -577,32 +577,32 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 388
+    def GET
+      fetch_header("action_dispatch.request.query_parameters") do |k|
+        rack_query_params = super || {}
+        controller = path_parameters[:controller]
+        action = path_parameters[:action]
+        rack_query_params = Request::Utils.set_binary_encoding(self, rack_query_params, controller, action)
+        # Check for non UTF-8 parameter values, which would cause errors later
+        Request::Utils.check_param_encoding(rack_query_params)
+        set_header k, Request::Utils.normalize_encode_params(rack_query_params)
+      end
+    rescue Rack::Utils::ParameterTypeError, Rack::Utils::InvalidParameterError, Rack::QueryParser::ParamsTooDeepError => e
+      raise ActionController::BadRequest.new("Invalid query parameters: #{e.message}")
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 388
-def GET
-  fetch_header("action_dispatch.request.query_parameters") do |k|
-    rack_query_params = super || {}
-    controller = path_parameters[:controller]
-    action = path_parameters[:action]
-    rack_query_params = Request::Utils.set_binary_encoding(self, rack_query_params, controller, action)
-    # Check for non UTF-8 parameter values, which would cause errors later
-    Request::Utils.check_param_encoding(rack_query_params)
-    set_header k, Request::Utils.normalize_encode_params(rack_query_params)
-  end
-rescue Rack::Utils::ParameterTypeError, Rack::Utils::InvalidParameterError, Rack::QueryParser::ParamsTooDeepError => e
-  raise ActionController::BadRequest.new("Invalid query parameters: #{e.message}")
-end
-
-
- - + See on GitHub + + + +

@@ -626,31 +626,31 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 404
+    def POST
+      fetch_header("action_dispatch.request.request_parameters") do
+        pr = parse_formatted_parameters(params_parsers) do |params|
+          super || {}
+        end
+        pr = Request::Utils.set_binary_encoding(self, pr, path_parameters[:controller], path_parameters[:action])
+        Request::Utils.check_param_encoding(pr)
+        self.request_parameters = Request::Utils.normalize_encode_params(pr)
+      end
+    rescue Rack::Utils::ParameterTypeError, Rack::Utils::InvalidParameterError, Rack::QueryParser::ParamsTooDeepError, EOFError => e
+      raise ActionController::BadRequest.new("Invalid request parameters: #{e.message}")
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 404
-def POST
-  fetch_header("action_dispatch.request.request_parameters") do
-    pr = parse_formatted_parameters(params_parsers) do |params|
-      super || {}
-    end
-    pr = Request::Utils.set_binary_encoding(self, pr, path_parameters[:controller], path_parameters[:action])
-    Request::Utils.check_param_encoding(pr)
-    self.request_parameters = Request::Utils.normalize_encode_params(pr)
-  end
-rescue Rack::Utils::ParameterTypeError, Rack::Utils::InvalidParameterError, Rack::QueryParser::ParamsTooDeepError, EOFError => e
-  raise ActionController::BadRequest.new("Invalid request parameters: #{e.message}")
-end
-
-
- -

+ See on GitHub + + + +

@@ -670,25 +670,25 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 420
+    def authorization
+      get_header("HTTP_AUTHORIZATION")   ||
+      get_header("X-HTTP_AUTHORIZATION") ||
+      get_header("X_HTTP_AUTHORIZATION") ||
+      get_header("REDIRECT_X_HTTP_AUTHORIZATION")
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 420
-def authorization
-  get_header("HTTP_AUTHORIZATION")   ||
-  get_header("X-HTTP_AUTHORIZATION") ||
-  get_header("X_HTTP_AUTHORIZATION") ||
-  get_header("REDIRECT_X_HTTP_AUTHORIZATION")
-end
-
-
- -

+ See on GitHub + + + +

@@ -708,27 +708,27 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 349
+    def body
+      if raw_post = get_header("RAW_POST_DATA")
+        raw_post = (+raw_post).force_encoding(Encoding::BINARY)
+        StringIO.new(raw_post)
+      else
+        body_stream
+      end
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 349
-def body
-  if raw_post = get_header("RAW_POST_DATA")
-    raw_post = (+raw_post).force_encoding(Encoding::BINARY)
-    StringIO.new(raw_post)
-  else
-    body_stream
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -748,22 +748,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 452
+    def commit_csrf_token
+      controller_instance.commit_csrf_token(self) if controller_instance.respond_to?(:commit_csrf_token)
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 452
-def commit_csrf_token
-  controller_instance.commit_csrf_token(self) if controller_instance.respond_to?(:commit_csrf_token)
-end
-
-
- -

+ See on GitHub + + + +

@@ -783,21 +783,21 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 441
+    def commit_flash
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 441
-def commit_flash
-end
-
-
- -

+ See on GitHub + + + +

@@ -817,23 +817,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 285
+    def content_length
+      return raw_post.bytesize if headers.key?("Transfer-Encoding")
+      super.to_i
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 285
-def content_length
-  return raw_post.bytesize if headers.key?("Transfer-Encoding")
-  super.to_i
-end
-
-
- -

+ See on GitHub + + + +

@@ -853,24 +853,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 79
+    def controller_class
+      params = path_parameters
+      params[:action] ||= "index"
+      controller_class_for(params[:controller])
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 79
-def controller_class
-  params = path_parameters
-  params[:action] ||= "index"
-  controller_class_for(params[:controller])
-end
-
-
- -

+ See on GitHub + + + +

@@ -890,36 +890,36 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 85
+    def controller_class_for(name)
+      if name
+        controller_param = name.underscore
+        const_name = controller_param.camelize << "Controller"
+        begin
+          const_name.constantize
+        rescue NameError => error
+          if error.missing_name == const_name || const_name.start_with?("#{error.missing_name}::")
+            raise MissingController.new(error.message, error.name)
+          else
+            raise
+          end
+        end
+      else
+        PASS_NOT_FOUND
+      end
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 85
-def controller_class_for(name)
-  if name
-    controller_param = name.underscore
-    const_name = controller_param.camelize << "Controller"
-    begin
-      const_name.constantize
-    rescue NameError => error
-      if error.missing_name == const_name || const_name.start_with?("#{error.missing_name}::")
-        raise MissingController.new(error.message, error.name)
-      else
-        raise
-      end
-    end
-  else
-    PASS_NOT_FOUND
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -941,22 +941,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 366
+    def form_data?
+      FORM_DATA_MEDIA_TYPES.include?(media_type)
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 366
-def form_data?
-  FORM_DATA_MEDIA_TYPES.include?(media_type)
-end
-
-
- -

+ See on GitHub + + + +

@@ -983,22 +983,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 264
+    def fullpath
+      @fullpath ||= super
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 264
-def fullpath
-  @fullpath ||= super
-end
-
-
- -

+ See on GitHub + + + +

@@ -1021,22 +1021,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 225
+    def headers
+      @headers ||= Http::Headers.new(self)
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 225
-def headers
-  @headers ||= Http::Headers.new(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1056,22 +1056,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 190
+    def http_auth_salt
+      get_header "action_dispatch.http_auth_salt"
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 190
-def http_auth_salt
-  get_header "action_dispatch.http_auth_salt"
-end
-
-
- -

+ See on GitHub + + + +

@@ -1091,22 +1091,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 299
+    def ip
+      @ip ||= super
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 299
-def ip
-  @ip ||= super
-end
-
-
- -

+ See on GitHub + + + +

@@ -1129,22 +1129,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 106
+    def key?(key)
+      has_header? key
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 106
-def key?(key)
-  has_header? key
-end
-
-
- -

+ See on GitHub + + + +

@@ -1164,22 +1164,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 428
+    def local?
+      LOCALHOST.match?(remote_addr) && LOCALHOST.match?(remote_ip)
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 428
-def local?
-  LOCALHOST.match?(remote_addr) && LOCALHOST.match?(remote_ip)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1199,22 +1199,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 437
+    def logger
+      get_header("action_dispatch.logger")
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 437
-def logger
-  get_header("action_dispatch.logger")
-end
-
-
- -

+ See on GitHub + + + +

@@ -1238,22 +1238,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 280
+    def media_type
+      content_mime_type&.to_s
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 280
-def media_type
-  content_mime_type&.to_s
-end
-
-
- -

+ See on GitHub + + + +

@@ -1275,29 +1275,29 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 205
+    def method(*args)
+      if args.empty?
+        @method ||= check_method(
+          get_header("rack.methodoverride.original_method") ||
+          get_header("REQUEST_METHOD")
+        )
+      else
+        super
+      end
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 205
-def method(*args)
-  if args.empty?
-    @method ||= check_method(
-      get_header("rack.methodoverride.original_method") ||
-      get_header("REQUEST_METHOD")
-    )
-  else
-    super
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1317,22 +1317,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 218
+    def method_symbol
+      HTTP_METHOD_LOOKUP[method]
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 218
-def method_symbol
-  HTTP_METHOD_LOOKUP[method]
-end
-
-
- -

+ See on GitHub + + + +

@@ -1359,22 +1359,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 253
+    def original_fullpath
+      @original_fullpath ||= (get_header("ORIGINAL_FULLPATH") || fullpath)
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 253
-def original_fullpath
-  @original_fullpath ||= (get_header("ORIGINAL_FULLPATH") || fullpath)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1398,22 +1398,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 272
+    def original_url
+      base_url + original_fullpath
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 272
-def original_url
-  base_url + original_fullpath
-end
-
-
- -

+ See on GitHub + + + +

@@ -1437,7 +1437,8 @@

-

+ +

@@ -1457,26 +1458,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 339
+    def raw_post
+      unless has_header? "RAW_POST_DATA"
+        set_header("RAW_POST_DATA", read_body_stream)
+        body_stream.rewind if body_stream.respond_to?(:rewind)
+      end
+      get_header "RAW_POST_DATA"
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 339
-def raw_post
-  unless has_header? "RAW_POST_DATA"
-    set_header("RAW_POST_DATA", read_body_stream)
-    body_stream.rewind if body_stream.respond_to?(:rewind)
-  end
-  get_header "RAW_POST_DATA"
-end
-
-
- -

+ See on GitHub + + + +

@@ -1500,7 +1501,8 @@

-

+ +

@@ -1520,22 +1522,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 305
+    def remote_ip
+      @remote_ip ||= (get_header("action_dispatch.remote_ip") || ip).to_s
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 305
-def remote_ip
-  @remote_ip ||= (get_header("action_dispatch.remote_ip") || ip).to_s
-end
-
-
- -

+ See on GitHub + + + +

@@ -1555,23 +1557,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 309
+    def remote_ip=(remote_ip)
+      @remote_ip = nil
+      set_header "action_dispatch.remote_ip", remote_ip
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 309
-def remote_ip=(remote_ip)
-  @remote_ip = nil
-  set_header "action_dispatch.remote_ip", remote_ip
-end
-
-
- -

+ See on GitHub + + + +

@@ -1597,22 +1599,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 322
+    def request_id
+      get_header ACTION_DISPATCH_REQUEST_ID
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 322
-def request_id
-  get_header ACTION_DISPATCH_REQUEST_ID
-end
-
-
- -

+ See on GitHub + + + +

@@ -1636,22 +1638,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 144
+    def request_method
+      @request_method ||= check_method(super)
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 144
-def request_method
-  @request_method ||= check_method(super)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1671,22 +1673,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 195
+    def request_method_symbol
+      HTTP_METHOD_LOOKUP[request_method]
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 195
-def request_method_symbol
-  HTTP_METHOD_LOOKUP[request_method]
-end
-
-
- -

+ See on GitHub + + + +

@@ -1710,7 +1712,8 @@

-

+ +

@@ -1730,23 +1733,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 432
+    def request_parameters=(params)
+      raise if params.nil?
+      set_header("action_dispatch.request.request_parameters", params)
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 432
-def request_parameters=(params)
-  raise if params.nil?
-  set_header("action_dispatch.request.request_parameters", params)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1766,22 +1769,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 448
+    def reset_csrf_token
+      controller_instance.reset_csrf_token(self) if controller_instance.respond_to?(:reset_csrf_token)
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 448
-def reset_csrf_token
-  controller_instance.reset_csrf_token(self) if controller_instance.respond_to?(:reset_csrf_token)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1801,23 +1804,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 374
+    def reset_session
+      session.destroy
+      reset_csrf_token
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 374
-def reset_session
-  session.destroy
-  reset_csrf_token
-end
-
-
- -

+ See on GitHub + + + +

@@ -1840,22 +1843,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 152
+    def route_uri_pattern
+      get_header("action_dispatch.route_uri_pattern")
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 152
-def route_uri_pattern
-  get_header("action_dispatch.route_uri_pattern")
-end
-
-
- -

+ See on GitHub + + + +

@@ -1884,24 +1887,24 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 240
-def send_early_hints(links)
-  return unless env["rack.early_hints"]
+          
+            
+ + Source code + - env["rack.early_hints"].call(links) -end
-
-
- -

+
# File actionpack/lib/action_dispatch/http/request.rb, line 240
+    def send_early_hints(links)
+      return unless env["rack.early_hints"]
+
+      env["rack.early_hints"].call(links)
+    end
+ + See on GitHub + + + +

@@ -1921,22 +1924,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 333
+    def server_software
+      (get_header("SERVER_SOFTWARE") && /^([a-zA-Z]+)/ =~ get_header("SERVER_SOFTWARE")) ? $1.downcase : nil
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 333
-def server_software
-  (get_header("SERVER_SOFTWARE") && /^([a-zA-Z]+)/ =~ get_header("SERVER_SOFTWARE")) ? $1.downcase : nil
-end
-
-
- -

+ See on GitHub + + + +

@@ -1956,22 +1959,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 383
+    def session_options=(options)
+      Session::Options.set self, options
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 383
-def session_options=(options)
-  Session::Options.set self, options
-end
-
-
- -

+ See on GitHub + + + +

@@ -1995,7 +1998,8 @@

-

+ +

@@ -2019,7 +2023,8 @@

-

+ +

@@ -2043,22 +2048,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/request.rb, line 293
+    def xml_http_request?
+      /XMLHttpRequest/i.match?(get_header("HTTP_X_REQUESTED_WITH"))
+    end
- -
-
# File actionpack/lib/action_dispatch/http/request.rb, line 293
-def xml_http_request?
-  /XMLHttpRequest/i.match?(get_header("HTTP_X_REQUESTED_WITH"))
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/RequestCookieMethods.html b/src/classes/ActionDispatch/RequestCookieMethods.html index f787fbd524..84eaa376ab 100644 --- a/src/classes/ActionDispatch/RequestCookieMethods.html +++ b/src/classes/ActionDispatch/RequestCookieMethods.html @@ -75,24 +75,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/request_encoder.rb, line 9
+      def accept_header; end
- -
-
# File actionpack/lib/action_dispatch/testing/request_encoder.rb, line 9
-def accept_header; end
-
-
- - + See on GitHub + + + +

@@ -126,20 +126,20 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/request_encoder.rb, line 8
+      def content_type; end
- -
-
# File actionpack/lib/action_dispatch/testing/request_encoder.rb, line 8
-def content_type; end
-
-
- -

+ See on GitHub + + + +

@@ -159,20 +159,20 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/request_encoder.rb, line 10
+      def encode_params(params); params; end
- -
-
# File actionpack/lib/action_dispatch/testing/request_encoder.rb, line 10
-def encode_params(params); params; end
-
-
- -

+ See on GitHub + + + +

@@ -192,20 +192,20 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/request_encoder.rb, line 11
+      def response_parser; -> body { body }; end
- -
-
# File actionpack/lib/action_dispatch/testing/request_encoder.rb, line 11
-def response_parser; -> body { body }; end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/RequestId.html b/src/classes/ActionDispatch/RequestId.html index 32cee47f65..33817518f2 100644 --- a/src/classes/ActionDispatch/RequestId.html +++ b/src/classes/ActionDispatch/RequestId.html @@ -96,23 +96,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/request_id.rb, line 20
+    def initialize(app, header:)
+      @app = app
+      @header = header
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/request_id.rb, line 20
-def initialize(app, header:)
-  @app = app
-  @header = header
-end
-
-
- - + See on GitHub + + + + @@ -136,24 +136,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/request_id.rb, line 25
+    def call(env)
+      req = ActionDispatch::Request.new env
+      req.request_id = make_request_id(req.headers[@header])
+      @app.call(env).tap { |_status, headers, _body| headers[@header] = req.request_id }
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/request_id.rb, line 25
-def call(env)
-  req = ActionDispatch::Request.new env
-  req.request_id = make_request_id(req.headers[@header])
-  @app.call(env).tap { |_status, headers, _body| headers[@header] = req.request_id }
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Response.html b/src/classes/ActionDispatch/Response.html index 059c298e96..d462520df7 100644 --- a/src/classes/ActionDispatch/Response.html +++ b/src/classes/ActionDispatch/Response.html @@ -461,23 +461,23 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 155
-def self.create(status = 200, headers = {}, body = [], default_headers: self.default_headers)
-  headers = merge_default_headers(headers, default_headers)
-  new status, headers, body
-end
-
-
- - + +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 155
+    def self.create(status = 200, headers = {}, body = [], default_headers: self.default_headers)
+      headers = merge_default_headers(headers, default_headers)
+      new status, headers, body
+    end
+ + See on GitHub + +
+ +

@@ -497,22 +497,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 160
+    def self.merge_default_headers(original, default)
+      default.respond_to?(:merge) ? default.merge(original) : original
+    end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 160
-def self.merge_default_headers(original, default)
-  default.respond_to?(:merge) ? default.merge(original) : original
-end
-
-
- -

+ See on GitHub + + + +

@@ -532,39 +532,39 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 167
-def initialize(status = 200, headers = nil, body = [])
-  super()
+          
+            
+ + Source code + - @headers = Headers.new +
# File actionpack/lib/action_dispatch/http/response.rb, line 167
+    def initialize(status = 200, headers = nil, body = [])
+      super()
 
-  headers&.each do |key, value|
-    @headers[key] = value
-  end
+      @headers = Headers.new
 
-  self.body, self.status = body, status
+      headers&.each do |key, value|
+        @headers[key] = value
+      end
 
-  @cv           = new_cond
-  @committed    = false
-  @sending      = false
-  @sent         = false
+      self.body, self.status = body, status
 
-  prepare_cache_control!
+      @cv           = new_cond
+      @committed    = false
+      @sending      = false
+      @sent         = false
 
-  yield self if block_given?
-end
-
-
- -

+ prepare_cache_control! + + yield self if block_given? + end + + See on GitHub + + + + @@ -588,29 +588,29 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 380
+    def abort
+      if stream.respond_to?(:abort)
+        stream.abort
+      elsif stream.respond_to?(:close)
+        # `stream.close` should really be reserved for a close from the
+        # other direction, but we must fall back to it for
+        # compatibility.
+        stream.close
+      end
+    end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 380
-def abort
-  if stream.respond_to?(:abort)
-    stream.abort
-  elsif stream.respond_to?(:close)
-    # `stream.close` should really be reserved for a close from the
-    # other direction, but we must fall back to it for
-    # compatibility.
-    stream.close
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -630,24 +630,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 193
+    def await_commit
+      synchronize do
+        @cv.wait_until { @committed }
+      end
+    end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 193
-def await_commit
-  synchronize do
-    @cv.wait_until { @committed }
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -667,22 +667,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 199
+    def await_sent
+      synchronize { @cv.wait_until { @sent } }
+    end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 199
-def await_sent
-  synchronize { @cv.wait_until { @sent } }
-end
-
-
- -

+ See on GitHub + + + +

@@ -702,22 +702,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 314
+    def body
+      @stream.body
+    end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 314
-def body
-  @stream.body
-end
-
-
- -

+ See on GitHub + + + +

@@ -737,28 +737,28 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 323
+    def body=(body)
+      if body.respond_to?(:to_path)
+        @stream = body
+      else
+        synchronize do
+          @stream = build_buffer self, munge_body_object(body)
+        end
+      end
+    end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 323
-def body=(body)
-  if body.respond_to?(:to_path)
-    @stream = body
-  else
-    synchronize do
-      @stream = build_buffer self, munge_body_object(body)
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -778,24 +778,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 367
+    def body_parts
+      parts = []
+      @stream.each { |x| parts << x }
+      parts
+    end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 367
-def body_parts
-  parts = []
-  @stream.each { |x| parts << x }
-  parts
-end
-
-
- -

+ See on GitHub + + + +

@@ -815,23 +815,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 284
+    def charset
+      header_info = parsed_content_type_header
+      header_info.charset || self.class.default_charset
+    end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 284
-def charset
-  header_info = parsed_content_type_header
-  header_info.charset || self.class.default_charset
-end
-
-
- -

+ See on GitHub + + + +

@@ -855,27 +855,27 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 273
+    def charset=(charset)
+      content_type = parsed_content_type_header.mime_type
+      if false == charset
+        set_content_type content_type, nil
+      else
+        set_content_type content_type, charset || self.class.default_charset
+      end
+    end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 273
-def charset=(charset)
-  content_type = parsed_content_type_header.mime_type
-  if false == charset
-    set_content_type content_type, nil
-  else
-    set_content_type content_type, charset || self.class.default_charset
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -895,22 +895,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 376
+    def close
+      stream.close if stream.respond_to?(:close)
+    end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 376
-def close
-  stream.close if stream.respond_to?(:close)
-end
-
-
- -

+ See on GitHub + + + +

@@ -930,22 +930,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 295
+    def code
+      @status.to_s
+    end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 295
-def code
-  @status.to_s
-end
-
-
- -

+ See on GitHub + + + +

@@ -965,26 +965,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 203
+    def commit!
+      synchronize do
+        before_committed
+        @committed = true
+        @cv.broadcast
+      end
+    end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 203
-def commit!
-  synchronize do
-    before_committed
-    @committed = true
-    @cv.broadcast
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1004,20 +1004,20 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 227
+    def committed?; synchronize { @committed }; end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 227
-def committed?; synchronize { @committed }; end
-
-
- -

+ See on GitHub + + + +

@@ -1037,22 +1037,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 253
+    def content_type
+      super.presence
+    end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 253
-def content_type
-  super.presence
-end
-
-
- -

+ See on GitHub + + + +

@@ -1077,27 +1077,27 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 243
+    def content_type=(content_type)
+      return unless content_type
+      new_header_info = parse_content_type(content_type.to_s)
+      prev_header_info = parsed_content_type_header
+      charset = new_header_info.charset || prev_header_info.charset
+      charset ||= self.class.default_charset unless prev_header_info.mime_type
+      set_content_type new_header_info.mime_type, charset
+    end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 243
-def content_type=(content_type)
-  return unless content_type
-  new_header_info = parse_content_type(content_type.to_s)
-  prev_header_info = parsed_content_type_header
-  charset = new_header_info.charset || prev_header_info.charset
-  charset ||= self.class.default_charset unless prev_header_info.mime_type
-  set_content_type new_header_info.mime_type, charset
-end
-
-
- -

+ See on GitHub + + + +

@@ -1120,32 +1120,32 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 404
+    def cookies
+      cookies = {}
+      if header = get_header(SET_COOKIE)
+        header = header.split("\n") if header.respond_to?(:to_str)
+        header.each do |cookie|
+          if pair = cookie.split(";").first
+            key, value = pair.split("=").map { |v| Rack::Utils.unescape(v) }
+            cookies[key] = value
+          end
+        end
+      end
+      cookies
+    end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 404
-def cookies
-  cookies = {}
-  if header = get_header(SET_COOKIE)
-    header = header.split("\n") if header.respond_to?(:to_str)
-    header.each do |cookie|
-      if pair = cookie.split(";").first
-        key, value = pair.split("=").map { |v| Rack::Utils.unescape(v) }
-        cookies[key] = value
-      end
-    end
-  end
-  cookies
-end
-
-
- -

+ See on GitHub + + + +

@@ -1165,20 +1165,20 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 191
+    def delete_header(key); @headers.delete key; end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 191
-def delete_header(key); @headers.delete key; end
-
-
- -

+ See on GitHub + + + +

@@ -1198,25 +1198,25 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 75
+    def each(&block)
+      sending!
+      x = @stream.each(&block)
+      sent!
+      x
+    end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 75
-def each(&block)
-  sending!
-  x = @stream.each(&block)
-  sent!
-  x
-end
-
-
- -

+ See on GitHub + + + +

@@ -1236,20 +1236,20 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 189
+    def get_header(key);    @headers[key];       end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 189
-def get_header(key);    @headers[key];       end
-
-
- -

+ See on GitHub + + + +

@@ -1269,20 +1269,20 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 188
+    def has_header?(key);   @headers.key? key;   end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 188
-def has_header?(key);   @headers.key? key;   end
-
-
- -

+ See on GitHub + + + +

@@ -1302,22 +1302,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 258
+    def media_type
+      parsed_content_type_header.mime_type
+    end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 258
-def media_type
-  parsed_content_type_header.mime_type
-end
-
-
- -

+ See on GitHub + + + +

@@ -1348,22 +1348,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 307
+    def message
+      Rack::Utils::HTTP_STATUS_CODES[@status]
+    end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 307
-def message
-  Rack::Utils::HTTP_STATUS_CODES[@status]
-end
-
-
- -

+ See on GitHub + + + +

@@ -1387,7 +1387,8 @@

-

+ +

@@ -1407,22 +1408,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 363
+    def reset_body!
+      @stream = build_buffer(self, [])
+    end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 363
-def reset_body!
-  @stream = build_buffer(self, [])
-end
-
-
- -

+ See on GitHub + + + +

@@ -1442,22 +1443,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 290
+    def response_code
+      @status
+    end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 290
-def response_code
-  @status
-end
-
-
- -

+ See on GitHub + + + +

@@ -1477,23 +1478,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 358
+    def send_file(path)
+      commit!
+      @stream = FileBody.new(path)
+    end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 358
-def send_file(path)
-  commit!
-  @stream = FileBody.new(path)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1513,26 +1514,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 211
+    def sending!
+      synchronize do
+        before_sending
+        @sending = true
+        @cv.broadcast
+      end
+    end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 211
-def sending!
-  synchronize do
-    before_sending
-    @sending = true
-    @cv.broadcast
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1552,20 +1553,20 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 226
+    def sending?;   synchronize { @sending };   end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 226
-def sending?;   synchronize { @sending };   end
-
-
- -

+ See on GitHub + + + +

@@ -1585,24 +1586,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 262
+    def sending_file=(v)
+      if true == v
+        self.charset = false
+      end
+    end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 262
-def sending_file=(v)
-  if true == v
-    self.charset = false
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1622,25 +1623,25 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 219
+    def sent!
+      synchronize do
+        @sent = true
+        @cv.broadcast
+      end
+    end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 219
-def sent!
-  synchronize do
-    @sent = true
-    @cv.broadcast
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1660,20 +1661,20 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 228
+    def sent?;      synchronize { @sent };      end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 228
-def sent?;      synchronize { @sent };      end
-
-
- -

+ See on GitHub + + + +

@@ -1693,20 +1694,20 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 190
+    def set_header(key, v); @headers[key] = v;   end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 190
-def set_header(key, v); @headers[key] = v;   end
-
-
- -

+ See on GitHub + + + +

@@ -1726,22 +1727,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 231
+    def status=(status)
+      @status = Rack::Utils.status_code(status)
+    end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 231
-def status=(status)
-  @status = Rack::Utils.status_code(status)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1765,7 +1766,8 @@

-

+ +

@@ -1792,23 +1794,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 395
+    def to_a
+      commit!
+      rack_response @status, @headers.to_hash
+    end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 395
-def to_a
-  commit!
-  rack_response @status, @headers.to_hash
-end
-
-
- -

+ See on GitHub + + + +

@@ -1828,22 +1830,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 318
+    def write(string)
+      @stream.write string
+    end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 318
-def write(string)
-  @stream.write string
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Response/RackBody.html b/src/classes/ActionDispatch/Response/RackBody.html index 93d6674cf0..3ce752c8b6 100644 --- a/src/classes/ActionDispatch/Response/RackBody.html +++ b/src/classes/ActionDispatch/Response/RackBody.html @@ -126,22 +126,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 484
+      def initialize(response)
+        @response = response
+      end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 484
-def initialize(response)
-  @response = response
-end
-
-
- - + See on GitHub + + + + @@ -165,22 +165,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 494
+      def body
+        @response.body
+      end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 494
-def body
-  @response.body
-end
-
-
- - + See on GitHub + + + +

@@ -200,22 +200,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 516
+      def call(*arguments, &block)
+        @response.stream.call(*arguments, &block)
+      end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 516
-def call(*arguments, &block)
-  @response.stream.call(*arguments, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -235,24 +235,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 488
+      def close
+        # Rack "close" maps to Response#abort, and *not* Response#close
+        # (which is used when the controller's finished writing)
+        @response.abort
+      end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 488
-def close
-  # Rack "close" maps to Response#abort, and *not* Response#close
-  # (which is used when the controller's finished writing)
-  @response.abort
-end
-
-
- -

+ See on GitHub + + + +

@@ -272,22 +272,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 512
+      def each(*args, &block)
+        @response.each(*args, &block)
+      end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 512
-def each(*args, &block)
-  @response.each(*args, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -307,26 +307,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 500
+      def respond_to?(method, include_private = false)
+        if BODY_METHODS.key?(method)
+          @response.stream.respond_to?(method)
+        else
+          super
+        end
+      end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 500
-def respond_to?(method, include_private = false)
-  if BODY_METHODS.key?(method)
-    @response.stream.respond_to?(method)
-  else
-    super
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -346,22 +346,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 508
+      def to_ary
+        @response.stream.to_ary
+      end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 508
-def to_ary
-  @response.stream.to_ary
-end
-
-
- -

+ See on GitHub + + + +

@@ -381,22 +381,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/response.rb, line 520
+      def to_path
+        @response.stream.to_path
+      end
- -
-
# File actionpack/lib/action_dispatch/http/response.rb, line 520
-def to_path
-  @response.stream.to_path
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Routing/ConsoleFormatter/Base.html b/src/classes/ActionDispatch/Routing/ConsoleFormatter/Base.html index 6a51bcda3e..2c45512e55 100644 --- a/src/classes/ActionDispatch/Routing/ConsoleFormatter/Base.html +++ b/src/classes/ActionDispatch/Routing/ConsoleFormatter/Base.html @@ -100,22 +100,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 155
+        def initialize
+          @buffer = []
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 155
-def initialize
-  @buffer = []
-end
-
-
- - + See on GitHub + + + + @@ -139,21 +139,21 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 169
+        def header(routes)
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 169
-def header(routes)
-end
-
-
- - + See on GitHub + + + +

@@ -173,35 +173,35 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 172
-        def no_routes(routes, filter)
-          @buffer <<
-            if routes.none?
-              <<~MESSAGE
-                You don't have any routes defined!
+          
+            
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 172
+        def no_routes(routes, filter)
+          @buffer <<
+            if routes.none?
+              <<~MESSAGE
+                You don't have any routes defined!
 
                 Please add some routes in config/routes.rb.
-              MESSAGE
-            elsif filter.key?(:controller)
-              "No routes were found for this controller."
-            elsif filter.key?(:grep)
-              "No routes were found for this grep pattern."
-            end
-
-          @buffer << "For more information about routes, see the Rails guide: https://guides.rubyonrails.org/routing.html."
-        end
-
-
- -

+ MESSAGE + elsif filter.key?(:controller) + "No routes were found for this controller." + elsif filter.key?(:grep) + "No routes were found for this grep pattern." + end + + @buffer << "For more information about routes, see the Rails guide: https://guides.rubyonrails.org/routing.html." + end + + See on GitHub + + + +

@@ -221,22 +221,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 159
+        def result
+          @buffer.join("\n")
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 159
-def result
-  @buffer.join("\n")
-end
-
-
- -

+ See on GitHub + + + +

@@ -256,21 +256,21 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 166
+        def section(routes)
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 166
-def section(routes)
-end
-
-
- -

+ See on GitHub + + + +

@@ -290,21 +290,21 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 163
+        def section_title(title)
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 163
-def section_title(title)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Routing/ConsoleFormatter/Expanded.html b/src/classes/ActionDispatch/Routing/ConsoleFormatter/Expanded.html index 074baec2b2..d827b704b8 100644 --- a/src/classes/ActionDispatch/Routing/ConsoleFormatter/Expanded.html +++ b/src/classes/ActionDispatch/Routing/ConsoleFormatter/Expanded.html @@ -88,23 +88,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 227
+        def initialize(width: IO.console_size[1])
+          @width = width
+          super()
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 227
-def initialize(width: IO.console_size[1])
-  @width = width
-  super()
-end
-
-
- - + See on GitHub + + + + @@ -128,22 +128,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 236
+        def section(routes)
+          @buffer << draw_expanded_section(routes)
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 236
-def section(routes)
-  @buffer << draw_expanded_section(routes)
-end
-
-
- - + See on GitHub + + + +

@@ -163,22 +163,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 232
+        def section_title(title)
+          @buffer << "\n#{"[ #{title} ]"}"
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 232
-def section_title(title)
-  @buffer << "\n#{"[ #{title} ]"}"
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Routing/ConsoleFormatter/Sheet.html b/src/classes/ActionDispatch/Routing/ConsoleFormatter/Sheet.html index 66ea52adb7..df2b5700a3 100644 --- a/src/classes/ActionDispatch/Routing/ConsoleFormatter/Sheet.html +++ b/src/classes/ActionDispatch/Routing/ConsoleFormatter/Sheet.html @@ -89,22 +89,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 199
+        def header(routes)
+          @buffer << draw_header(routes)
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 199
-def header(routes)
-  @buffer << draw_header(routes)
-end
-
-
- - + See on GitHub + + + +

@@ -124,22 +124,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 195
+        def section(routes)
+          @buffer << draw_section(routes)
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 195
-def section(routes)
-  @buffer << draw_section(routes)
-end
-
-
- -

+ See on GitHub + + + +

@@ -159,22 +159,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 191
+        def section_title(title)
+          @buffer << "\n#{title}:"
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 191
-def section_title(title)
-  @buffer << "\n#{title}:"
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Routing/ConsoleFormatter/Unused.html b/src/classes/ActionDispatch/Routing/ConsoleFormatter/Unused.html index a9d44116c5..c4cc75a0e0 100644 --- a/src/classes/ActionDispatch/Routing/ConsoleFormatter/Unused.html +++ b/src/classes/ActionDispatch/Routing/ConsoleFormatter/Unused.html @@ -85,26 +85,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 262
+        def header(routes)
+          @buffer << <<~MSG
+            Found #{routes.count} unused #{"route".pluralize(routes.count)}:
+          MSG
+
+          super
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 262
-        def header(routes)
-          @buffer << <<~MSG
-            Found #{routes.count} unused #{"route".pluralize(routes.count)}:
-          MSG
-
-          super
-        end
-
-
- - + See on GitHub + + + +

@@ -124,29 +124,29 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 270
+        def no_routes(routes, filter)
+          @buffer <<
+            if filter.none?
+              "No unused routes found."
+            elsif filter.key?(:controller)
+              "No unused routes found for this controller."
+            elsif filter.key?(:grep)
+              "No unused routes found for this grep pattern."
+            end
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 270
-def no_routes(routes, filter)
-  @buffer <<
-    if filter.none?
-      "No unused routes found."
-    elsif filter.key?(:controller)
-      "No unused routes found for this controller."
-    elsif filter.key?(:grep)
-      "No unused routes found for this grep pattern."
-    end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Routing/HtmlTableFormatter.html b/src/classes/ActionDispatch/Routing/HtmlTableFormatter.html index 2d8463f4bf..3f5e73adb4 100644 --- a/src/classes/ActionDispatch/Routing/HtmlTableFormatter.html +++ b/src/classes/ActionDispatch/Routing/HtmlTableFormatter.html @@ -100,23 +100,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 284
+      def initialize(view)
+        @view = view
+        @buffer = []
+      end
- -
-
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 284
-def initialize(view)
-  @view = view
-  @buffer = []
-end
-
-
- - + See on GitHub + + + + @@ -140,21 +140,21 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 298
+      def header(routes)
+      end
- -
-
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 298
-def header(routes)
-end
-
-
- - + See on GitHub + + + +

@@ -174,31 +174,31 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 301
-      def no_routes(*)
-        @buffer << <<~MESSAGE
-          <p>You don't have any routes defined!</p>
-          <ul>
-            <li>Please add some routes in <tt>config/routes.rb</tt>.</li>
-            <li>
+          
+            
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 301
+      def no_routes(*)
+        @buffer << <<~MESSAGE
+          

You don't have any routes defined!

+
    +
  • Please add some routes in config/routes.rb.
  • +
  • For more information about routes, please see the Rails guide - <a href="https://guides.rubyonrails.org/routing.html">Rails Routing from the Outside In</a>. - </li> - </ul> - MESSAGE - end
-
-
- -

+ Rails Routing from the Outside In. + + + MESSAGE + end + + See on GitHub + + + +

@@ -218,24 +218,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 314
+      def result
+        @view.raw @view.render(layout: "routes/table") {
+          @view.raw @buffer.join("\n")
+        }
+      end
- -
-
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 314
-def result
-  @view.raw @view.render(layout: "routes/table") {
-    @view.raw @buffer.join("\n")
-  }
-end
-
-
- -

+ See on GitHub + + + +

@@ -255,22 +255,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 293
+      def section(routes)
+        @buffer << @view.render(partial: "routes/route", collection: routes)
+      end
- -
-
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 293
-def section(routes)
-  @buffer << @view.render(partial: "routes/route", collection: routes)
-end
-
-
- -

+ See on GitHub + + + +

@@ -290,22 +290,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 289
+      def section_title(title)
+        @buffer << %(#{title})
+      end
- -
-
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 289
-def section_title(title)
-  @buffer << %(<tr><th colspan="4">#{title}</th></tr>)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Routing/Mapper.html b/src/classes/ActionDispatch/Routing/Mapper.html index 5127c033b0..6ba43289a9 100644 --- a/src/classes/ActionDispatch/Routing/Mapper.html +++ b/src/classes/ActionDispatch/Routing/Mapper.html @@ -187,22 +187,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 393
+      def self.normalize_name(name)
+        normalize_path(name)[1..-1].tr("/", "_")
+      end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 393
-def self.normalize_name(name)
-  normalize_path(name)[1..-1].tr("/", "_")
-end
-
-
- - + See on GitHub + + + +

@@ -222,35 +222,35 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 376
-def self.normalize_path(path)
-  path = Journey::Router::Utils.normalize_path(path)
+          
+            
+ + Source code + - # the path for a root URL at this point can be something like - # "/(/:locale)(/:platform)/(:browser)", and we would want - # "/(:locale)(/:platform)(/:browser)" +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 376
+      def self.normalize_path(path)
+        path = Journey::Router::Utils.normalize_path(path)
 
-  # reverse "/(", "/((" etc to "(/", "((/" etc
-  path.gsub!(%r{/(\(+)/?}, '\1/')
-  # if a path is all optional segments, change the leading "(/" back to
-  # "/(" so it evaluates to "/" when interpreted with no options.
-  # Unless, however, at least one secondary segment consists of a static
-  # part, ex. "(/:locale)(/pages/:page)"
-  path.sub!(%r{^(\(+)/}, '/\1') if %r{^(\(+[^)]+\))(\(+/:[^)]+\))*$}.match?(path)
-  path
-end
-
-
- -

+ # the path for a root URL at this point can be something like + # "/(/:locale)(/:platform)/(:browser)", and we would want + # "/(:locale)(/:platform)(/:browser)" + + # reverse "/(", "/((" etc to "(/", "((/" etc + path.gsub!(%r{/(\(+)/?}, '\1/') + # if a path is all optional segments, change the leading "(/" back to + # "/(" so it evaluates to "/" when interpreted with no options. + # Unless, however, at least one secondary segment consists of a static + # part, ex. "(/:locale)(/pages/:page)" + path.sub!(%r{^(\(+)/}, '/\1') if %r{^(\(+[^)]+\))(\(+/:[^)]+\))*$}.match?(path) + path + end + + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Routing/Mapper/Base.html b/src/classes/ActionDispatch/Routing/Mapper/Base.html index fc9ae8bce3..244e8d0408 100644 --- a/src/classes/ActionDispatch/Routing/Mapper/Base.html +++ b/src/classes/ActionDispatch/Routing/Mapper/Base.html @@ -99,7 +99,8 @@

- + +

@@ -123,22 +124,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 630
+        def default_url_options=(options)
+          @set.default_url_options = options
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 630
-def default_url_options=(options)
-  @set.default_url_options = options
-end
-
-
- -

+ See on GitHub + + + +

@@ -158,22 +159,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 642
+        def has_named_route?(name)
+          @set.named_routes.key?(name)
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 642
-def has_named_route?(name)
-  @set.named_routes.key?(name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -365,21 +366,21 @@

Options

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 578
+        def match(path, options = nil)
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 578
-def match(path, options = nil)
-end
-
-
- -
+ See on GitHub + + + +

@@ -416,48 +417,48 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 600
-        def mount(app, options = nil)
-          if options
-            path = options.delete(:at)
-          elsif Hash === app
-            options = app
-            app, path = options.find { |k, _| k.respond_to?(:call) }
-            options.delete(app) if app
-          end
-
-          raise ArgumentError, "A rack application must be specified" unless app.respond_to?(:call)
-          raise ArgumentError, <<~MSG unless path
-            Must be called with mount point
-
-              mount SomeRackApp, at: "some_route"
+          
+            
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 600
+        def mount(app, options = nil)
+          if options
+            path = options.delete(:at)
+          elsif Hash === app
+            options = app
+            app, path = options.find { |k, _| k.respond_to?(:call) }
+            options.delete(app) if app
+          end
+
+          raise ArgumentError, "A rack application must be specified" unless app.respond_to?(:call)
+          raise ArgumentError, <<~MSG unless path
+            Must be called with mount point
+
+              mount SomeRackApp, at: "some_route"
               or
-              mount(SomeRackApp => "some_route")
-          MSG
+              mount(SomeRackApp => "some_route")
+          MSG
 
-          rails_app = rails_app? app
-          options[:as] ||= app_name(app, rails_app)
+          rails_app = rails_app? app
+          options[:as] ||= app_name(app, rails_app)
 
-          target_as       = name_for_action(options[:as], path)
-          options[:via] ||= :all
+          target_as       = name_for_action(options[:as], path)
+          options[:via] ||= :all
 
-          match(path, { to: app, anchor: false, format: false }.merge(options))
+          match(path, { to: app, anchor: false, format: false }.merge(options))
 
-          define_generate_prefix(app, target_as) if rails_app
-          self
-        end
-
-
- -

+ define_generate_prefix(app, target_as) if rails_app + self + end + + See on GitHub + + + +

@@ -477,24 +478,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 635
+        def with_default_scope(scope, &block)
+          scope(scope) do
+            instance_exec(&block)
+          end
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 635
-def with_default_scope(scope, &block)
-  scope(scope) do
-    instance_exec(&block)
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Routing/Mapper/Concerns.html b/src/classes/ActionDispatch/Routing/Mapper/Concerns.html index 3434f31dc7..353cf57eb7 100644 --- a/src/classes/ActionDispatch/Routing/Mapper/Concerns.html +++ b/src/classes/ActionDispatch/Routing/Mapper/Concerns.html @@ -155,23 +155,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 2083
+        def concern(name, callable = nil, &block)
+          callable ||= lambda { |mapper, options| mapper.instance_exec(options, &block) }
+          @concerns[name] = callable
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 2083
-def concern(name, callable = nil, &block)
-  callable ||= lambda { |mapper, options| mapper.instance_exec(options, &block) }
-  @concerns[name] = callable
-end
-
-
- - + See on GitHub + + + +

@@ -203,29 +203,29 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 2099
+        def concerns(*args)
+          options = args.extract_options!
+          args.flatten.each do |name|
+            if concern = @concerns[name]
+              concern.call(self, options)
+            else
+              raise ArgumentError, "No concern named #{name} was found!"
+            end
+          end
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 2099
-def concerns(*args)
-  options = args.extract_options!
-  args.flatten.each do |name|
-    if concern = @concerns[name]
-      concern.call(self, options)
-    else
-      raise ArgumentError, "No concern named #{name} was found!"
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Routing/Mapper/CustomUrls.html b/src/classes/ActionDispatch/Routing/Mapper/CustomUrls.html index a7019673cc..6a52f05b25 100644 --- a/src/classes/ActionDispatch/Routing/Mapper/CustomUrls.html +++ b/src/classes/ActionDispatch/Routing/Mapper/CustomUrls.html @@ -123,26 +123,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 2159
+        def direct(name, options = {}, &block)
+          unless @scope.root?
+            raise RuntimeError, "The direct method can't be used inside a routes scope block"
+          end
+
+          @set.add_url_helper(name, options, &block)
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 2159
-def direct(name, options = {}, &block)
-  unless @scope.root?
-    raise RuntimeError, "The direct method can't be used inside a routes scope block"
-  end
-
-  @set.add_url_helper(name, options, &block)
-end
-
-
- - + See on GitHub + + + +

@@ -199,31 +199,31 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 2211
+        def resolve(*args, &block)
+          unless @scope.root?
+            raise RuntimeError, "The resolve method can't be used inside a routes scope block"
+          end
+
+          options = args.extract_options!
+          args = args.flatten(1)
+
+          args.each do |klass|
+            @set.add_polymorphic_mapping(klass, options, &block)
+          end
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 2211
-def resolve(*args, &block)
-  unless @scope.root?
-    raise RuntimeError, "The resolve method can't be used inside a routes scope block"
-  end
-
-  options = args.extract_options!
-  args = args.flatten(1)
-
-  args.each do |klass|
-    @set.add_polymorphic_mapping(klass, options, &block)
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Routing/Mapper/HttpHelpers.html b/src/classes/ActionDispatch/Routing/Mapper/HttpHelpers.html index 4c7ed8e804..5859b64349 100644 --- a/src/classes/ActionDispatch/Routing/Mapper/HttpHelpers.html +++ b/src/classes/ActionDispatch/Routing/Mapper/HttpHelpers.html @@ -98,22 +98,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 731
+        def delete(*args, &block)
+          map_method(:delete, args, &block)
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 731
-def delete(*args, &block)
-  map_method(:delete, args, &block)
-end
-
-
- - + See on GitHub + + + +

@@ -136,22 +136,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 699
+        def get(*args, &block)
+          map_method(:get, args, &block)
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 699
-def get(*args, &block)
-  map_method(:get, args, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -174,22 +174,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 739
+        def options(*args, &block)
+          map_method(:options, args, &block)
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 739
-def options(*args, &block)
-  map_method(:options, args, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -212,22 +212,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 715
+        def patch(*args, &block)
+          map_method(:patch, args, &block)
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 715
-def patch(*args, &block)
-  map_method(:patch, args, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -250,22 +250,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 707
+        def post(*args, &block)
+          map_method(:post, args, &block)
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 707
-def post(*args, &block)
-  map_method(:post, args, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -288,22 +288,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 723
+        def put(*args, &block)
+          map_method(:put, args, &block)
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 723
-def put(*args, &block)
-  map_method(:put, args, &block)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Routing/Mapper/Resources.html b/src/classes/ActionDispatch/Routing/Mapper/Resources.html index 2c3db8d755..360a0748ac 100644 --- a/src/classes/ActionDispatch/Routing/Mapper/Resources.html +++ b/src/classes/ActionDispatch/Routing/Mapper/Resources.html @@ -221,28 +221,28 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1512
+        def collection(&block)
+          unless resource_scope?
+            raise ArgumentError, "can't use collection outside resource(s) scope"
+          end
+
+          with_scope_level(:collection) do
+            path_scope(parent_resource.collection_scope, &block)
+          end
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1512
-def collection(&block)
-  unless resource_scope?
-    raise ArgumentError, "can't use collection outside resource(s) scope"
-  end
-
-  with_scope_level(:collection) do
-    path_scope(parent_resource.collection_scope, &block)
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -279,34 +279,34 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1622
+        def draw(name)
+          path = @draw_paths.find do |_path|
+            File.exist? "#{_path}/#{name}.rb"
+          end
+
+          unless path
+            msg  = "Your router tried to #draw the external file #{name}.rb,\n" \
+                   "but the file was not found in:\n\n"
+            msg += @draw_paths.map { |_path| " * #{_path}" }.join("\n")
+            raise ArgumentError, msg
+          end
+
+          route_path = "#{path}/#{name}.rb"
+          instance_eval(File.read(route_path), route_path.to_s)
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1622
-def draw(name)
-  path = @draw_paths.find do |_path|
-    File.exist? "#{_path}/#{name}.rb"
-  end
-
-  unless path
-    msg  = "Your router tried to #draw the external file #{name}.rb,\n" \
-           "but the file was not found in:\n\n"
-    msg += @draw_paths.map { |_path| " * #{_path}" }.join("\n")
-    raise ArgumentError, msg
-  end
-
-  route_path = "#{path}/#{name}.rb"
-  instance_eval(File.read(route_path), route_path.to_s)
-end
-
-
- -

+ See on GitHub + + + +

@@ -331,52 +331,52 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1644
+        def match(path, *rest, &block)
+          if rest.empty? && Hash === path
+            options  = path
+            path, to = options.find { |name, _value| name.is_a?(String) }
+
+            raise ArgumentError, "Route path not specified" if path.nil?
+
+            case to
+            when Symbol
+              options[:action] = to
+            when String
+              if to.include?("#")
+                options[:to] = to
+              else
+                options[:controller] = to
+              end
+            else
+              options[:to] = to
+            end
+
+            options.delete(path)
+            paths = [path]
+          else
+            options = rest.pop || {}
+            paths = [path] + rest
+          end
+
+          if options.key?(:defaults)
+            defaults(options.delete(:defaults)) { map_match(paths, options, &block) }
+          else
+            map_match(paths, options, &block)
+          end
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1644
-def match(path, *rest, &block)
-  if rest.empty? && Hash === path
-    options  = path
-    path, to = options.find { |name, _value| name.is_a?(String) }
-
-    raise ArgumentError, "Route path not specified" if path.nil?
-
-    case to
-    when Symbol
-      options[:action] = to
-    when String
-      if to.include?("#")
-        options[:to] = to
-      else
-        options[:controller] = to
-      end
-    else
-      options[:to] = to
-    end
-
-    options.delete(path)
-    paths = [path]
-  else
-    options = rest.pop || {}
-    paths = [path] + rest
-  end
-
-  if options.key?(:defaults)
-    defaults(options.delete(:defaults)) { map_match(paths, options, &block) }
-  else
-    map_match(paths, options, &block)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -405,34 +405,34 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1533
+        def member(&block)
+          unless resource_scope?
+            raise ArgumentError, "can't use member outside resource(s) scope"
+          end
+
+          with_scope_level(:member) do
+            if shallow?
+              shallow_scope {
+                path_scope(parent_resource.member_scope, &block)
+              }
+            else
+              path_scope(parent_resource.member_scope, &block)
+            end
+          end
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1533
-def member(&block)
-  unless resource_scope?
-    raise ArgumentError, "can't use member outside resource(s) scope"
-  end
-
-  with_scope_level(:member) do
-    if shallow?
-      shallow_scope {
-        path_scope(parent_resource.member_scope, &block)
-      }
-    else
-      path_scope(parent_resource.member_scope, &block)
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -452,26 +452,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1580
+        def namespace(path, options = {})
+          if resource_scope?
+            nested { super }
+          else
+            super
+          end
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1580
-def namespace(path, options = {})
-  if resource_scope?
-    nested { super }
-  else
-    super
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -491,38 +491,38 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1559
+        def nested(&block)
+          unless resource_scope?
+            raise ArgumentError, "can't use nested outside resource(s) scope"
+          end
+
+          with_scope_level(:nested) do
+            if shallow? && shallow_nesting_depth >= 1
+              shallow_scope do
+                path_scope(parent_resource.nested_scope) do
+                  scope(nested_options, &block)
+                end
+              end
+            else
+              path_scope(parent_resource.nested_scope) do
+                scope(nested_options, &block)
+              end
+            end
+          end
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1559
-def nested(&block)
-  unless resource_scope?
-    raise ArgumentError, "can't use nested outside resource(s) scope"
-  end
-
-  with_scope_level(:nested) do
-    if shallow? && shallow_nesting_depth >= 1
-      shallow_scope do
-        path_scope(parent_resource.nested_scope) do
-          scope(nested_options, &block)
-        end
-      end
-    else
-      path_scope(parent_resource.nested_scope) do
-        scope(nested_options, &block)
-      end
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -542,28 +542,28 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1549
+        def new(&block)
+          unless resource_scope?
+            raise ArgumentError, "can't use new outside resource(s) scope"
+          end
+
+          with_scope_level(:new) do
+            path_scope(parent_resource.new_scope(action_path(:new)), &block)
+          end
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1549
-def new(&block)
-  unless resource_scope?
-    raise ArgumentError, "can't use new outside resource(s) scope"
-  end
-
-  with_scope_level(:new) do
-    path_scope(parent_resource.new_scope(action_path(:new)), &block)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -609,47 +609,47 @@

Options

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1304
+        def resource(*resources, &block)
+          options = resources.extract_options!.dup
+
+          if apply_common_behavior_for(:resource, resources, options, &block)
+            return self
+          end
+
+          with_scope_level(:resource) do
+            options = apply_action_options options
+            resource_scope(SingletonResource.new(resources.pop, api_only?, @scope[:shallow], options)) do
+              yield if block_given?
+
+              concerns(options[:concerns]) if options[:concerns]
+
+              new do
+                get :new
+              end if parent_resource.actions.include?(:new)
+
+              set_member_mappings_for_resource
+
+              collection do
+                post :create
+              end if parent_resource.actions.include?(:create)
+            end
+          end
+
+          self
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1304
-def resource(*resources, &block)
-  options = resources.extract_options!.dup
-
-  if apply_common_behavior_for(:resource, resources, options, &block)
-    return self
-  end
-
-  with_scope_level(:resource) do
-    options = apply_action_options options
-    resource_scope(SingletonResource.new(resources.pop, api_only?, @scope[:shallow], options)) do
-      yield if block_given?
-
-      concerns(options[:concerns]) if options[:concerns]
-
-      new do
-        get :new
-      end if parent_resource.actions.include?(:new)
-
-      set_member_mappings_for_resource
-
-      collection do
-        post :create
-      end if parent_resource.actions.include?(:create)
-    end
-  end
-
-  self
-end
-
-
- -
+ See on GitHub + + + +

@@ -813,48 +813,48 @@

Examples

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1470
+        def resources(*resources, &block)
+          options = resources.extract_options!.dup
+
+          if apply_common_behavior_for(:resources, resources, options, &block)
+            return self
+          end
+
+          with_scope_level(:resources) do
+            options = apply_action_options options
+            resource_scope(Resource.new(resources.pop, api_only?, @scope[:shallow], options)) do
+              yield if block_given?
+
+              concerns(options[:concerns]) if options[:concerns]
+
+              collection do
+                get  :index if parent_resource.actions.include?(:index)
+                post :create if parent_resource.actions.include?(:create)
+              end
+
+              new do
+                get :new
+              end if parent_resource.actions.include?(:new)
+
+              set_member_mappings_for_resource
+            end
+          end
+
+          self
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1470
-def resources(*resources, &block)
-  options = resources.extract_options!.dup
-
-  if apply_common_behavior_for(:resources, resources, options, &block)
-    return self
-  end
-
-  with_scope_level(:resources) do
-    options = apply_action_options options
-    resource_scope(Resource.new(resources.pop, api_only?, @scope[:shallow], options)) do
-      yield if block_given?
-
-      concerns(options[:concerns]) if options[:concerns]
-
-      collection do
-        get  :index if parent_resource.actions.include?(:index)
-        post :create if parent_resource.actions.include?(:create)
-      end
-
-      new do
-        get :new
-      end if parent_resource.actions.include?(:new)
-
-      set_member_mappings_for_resource
-    end
-  end
-
-  self
-end
-
-
- -
+ See on GitHub + + + +

@@ -874,22 +874,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1269
+        def resources_path_names(options)
+          @scope[:path_names].merge!(options)
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1269
-def resources_path_names(options)
-  @scope[:path_names].merge!(options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -921,38 +921,38 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1691
+        def root(path, options = {})
+          if path.is_a?(String)
+            options[:to] = path
+          elsif path.is_a?(Hash) && options.empty?
+            options = path
+          else
+            raise ArgumentError, "must be called with a path and/or options"
+          end
+
+          if @scope.resources?
+            with_scope_level(:root) do
+              path_scope(parent_resource.path) do
+                match_root_route(options)
+              end
+            end
+          else
+            match_root_route(options)
+          end
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1691
-def root(path, options = {})
-  if path.is_a?(String)
-    options[:to] = path
-  elsif path.is_a?(Hash) && options.empty?
-    options = path
-  else
-    raise ArgumentError, "must be called with a path and/or options"
-  end
-
-  if @scope.resources?
-    with_scope_level(:root) do
-      path_scope(parent_resource.path) do
-        match_root_route(options)
-      end
-    end
-  else
-    match_root_route(options)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -972,25 +972,25 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1588
+        def shallow
+          @scope = @scope.new(shallow: true)
+          yield
+        ensure
+          @scope = @scope.parent
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1588
-def shallow
-  @scope = @scope.new(shallow: true)
-  yield
-ensure
-  @scope = @scope.parent
-end
-
-
- -

+ See on GitHub + + + +

@@ -1010,22 +1010,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1595
+        def shallow?
+          !parent_resource.singleton? && @scope[:shallow]
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1595
-def shallow?
-  !parent_resource.singleton? && @scope[:shallow]
-end
-
-
- -

+ See on GitHub + + + +

Instance Private methods

@@ -1048,22 +1048,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1891
+          def api_only? # :doc:
+            @set.api_only?
+          end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1891
-def api_only? # :doc:
-  @set.api_only?
-end
-
-
- - + See on GitHub + + + +

@@ -1083,30 +1083,30 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1879
+          def set_member_mappings_for_resource # :doc:
+            member do
+              get :edit if parent_resource.actions.include?(:edit)
+              get :show if parent_resource.actions.include?(:show)
+              if parent_resource.actions.include?(:update)
+                patch :update
+                put   :update
+              end
+              delete :destroy if parent_resource.actions.include?(:destroy)
+            end
+          end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1879
-def set_member_mappings_for_resource # :doc:
-  member do
-    get :edit if parent_resource.actions.include?(:edit)
-    get :show if parent_resource.actions.include?(:show)
-    if parent_resource.actions.include?(:update)
-      patch :update
-      put   :update
-    end
-    delete :destroy if parent_resource.actions.include?(:destroy)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1126,25 +1126,25 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1775
+          def with_scope_level(kind) # :doc:
+            @scope = @scope.new_level(kind)
+            yield
+          ensure
+            @scope = @scope.parent
+          end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1775
-def with_scope_level(kind) # :doc:
-  @scope = @scope.new_level(kind)
-  yield
-ensure
-  @scope = @scope.parent
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Routing/Mapper/Scoping.html b/src/classes/ActionDispatch/Routing/Mapper/Scoping.html index 8eb3040b62..05c8c22642 100644 --- a/src/classes/ActionDispatch/Routing/Mapper/Scoping.html +++ b/src/classes/ActionDispatch/Routing/Mapper/Scoping.html @@ -204,22 +204,22 @@

Dynamic request mat - -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1011
+        def constraints(constraints = {}, &block)
+          scope(constraints: constraints, &block)
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1011
-def constraints(constraints = {}, &block)
-  scope(constraints: constraints, &block)
-end
-
-
- - + See on GitHub + + + +

@@ -244,25 +244,25 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 896
+        def controller(controller)
+          @scope = @scope.new(controller: controller)
+          yield
+        ensure
+          @scope = @scope.parent
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 896
-def controller(controller)
-  @scope = @scope.new(controller: controller)
-  yield
-ensure
-  @scope = @scope.parent
-end
-
-
- -

+ See on GitHub + + + +

@@ -289,25 +289,25 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1020
+        def defaults(defaults = {})
+          @scope = @scope.new(defaults: merge_defaults_scope(@scope[:defaults], defaults))
+          yield
+        ensure
+          @scope = @scope.parent
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 1020
-def defaults(defaults = {})
-  @scope = @scope.new(defaults: merge_defaults_scope(@scope[:defaults], defaults))
-  yield
-ensure
-  @scope = @scope.parent
-end
-
-
- -

+ See on GitHub + + + +

@@ -365,33 +365,33 @@

Options

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 941
+        def namespace(path, options = {}, &block)
+          path = path.to_s
+
+          defaults = {
+            module:         path,
+            as:             options.fetch(:as, path),
+            shallow_path:   options.fetch(:path, path),
+            shallow_prefix: options.fetch(:as, path)
+          }
+
+          path_scope(options.delete(:path) { path }) do
+            scope(defaults.merge!(options), &block)
+          end
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 941
-def namespace(path, options = {}, &block)
-  path = path.to_s
-
-  defaults = {
-    module:         path,
-    as:             options.fetch(:as, path),
-    shallow_path:   options.fetch(:path, path),
-    shallow_prefix: options.fetch(:as, path)
-  }
-
-  path_scope(options.delete(:path) { path }) do
-    scope(defaults.merge!(options), &block)
-  end
-end
-
-
- -
+ See on GitHub + + + +

@@ -440,70 +440,70 @@

Options

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 837
+        def scope(*args)
+          options = args.extract_options!.dup
+          scope = {}
+
+          options[:path] = args.flatten.join("/") if args.any?
+          options[:constraints] ||= {}
+
+          unless nested_scope?
+            options[:shallow_path] ||= options[:path] if options.key?(:path)
+            options[:shallow_prefix] ||= options[:as] if options.key?(:as)
+          end
+
+          if options[:constraints].is_a?(Hash)
+            defaults = options[:constraints].select do |k, v|
+              URL_OPTIONS.include?(k) && (v.is_a?(String) || v.is_a?(Integer))
+            end
+
+            options[:defaults] = defaults.merge(options[:defaults] || {})
+          else
+            block, options[:constraints] = options[:constraints], {}
+          end
+
+          if options.key?(:only) || options.key?(:except)
+            scope[:action_options] = { only: options.delete(:only),
+                                       except: options.delete(:except) }
+          end
+
+          if options.key? :anchor
+            raise ArgumentError, "anchor is ignored unless passed to `match`"
+          end
+
+          @scope.options.each do |option|
+            if option == :blocks
+              value = block
+            elsif option == :options
+              value = options
+            else
+              value = options.delete(option) { POISON }
+            end
+
+            unless POISON == value
+              scope[option] = send("merge_#{option}_scope", @scope[option], value)
+            end
+          end
+
+          @scope = @scope.new scope
+          yield
+          self
+        ensure
+          @scope = @scope.parent
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 837
-def scope(*args)
-  options = args.extract_options!.dup
-  scope = {}
-
-  options[:path] = args.flatten.join("/") if args.any?
-  options[:constraints] ||= {}
-
-  unless nested_scope?
-    options[:shallow_path] ||= options[:path] if options.key?(:path)
-    options[:shallow_prefix] ||= options[:as] if options.key?(:as)
-  end
-
-  if options[:constraints].is_a?(Hash)
-    defaults = options[:constraints].select do |k, v|
-      URL_OPTIONS.include?(k) && (v.is_a?(String) || v.is_a?(Integer))
-    end
-
-    options[:defaults] = defaults.merge(options[:defaults] || {})
-  else
-    block, options[:constraints] = options[:constraints], {}
-  end
-
-  if options.key?(:only) || options.key?(:except)
-    scope[:action_options] = { only: options.delete(:only),
-                               except: options.delete(:except) }
-  end
-
-  if options.key? :anchor
-    raise ArgumentError, "anchor is ignored unless passed to `match`"
-  end
-
-  @scope.options.each do |option|
-    if option == :blocks
-      value = block
-    elsif option == :options
-      value = options
-    else
-      value = options.delete(option) { POISON }
-    end
-
-    unless POISON == value
-      scope[option] = send("merge_#{option}_scope", @scope[option], value)
-    end
-  end
-
-  @scope = @scope.new scope
-  yield
-  self
-ensure
-  @scope = @scope.parent
-end
-
-
- -
+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Routing/PathRedirect.html b/src/classes/ActionDispatch/Routing/PathRedirect.html index 18094a31e7..ef558b8153 100644 --- a/src/classes/ActionDispatch/Routing/PathRedirect.html +++ b/src/classes/ActionDispatch/Routing/PathRedirect.html @@ -103,22 +103,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/redirection.rb, line 102
+      def inspect
+        "redirect(#{status}, #{block})"
+      end
- -
-
# File actionpack/lib/action_dispatch/routing/redirection.rb, line 102
-def inspect
-  "redirect(#{status}, #{block})"
-end
-
-
- - + See on GitHub + + + +

@@ -138,30 +138,30 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/redirection.rb, line 90
+      def path(params, request)
+        if block.match(URL_PARTS)
+          path     = interpolation_required?($1, params) ? $1 % escape_path(params)     : $1
+          query    = interpolation_required?($2, params) ? $2 % escape(params)          : $2
+          fragment = interpolation_required?($3, params) ? $3 % escape_fragment(params) : $3
+
+          "#{path}#{query}#{fragment}"
+        else
+          interpolation_required?(block, params) ? block % escape(params) : block
+        end
+      end
- -
-
# File actionpack/lib/action_dispatch/routing/redirection.rb, line 90
-def path(params, request)
-  if block.match(URL_PARTS)
-    path     = interpolation_required?($1, params) ? $1 % escape_path(params)     : $1
-    query    = interpolation_required?($2, params) ? $2 % escape(params)          : $2
-    fragment = interpolation_required?($3, params) ? $3 % escape_fragment(params) : $3
-
-    "#{path}#{query}#{fragment}"
-  else
-    interpolation_required?(block, params) ? block % escape(params) : block
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Routing/PolymorphicRoutes.html b/src/classes/ActionDispatch/Routing/PolymorphicRoutes.html index d11300d933..7822fbc22f 100644 --- a/src/classes/ActionDispatch/Routing/PolymorphicRoutes.html +++ b/src/classes/ActionDispatch/Routing/PolymorphicRoutes.html @@ -137,40 +137,40 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/polymorphic_routes.rb, line 126
+      def polymorphic_path(record_or_hash_or_array, options = {})
+        if Hash === record_or_hash_or_array
+          options = record_or_hash_or_array.merge(options)
+          record  = options.delete :id
+          return polymorphic_path record, options
+        end
+
+        if mapping = polymorphic_mapping(record_or_hash_or_array)
+          return mapping.call(self, [record_or_hash_or_array, options], true)
+        end
+
+        opts   = options.dup
+        action = opts.delete :action
+        type   = :path
+
+        HelperMethodBuilder.polymorphic_method self,
+                                               record_or_hash_or_array,
+                                               action,
+                                               type,
+                                               opts
+      end
- -
-
# File actionpack/lib/action_dispatch/routing/polymorphic_routes.rb, line 126
-def polymorphic_path(record_or_hash_or_array, options = {})
-  if Hash === record_or_hash_or_array
-    options = record_or_hash_or_array.merge(options)
-    record  = options.delete :id
-    return polymorphic_path record, options
-  end
-
-  if mapping = polymorphic_mapping(record_or_hash_or_array)
-    return mapping.call(self, [record_or_hash_or_array, options], true)
-  end
-
-  opts   = options.dup
-  action = opts.delete :action
-  type   = :path
-
-  HelperMethodBuilder.polymorphic_method self,
-                                         record_or_hash_or_array,
-                                         action,
-                                         type,
-                                         opts
-end
-
-
- - + See on GitHub + + + +

@@ -231,40 +231,40 @@

Functionality

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/polymorphic_routes.rb, line 103
+      def polymorphic_url(record_or_hash_or_array, options = {})
+        if Hash === record_or_hash_or_array
+          options = record_or_hash_or_array.merge(options)
+          record  = options.delete :id
+          return polymorphic_url record, options
+        end
+
+        if mapping = polymorphic_mapping(record_or_hash_or_array)
+          return mapping.call(self, [record_or_hash_or_array, options], false)
+        end
+
+        opts   = options.dup
+        action = opts.delete :action
+        type   = opts.delete(:routing_type) || :url
+
+        HelperMethodBuilder.polymorphic_method self,
+                                               record_or_hash_or_array,
+                                               action,
+                                               type,
+                                               opts
+      end
- -
-
# File actionpack/lib/action_dispatch/routing/polymorphic_routes.rb, line 103
-def polymorphic_url(record_or_hash_or_array, options = {})
-  if Hash === record_or_hash_or_array
-    options = record_or_hash_or_array.merge(options)
-    record  = options.delete :id
-    return polymorphic_url record, options
-  end
-
-  if mapping = polymorphic_mapping(record_or_hash_or_array)
-    return mapping.call(self, [record_or_hash_or_array, options], false)
-  end
-
-  opts   = options.dup
-  action = opts.delete :action
-  type   = opts.delete(:routing_type) || :url
-
-  HelperMethodBuilder.polymorphic_method self,
-                                         record_or_hash_or_array,
-                                         action,
-                                         type,
-                                         opts
-end
-
-
- -
+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Routing/Redirection.html b/src/classes/ActionDispatch/Routing/Redirection.html index 6403bf1771..d230af1f3a 100644 --- a/src/classes/ActionDispatch/Routing/Redirection.html +++ b/src/classes/ActionDispatch/Routing/Redirection.html @@ -118,31 +118,31 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/redirection.rb, line 199
+      def redirect(*args, &block)
+        options = args.extract_options!
+        status  = options.delete(:status) || 301
+        path    = args.shift
+
+        return OptionRedirect.new(status, options) if options.any?
+        return PathRedirect.new(status, path) if String === path
+
+        block = path if path.respond_to? :call
+        raise ArgumentError, "redirection argument not supported" unless block
+        Redirect.new status, block
+      end
- -
-
# File actionpack/lib/action_dispatch/routing/redirection.rb, line 199
-def redirect(*args, &block)
-  options = args.extract_options!
-  status  = options.delete(:status) || 301
-  path    = args.shift
-
-  return OptionRedirect.new(status, options) if options.any?
-  return PathRedirect.new(status, path) if String === path
-
-  block = path if path.respond_to? :call
-  raise ArgumentError, "redirection argument not supported" unless block
-  Redirect.new status, block
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Routing/RouteWrapper.html b/src/classes/ActionDispatch/Routing/RouteWrapper.html deleted file mode 100644 index b1443c3808..0000000000 --- a/src/classes/ActionDispatch/Routing/RouteWrapper.html +++ /dev/null @@ -1,462 +0,0 @@ ---- -title: ActionDispatch::Routing::RouteWrapper -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - - -

Instance Public methods

- -
-

- - action() - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 41
-def action
-  parts.include?(:action) ? ":action" : requirements[:action]
-end
-
-
- -
- -
-

- - constraints() - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 13
-def constraints
-  requirements.except(:controller, :action)
-end
-
-
- -
- -
-

- - controller() - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 37
-def controller
-  parts.include?(:controller) ? ":controller" : requirements[:controller]
-end
-
-
- -
- -
-

- - endpoint() - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 9
-def endpoint
-  app.dispatcher? ? "#{controller}##{action}" : rack_app.inspect
-end
-
-
- -
- -
-

- - engine?() - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 49
-def engine?
-  app.engine?
-end
-
-
- -
- -
-

- - internal?() - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 45
-def internal?
-  internal
-end
-
-
- -
- -
-

- - name() - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 25
-def name
-  super.to_s
-end
-
-
- -
- -
-

- - path() - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 21
-def path
-  super.spec.to_s
-end
-
-
- -
- -
-

- - rack_app() - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 17
-def rack_app
-  app.rack_app
-end
-
-
- -
- -
-

- - reqs() - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 29
-def reqs
-  @reqs ||= begin
-    reqs = endpoint
-    reqs += " #{constraints}" unless constraints.empty?
-    reqs
-  end
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActionDispatch/Routing/UrlFor.html b/src/classes/ActionDispatch/Routing/UrlFor.html index 753c4dd442..d7551fa469 100644 --- a/src/classes/ActionDispatch/Routing/UrlFor.html +++ b/src/classes/ActionDispatch/Routing/UrlFor.html @@ -177,23 +177,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/url_for.rb, line 108
+      def initialize(...)
+        @_routes = nil
+        super
+      end
- -
-
# File actionpack/lib/action_dispatch/routing/url_for.rb, line 108
-def initialize(...)
-  @_routes = nil
-  super
-end
-
-
- - + See on GitHub + + + + @@ -234,22 +234,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/url_for.rb, line 217
+      def route_for(name, *args)
+        public_send(:"#{name}_url", *args)
+      end
- -
-
# File actionpack/lib/action_dispatch/routing/url_for.rb, line 217
-def route_for(name, *args)
-  public_send(:"#{name}_url", *args)
-end
-
-
- - + See on GitHub + + + +

@@ -319,22 +319,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/url_for.rb, line 173
+      def url_for(options = nil)
+        full_url_for(options)
+      end
- -
-
# File actionpack/lib/action_dispatch/routing/url_for.rb, line 173
-def url_for(options = nil)
-  full_url_for(options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -354,22 +354,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/url_for.rb, line 116
+      def url_options
+        default_url_options
+      end
- -
-
# File actionpack/lib/action_dispatch/routing/url_for.rb, line 116
-def url_options
-  default_url_options
-end
-
-
- -

+ See on GitHub + + + +

Instance Protected methods

@@ -392,22 +392,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/url_for.rb, line 222
+        def optimize_routes_generation?
+          _routes.optimize_routes_generation? && default_url_options.empty?
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/url_for.rb, line 222
-def optimize_routes_generation?
-  _routes.optimize_routes_generation? && default_url_options.empty?
-end
-
-
- - + See on GitHub + + + +

Instance Private methods

@@ -430,22 +430,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/url_for.rb, line 234
+        def _routes_context # :doc:
+          self
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/url_for.rb, line 234
-def _routes_context # :doc:
-  self
-end
-
-
- - + See on GitHub + + + +

@@ -465,25 +465,25 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/routing/url_for.rb, line 227
+        def _with_routes(routes) # :doc:
+          old_routes, @_routes = @_routes, routes
+          yield
+        ensure
+          @_routes = old_routes
+        end
- -
-
# File actionpack/lib/action_dispatch/routing/url_for.rb, line 227
-def _with_routes(routes) # :doc:
-  old_routes, @_routes = @_routes, routes
-  yield
-ensure
-  @_routes = old_routes
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/ServerTiming.html b/src/classes/ActionDispatch/ServerTiming.html index af41223c91..d9ae68672b 100644 --- a/src/classes/ActionDispatch/ServerTiming.html +++ b/src/classes/ActionDispatch/ServerTiming.html @@ -84,24 +84,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/server_timing.rb, line 50
+    def initialize(app)
+      @app = app
+      @subscriber = Subscriber.instance
+      @subscriber.ensure_subscribed
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/server_timing.rb, line 50
-def initialize(app)
-  @app = app
-  @subscriber = Subscriber.instance
-  @subscriber.ensure_subscribed
-end
-
-
- - + See on GitHub + + + + @@ -125,38 +125,38 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/server_timing.rb, line 56
+    def call(env)
+      response = nil
+      events = @subscriber.collect_events do
+        response = @app.call(env)
+      end
+
+      headers = response[1]
+
+      header_info = events.group_by(&:name).map do |event_name, events_collection|
+        "%s;dur=%.2f" % [event_name, events_collection.sum(&:duration)]
+      end
+
+      if headers[ActionDispatch::Constants::SERVER_TIMING].present?
+        header_info.prepend(headers[ActionDispatch::Constants::SERVER_TIMING])
+      end
+      headers[ActionDispatch::Constants::SERVER_TIMING] = header_info.join(", ")
+
+      response
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/server_timing.rb, line 56
-def call(env)
-  response = nil
-  events = @subscriber.collect_events do
-    response = @app.call(env)
-  end
-
-  headers = response[1]
-
-  header_info = events.group_by(&:name).map do |event_name, events_collection|
-    "%s;dur=%.2f" % [event_name, events_collection.sum(&:duration)]
-  end
-
-  if headers[ActionDispatch::Constants::SERVER_TIMING].present?
-    header_info.prepend(headers[ActionDispatch::Constants::SERVER_TIMING])
-  end
-  headers[ActionDispatch::Constants::SERVER_TIMING] = header_info.join(", ")
-
-  response
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Session/AbstractSecureStore.html b/src/classes/ActionDispatch/Session/AbstractSecureStore.html index f2638d92bc..193f4fdefc 100644 --- a/src/classes/ActionDispatch/Session/AbstractSecureStore.html +++ b/src/classes/ActionDispatch/Session/AbstractSecureStore.html @@ -103,22 +103,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/session/abstract_store.rb, line 100
+      def generate_sid
+        Rack::Session::SessionId.new(super)
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/session/abstract_store.rb, line 100
-def generate_sid
-  Rack::Session::SessionId.new(super)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Session/CacheStore.html b/src/classes/ActionDispatch/Session/CacheStore.html index 0164a7bf53..4d6ffe8eba 100644 --- a/src/classes/ActionDispatch/Session/CacheStore.html +++ b/src/classes/ActionDispatch/Session/CacheStore.html @@ -107,24 +107,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/session/cache_store.rb, line 18
+      def initialize(app, options = {})
+        @cache = options[:cache] || Rails.cache
+        options[:expire_after] ||= @cache.options[:expires_in]
+        super
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/session/cache_store.rb, line 18
-def initialize(app, options = {})
-  @cache = options[:cache] || Rails.cache
-  options[:expire_after] ||= @cache.options[:expires_in]
-  super
-end
-
-
- - + See on GitHub + + + + @@ -148,24 +148,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/session/cache_store.rb, line 44
+      def delete_session(env, sid, options)
+        @cache.delete(cache_key(sid.private_id))
+        @cache.delete(cache_key(sid.public_id))
+        generate_sid
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/session/cache_store.rb, line 44
-def delete_session(env, sid, options)
-  @cache.delete(cache_key(sid.private_id))
-  @cache.delete(cache_key(sid.public_id))
-  generate_sid
-end
-
-
- - + See on GitHub + + + +

@@ -185,25 +185,25 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/session/cache_store.rb, line 25
+      def find_session(env, sid)
+        unless sid && (session = get_session_with_fallback(sid))
+          sid, session = generate_sid, {}
+        end
+        [sid, session]
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/session/cache_store.rb, line 25
-def find_session(env, sid)
-  unless sid && (session = get_session_with_fallback(sid))
-    sid, session = generate_sid, {}
-  end
-  [sid, session]
-end
-
-
- -

+ See on GitHub + + + +

@@ -223,28 +223,28 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/session/cache_store.rb, line 33
+      def write_session(env, sid, session, options)
+        key = cache_key(sid.private_id)
+        if session
+          @cache.write(key, session, expires_in: options[:expire_after])
+        else
+          @cache.delete(key)
+        end
+        sid
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/session/cache_store.rb, line 33
-def write_session(env, sid, session, options)
-  key = cache_key(sid.private_id)
-  if session
-    @cache.write(key, session, expires_in: options[:expire_after])
-  else
-    @cache.delete(key)
-  end
-  sid
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Session/Compatibility.html b/src/classes/ActionDispatch/Session/Compatibility.html index 338100d2ef..0bf1873cb2 100644 --- a/src/classes/ActionDispatch/Session/Compatibility.html +++ b/src/classes/ActionDispatch/Session/Compatibility.html @@ -82,23 +82,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/session/abstract_store.rb, line 21
+      def initialize(app, options = {})
+        options[:key] ||= "_session_id"
+        super
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/session/abstract_store.rb, line 21
-def initialize(app, options = {})
-  options[:key] ||= "_session_id"
-  super
-end
-
-
- - + See on GitHub + + + + @@ -122,24 +122,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/session/abstract_store.rb, line 26
+      def generate_sid
+        sid = SecureRandom.hex(16)
+        sid.encode!(Encoding::UTF_8)
+        sid
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/session/abstract_store.rb, line 26
-def generate_sid
-  sid = SecureRandom.hex(16)
-  sid.encode!(Encoding::UTF_8)
-  sid
-end
-
-
- - + See on GitHub + + + +

Instance Private methods

@@ -162,23 +162,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/session/abstract_store.rb, line 33
+      def initialize_sid # :doc:
+        @default_options.delete(:sidbits)
+        @default_options.delete(:secure_random)
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/session/abstract_store.rb, line 33
-def initialize_sid # :doc:
-  @default_options.delete(:sidbits)
-  @default_options.delete(:secure_random)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Session/CookieStore.html b/src/classes/ActionDispatch/Session/CookieStore.html index cddadbe8f4..922a2557ba 100644 --- a/src/classes/ActionDispatch/Session/CookieStore.html +++ b/src/classes/ActionDispatch/Session/CookieStore.html @@ -133,24 +133,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/session/cookie_store.rb, line 63
+      def initialize(app, options = {})
+        options[:cookie_only] = true
+        options[:same_site] = DEFAULT_SAME_SITE if !options.key?(:same_site)
+        super
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/session/cookie_store.rb, line 63
-def initialize(app, options = {})
-  options[:cookie_only] = true
-  options[:same_site] = DEFAULT_SAME_SITE if !options.key?(:same_site)
-  super
-end
-
-
- - + See on GitHub + + + + @@ -174,25 +174,25 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/session/cookie_store.rb, line 69
+      def delete_session(req, session_id, options)
+        new_sid = generate_sid unless options[:drop]
+        # Reset hash and Assign the new session id
+        req.set_header("action_dispatch.request.unsigned_session_cookie", new_sid ? { "session_id" => new_sid.public_id } : {})
+        new_sid
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/session/cookie_store.rb, line 69
-def delete_session(req, session_id, options)
-  new_sid = generate_sid unless options[:drop]
-  # Reset hash and Assign the new session id
-  req.set_header("action_dispatch.request.unsigned_session_cookie", new_sid ? { "session_id" => new_sid.public_id } : {})
-  new_sid
-end
-
-
- - + See on GitHub + + + +

@@ -212,26 +212,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/session/cookie_store.rb, line 76
+      def load_session(req)
+        stale_session_check! do
+          data = unpacked_cookie_data(req)
+          data = persistent_session_id!(data)
+          [Rack::Session::SessionId.new(data["session_id"]), data]
+        end
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/session/cookie_store.rb, line 76
-def load_session(req)
-  stale_session_check! do
-    data = unpacked_cookie_data(req)
-    data = persistent_session_id!(data)
-    [Rack::Session::SessionId.new(data["session_id"]), data]
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Session/CookieStore/SessionId.html b/src/classes/ActionDispatch/Session/CookieStore/SessionId.html index 7ae960e123..f6371be329 100644 --- a/src/classes/ActionDispatch/Session/CookieStore/SessionId.html +++ b/src/classes/ActionDispatch/Session/CookieStore/SessionId.html @@ -94,23 +94,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/session/cookie_store.rb, line 55
+        def initialize(session_id, cookie_value = {})
+          super(session_id)
+          @cookie_value = cookie_value
+        end
- -
-
# File actionpack/lib/action_dispatch/middleware/session/cookie_store.rb, line 55
-def initialize(session_id, cookie_value = {})
-  super(session_id)
-  @cookie_value = cookie_value
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Session/MemCacheStore.html b/src/classes/ActionDispatch/Session/MemCacheStore.html index 2e546d5c3e..8c8fce26d5 100644 --- a/src/classes/ActionDispatch/Session/MemCacheStore.html +++ b/src/classes/ActionDispatch/Session/MemCacheStore.html @@ -115,23 +115,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb, line 24
+      def initialize(app, options = {})
+        options[:expire_after] ||= options[:expires]
+        super
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb, line 24
-def initialize(app, options = {})
-  options[:expire_after] ||= options[:expires]
-  super
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Session/StaleSessionCheck.html b/src/classes/ActionDispatch/Session/StaleSessionCheck.html index 10d187e455..d122433665 100644 --- a/src/classes/ActionDispatch/Session/StaleSessionCheck.html +++ b/src/classes/ActionDispatch/Session/StaleSessionCheck.html @@ -83,22 +83,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/session/abstract_store.rb, line 48
+      def extract_session_id(env)
+        stale_session_check! { super }
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/session/abstract_store.rb, line 48
-def extract_session_id(env)
-  stale_session_check! { super }
-end
-
-
- - + See on GitHub + + + +

@@ -118,22 +118,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/session/abstract_store.rb, line 44
+      def load_session(env)
+        stale_session_check! { super }
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/session/abstract_store.rb, line 44
-def load_session(env)
-  stale_session_check! { super }
-end
-
-
- -

+ See on GitHub + + + +

@@ -153,34 +153,34 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/session/abstract_store.rb, line 52
+      def stale_session_check!
+        yield
+      rescue ArgumentError => argument_error
+        if argument_error.message =~ %r{undefined class/module ([\w:]*\w)}
+          begin
+            # Note that the regexp does not allow $1 to end with a ':'.
+            $1.constantize
+          rescue LoadError, NameError
+            raise ActionDispatch::Session::SessionRestoreError
+          end
+          retry
+        else
+          raise
+        end
+      end
- -
-
# File actionpack/lib/action_dispatch/middleware/session/abstract_store.rb, line 52
-def stale_session_check!
-  yield
-rescue ArgumentError => argument_error
-  if argument_error.message =~ %r{undefined class/module ([\w:]*\w)}
-    begin
-      # Note that the regexp does not allow $1 to end with a ':'.
-      $1.constantize
-    rescue LoadError, NameError
-      raise ActionDispatch::Session::SessionRestoreError
-    end
-    retry
-  else
-    raise
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/ShowExceptions.html b/src/classes/ActionDispatch/ShowExceptions.html index ecb77326c0..f3472837d4 100644 --- a/src/classes/ActionDispatch/ShowExceptions.html +++ b/src/classes/ActionDispatch/ShowExceptions.html @@ -98,23 +98,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/show_exceptions.rb, line 25
+    def initialize(app, exceptions_app)
+      @app = app
+      @exceptions_app = exceptions_app
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/show_exceptions.rb, line 25
-def initialize(app, exceptions_app)
-  @app = app
-  @exceptions_app = exceptions_app
-end
-
-
- - + See on GitHub + + + + @@ -138,31 +138,31 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/show_exceptions.rb, line 30
+    def call(env)
+      @app.call(env)
+    rescue Exception => exception
+      request = ActionDispatch::Request.new env
+      backtrace_cleaner = request.get_header("action_dispatch.backtrace_cleaner")
+      wrapper = ExceptionWrapper.new(backtrace_cleaner, exception)
+      if wrapper.show?(request)
+        render_exception(request, wrapper)
+      else
+        raise exception
+      end
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/show_exceptions.rb, line 30
-def call(env)
-  @app.call(env)
-rescue Exception => exception
-  request = ActionDispatch::Request.new env
-  backtrace_cleaner = request.get_header("action_dispatch.backtrace_cleaner")
-  wrapper = ExceptionWrapper.new(backtrace_cleaner, exception)
-  if wrapper.show?(request)
-    render_exception(request, wrapper)
-  else
-    raise exception
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/Static.html b/src/classes/ActionDispatch/Static.html index a8bc7097f8..a52bb8578b 100644 --- a/src/classes/ActionDispatch/Static.html +++ b/src/classes/ActionDispatch/Static.html @@ -98,23 +98,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/static.rb, line 19
+    def initialize(app, path, index: "index", headers: {})
+      @app = app
+      @file_handler = FileHandler.new(path, index: index, headers: headers)
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/static.rb, line 19
-def initialize(app, path, index: "index", headers: {})
-  @app = app
-  @file_handler = FileHandler.new(path, index: index, headers: headers)
-end
-
-
- - + See on GitHub + + + + @@ -138,22 +138,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/middleware/static.rb, line 24
+    def call(env)
+      @file_handler.attempt(env) || @app.call(env)
+    end
- -
-
# File actionpack/lib/action_dispatch/middleware/static.rb, line 24
-def call(env)
-  @file_handler.attempt(env) || @app.call(env)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/SystemTestCase.html b/src/classes/ActionDispatch/SystemTestCase.html index 7809ceb6cc..648cdba936 100644 --- a/src/classes/ActionDispatch/SystemTestCase.html +++ b/src/classes/ActionDispatch/SystemTestCase.html @@ -219,24 +219,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/system_test_case.rb, line 156
+    def self.driven_by(driver, using: :chrome, screen_size: [1400, 1400], options: {}, &capabilities)
+      driver_options = { using: using, screen_size: screen_size, options: options }
+
+      self.driver = SystemTesting::Driver.new(driver, **driver_options, &capabilities)
+    end
- -
-
# File actionpack/lib/action_dispatch/system_test_case.rb, line 156
-def self.driven_by(driver, using: :chrome, screen_size: [1400, 1400], options: {}, &capabilities)
-  driver_options = { using: using, screen_size: screen_size, options: options }
-
-  self.driver = SystemTesting::Driver.new(driver, **driver_options, &capabilities)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionDispatch/SystemTesting/TestHelpers/ScreenshotHelper.html b/src/classes/ActionDispatch/SystemTesting/TestHelpers/ScreenshotHelper.html index 9c45bcdc47..ccd58ea68d 100644 --- a/src/classes/ActionDispatch/SystemTesting/TestHelpers/ScreenshotHelper.html +++ b/src/classes/ActionDispatch/SystemTesting/TestHelpers/ScreenshotHelper.html @@ -87,25 +87,25 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb, line 44
+        def take_failed_screenshot
+          return unless failed? && supports_screenshot? && Capybara::Session.instance_created?
+
+          take_screenshot
+          metadata[:failure_screenshot_path] = relative_image_path if Minitest::Runnable.method_defined?(:metadata)
+        end
- -
-
# File actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb, line 44
-def take_failed_screenshot
-  return unless failed? && supports_screenshot? && Capybara::Session.instance_created?
-
-  take_screenshot
-  metadata[:failure_screenshot_path] = relative_image_path if Minitest::Runnable.method_defined?(:metadata)
-end
-
-
- - + See on GitHub + + + +

@@ -146,27 +146,27 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb, line 31
+        def take_screenshot(html: false, screenshot: nil)
+          showing_html = html || html_from_env?
+
+          increment_unique
+          save_html if showing_html
+          save_image
+          show display_image(html: showing_html, screenshot_output: screenshot)
+        end
- -
-
# File actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb, line 31
-def take_screenshot(html: false, screenshot: nil)
-  showing_html = html || html_from_env?
-
-  increment_unique
-  save_html if showing_html
-  save_image
-  show display_image(html: showing_html, screenshot_output: screenshot)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/TestProcess.html b/src/classes/ActionDispatch/TestProcess.html index df240bc9cc..35b82818b9 100644 --- a/src/classes/ActionDispatch/TestProcess.html +++ b/src/classes/ActionDispatch/TestProcess.html @@ -118,24 +118,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/test_process.rb, line 31
+    def assigns(key = nil)
+      raise NoMethodError,
+        "assigns has been extracted to a gem. To continue using it,
+        add `gem 'rails-controller-testing'` to your Gemfile."
+    end
- -
-
# File actionpack/lib/action_dispatch/testing/test_process.rb, line 31
-def assigns(key = nil)
-  raise NoMethodError,
-    "assigns has been extracted to a gem. To continue using it,
-    add `gem 'rails-controller-testing'` to your Gemfile."
-end
-
-
- - + See on GitHub + + + +

@@ -155,22 +155,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/test_process.rb, line 45
+    def cookies
+      @cookie_jar ||= Cookies::CookieJar.build(@request, @request.cookies)
+    end
- -
-
# File actionpack/lib/action_dispatch/testing/test_process.rb, line 45
-def cookies
-  @cookie_jar ||= Cookies::CookieJar.build(@request, @request.cookies)
-end
-
-
- -

+ See on GitHub + + + +

@@ -190,22 +190,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/test_process.rb, line 41
+    def flash
+      @request.flash
+    end
- -
-
# File actionpack/lib/action_dispatch/testing/test_process.rb, line 41
-def flash
-  @request.flash
-end
-
-
- -

+ See on GitHub + + + +

@@ -225,22 +225,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/test_process.rb, line 49
+    def redirect_to_url
+      @response.redirect_url
+    end
- -
-
# File actionpack/lib/action_dispatch/testing/test_process.rb, line 49
-def redirect_to_url
-  @response.redirect_url
-end
-
-
- -

+ See on GitHub + + + +

@@ -260,22 +260,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/test_process.rb, line 37
+    def session
+      @request.session
+    end
- -
-
# File actionpack/lib/action_dispatch/testing/test_process.rb, line 37
-def session
-  @request.session
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionDispatch/TestProcess/FixtureFile.html b/src/classes/ActionDispatch/TestProcess/FixtureFile.html index 0b21aaf4be..e03983c0a4 100644 --- a/src/classes/ActionDispatch/TestProcess/FixtureFile.html +++ b/src/classes/ActionDispatch/TestProcess/FixtureFile.html @@ -93,26 +93,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/test_process.rb, line 19
+      def file_fixture_upload(path, mime_type = nil, binary = false)
+        if self.class.file_fixture_path && !File.exist?(path)
+          path = file_fixture(path)
+        end
+
+        Rack::Test::UploadedFile.new(path, mime_type, binary)
+      end
- -
-
# File actionpack/lib/action_dispatch/testing/test_process.rb, line 19
-def file_fixture_upload(path, mime_type = nil, binary = false)
-  if self.class.file_fixture_path && !File.exist?(path)
-    path = file_fixture(path)
-  end
-
-  Rack::Test::UploadedFile.new(path, mime_type, binary)
-end
-
-
- - + See on GitHub + + + +

@@ -136,7 +136,8 @@

-

+ + diff --git a/src/classes/ActionDispatch/TestRequest.html b/src/classes/ActionDispatch/TestRequest.html index c54d0c4481..84f507afb8 100644 --- a/src/classes/ActionDispatch/TestRequest.html +++ b/src/classes/ActionDispatch/TestRequest.html @@ -146,24 +146,24 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 15
-def self.create(env = {})
-  env = Rails.application.env_config.merge(env) if defined?(Rails.application) && Rails.application
-  env["rack.request.cookie_hash"] ||= {}.with_indifferent_access
-  new(default_env.merge(env))
-end
-
-
- - + +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 15
+    def self.create(env = {})
+      env = Rails.application.env_config.merge(env) if defined?(Rails.application) && Rails.application
+      env["rack.request.cookie_hash"] ||= {}.with_indifferent_access
+      new(default_env.merge(env))
+    end
+ + See on GitHub + +
+ + @@ -187,23 +187,23 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 66
-def accept=(mime_types)
-  delete_header("action_dispatch.request.accepts")
-  set_header("HTTP_ACCEPT", Array(mime_types).collect(&:to_s).join(","))
-end
-
-
- - + +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 66
+    def accept=(mime_types)
+      delete_header("action_dispatch.request.accepts")
+      set_header("HTTP_ACCEPT", Array(mime_types).collect(&:to_s).join(","))
+    end
+ + See on GitHub + +
+ +

@@ -223,22 +223,22 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 46
-def action=(action_name)
-  path_parameters[:action] = action_name.to_s
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 46
+    def action=(action_name)
+      path_parameters[:action] = action_name.to_s
+    end
+ + See on GitHub + +
+ +

@@ -258,22 +258,22 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 30
-def host=(host)
-  set_header("HTTP_HOST", host)
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 30
+    def host=(host)
+      set_header("HTTP_HOST", host)
+    end
+ + See on GitHub + +
+ +

@@ -293,22 +293,22 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 50
-def if_modified_since=(last_modified)
-  set_header("HTTP_IF_MODIFIED_SINCE", last_modified)
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 50
+    def if_modified_since=(last_modified)
+      set_header("HTTP_IF_MODIFIED_SINCE", last_modified)
+    end
+ + See on GitHub + +
+ +

@@ -328,22 +328,22 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 54
-def if_none_match=(etag)
-  set_header("HTTP_IF_NONE_MATCH", etag)
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 54
+    def if_none_match=(etag)
+      set_header("HTTP_IF_NONE_MATCH", etag)
+    end
+ + See on GitHub + +
+ +

@@ -363,22 +363,22 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 42
-def path=(path)
-  set_header("PATH_INFO", path)
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 42
+    def path=(path)
+      set_header("PATH_INFO", path)
+    end
+ + See on GitHub + +
+ +

@@ -398,22 +398,22 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 34
-def port=(number)
-  set_header("SERVER_PORT", number)
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 34
+    def port=(number)
+      set_header("SERVER_PORT", number)
+    end
+ + See on GitHub + +
+ +

@@ -433,22 +433,22 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 58
-def remote_addr=(addr)
-  set_header("REMOTE_ADDR", addr)
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 58
+    def remote_addr=(addr)
+      set_header("REMOTE_ADDR", addr)
+    end
+ + See on GitHub + +
+ +

@@ -468,22 +468,22 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 26
-def request_method=(method)
-  super(method.to_s.upcase)
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 26
+    def request_method=(method)
+      super(method.to_s.upcase)
+    end
+ + See on GitHub + +
+ +

@@ -503,22 +503,22 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 38
-def request_uri=(uri)
-  set_header("REQUEST_URI", uri)
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 38
+    def request_uri=(uri)
+      set_header("REQUEST_URI", uri)
+    end
+ + See on GitHub + +
+ +

@@ -538,22 +538,22 @@

- -
- - -
-
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 62
-def user_agent=(user_agent)
-  set_header("HTTP_USER_AGENT", user_agent)
-end
-
-
- -

+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/test_request.rb, line 62
+    def user_agent=(user_agent)
+      set_header("HTTP_USER_AGENT", user_agent)
+    end
+ + See on GitHub + +
+ + diff --git a/src/classes/ActionDispatch/TestResponse.html b/src/classes/ActionDispatch/TestResponse.html index 35bb171622..7cc7a9ced1 100644 --- a/src/classes/ActionDispatch/TestResponse.html +++ b/src/classes/ActionDispatch/TestResponse.html @@ -96,22 +96,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/test_response.rb, line 13
+    def self.from_response(response)
+      new response.status, response.headers, response.body
+    end
- -
-
# File actionpack/lib/action_dispatch/testing/test_response.rb, line 13
-def self.from_response(response)
-  new response.status, response.headers, response.body
-end
-
-
- - + See on GitHub + + + + @@ -167,22 +167,22 @@

Examples

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/test_response.rb, line 49
+    def parsed_body
+      @parsed_body ||= response_parser.call(body)
+    end
- -
-
# File actionpack/lib/action_dispatch/testing/test_response.rb, line 49
-def parsed_body
-  @parsed_body ||= response_parser.call(body)
-end
-
-
- - + See on GitHub + + + +

@@ -202,22 +202,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/testing/test_response.rb, line 53
+    def response_parser
+      @response_parser ||= RequestEncoder.parser(media_type)
+    end
- -
-
# File actionpack/lib/action_dispatch/testing/test_response.rb, line 53
-def response_parser
-  @response_parser ||= RequestEncoder.parser(media_type)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionMailbox.html b/src/classes/ActionMailbox.html index 74f83068b0..d99de6c7e5 100644 --- a/src/classes/ActionMailbox.html +++ b/src/classes/ActionMailbox.html @@ -194,22 +194,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/gem_version.rb, line 5
+  def self.gem_version
+    Gem::Version.new VERSION::STRING
+  end
- -
-
# File actionmailbox/lib/action_mailbox/gem_version.rb, line 5
-def self.gem_version
-  Gem::Version.new VERSION::STRING
-end
-
-
- - + See on GitHub + + + +

@@ -229,22 +229,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/version.rb, line 7
+  def self.version
+    gem_version
+  end
- -
-
# File actionmailbox/lib/action_mailbox/version.rb, line 7
-def self.version
-  gem_version
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionMailbox/Base.html b/src/classes/ActionMailbox/Base.html index 01a869cc1d..290edbe763 100644 --- a/src/classes/ActionMailbox/Base.html +++ b/src/classes/ActionMailbox/Base.html @@ -175,22 +175,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/base.rb, line 79
+    def initialize(inbound_email)
+      @inbound_email = inbound_email
+    end
- -
-
# File actionmailbox/lib/action_mailbox/base.rb, line 79
-def initialize(inbound_email)
-  @inbound_email = inbound_email
-end
-
-
- - + See on GitHub + + + +

@@ -210,22 +210,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/base.rb, line 75
+    def self.receive(inbound_email)
+      new(inbound_email).perform_processing
+    end
- -
-
# File actionmailbox/lib/action_mailbox/base.rb, line 75
-def self.receive(inbound_email)
-  new(inbound_email).perform_processing
-end
-
-
- -

+ See on GitHub + + + + @@ -249,23 +249,23 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/base.rb, line 111
+    def bounce_now_with(message)
+      inbound_email.bounced!
+      message.deliver_now
+    end
- -
-
# File actionmailbox/lib/action_mailbox/base.rb, line 111
-def bounce_now_with(message)
-  inbound_email.bounced!
-  message.deliver_now
-end
-
-
- - + See on GitHub + + + +

@@ -285,23 +285,23 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/base.rb, line 105
+    def bounce_with(message)
+      inbound_email.bounced!
+      message.deliver_later
+    end
- -
-
# File actionmailbox/lib/action_mailbox/base.rb, line 105
-def bounce_with(message)
-  inbound_email.bounced!
-  message.deliver_later
-end
-
-
- -

+ See on GitHub + + + +

@@ -321,22 +321,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/base.rb, line 96
+    def process
+      # Override in subclasses
+    end
- -
-
# File actionmailbox/lib/action_mailbox/base.rb, line 96
-def process
-  # Override in subclasses
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionMailbox/Callbacks.html b/src/classes/ActionMailbox/Callbacks.html index c1eaddff7e..01aaac0e13 100644 --- a/src/classes/ActionMailbox/Callbacks.html +++ b/src/classes/ActionMailbox/Callbacks.html @@ -126,22 +126,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/callbacks.rb, line 27
+      def after_processing(*methods, &block)
+        set_callback(:process, :after, *methods, &block)
+      end
- -
-
# File actionmailbox/lib/action_mailbox/callbacks.rb, line 27
-def after_processing(*methods, &block)
-  set_callback(:process, :after, *methods, &block)
-end
-
-
- - + See on GitHub + + + +

@@ -161,22 +161,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/callbacks.rb, line 31
+      def around_processing(*methods, &block)
+        set_callback(:process, :around, *methods, &block)
+      end
- -
-
# File actionmailbox/lib/action_mailbox/callbacks.rb, line 31
-def around_processing(*methods, &block)
-  set_callback(:process, :around, *methods, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -196,22 +196,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/callbacks.rb, line 23
+      def before_processing(*methods, &block)
+        set_callback(:process, :before, *methods, &block)
+      end
- -
-
# File actionmailbox/lib/action_mailbox/callbacks.rb, line 23
-def before_processing(*methods, &block)
-  set_callback(:process, :before, *methods, &block)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionMailbox/InboundEmail.html b/src/classes/ActionMailbox/InboundEmail.html index 6ed5b1954d..fa37ad52a5 100644 --- a/src/classes/ActionMailbox/InboundEmail.html +++ b/src/classes/ActionMailbox/InboundEmail.html @@ -141,22 +141,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/app/models/action_mailbox/inbound_email.rb, line 35
+    def mail
+      @mail ||= Mail.from_source(source)
+    end
- -
-
# File actionmailbox/app/models/action_mailbox/inbound_email.rb, line 35
-def mail
-  @mail ||= Mail.from_source(source)
-end
-
-
- - + See on GitHub + + + +

@@ -176,22 +176,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/app/models/action_mailbox/inbound_email.rb, line 43
+    def processed?
+      delivered? || failed? || bounced?
+    end
- -
-
# File actionmailbox/app/models/action_mailbox/inbound_email.rb, line 43
-def processed?
-  delivered? || failed? || bounced?
-end
-
-
- -

+ See on GitHub + + + +

@@ -211,22 +211,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/app/models/action_mailbox/inbound_email.rb, line 39
+    def source
+      @source ||= raw_email.download
+    end
- -
-
# File actionmailbox/app/models/action_mailbox/inbound_email.rb, line 39
-def source
-  @source ||= raw_email.download
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionMailbox/InboundEmail/Incineratable.html b/src/classes/ActionMailbox/InboundEmail/Incineratable.html index 9b75c97864..bb5b33ae85 100644 --- a/src/classes/ActionMailbox/InboundEmail/Incineratable.html +++ b/src/classes/ActionMailbox/InboundEmail/Incineratable.html @@ -100,22 +100,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/app/models/action_mailbox/inbound_email/incineratable.rb, line 17
+  def incinerate
+    Incineration.new(self).run
+  end
- -
-
# File actionmailbox/app/models/action_mailbox/inbound_email/incineratable.rb, line 17
-def incinerate
-  Incineration.new(self).run
-end
-
-
- - + See on GitHub + + + +

@@ -135,22 +135,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/app/models/action_mailbox/inbound_email/incineratable.rb, line 13
+  def incinerate_later
+    ActionMailbox::IncinerationJob.schedule self
+  end
- -
-
# File actionmailbox/app/models/action_mailbox/inbound_email/incineratable.rb, line 13
-def incinerate_later
-  ActionMailbox::IncinerationJob.schedule self
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionMailbox/InboundEmail/Incineratable/Incineration.html b/src/classes/ActionMailbox/InboundEmail/Incineratable/Incineration.html index cb9dc0dff5..b000b699c9 100644 --- a/src/classes/ActionMailbox/InboundEmail/Incineratable/Incineration.html +++ b/src/classes/ActionMailbox/InboundEmail/Incineratable/Incineration.html @@ -90,22 +90,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/app/models/action_mailbox/inbound_email/incineratable/incineration.rb, line 9
+    def initialize(inbound_email)
+      @inbound_email = inbound_email
+    end
- -
-
# File actionmailbox/app/models/action_mailbox/inbound_email/incineratable/incineration.rb, line 9
-def initialize(inbound_email)
-  @inbound_email = inbound_email
-end
-
-
- - + See on GitHub + + + + @@ -129,22 +129,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/app/models/action_mailbox/inbound_email/incineratable/incineration.rb, line 13
+    def run
+      @inbound_email.destroy! if due? && processed?
+    end
- -
-
# File actionmailbox/app/models/action_mailbox/inbound_email/incineratable/incineration.rb, line 13
-def run
-  @inbound_email.destroy! if due? && processed?
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionMailbox/InboundEmail/MessageId.html b/src/classes/ActionMailbox/InboundEmail/MessageId.html index 1459fd4e48..48320ff39e 100644 --- a/src/classes/ActionMailbox/InboundEmail/MessageId.html +++ b/src/classes/ActionMailbox/InboundEmail/MessageId.html @@ -95,28 +95,28 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/app/models/action_mailbox/inbound_email/message_id.rb, line 16
+    def create_and_extract_message_id!(source, **options)
+      message_checksum = OpenSSL::Digest::SHA1.hexdigest(source)
+      message_id = extract_message_id(source) || generate_missing_message_id(message_checksum)
+
+      create! raw_email: create_and_upload_raw_email!(source),
+        message_id: message_id, message_checksum: message_checksum, **options
+    rescue ActiveRecord::RecordNotUnique
+      nil
+    end
- -
-
# File actionmailbox/app/models/action_mailbox/inbound_email/message_id.rb, line 16
-def create_and_extract_message_id!(source, **options)
-  message_checksum = OpenSSL::Digest::SHA1.hexdigest(source)
-  message_id = extract_message_id(source) || generate_missing_message_id(message_checksum)
-
-  create! raw_email: create_and_upload_raw_email!(source),
-    message_id: message_id, message_checksum: message_checksum, **options
-rescue ActiveRecord::RecordNotUnique
-  nil
-end
-
-
- - + See on GitHub + + + +

@@ -136,23 +136,23 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/app/models/action_mailbox/inbound_email/message_id.rb, line 37
+      def create_and_upload_raw_email!(source)
+        ActiveStorage::Blob.create_and_upload! io: StringIO.new(source), filename: "message.eml", content_type: "message/rfc822",
+                                               service_name: ActionMailbox.storage_service
+      end
- -
-
# File actionmailbox/app/models/action_mailbox/inbound_email/message_id.rb, line 37
-def create_and_upload_raw_email!(source)
-  ActiveStorage::Blob.create_and_upload! io: StringIO.new(source), filename: "message.eml", content_type: "message/rfc822",
-                                         service_name: ActionMailbox.storage_service
-end
-
-
- -

+ See on GitHub + + + +

@@ -172,22 +172,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/app/models/action_mailbox/inbound_email/message_id.rb, line 27
+      def extract_message_id(source)
+        Mail.from_source(source).message_id rescue nil
+      end
- -
-
# File actionmailbox/app/models/action_mailbox/inbound_email/message_id.rb, line 27
-def extract_message_id(source)
-  Mail.from_source(source).message_id rescue nil
-end
-
-
- -

+ See on GitHub + + + +

@@ -207,24 +207,24 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/app/models/action_mailbox/inbound_email/message_id.rb, line 31
+      def generate_missing_message_id(message_checksum)
+        Mail::MessageIdField.new("<#{message_checksum}@#{::Socket.gethostname}.mail>").message_id.tap do |message_id|
+          logger.warn "Message-ID couldn't be parsed or is missing. Generated a new Message-ID: #{message_id}"
+        end
+      end
- -
-
# File actionmailbox/app/models/action_mailbox/inbound_email/message_id.rb, line 31
-def generate_missing_message_id(message_checksum)
-  Mail::MessageIdField.new("<#{message_checksum}@#{::Socket.gethostname}.mail>").message_id.tap do |message_id|
-    logger.warn "Message-ID couldn't be parsed or is missing. Generated a new Message-ID: #{message_id}"
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionMailbox/InboundEmail/Routable.html b/src/classes/ActionMailbox/InboundEmail/Routable.html index e6b9883052..ee4919f67e 100644 --- a/src/classes/ActionMailbox/InboundEmail/Routable.html +++ b/src/classes/ActionMailbox/InboundEmail/Routable.html @@ -87,22 +87,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/app/models/action_mailbox/inbound_email/routable.rb, line 21
+  def route
+    ApplicationMailbox.route self
+  end
- -
-
# File actionmailbox/app/models/action_mailbox/inbound_email/routable.rb, line 21
-def route
-  ApplicationMailbox.route self
-end
-
-
- - + See on GitHub + + + +

@@ -122,22 +122,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/app/models/action_mailbox/inbound_email/routable.rb, line 16
+  def route_later
+    ActionMailbox::RoutingJob.perform_later self
+  end
- -
-
# File actionmailbox/app/models/action_mailbox/inbound_email/routable.rb, line 16
-def route_later
-  ActionMailbox::RoutingJob.perform_later self
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionMailbox/InboundEmails.html b/src/classes/ActionMailbox/InboundEmails.html deleted file mode 100644 index a123a4a889..0000000000 --- a/src/classes/ActionMailbox/InboundEmails.html +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: ActionMailbox::InboundEmails -layout: default ---- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActionMailbox/IncinerationJob.html b/src/classes/ActionMailbox/IncinerationJob.html index 0af5971cb6..e7da519fff 100644 --- a/src/classes/ActionMailbox/IncinerationJob.html +++ b/src/classes/ActionMailbox/IncinerationJob.html @@ -94,22 +94,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/app/jobs/action_mailbox/incineration_job.rb, line 17
+    def self.schedule(inbound_email)
+      set(wait: ActionMailbox.incinerate_after).perform_later(inbound_email)
+    end
- -
-
# File actionmailbox/app/jobs/action_mailbox/incineration_job.rb, line 17
-def self.schedule(inbound_email)
-  set(wait: ActionMailbox.incinerate_after).perform_later(inbound_email)
-end
-
-
- - + See on GitHub + + + + @@ -133,22 +133,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/app/jobs/action_mailbox/incineration_job.rb, line 21
+    def perform(inbound_email)
+      inbound_email.incinerate
+    end
- -
-
# File actionmailbox/app/jobs/action_mailbox/incineration_job.rb, line 21
-def perform(inbound_email)
-  inbound_email.incinerate
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionMailbox/Ingresses/Amazon.html b/src/classes/ActionMailbox/Ingresses/Amazon.html deleted file mode 100644 index f1bc993fea..0000000000 --- a/src/classes/ActionMailbox/Ingresses/Amazon.html +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: ActionMailbox::Ingresses::Amazon -layout: default ---- -
- -
-
- - - - - - - - - -

Namespace

- - - - -

Class

- - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActionMailbox/Ingresses/Amazon/InboundEmailsController.html b/src/classes/ActionMailbox/Ingresses/Amazon/InboundEmailsController.html deleted file mode 100644 index d25df38a7d..0000000000 --- a/src/classes/ActionMailbox/Ingresses/Amazon/InboundEmailsController.html +++ /dev/null @@ -1,209 +0,0 @@ ---- -title: ActionMailbox::Ingresses::Amazon::InboundEmailsController -layout: default ---- -
- -
-
- -
- -

Ingests inbound emails from Amazon's Simple Email Service (SES).

- -

Requires the full RFC 822 message in the content parameter. Authenticates requests by validating their signatures.

- -

Returns:

-
  • -

    204 No Content if an inbound email is successfully recorded and enqueued for routing to the appropriate mailbox

    -
  • -

    401 Unauthorized if the request's signature could not be validated

    -
  • -

    404 Not Found if Action Mailbox is not configured to accept inbound emails from SES

    -
  • -

    422 Unprocessable Entity if the request is missing the required content parameter

    -
  • -

    500 Server Error if one of the Active Record database, the Active Storage service, or the Active Job backend is misconfigured or unavailable

    -
- -

Usage

-
  1. -

    Install the aws-sdk-sns gem:

    - -
    # Gemfile
    -gem "aws-sdk-sns", ">= 1.9.0", require: false
    -
    -
  2. -

    Tell Action Mailbox to accept emails from SES:

    - -
    # config/environments/production.rb
    -config.action_mailbox.ingress = :amazon
    -
    -
  3. -

    Configure SES to deliver emails to your application via POST requests to /rails/action_mailbox/amazon/inbound_emails. If your application lived at https://example.com, you would specify the fully-qualified URL https://example.com/rails/action_mailbox/amazon/inbound_emails.

    -
- -
- - - - - - - - - - - - -

Methods

-
- -
C
-
- -
- -
P
-
- -
- -
- - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - prepare() - - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionmailbox/app/controllers/action_mailbox/ingresses/amazon/inbound_emails_controller.rb, line 38
-def self.prepare
-  self.verifier ||= begin
-    require "aws-sdk-sns"
-    Aws::SNS::MessageVerifier.new
-  end
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - create() - - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionmailbox/app/controllers/action_mailbox/ingresses/amazon/inbound_emails_controller.rb, line 45
-def create
-  ActionMailbox::InboundEmail.create_and_extract_message_id! params.require(:content)
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActionMailbox/Ingresses/Mailgun/InboundEmailsController.html b/src/classes/ActionMailbox/Ingresses/Mailgun/InboundEmailsController.html index 27fa20cedb..7ced8e14ca 100644 --- a/src/classes/ActionMailbox/Ingresses/Mailgun/InboundEmailsController.html +++ b/src/classes/ActionMailbox/Ingresses/Mailgun/InboundEmailsController.html @@ -147,22 +147,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller.rb, line 49
+    def create
+      ActionMailbox::InboundEmail.create_and_extract_message_id! mail
+    end
- -
-
# File actionmailbox/app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller.rb, line 49
-def create
-  ActionMailbox::InboundEmail.create_and_extract_message_id! mail
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionMailbox/Ingresses/Mailgun/InboundEmailsController/Authenticator.html b/src/classes/ActionMailbox/Ingresses/Mailgun/InboundEmailsController/Authenticator.html index d046cf08ca..dc33792a07 100644 --- a/src/classes/ActionMailbox/Ingresses/Mailgun/InboundEmailsController/Authenticator.html +++ b/src/classes/ActionMailbox/Ingresses/Mailgun/InboundEmailsController/Authenticator.html @@ -122,22 +122,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller.rb, line 87
+        def initialize(key:, timestamp:, token:, signature:)
+          @key, @timestamp, @token, @signature = key, Integer(timestamp), token, signature
+        end
- -
-
# File actionmailbox/app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller.rb, line 87
-def initialize(key:, timestamp:, token:, signature:)
-  @key, @timestamp, @token, @signature = key, Integer(timestamp), token, signature
-end
-
-
- - + See on GitHub + + + + @@ -161,22 +161,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller.rb, line 91
+        def authenticated?
+          signed? && recent?
+        end
- -
-
# File actionmailbox/app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller.rb, line 91
-def authenticated?
-  signed? && recent?
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionMailbox/Ingresses/Mandrill/InboundEmailsController.html b/src/classes/ActionMailbox/Ingresses/Mandrill/InboundEmailsController.html index a7b2c76e71..bfa29321f8 100644 --- a/src/classes/ActionMailbox/Ingresses/Mandrill/InboundEmailsController.html +++ b/src/classes/ActionMailbox/Ingresses/Mandrill/InboundEmailsController.html @@ -119,26 +119,26 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/app/controllers/action_mailbox/ingresses/mandrill/inbound_emails_controller.rb, line 20
+    def create
+      raw_emails.each { |raw_email| ActionMailbox::InboundEmail.create_and_extract_message_id! raw_email }
+      head :ok
+    rescue JSON::ParserError => error
+      logger.error error.message
+      head :unprocessable_entity
+    end
- -
-
# File actionmailbox/app/controllers/action_mailbox/ingresses/mandrill/inbound_emails_controller.rb, line 20
-def create
-  raw_emails.each { |raw_email| ActionMailbox::InboundEmail.create_and_extract_message_id! raw_email }
-  head :ok
-rescue JSON::ParserError => error
-  logger.error error.message
-  head :unprocessable_entity
-end
-
-
- - + See on GitHub + + + +

@@ -158,22 +158,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/app/controllers/action_mailbox/ingresses/mandrill/inbound_emails_controller.rb, line 28
+    def health_check
+      head :ok
+    end
- -
-
# File actionmailbox/app/controllers/action_mailbox/ingresses/mandrill/inbound_emails_controller.rb, line 28
-def health_check
-  head :ok
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionMailbox/Ingresses/Mandrill/InboundEmailsController/Authenticator.html b/src/classes/ActionMailbox/Ingresses/Mandrill/InboundEmailsController/Authenticator.html index 4e9efdfbeb..0b43aeb36c 100644 --- a/src/classes/ActionMailbox/Ingresses/Mandrill/InboundEmailsController/Authenticator.html +++ b/src/classes/ActionMailbox/Ingresses/Mandrill/InboundEmailsController/Authenticator.html @@ -106,22 +106,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/app/controllers/action_mailbox/ingresses/mandrill/inbound_emails_controller.rb, line 64
+        def initialize(request, key)
+          @request, @key = request, key
+        end
- -
-
# File actionmailbox/app/controllers/action_mailbox/ingresses/mandrill/inbound_emails_controller.rb, line 64
-def initialize(request, key)
-  @request, @key = request, key
-end
-
-
- - + See on GitHub + + + + @@ -145,22 +145,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/app/controllers/action_mailbox/ingresses/mandrill/inbound_emails_controller.rb, line 68
+        def authenticated?
+          ActiveSupport::SecurityUtils.secure_compare given_signature, expected_signature
+        end
- -
-
# File actionmailbox/app/controllers/action_mailbox/ingresses/mandrill/inbound_emails_controller.rb, line 68
-def authenticated?
-  ActiveSupport::SecurityUtils.secure_compare given_signature, expected_signature
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionMailbox/Ingresses/Postmark/InboundEmailsController.html b/src/classes/ActionMailbox/Ingresses/Postmark/InboundEmailsController.html index 124477aa92..e7cab8be61 100644 --- a/src/classes/ActionMailbox/Ingresses/Postmark/InboundEmailsController.html +++ b/src/classes/ActionMailbox/Ingresses/Postmark/InboundEmailsController.html @@ -130,30 +130,30 @@

- -
- - -
-
# File actionmailbox/app/controllers/action_mailbox/ingresses/postmark/inbound_emails_controller.rb, line 51
-    def create
-      ActionMailbox::InboundEmail.create_and_extract_message_id! params.require("RawEmail")
-    rescue ActionController::ParameterMissing => error
-      logger.error <<~MESSAGE
-        #{error.message}
+          
+            
+ + Source code + + +
# File actionmailbox/app/controllers/action_mailbox/ingresses/postmark/inbound_emails_controller.rb, line 51
+    def create
+      ActionMailbox::InboundEmail.create_and_extract_message_id! params.require("RawEmail")
+    rescue ActionController::ParameterMissing => error
+      logger.error <<~MESSAGE
+        #{error.message}
 
         When configuring your Postmark inbound webhook, be sure to check the box
-        labeled "Include raw email content in JSON payload".
-      MESSAGE
-      head :unprocessable_entity
-    end
-
-
- - + labeled "Include raw email content in JSON payload". + MESSAGE + head :unprocessable_entity + end + + See on GitHub + + + + diff --git a/src/classes/ActionMailbox/Ingresses/Relay/InboundEmailsController.html b/src/classes/ActionMailbox/Ingresses/Relay/InboundEmailsController.html index 392dab4ad0..4470749114 100644 --- a/src/classes/ActionMailbox/Ingresses/Relay/InboundEmailsController.html +++ b/src/classes/ActionMailbox/Ingresses/Relay/InboundEmailsController.html @@ -139,22 +139,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/app/controllers/action_mailbox/ingresses/relay/inbound_emails_controller.rb, line 54
+    def create
+      ActionMailbox::InboundEmail.create_and_extract_message_id! request.body.read
+    end
- -
-
# File actionmailbox/app/controllers/action_mailbox/ingresses/relay/inbound_emails_controller.rb, line 54
-def create
-  ActionMailbox::InboundEmail.create_and_extract_message_id! request.body.read
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionMailbox/Ingresses/Sendgrid/InboundEmailsController.html b/src/classes/ActionMailbox/Ingresses/Sendgrid/InboundEmailsController.html index 0f18553fa7..6ff7d4f688 100644 --- a/src/classes/ActionMailbox/Ingresses/Sendgrid/InboundEmailsController.html +++ b/src/classes/ActionMailbox/Ingresses/Sendgrid/InboundEmailsController.html @@ -130,25 +130,25 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/app/controllers/action_mailbox/ingresses/sendgrid/inbound_emails_controller.rb, line 51
+    def create
+      ActionMailbox::InboundEmail.create_and_extract_message_id! mail
+    rescue JSON::ParserError => error
+      logger.error error.message
+      head :unprocessable_entity
+    end
- -
-
# File actionmailbox/app/controllers/action_mailbox/ingresses/sendgrid/inbound_emails_controller.rb, line 51
-def create
-  ActionMailbox::InboundEmail.create_and_extract_message_id! mail
-rescue JSON::ParserError => error
-  logger.error error.message
-  head :unprocessable_entity
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionMailbox/Relayer.html b/src/classes/ActionMailbox/Relayer.html index 6b7394396b..1d3af27882 100644 --- a/src/classes/ActionMailbox/Relayer.html +++ b/src/classes/ActionMailbox/Relayer.html @@ -157,22 +157,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/relayer.rb, line 32
+    def initialize(url:, username: "actionmailbox", password:)
+      @uri, @username, @password = URI(url), username, password
+    end
- -
-
# File actionmailbox/lib/action_mailbox/relayer.rb, line 32
-def initialize(url:, username: "actionmailbox", password:)
-  @uri, @username, @password = URI(url), username, password
-end
-
-
- - + See on GitHub + + + + @@ -196,35 +196,35 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/relayer.rb, line 36
+    def relay(source)
+      case response = post(source)
+      when Net::HTTPSuccess
+        Result.new "2.0.0", "Successfully relayed message to ingress"
+      when Net::HTTPUnauthorized
+        Result.new "4.7.0", "Invalid credentials for ingress"
+      else
+        Result.new "4.0.0", "HTTP #{response.code}"
+      end
+    rescue IOError, SocketError, SystemCallError => error
+      Result.new "4.4.2", "Network error relaying to ingress: #{error.message}"
+    rescue Timeout::Error
+      Result.new "4.4.2", "Timed out relaying to ingress"
+    rescue => error
+      Result.new "4.0.0", "Error relaying to ingress: #{error.message}"
+    end
- -
-
# File actionmailbox/lib/action_mailbox/relayer.rb, line 36
-def relay(source)
-  case response = post(source)
-  when Net::HTTPSuccess
-    Result.new "2.0.0", "Successfully relayed message to ingress"
-  when Net::HTTPUnauthorized
-    Result.new "4.7.0", "Invalid credentials for ingress"
-  else
-    Result.new "4.0.0", "HTTP #{response.code}"
-  end
-rescue IOError, SocketError, SystemCallError => error
-  Result.new "4.4.2", "Network error relaying to ingress: #{error.message}"
-rescue Timeout::Error
-  Result.new "4.4.2", "Timed out relaying to ingress"
-rescue => error
-  Result.new "4.0.0", "Error relaying to ingress: #{error.message}"
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionMailbox/Relayer/Result.html b/src/classes/ActionMailbox/Relayer/Result.html index 389aee92d5..4c8104d71d 100644 --- a/src/classes/ActionMailbox/Relayer/Result.html +++ b/src/classes/ActionMailbox/Relayer/Result.html @@ -93,22 +93,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/relayer.rb, line 14
+      def failure?
+        transient_failure? || permanent_failure?
+      end
- -
-
# File actionmailbox/lib/action_mailbox/relayer.rb, line 14
-def failure?
-  transient_failure? || permanent_failure?
-end
-
-
- - + See on GitHub + + + +

@@ -128,22 +128,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/relayer.rb, line 22
+      def permanent_failure?
+        status_code.start_with?("5.")
+      end
- -
-
# File actionmailbox/lib/action_mailbox/relayer.rb, line 22
-def permanent_failure?
-  status_code.start_with?("5.")
-end
-
-
- -

+ See on GitHub + + + +

@@ -163,22 +163,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/relayer.rb, line 10
+      def success?
+        !failure?
+      end
- -
-
# File actionmailbox/lib/action_mailbox/relayer.rb, line 10
-def success?
-  !failure?
-end
-
-
- -

+ See on GitHub + + + +

@@ -198,22 +198,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/relayer.rb, line 18
+      def transient_failure?
+        status_code.start_with?("4.")
+      end
- -
-
# File actionmailbox/lib/action_mailbox/relayer.rb, line 18
-def transient_failure?
-  status_code.start_with?("4.")
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionMailbox/Router.html b/src/classes/ActionMailbox/Router.html index 78546a9f2f..f0e502fa78 100644 --- a/src/classes/ActionMailbox/Router.html +++ b/src/classes/ActionMailbox/Router.html @@ -121,22 +121,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/router.rb, line 11
+    def initialize
+      @routes = []
+    end
- -
-
# File actionmailbox/lib/action_mailbox/router.rb, line 11
-def initialize
-  @routes = []
-end
-
-
- - + See on GitHub + + + + @@ -160,22 +160,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/router.rb, line 21
+    def add_route(address, to:)
+      routes.append Route.new(address, to: to)
+    end
- -
-
# File actionmailbox/lib/action_mailbox/router.rb, line 21
-def add_route(address, to:)
-  routes.append Route.new(address, to: to)
-end
-
-
- - + See on GitHub + + + +

@@ -195,24 +195,24 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/router.rb, line 15
+    def add_routes(routes)
+      routes.each do |(address, mailbox_name)|
+        add_route address, to: mailbox_name
+      end
+    end
- -
-
# File actionmailbox/lib/action_mailbox/router.rb, line 15
-def add_routes(routes)
-  routes.each do |(address, mailbox_name)|
-    add_route address, to: mailbox_name
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -232,22 +232,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/router.rb, line 35
+    def mailbox_for(inbound_email)
+      routes.detect { |route| route.match?(inbound_email) }&.mailbox_class
+    end
- -
-
# File actionmailbox/lib/action_mailbox/router.rb, line 35
-def mailbox_for(inbound_email)
-  routes.detect { |route| route.match?(inbound_email) }&.mailbox_class
-end
-
-
- -

+ See on GitHub + + + +

@@ -267,28 +267,28 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/router.rb, line 25
+    def route(inbound_email)
+      if mailbox = mailbox_for(inbound_email)
+        mailbox.receive(inbound_email)
+      else
+        inbound_email.bounced!
+
+        raise RoutingError
+      end
+    end
- -
-
# File actionmailbox/lib/action_mailbox/router.rb, line 25
-def route(inbound_email)
-  if mailbox = mailbox_for(inbound_email)
-    mailbox.receive(inbound_email)
-  else
-    inbound_email.bounced!
-
-    raise RoutingError
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionMailbox/Router/Route.html b/src/classes/ActionMailbox/Router/Route.html index e39f778b29..42dd55bd8b 100644 --- a/src/classes/ActionMailbox/Router/Route.html +++ b/src/classes/ActionMailbox/Router/Route.html @@ -116,24 +116,24 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/router/route.rb, line 10
+    def initialize(address, to:)
+      @address, @mailbox_name = address, to
+
+      ensure_valid_address
+    end
- -
-
# File actionmailbox/lib/action_mailbox/router/route.rb, line 10
-def initialize(address, to:)
-  @address, @mailbox_name = address, to
-
-  ensure_valid_address
-end
-
-
- - + See on GitHub + + + + @@ -157,22 +157,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/router/route.rb, line 31
+    def mailbox_class
+      "#{mailbox_name.to_s.camelize}Mailbox".constantize
+    end
- -
-
# File actionmailbox/lib/action_mailbox/router/route.rb, line 31
-def mailbox_class
-  "#{mailbox_name.to_s.camelize}Mailbox".constantize
-end
-
-
- - + See on GitHub + + + +

@@ -192,33 +192,33 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/router/route.rb, line 16
+    def match?(inbound_email)
+      case address
+      when :all
+        true
+      when String
+        inbound_email.mail.recipients.any? { |recipient| address.casecmp?(recipient) }
+      when Regexp
+        inbound_email.mail.recipients.any? { |recipient| address.match?(recipient) }
+      when Proc
+        address.call(inbound_email)
+      else
+        address.match?(inbound_email)
+      end
+    end
- -
-
# File actionmailbox/lib/action_mailbox/router/route.rb, line 16
-def match?(inbound_email)
-  case address
-  when :all
-    true
-  when String
-    inbound_email.mail.recipients.any? { |recipient| address.casecmp?(recipient) }
-  when Regexp
-    inbound_email.mail.recipients.any? { |recipient| address.match?(recipient) }
-  when Proc
-    address.call(inbound_email)
-  else
-    address.match?(inbound_email)
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionMailbox/Routing.html b/src/classes/ActionMailbox/Routing.html index c9f0499a34..6b1c57c014 100644 --- a/src/classes/ActionMailbox/Routing.html +++ b/src/classes/ActionMailbox/Routing.html @@ -89,22 +89,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/routing.rb, line 21
+      def mailbox_for(inbound_email)
+        router.mailbox_for(inbound_email)
+      end
- -
-
# File actionmailbox/lib/action_mailbox/routing.rb, line 21
-def mailbox_for(inbound_email)
-  router.mailbox_for(inbound_email)
-end
-
-
- - + See on GitHub + + + +

@@ -124,22 +124,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/routing.rb, line 17
+      def route(inbound_email)
+        router.route(inbound_email)
+      end
- -
-
# File actionmailbox/lib/action_mailbox/routing.rb, line 17
-def route(inbound_email)
-  router.route(inbound_email)
-end
-
-
- -

+ See on GitHub + + + +

@@ -159,22 +159,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/routing.rb, line 13
+      def routing(routes)
+        router.add_routes(routes)
+      end
- -
-
# File actionmailbox/lib/action_mailbox/routing.rb, line 13
-def routing(routes)
-  router.add_routes(routes)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionMailbox/RoutingJob.html b/src/classes/ActionMailbox/RoutingJob.html index 5888f6e2bc..7dd34ed5c7 100644 --- a/src/classes/ActionMailbox/RoutingJob.html +++ b/src/classes/ActionMailbox/RoutingJob.html @@ -87,22 +87,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/app/jobs/action_mailbox/routing_job.rb, line 9
+    def perform(inbound_email)
+      inbound_email.route
+    end
- -
-
# File actionmailbox/app/jobs/action_mailbox/routing_job.rb, line 9
-def perform(inbound_email)
-  inbound_email.route
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionMailbox/TestHelper.html b/src/classes/ActionMailbox/TestHelper.html index 65d247b583..c6a1589d06 100644 --- a/src/classes/ActionMailbox/TestHelper.html +++ b/src/classes/ActionMailbox/TestHelper.html @@ -95,22 +95,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/test_helper.rb, line 9
+    def create_inbound_email_from_fixture(fixture_name, status: :processing)
+      create_inbound_email_from_source file_fixture(fixture_name).read, status: status
+    end
- -
-
# File actionmailbox/lib/action_mailbox/test_helper.rb, line 9
-def create_inbound_email_from_fixture(fixture_name, status: :processing)
-  create_inbound_email_from_source file_fixture(fixture_name).read, status: status
-end
-
-
- - + See on GitHub + + + +

@@ -178,26 +178,26 @@

+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/test_helper.rb, line 63
+    def create_inbound_email_from_mail(status: :processing, **mail_options, &block)
+      mail = Mail.new(mail_options, &block)
+      # Bcc header is not encoded by default
+      mail[:bcc].include_in_headers = true if mail[:bcc]
+
+      create_inbound_email_from_source mail.to_s, status: status
+    end
- -
-
# File actionmailbox/lib/action_mailbox/test_helper.rb, line 63
-def create_inbound_email_from_mail(status: :processing, **mail_options, &block)
-  mail = Mail.new(mail_options, &block)
-  # Bcc header is not encoded by default
-  mail[:bcc].include_in_headers = true if mail[:bcc]
-
-  create_inbound_email_from_source mail.to_s, status: status
-end
-
-

- - + See on GitHub + + + +

@@ -217,22 +217,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/test_helper.rb, line 72
+    def create_inbound_email_from_source(source, status: :processing)
+      ActionMailbox::InboundEmail.create_and_extract_message_id! source, status: status
+    end
- -
-
# File actionmailbox/lib/action_mailbox/test_helper.rb, line 72
-def create_inbound_email_from_source(source, status: :processing)
-  ActionMailbox::InboundEmail.create_and_extract_message_id! source, status: status
-end
-
-
- -

+ See on GitHub + + + +

@@ -252,22 +252,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/test_helper.rb, line 79
+    def receive_inbound_email_from_fixture(*args)
+      create_inbound_email_from_fixture(*args).tap(&:route)
+    end
- -
-
# File actionmailbox/lib/action_mailbox/test_helper.rb, line 79
-def receive_inbound_email_from_fixture(*args)
-  create_inbound_email_from_fixture(*args).tap(&:route)
-end
-
-
- -

+ See on GitHub + + + +

@@ -287,22 +287,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/test_helper.rb, line 85
+    def receive_inbound_email_from_mail(**kwargs, &block)
+      create_inbound_email_from_mail(**kwargs, &block).tap(&:route)
+    end
- -
-
# File actionmailbox/lib/action_mailbox/test_helper.rb, line 85
-def receive_inbound_email_from_mail(**kwargs, &block)
-  create_inbound_email_from_mail(**kwargs, &block).tap(&:route)
-end
-
-
- -

+ See on GitHub + + + +

@@ -322,22 +322,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/test_helper.rb, line 91
+    def receive_inbound_email_from_source(*args)
+      create_inbound_email_from_source(*args).tap(&:route)
+    end
- -
-
# File actionmailbox/lib/action_mailbox/test_helper.rb, line 91
-def receive_inbound_email_from_source(*args)
-  create_inbound_email_from_source(*args).tap(&:route)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionMailer.html b/src/classes/ActionMailer.html index 41278b398a..86aeac6cb1 100644 --- a/src/classes/ActionMailer.html +++ b/src/classes/ActionMailer.html @@ -315,29 +315,29 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer.rb, line 61
+  def self.eager_load!
+    super
+
+    require "mail"
+    Mail.eager_autoload!
+
+    Base.descendants.each do |mailer|
+      mailer.eager_load! unless mailer.abstract?
+    end
+  end
- -
-
# File actionmailer/lib/action_mailer.rb, line 61
-def self.eager_load!
-  super
-
-  require "mail"
-  Mail.eager_autoload!
-
-  Base.descendants.each do |mailer|
-    mailer.eager_load! unless mailer.abstract?
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -357,22 +357,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/gem_version.rb, line 5
+  def self.gem_version
+    Gem::Version.new VERSION::STRING
+  end
- -
-
# File actionmailer/lib/action_mailer/gem_version.rb, line 5
-def self.gem_version
-  Gem::Version.new VERSION::STRING
-end
-
-
- -

+ See on GitHub + + + +

@@ -392,22 +392,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/version.rb, line 8
+  def self.version
+    gem_version
+  end
- -
-
# File actionmailer/lib/action_mailer/version.rb, line 8
-def self.version
-  gem_version
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionMailer/Base.html b/src/classes/ActionMailer/Base.html index 7a767520ee..b629f10e50 100644 --- a/src/classes/ActionMailer/Base.html +++ b/src/classes/ActionMailer/Base.html @@ -750,7 +750,8 @@

- + +

@@ -779,23 +780,23 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/base.rb, line 582
+      def default(value = nil)
+        self.default_params = default_params.merge(value).freeze if value
+        default_params
+      end
- -
-
# File actionmailer/lib/action_mailer/base.rb, line 582
-def default(value = nil)
-  self.default_params = default_params.merge(value).freeze if value
-  default_params
-end
-
-
- -

+ See on GitHub + + + +

@@ -822,7 +823,8 @@

-

+ +

@@ -844,25 +846,25 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/base.rb, line 607
+      def email_address_with_name(address, name)
+        Mail::Address.new.tap do |builder|
+          builder.address = address
+          builder.display_name = name.presence
+        end.to_s
+      end
- -
-
# File actionmailer/lib/action_mailer/base.rb, line 607
-def email_address_with_name(address, name)
-  Mail::Address.new.tap do |builder|
-    builder.address = address
-    builder.display_name = name.presence
-  end.to_s
-end
-
-
- -

+ See on GitHub + + + +

@@ -886,22 +888,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/base.rb, line 570
+      def mailer_name
+        @mailer_name ||= anonymous? ? "anonymous" : name.underscore
+      end
- -
-
# File actionmailer/lib/action_mailer/base.rb, line 570
-def mailer_name
-  @mailer_name ||= anonymous? ? "anonymous" : name.underscore
-end
-
-
- -

+ See on GitHub + + + +

@@ -921,24 +923,24 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/base.rb, line 644
+    def initialize
+      super()
+      @_mail_was_called = false
+      @_message = Mail.new
+    end
- -
-
# File actionmailer/lib/action_mailer/base.rb, line 644
-def initialize
-  super()
-  @_mail_was_called = false
-  @_message = Mail.new
-end
-
-
- -

+ See on GitHub + + + +

@@ -958,22 +960,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/base.rb, line 547
+      def register_interceptor(interceptor)
+        Mail.register_interceptor(observer_class_for(interceptor))
+      end
- -
-
# File actionmailer/lib/action_mailer/base.rb, line 547
-def register_interceptor(interceptor)
-  Mail.register_interceptor(observer_class_for(interceptor))
-end
-
-
- -

+ See on GitHub + + + +

@@ -993,22 +995,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/base.rb, line 521
+      def register_interceptors(*interceptors)
+        interceptors.flatten.compact.each { |interceptor| register_interceptor(interceptor) }
+      end
- -
-
# File actionmailer/lib/action_mailer/base.rb, line 521
-def register_interceptors(*interceptors)
-  interceptors.flatten.compact.each { |interceptor| register_interceptor(interceptor) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -1028,22 +1030,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/base.rb, line 533
+      def register_observer(observer)
+        Mail.register_observer(observer_class_for(observer))
+      end
- -
-
# File actionmailer/lib/action_mailer/base.rb, line 533
-def register_observer(observer)
-  Mail.register_observer(observer_class_for(observer))
-end
-
-
- -

+ See on GitHub + + + +

@@ -1063,22 +1065,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/base.rb, line 511
+      def register_observers(*observers)
+        observers.flatten.compact.each { |observer| register_observer(observer) }
+      end
- -
-
# File actionmailer/lib/action_mailer/base.rb, line 511
-def register_observers(*observers)
-  observers.flatten.compact.each { |observer| register_observer(observer) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -1098,22 +1100,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/base.rb, line 554
+      def unregister_interceptor(interceptor)
+        Mail.unregister_interceptor(observer_class_for(interceptor))
+      end
- -
-
# File actionmailer/lib/action_mailer/base.rb, line 554
-def unregister_interceptor(interceptor)
-  Mail.unregister_interceptor(observer_class_for(interceptor))
-end
-
-
- -

+ See on GitHub + + + +

@@ -1133,22 +1135,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/base.rb, line 526
+      def unregister_interceptors(*interceptors)
+        interceptors.flatten.compact.each { |interceptor| unregister_interceptor(interceptor) }
+      end
- -
-
# File actionmailer/lib/action_mailer/base.rb, line 526
-def unregister_interceptors(*interceptors)
-  interceptors.flatten.compact.each { |interceptor| unregister_interceptor(interceptor) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -1168,22 +1170,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/base.rb, line 540
+      def unregister_observer(observer)
+        Mail.unregister_observer(observer_class_for(observer))
+      end
- -
-
# File actionmailer/lib/action_mailer/base.rb, line 540
-def unregister_observer(observer)
-  Mail.unregister_observer(observer_class_for(observer))
-end
-
-
- -

+ See on GitHub + + + +

@@ -1203,22 +1205,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/base.rb, line 516
+      def unregister_observers(*observers)
+        observers.flatten.compact.each { |observer| unregister_observer(observer) }
+      end
- -
-
# File actionmailer/lib/action_mailer/base.rb, line 516
-def unregister_observers(*observers)
-  observers.flatten.compact.each { |observer| unregister_observer(observer) }
-end
-
-
- -

+ See on GitHub + + + +

Class Private methods

@@ -1241,22 +1243,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/base.rb, line 943
+      def self.supports_path? # :doc:
+        false
+      end
- -
-
# File actionmailer/lib/action_mailer/base.rb, line 943
-def self.supports_path? # :doc:
-  false
-end
-
-
- - + See on GitHub + + + + @@ -1308,26 +1310,26 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/base.rb, line 761
+    def attachments
+      if @_mail_was_called
+        LateAttachmentsProxy.new(@_message.attachments)
+      else
+        @_message.attachments
+      end
+    end
- -
-
# File actionmailer/lib/action_mailer/base.rb, line 761
-def attachments
-  if @_mail_was_called
-    LateAttachmentsProxy.new(@_message.attachments)
-  else
-    @_message.attachments
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -1349,22 +1351,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/base.rb, line 685
+    def email_address_with_name(address, name)
+      self.class.email_address_with_name(address, name)
+    end
- -
-
# File actionmailer/lib/action_mailer/base.rb, line 685
-def email_address_with_name(address, name)
-  self.class.email_address_with_name(address, name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1425,26 +1427,26 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/base.rb, line 723
+    def headers(args = nil)
+      if args
+        @_message.headers(args)
+      else
+        @_message
+      end
+    end
- -
-
# File actionmailer/lib/action_mailer/base.rb, line 723
-def headers(args = nil)
-  if args
-    @_message.headers(args)
-  else
-    @_message
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1542,53 +1544,53 @@

- -
- - -
-
# File actionmailer/lib/action_mailer/base.rb, line 870
-def mail(headers = {}, &block)
-  return message if @_mail_was_called && headers.blank? && !block
+          
+            
+ + Source code + - # At the beginning, do not consider class default for content_type - content_type = headers[:content_type] +
# File actionmailer/lib/action_mailer/base.rb, line 870
+    def mail(headers = {}, &block)
+      return message if @_mail_was_called && headers.blank? && !block
 
-  headers = apply_defaults(headers)
+      # At the beginning, do not consider class default for content_type
+      content_type = headers[:content_type]
 
-  # Apply charset at the beginning so all fields are properly quoted
-  message.charset = charset = headers[:charset]
+      headers = apply_defaults(headers)
 
-  # Set configure delivery behavior
-  wrap_delivery_behavior!(headers[:delivery_method], headers[:delivery_method_options])
+      # Apply charset at the beginning so all fields are properly quoted
+      message.charset = charset = headers[:charset]
 
-  assign_headers_to_message(message, headers)
+      # Set configure delivery behavior
+      wrap_delivery_behavior!(headers[:delivery_method], headers[:delivery_method_options])
 
-  # Render the templates and blocks
-  responses = collect_responses(headers, &block)
-  @_mail_was_called = true
+      assign_headers_to_message(message, headers)
 
-  create_parts_from_responses(message, responses)
-  wrap_inline_attachments(message)
+      # Render the templates and blocks
+      responses = collect_responses(headers, &block)
+      @_mail_was_called = true
 
-  # Set up content type, reapply charset and handle parts order
-  message.content_type = set_content_type(message, content_type, headers[:content_type])
-  message.charset      = charset
+      create_parts_from_responses(message, responses)
+      wrap_inline_attachments(message)
 
-  if message.multipart?
-    message.body.set_sort_order(headers[:parts_order])
-    message.body.sort_parts!
-  end
+      # Set up content type, reapply charset and handle parts order
+      message.content_type = set_content_type(message, content_type, headers[:content_type])
+      message.charset      = charset
 
-  message
-end
-
-
- -

+ if message.multipart? + message.body.set_sort_order(headers[:parts_order]) + message.body.sort_parts! + end + + message + end + + See on GitHub + + + +

@@ -1608,22 +1610,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/base.rb, line 678
+    def mailer_name
+      self.class.mailer_name
+    end
- -
-
# File actionmailer/lib/action_mailer/base.rb, line 678
-def mailer_name
-  self.class.mailer_name
-end
-
-
- -

+ See on GitHub + + + +

Instance Private methods

@@ -1646,23 +1648,23 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/base.rb, line 937
+      def default_i18n_subject(interpolations = {}) # :doc:
+        mailer_scope = self.class.mailer_name.tr("/", ".")
+        I18n.t(:subject, **interpolations.merge(scope: [mailer_scope, action_name], default: action_name.humanize))
+      end
- -
-
# File actionmailer/lib/action_mailer/base.rb, line 937
-def default_i18n_subject(interpolations = {}) # :doc:
-  mailer_scope = self.class.mailer_name.tr("/", ".")
-  I18n.t(:subject, **interpolations.merge(scope: [mailer_scope, action_name], default: action_name.humanize))
-end
-
-
- - + See on GitHub + + + +

@@ -1686,36 +1688,36 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/base.rb, line 915
+      def set_content_type(m, user_content_type, class_default) # :doc:
+        params = m.content_type_parameters || {}
+        case
+        when user_content_type.present?
+          user_content_type
+        when m.has_attachments?
+          if m.attachments.all?(&:inline?)
+            ["multipart", "related", params]
+          else
+            ["multipart", "mixed", params]
+          end
+        when m.multipart?
+          ["multipart", "alternative", params]
+        else
+          m.content_type || class_default
+        end
+      end
- -
-
# File actionmailer/lib/action_mailer/base.rb, line 915
-def set_content_type(m, user_content_type, class_default) # :doc:
-  params = m.content_type_parameters || {}
-  case
-  when user_content_type.present?
-    user_content_type
-  when m.has_attachments?
-    if m.attachments.all?(&:inline?)
-      ["multipart", "related", params]
-    else
-      ["multipart", "mixed", params]
-    end
-  when m.multipart?
-    ["multipart", "alternative", params]
-  else
-    m.content_type || class_default
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionMailer/Base/LateAttachmentsProxy.html b/src/classes/ActionMailer/Base/LateAttachmentsProxy.html index 14b6499ba5..d94573b9e0 100644 --- a/src/classes/ActionMailer/Base/LateAttachmentsProxy.html +++ b/src/classes/ActionMailer/Base/LateAttachmentsProxy.html @@ -85,20 +85,20 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/base.rb, line 771
+      def []=(_name, _content); _raise_error end
- -
-
# File actionmailer/lib/action_mailer/base.rb, line 771
-def []=(_name, _content); _raise_error end
-
-
- - + See on GitHub + + + +

@@ -118,20 +118,20 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/base.rb, line 770
+      def inline; self end
- -
-
# File actionmailer/lib/action_mailer/base.rb, line 770
-def inline; self end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionMailer/Callbacks/ClassMethods.html b/src/classes/ActionMailer/Callbacks/ClassMethods.html index dfe859bb31..7d307e7237 100644 --- a/src/classes/ActionMailer/Callbacks/ClassMethods.html +++ b/src/classes/ActionMailer/Callbacks/ClassMethods.html @@ -83,22 +83,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/callbacks.rb, line 21
+      def after_deliver(*filters, &blk)
+        set_callback(:deliver, :after, *filters, &blk)
+      end
- -
-
# File actionmailer/lib/action_mailer/callbacks.rb, line 21
-def after_deliver(*filters, &blk)
-  set_callback(:deliver, :after, *filters, &blk)
-end
-
-
- - + See on GitHub + + + +

@@ -118,22 +118,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/callbacks.rb, line 26
+      def around_deliver(*filters, &blk)
+        set_callback(:deliver, :around, *filters, &blk)
+      end
- -
-
# File actionmailer/lib/action_mailer/callbacks.rb, line 26
-def around_deliver(*filters, &blk)
-  set_callback(:deliver, :around, *filters, &blk)
-end
-
-
- -

+ See on GitHub + + + +

@@ -153,22 +153,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/callbacks.rb, line 15
+      def before_deliver(*filters, &blk)
+        set_callback(:deliver, :before, *filters, &blk)
+      end
- -
-
# File actionmailer/lib/action_mailer/callbacks.rb, line 15
-def before_deliver(*filters, &blk)
-  set_callback(:deliver, :before, *filters, &blk)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionMailer/Collector.html b/src/classes/ActionMailer/Collector.html index 3e2d1b84de..b57d97a0b1 100644 --- a/src/classes/ActionMailer/Collector.html +++ b/src/classes/ActionMailer/Collector.html @@ -120,24 +120,24 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/collector.rb, line 12
+    def initialize(context, &block)
+      @context = context
+      @responses = []
+      @default_render = block
+    end
- -
-
# File actionmailer/lib/action_mailer/collector.rb, line 12
-def initialize(context, &block)
-  @context = context
-  @responses = []
-  @default_render = block
-end
-
-
- - + See on GitHub + + + + @@ -165,7 +165,8 @@

- + +

@@ -189,24 +190,24 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/collector.rb, line 18
+    def any(*args, &block)
+      options = args.extract_options!
+      raise ArgumentError, "You have to supply at least one format" if args.empty?
+      args.each { |type| send(type, options.dup, &block) }
+    end
- -
-
# File actionmailer/lib/action_mailer/collector.rb, line 18
-def any(*args, &block)
-  options = args.extract_options!
-  raise ArgumentError, "You have to supply at least one format" if args.empty?
-  args.each { |type| send(type, options.dup, &block) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -226,25 +227,25 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/collector.rb, line 25
+    def custom(mime, options = {})
+      options.reverse_merge!(content_type: mime.to_s)
+      @context.formats = [mime.to_sym]
+      options[:body] = block_given? ? yield : @default_render.call
+      @responses << options
+    end
- -
-
# File actionmailer/lib/action_mailer/collector.rb, line 25
-def custom(mime, options = {})
-  options.reverse_merge!(content_type: mime.to_s)
-  @context.formats = [mime.to_sym]
-  options[:body] = block_given? ? yield : @default_render.call
-  @responses << options
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionMailer/DeliveryMethods/ClassMethods.html b/src/classes/ActionMailer/DeliveryMethods/ClassMethods.html index 98dc2238ad..424251458d 100644 --- a/src/classes/ActionMailer/DeliveryMethods/ClassMethods.html +++ b/src/classes/ActionMailer/DeliveryMethods/ClassMethods.html @@ -86,24 +86,24 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/delivery_methods.rb, line 52
+      def add_delivery_method(symbol, klass, default_options = {})
+        class_attribute(:"#{symbol}_settings") unless respond_to?(:"#{symbol}_settings")
+        public_send(:"#{symbol}_settings=", default_options)
+        self.delivery_methods = delivery_methods.merge(symbol.to_sym => klass).freeze
+      end
- -
-
# File actionmailer/lib/action_mailer/delivery_methods.rb, line 52
-def add_delivery_method(symbol, klass, default_options = {})
-  class_attribute(:"#{symbol}_settings") unless respond_to?(:"#{symbol}_settings")
-  public_send(:"#{symbol}_settings=", default_options)
-  self.delivery_methods = delivery_methods.merge(symbol.to_sym => klass).freeze
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionMailer/FormBuilder.html b/src/classes/ActionMailer/FormBuilder.html index 8705a335dc..0eb9b13689 100644 --- a/src/classes/ActionMailer/FormBuilder.html +++ b/src/classes/ActionMailer/FormBuilder.html @@ -100,22 +100,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/form_builder.rb, line 33
+    def default_form_builder
+      self.class._default_form_builder
+    end
- -
-
# File actionmailer/lib/action_mailer/form_builder.rb, line 33
-def default_form_builder
-  self.class._default_form_builder
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionMailer/FormBuilder/ClassMethods.html b/src/classes/ActionMailer/FormBuilder/ClassMethods.html index 4d84cd9720..304fa50466 100644 --- a/src/classes/ActionMailer/FormBuilder/ClassMethods.html +++ b/src/classes/ActionMailer/FormBuilder/ClassMethods.html @@ -80,22 +80,22 @@

Parameters

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/form_builder.rb, line 27
+      def default_form_builder(builder)
+        self._default_form_builder = builder
+      end
- -
-
# File actionmailer/lib/action_mailer/form_builder.rb, line 27
-def default_form_builder(builder)
-  self._default_form_builder = builder
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionMailer/LogSubscriber.html b/src/classes/ActionMailer/LogSubscriber.html index d3f37eb523..027337c839 100644 --- a/src/classes/ActionMailer/LogSubscriber.html +++ b/src/classes/ActionMailer/LogSubscriber.html @@ -97,32 +97,32 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/log_subscriber.rb, line 12
+    def deliver(event)
+      info do
+        if exception = event.payload[:exception_object]
+          "Failed delivery of mail #{event.payload[:message_id]} error_class=#{exception.class} error_message=#{exception.message.inspect}"
+        elsif event.payload[:perform_deliveries]
+          "Delivered mail #{event.payload[:message_id]} (#{event.duration.round(1)}ms)"
+        else
+          "Skipped delivery of mail #{event.payload[:message_id]} as `perform_deliveries` is false"
+        end
+      end
+
+      debug { event.payload[:mail] }
+    end
- -
-
# File actionmailer/lib/action_mailer/log_subscriber.rb, line 12
-def deliver(event)
-  info do
-    if exception = event.payload[:exception_object]
-      "Failed delivery of mail #{event.payload[:message_id]} error_class=#{exception.class} error_message=#{exception.message.inspect}"
-    elsif event.payload[:perform_deliveries]
-      "Delivered mail #{event.payload[:message_id]} (#{event.duration.round(1)}ms)"
-    else
-      "Skipped delivery of mail #{event.payload[:message_id]} as `perform_deliveries` is false"
-    end
-  end
-
-  debug { event.payload[:mail] }
-end
-
-
- - + See on GitHub + + + +

@@ -142,22 +142,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/log_subscriber.rb, line 38
+    def logger
+      ActionMailer::Base.logger
+    end
- -
-
# File actionmailer/lib/action_mailer/log_subscriber.rb, line 38
-def logger
-  ActionMailer::Base.logger
-end
-
-
- -

+ See on GitHub + + + +

@@ -177,26 +177,26 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/log_subscriber.rb, line 28
+    def process(event)
+      debug do
+        mailer = event.payload[:mailer]
+        action = event.payload[:action]
+        "#{mailer}##{action}: processed outbound mail in #{event.duration.round(1)}ms"
+      end
+    end
- -
-
# File actionmailer/lib/action_mailer/log_subscriber.rb, line 28
-def process(event)
-  debug do
-    mailer = event.payload[:mailer]
-    action = event.payload[:action]
-    "#{mailer}##{action}: processed outbound mail in #{event.duration.round(1)}ms"
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionMailer/MailHelper.html b/src/classes/ActionMailer/MailHelper.html index bfc5c2b430..008f0c4b67 100644 --- a/src/classes/ActionMailer/MailHelper.html +++ b/src/classes/ActionMailer/MailHelper.html @@ -99,22 +99,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/mail_helper.rb, line 45
+    def attachments
+      mailer.attachments
+    end
- -
-
# File actionmailer/lib/action_mailer/mail_helper.rb, line 45
-def attachments
-  mailer.attachments
-end
-
-
- - + See on GitHub + + + +

@@ -145,30 +145,30 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/mail_helper.rb, line 22
+    def block_format(text)
+      formatted = text.split(/\n\r?\n/).collect { |paragraph|
+        format_paragraph(paragraph)
+      }.join("\n\n")
+
+      # Make list points stand on their own line
+      formatted.gsub!(/[ ]*([*]+) ([^*]*)/) { "  #{$1} #{$2.strip}\n" }
+      formatted.gsub!(/[ ]*([#]+) ([^#]*)/) { "  #{$1} #{$2.strip}\n" }
+
+      formatted
+    end
- -
-
# File actionmailer/lib/action_mailer/mail_helper.rb, line 22
-def block_format(text)
-  formatted = text.split(/\n\r?\n/).collect { |paragraph|
-    format_paragraph(paragraph)
-  }.join("\n\n")
-
-  # Make list points stand on their own line
-  formatted.gsub!(/[ ]*([*]+) ([^*]*)/) { "  #{$1} #{$2.strip}\n" }
-  formatted.gsub!(/[ ]*([#]+) ([^#]*)/) { "  #{$1} #{$2.strip}\n" }
-
-  formatted
-end
-
-
- -

+ See on GitHub + + + +

@@ -194,35 +194,35 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/mail_helper.rb, line 57
+    def format_paragraph(text, len = 72, indent = 2)
+      sentences = [[]]
+
+      text.split.each do |word|
+        if sentences.first.present? && (sentences.last + [word]).join(" ").length > len
+          sentences << [word]
+        else
+          sentences.last << word
+        end
+      end
+
+      indentation = " " * indent
+      sentences.map! { |sentence|
+        "#{indentation}#{sentence.join(' ')}"
+      }.join "\n"
+    end
- -
-
# File actionmailer/lib/action_mailer/mail_helper.rb, line 57
-def format_paragraph(text, len = 72, indent = 2)
-  sentences = [[]]
-
-  text.split.each do |word|
-    if sentences.first.present? && (sentences.last + [word]).join(" ").length > len
-      sentences << [word]
-    else
-      sentences.last << word
-    end
-  end
-
-  indentation = " " * indent
-  sentences.map! { |sentence|
-    "#{indentation}#{sentence.join(' ')}"
-  }.join "\n"
-end
-
-
- -

+ See on GitHub + + + +

@@ -242,22 +242,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/mail_helper.rb, line 35
+    def mailer
+      @_controller
+    end
- -
-
# File actionmailer/lib/action_mailer/mail_helper.rb, line 35
-def mailer
-  @_controller
-end
-
-
- -

+ See on GitHub + + + +

@@ -277,22 +277,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/mail_helper.rb, line 40
+    def message
+      @_message
+    end
- -
-
# File actionmailer/lib/action_mailer/mail_helper.rb, line 40
-def message
-  @_message
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionMailer/MessageDelivery.html b/src/classes/ActionMailer/MessageDelivery.html index 5ee5aaad6b..4a6bf2048c 100644 --- a/src/classes/ActionMailer/MessageDelivery.html +++ b/src/classes/ActionMailer/MessageDelivery.html @@ -139,22 +139,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/message_delivery.rb, line 102
+    def deliver_later(options = {})
+      enqueue_delivery :deliver_now, options
+    end
- -
-
# File actionmailer/lib/action_mailer/message_delivery.rb, line 102
-def deliver_later(options = {})
-  enqueue_delivery :deliver_now, options
-end
-
-
- - + See on GitHub + + + +

@@ -198,22 +198,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/message_delivery.rb, line 75
+    def deliver_later!(options = {})
+      enqueue_delivery :deliver_now!, options
+    end
- -
-
# File actionmailer/lib/action_mailer/message_delivery.rb, line 75
-def deliver_later!(options = {})
-  enqueue_delivery :deliver_now!, options
-end
-
-
- -

+ See on GitHub + + + +

@@ -236,26 +236,26 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/message_delivery.rb, line 123
+    def deliver_now
+      processed_mailer.handle_exceptions do
+        processed_mailer.run_callbacks(:deliver) do
+          message.deliver
+        end
+      end
+    end
- -
-
# File actionmailer/lib/action_mailer/message_delivery.rb, line 123
-def deliver_now
-  processed_mailer.handle_exceptions do
-    processed_mailer.run_callbacks(:deliver) do
-      message.deliver
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -278,26 +278,26 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/message_delivery.rb, line 111
+    def deliver_now!
+      processed_mailer.handle_exceptions do
+        processed_mailer.run_callbacks(:deliver) do
+          message.deliver!
+        end
+      end
+    end
- -
-
# File actionmailer/lib/action_mailer/message_delivery.rb, line 111
-def deliver_now!
-  processed_mailer.handle_exceptions do
-    processed_mailer.run_callbacks(:deliver) do
-      message.deliver!
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -317,22 +317,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/message_delivery.rb, line 41
+    def message
+      __getobj__
+    end
- -
-
# File actionmailer/lib/action_mailer/message_delivery.rb, line 41
-def message
-  __getobj__
-end
-
-
- -

+ See on GitHub + + + +

@@ -352,22 +352,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/message_delivery.rb, line 46
+    def processed?
+      @processed_mailer || @mail_message
+    end
- -
-
# File actionmailer/lib/action_mailer/message_delivery.rb, line 46
-def processed?
-  @processed_mailer || @mail_message
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionMailer/NonInferrableMailerError.html b/src/classes/ActionMailer/NonInferrableMailerError.html index 7c60c6c8fa..d158e5755d 100644 --- a/src/classes/ActionMailer/NonInferrableMailerError.html +++ b/src/classes/ActionMailer/NonInferrableMailerError.html @@ -80,24 +80,24 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/test_case.rb, line 8
+    def initialize(name)
+      super "Unable to determine the mailer to test from #{name}. " \
+        "You'll need to specify it using tests YourMailer in your " \
+        "test case definition"
+    end
- -
-
# File actionmailer/lib/action_mailer/test_case.rb, line 8
-def initialize(name)
-  super "Unable to determine the mailer to test from #{name}. " \
-    "You'll need to specify it using tests YourMailer in your " \
-    "test case definition"
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionMailer/Parameterized.html b/src/classes/ActionMailer/Parameterized.html index 2e8a3505ac..bacc6ebf23 100644 --- a/src/classes/ActionMailer/Parameterized.html +++ b/src/classes/ActionMailer/Parameterized.html @@ -195,22 +195,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/parameterized.rb, line 95
+      def params
+        @params ||= {}
+      end
- -
-
# File actionmailer/lib/action_mailer/parameterized.rb, line 95
-def params
-  @params ||= {}
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionMailer/Parameterized/ClassMethods.html b/src/classes/ActionMailer/Parameterized/ClassMethods.html index 0e5d6a13d1..8d7c59266c 100644 --- a/src/classes/ActionMailer/Parameterized/ClassMethods.html +++ b/src/classes/ActionMailer/Parameterized/ClassMethods.html @@ -80,22 +80,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/parameterized.rb, line 106
+      def with(params)
+        ActionMailer::Parameterized::Mailer.new(self, params)
+      end
- -
-
# File actionmailer/lib/action_mailer/parameterized.rb, line 106
-def with(params)
-  ActionMailer::Parameterized::Mailer.new(self, params)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionMailer/Preview.html b/src/classes/ActionMailer/Preview.html index 7ba558715d..4e471cb4bb 100644 --- a/src/classes/ActionMailer/Preview.html +++ b/src/classes/ActionMailer/Preview.html @@ -122,23 +122,23 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/preview.rb, line 104
+      def all
+        load_previews if descendants.empty?
+        descendants.sort_by { |mailer| mailer.name.titleize }
+      end
- -
-
# File actionmailer/lib/action_mailer/preview.rb, line 104
-def all
-  load_previews if descendants.empty?
-  descendants.sort_by { |mailer| mailer.name.titleize }
-end
-
-
- - + See on GitHub + + + +

@@ -158,25 +158,25 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/preview.rb, line 112
+      def call(email, params = {})
+        preview = new(params)
+        message = preview.public_send(email)
+        inform_preview_interceptors(message)
+        message
+      end
- -
-
# File actionmailer/lib/action_mailer/preview.rb, line 112
-def call(email, params = {})
-  preview = new(params)
-  message = preview.public_send(email)
-  inform_preview_interceptors(message)
-  message
-end
-
-
- -

+ See on GitHub + + + +

@@ -196,22 +196,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/preview.rb, line 125
+      def email_exists?(email)
+        emails.include?(email)
+      end
- -
-
# File actionmailer/lib/action_mailer/preview.rb, line 125
-def email_exists?(email)
-  emails.include?(email)
-end
-
-
- -

+ See on GitHub + + + +

@@ -231,22 +231,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/preview.rb, line 120
+      def emails
+        public_instance_methods(false).map(&:to_s).sort
+      end
- -
-
# File actionmailer/lib/action_mailer/preview.rb, line 120
-def emails
-  public_instance_methods(false).map(&:to_s).sort
-end
-
-
- -

+ See on GitHub + + + +

@@ -266,22 +266,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/preview.rb, line 130
+      def exists?(preview)
+        all.any? { |p| p.preview_name == preview }
+      end
- -
-
# File actionmailer/lib/action_mailer/preview.rb, line 130
-def exists?(preview)
-  all.any? { |p| p.preview_name == preview }
-end
-
-
- -

+ See on GitHub + + + +

@@ -301,22 +301,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/preview.rb, line 135
+      def find(preview)
+        all.find { |p| p.preview_name == preview }
+      end
- -
-
# File actionmailer/lib/action_mailer/preview.rb, line 135
-def find(preview)
-  all.find { |p| p.preview_name == preview }
-end
-
-
- -

+ See on GitHub + + + +

@@ -336,22 +336,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/preview.rb, line 98
+    def initialize(params = {})
+      @params = params
+    end
- -
-
# File actionmailer/lib/action_mailer/preview.rb, line 98
-def initialize(params = {})
-  @params = params
-end
-
-
- -

+ See on GitHub + + + +

@@ -371,22 +371,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/preview.rb, line 140
+      def preview_name
+        name.delete_suffix("Preview").underscore
+      end
- -
-
# File actionmailer/lib/action_mailer/preview.rb, line 140
-def preview_name
-  name.delete_suffix("Preview").underscore
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionMailer/Previews/ClassMethods.html b/src/classes/ActionMailer/Previews/ClassMethods.html index 22ef329fa9..a810929729 100644 --- a/src/classes/ActionMailer/Previews/ClassMethods.html +++ b/src/classes/ActionMailer/Previews/ClassMethods.html @@ -95,26 +95,26 @@

- -
- - -
-
# File actionmailer/lib/action_mailer/preview.rb, line 45
-      def preview_path
-        ActionMailer.deprecator.warn(<<-MSG.squish)
-          Using preview_path option is deprecated and will be removed in Rails 7.2.
+          
+            
+ + Source code + + +
# File actionmailer/lib/action_mailer/preview.rb, line 45
+      def preview_path
+        ActionMailer.deprecator.warn(<<-MSG.squish)
+          Using preview_path option is deprecated and will be removed in Rails 7.2.
           Please use preview_paths instead.
-        MSG
-        self.preview_paths.first
-      end
-
-
- - + MSG + self.preview_paths.first + end + + See on GitHub + + + +

@@ -134,26 +134,26 @@

- -
- - -
-
# File actionmailer/lib/action_mailer/preview.rb, line 37
-      def preview_path=(value)
-        ActionMailer.deprecator.warn(<<-MSG.squish)
-          Using preview_path= option is deprecated and will be removed in Rails 7.2.
+          
+            
+ + Source code + + +
# File actionmailer/lib/action_mailer/preview.rb, line 37
+      def preview_path=(value)
+        ActionMailer.deprecator.warn(<<-MSG.squish)
+          Using preview_path= option is deprecated and will be removed in Rails 7.2.
           Please use preview_paths= instead.
-        MSG
-        self.preview_paths << value
-      end
-
-
- -

+ MSG + self.preview_paths << value + end + + See on GitHub + + + +

@@ -173,26 +173,26 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/preview.rb, line 66
+      def register_preview_interceptor(interceptor)
+        preview_interceptor = interceptor_class_for(interceptor)
+
+        unless preview_interceptors.include?(preview_interceptor)
+          preview_interceptors << preview_interceptor
+        end
+      end
- -
-
# File actionmailer/lib/action_mailer/preview.rb, line 66
-def register_preview_interceptor(interceptor)
-  preview_interceptor = interceptor_class_for(interceptor)
-
-  unless preview_interceptors.include?(preview_interceptor)
-    preview_interceptors << preview_interceptor
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -212,22 +212,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/preview.rb, line 54
+      def register_preview_interceptors(*interceptors)
+        interceptors.flatten.compact.each { |interceptor| register_preview_interceptor(interceptor) }
+      end
- -
-
# File actionmailer/lib/action_mailer/preview.rb, line 54
-def register_preview_interceptors(*interceptors)
-  interceptors.flatten.compact.each { |interceptor| register_preview_interceptor(interceptor) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -247,22 +247,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/preview.rb, line 77
+      def unregister_preview_interceptor(interceptor)
+        preview_interceptors.delete(interceptor_class_for(interceptor))
+      end
- -
-
# File actionmailer/lib/action_mailer/preview.rb, line 77
-def unregister_preview_interceptor(interceptor)
-  preview_interceptors.delete(interceptor_class_for(interceptor))
-end
-
-
- -

+ See on GitHub + + + +

@@ -282,22 +282,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/preview.rb, line 59
+      def unregister_preview_interceptors(*interceptors)
+        interceptors.flatten.compact.each { |interceptor| unregister_preview_interceptor(interceptor) }
+      end
- -
-
# File actionmailer/lib/action_mailer/preview.rb, line 59
-def unregister_preview_interceptors(*interceptors)
-  interceptors.flatten.compact.each { |interceptor| unregister_preview_interceptor(interceptor) }
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionMailer/TestCase/Behavior.html b/src/classes/ActionMailer/TestCase/Behavior.html index 808be24b98..86493f8490 100644 --- a/src/classes/ActionMailer/TestCase/Behavior.html +++ b/src/classes/ActionMailer/TestCase/Behavior.html @@ -124,22 +124,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/test_case.rb, line 82
+      def read_fixture(action)
+        IO.readlines(File.join(Rails.root, "test", "fixtures", self.class.mailer_class.name.underscore, action))
+      end
- -
-
# File actionmailer/lib/action_mailer/test_case.rb, line 82
-def read_fixture(action)
-  IO.readlines(File.join(Rails.root, "test", "fixtures", self.class.mailer_class.name.underscore, action))
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionMailer/TestCase/Behavior/ClassMethods.html b/src/classes/ActionMailer/TestCase/Behavior/ClassMethods.html index 08cc6f8ad3..6cbde53f3d 100644 --- a/src/classes/ActionMailer/TestCase/Behavior/ClassMethods.html +++ b/src/classes/ActionMailer/TestCase/Behavior/ClassMethods.html @@ -83,26 +83,26 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/test_case.rb, line 68
+        def determine_default_mailer(name)
+          mailer = determine_constant_from_test_name(name) do |constant|
+            Class === constant && constant < ActionMailer::Base
+          end
+          raise NonInferrableMailerError.new(name) if mailer.nil?
+          mailer
+        end
- -
-
# File actionmailer/lib/action_mailer/test_case.rb, line 68
-def determine_default_mailer(name)
-  mailer = determine_constant_from_test_name(name) do |constant|
-    Class === constant && constant < ActionMailer::Base
-  end
-  raise NonInferrableMailerError.new(name) if mailer.nil?
-  mailer
-end
-
-
- - + See on GitHub + + + +

@@ -122,26 +122,26 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/test_case.rb, line 60
+        def mailer_class
+          if mailer = _mailer_class
+            mailer
+          else
+            tests determine_default_mailer(name)
+          end
+        end
- -
-
# File actionmailer/lib/action_mailer/test_case.rb, line 60
-def mailer_class
-  if mailer = _mailer_class
-    mailer
-  else
-    tests determine_default_mailer(name)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -161,29 +161,29 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/test_case.rb, line 49
+        def tests(mailer)
+          case mailer
+          when String, Symbol
+            self._mailer_class = mailer.to_s.camelize.constantize
+          when Module
+            self._mailer_class = mailer
+          else
+            raise NonInferrableMailerError.new(mailer)
+          end
+        end
- -
-
# File actionmailer/lib/action_mailer/test_case.rb, line 49
-def tests(mailer)
-  case mailer
-  when String, Symbol
-    self._mailer_class = mailer.to_s.camelize.constantize
-  when Module
-    self._mailer_class = mailer
-  else
-    raise NonInferrableMailerError.new(mailer)
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionMailer/TestHelper.html b/src/classes/ActionMailer/TestHelper.html index c4eb82701b..5dee5c6b1a 100644 --- a/src/classes/ActionMailer/TestHelper.html +++ b/src/classes/ActionMailer/TestHelper.html @@ -142,27 +142,27 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/test_helper.rb, line 35
+    def assert_emails(number, &block)
+      if block_given?
+        diff = capture_emails(&block).length
+        assert_equal number, diff, "#{number} emails expected, but #{diff} were sent"
+      else
+        assert_equal number, ActionMailer::Base.deliveries.size
+      end
+    end
- -
-
# File actionmailer/lib/action_mailer/test_helper.rb, line 35
-def assert_emails(number, &block)
-  if block_given?
-    diff = capture_emails(&block).length
-    assert_equal number, diff, "#{number} emails expected, but #{diff} were sent"
-  else
-    assert_equal number, ActionMailer::Base.deliveries.size
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -244,57 +244,57 @@

- -
- - -
-
# File actionmailer/lib/action_mailer/test_helper.rb, line 157
-    def assert_enqueued_email_with(mailer, method, params: nil, args: nil, queue: nil, &block)
-      if mailer.is_a? ActionMailer::Parameterized::Mailer
-        params = mailer.instance_variable_get(:@params)
-        mailer = mailer.instance_variable_get(:@mailer)
-      end
-
-      if args.is_a?(Hash)
-        ActionMailer.deprecator.warn <<~MSG
-          Passing a Hash to the assert_enqueued_email_with :args kwarg causes the
+          
+            
+ + Source code + + +
# File actionmailer/lib/action_mailer/test_helper.rb, line 157
+    def assert_enqueued_email_with(mailer, method, params: nil, args: nil, queue: nil, &block)
+      if mailer.is_a? ActionMailer::Parameterized::Mailer
+        params = mailer.instance_variable_get(:@params)
+        mailer = mailer.instance_variable_get(:@mailer)
+      end
+
+      if args.is_a?(Hash)
+        ActionMailer.deprecator.warn <<~MSG
+          Passing a Hash to the assert_enqueued_email_with :args kwarg causes the
           Hash to be treated as params. This behavior is deprecated and will be
           removed in Rails 7.2.
 
           To specify a params Hash, use the :params kwarg:
 
-            assert_enqueued_email_with MyMailer, :my_method, params: { my_param: "value" }
+            assert_enqueued_email_with MyMailer, :my_method, params: { my_param: "value" }
 
           Or, to specify named mailer args as a Hash, wrap the Hash in an array:
 
-            assert_enqueued_email_with MyMailer, :my_method, args: [{ my_arg: "value" }]
+            assert_enqueued_email_with MyMailer, :my_method, args: [{ my_arg: "value" }]
             # OR
-            assert_enqueued_email_with MyMailer, :my_method, args: [my_arg: "value"]
-        MSG
+            assert_enqueued_email_with MyMailer, :my_method, args: [my_arg: "value"]
+        MSG
 
-        params, args = args, nil
-      end
+        params, args = args, nil
+      end
 
-      args = Array(args) unless args.is_a?(Proc)
-      queue ||= mailer.deliver_later_queue_name || ActiveJob::Base.default_queue_name
+      args = Array(args) unless args.is_a?(Proc)
+      queue ||= mailer.deliver_later_queue_name || ActiveJob::Base.default_queue_name
 
-      expected = ->(job_args) do
-        job_kwargs = job_args.extract_options!
+      expected = ->(job_args) do
+        job_kwargs = job_args.extract_options!
 
-        [mailer.to_s, method.to_s, "deliver_now"] == job_args &&
-          params === job_kwargs[:params] && args === job_kwargs[:args]
-      end
+        [mailer.to_s, method.to_s, "deliver_now"] == job_args &&
+          params === job_kwargs[:params] && args === job_kwargs[:args]
+      end
 
-      assert_enqueued_with(job: mailer.delivery_job, args: expected, queue: queue.to_s, &block)
-    end
-
-
- -

+ assert_enqueued_with(job: mailer.delivery_job, args: expected, queue: queue.to_s, &block) + end + + See on GitHub + + + +

@@ -337,22 +337,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/test_helper.rb, line 91
+    def assert_enqueued_emails(number, &block)
+      assert_enqueued_jobs(number, only: ->(job) { delivery_job_filter(job) }, &block)
+    end
- -
-
# File actionmailer/lib/action_mailer/test_helper.rb, line 91
-def assert_enqueued_emails(number, &block)
-  assert_enqueued_jobs(number, only: ->(job) { delivery_job_filter(job) }, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -393,22 +393,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/test_helper.rb, line 63
+    def assert_no_emails(&block)
+      assert_emails 0, &block
+    end
- -
-
# File actionmailer/lib/action_mailer/test_helper.rb, line 63
-def assert_no_emails(&block)
-  assert_emails 0, &block
-end
-
-
- -

+ See on GitHub + + + +

@@ -444,22 +444,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/test_helper.rb, line 211
+    def assert_no_enqueued_emails(&block)
+      assert_enqueued_emails 0, &block
+    end
- -
-
# File actionmailer/lib/action_mailer/test_helper.rb, line 211
-def assert_no_enqueued_emails(&block)
-  assert_enqueued_emails 0, &block
-end
-
-
- -

+ See on GitHub + + + +

@@ -493,26 +493,26 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/test_helper.rb, line 269
+    def capture_emails(&block)
+      original_count = ActionMailer::Base.deliveries.size
+      deliver_enqueued_emails(&block)
+      new_count = ActionMailer::Base.deliveries.size
+      diff = new_count - original_count
+      ActionMailer::Base.deliveries.last(diff)
+    end
- -
-
# File actionmailer/lib/action_mailer/test_helper.rb, line 269
-def capture_emails(&block)
-  original_count = ActionMailer::Base.deliveries.size
-  deliver_enqueued_emails(&block)
-  new_count = ActionMailer::Base.deliveries.size
-  diff = new_count - original_count
-  ActionMailer::Base.deliveries.last(diff)
-end
-
-
- -

+ See on GitHub + + + +

@@ -565,22 +565,22 @@

- -
+ +
+ + Source code + + +
# File actionmailer/lib/action_mailer/test_helper.rb, line 251
+    def deliver_enqueued_emails(queue: nil, at: nil, &block)
+      perform_enqueued_jobs(only: ->(job) { delivery_job_filter(job) }, queue: queue, at: at, &block)
+    end
- -
-
# File actionmailer/lib/action_mailer/test_helper.rb, line 251
-def deliver_enqueued_emails(queue: nil, at: nil, &block)
-  perform_enqueued_jobs(only: ->(job) { delivery_job_filter(job) }, queue: queue, at: at, &block)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionText.html b/src/classes/ActionText.html index 5b7744b665..6d73477f07 100644 --- a/src/classes/ActionText.html +++ b/src/classes/ActionText.html @@ -222,22 +222,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/gem_version.rb, line 5
+  def self.gem_version
+    Gem::Version.new VERSION::STRING
+  end
- -
-
# File actiontext/lib/action_text/gem_version.rb, line 5
-def self.gem_version
-  Gem::Version.new VERSION::STRING
-end
-
-
- - + See on GitHub + + + +

@@ -257,24 +257,24 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text.rb, line 47
+    def html_document_class
+      return @html_document_class if defined?(@html_document_class)
+      @html_document_class =
+        defined?(Nokogiri::HTML5) ? Nokogiri::HTML5::Document : Nokogiri::HTML4::Document
+    end
- -
-
# File actiontext/lib/action_text.rb, line 47
-def html_document_class
-  return @html_document_class if defined?(@html_document_class)
-  @html_document_class =
-    defined?(Nokogiri::HTML5) ? Nokogiri::HTML5::Document : Nokogiri::HTML4::Document
-end
-
-
- -

+ See on GitHub + + + +

@@ -294,24 +294,24 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text.rb, line 53
+    def html_document_fragment_class
+      return @html_document_fragment_class if defined?(@html_document_fragment_class)
+      @html_document_fragment_class =
+        defined?(Nokogiri::HTML5) ? Nokogiri::HTML5::DocumentFragment : Nokogiri::HTML4::DocumentFragment
+    end
- -
-
# File actiontext/lib/action_text.rb, line 53
-def html_document_fragment_class
-  return @html_document_fragment_class if defined?(@html_document_fragment_class)
-  @html_document_fragment_class =
-    defined?(Nokogiri::HTML5) ? Nokogiri::HTML5::DocumentFragment : Nokogiri::HTML4::DocumentFragment
-end
-
-
- -

+ See on GitHub + + + +

@@ -331,22 +331,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/version.rb, line 7
+  def self.version
+    gem_version
+  end
- -
-
# File actiontext/lib/action_text/version.rb, line 7
-def self.version
-  gem_version
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionText/Attachable.html b/src/classes/ActionText/Attachable.html index 34701c0b06..086a236ef7 100644 --- a/src/classes/ActionText/Attachable.html +++ b/src/classes/ActionText/Attachable.html @@ -162,24 +162,24 @@

- -
- - -
-
# File actiontext/lib/action_text/attachable.rb, line 41
-def from_attachable_sgid(sgid, options = {})
-  method = sgid.is_a?(Array) ? :locate_many_signed : :locate_signed
-  record = GlobalID::Locator.public_send(method, sgid, options.merge(for: LOCATOR_NAME))
-  record || raise(ActiveRecord::RecordNotFound)
-end
-
-
- - + +
+ + Source code + + +
# File actiontext/lib/action_text/attachable.rb, line 41
+      def from_attachable_sgid(sgid, options = {})
+        method = sgid.is_a?(Array) ? :locate_many_signed : :locate_signed
+        record = GlobalID::Locator.public_send(method, sgid, options.merge(for: LOCATOR_NAME))
+        record || raise(ActiveRecord::RecordNotFound)
+      end
+ + See on GitHub + +
+ +

@@ -206,30 +206,30 @@

- -
- - -
-
# File actiontext/lib/action_text/attachable.rb, line 29
-def from_node(node)
-  if attachable = attachable_from_sgid(node["sgid"])
-    attachable
-  elsif attachable = ActionText::Attachables::ContentAttachment.from_node(node)
-    attachable
-  elsif attachable = ActionText::Attachables::RemoteImage.from_node(node)
-    attachable
-  else
-    ActionText::Attachables::MissingAttachable.new(node["sgid"])
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachable.rb, line 29
+      def from_node(node)
+        if attachable = attachable_from_sgid(node["sgid"])
+          attachable
+        elsif attachable = ActionText::Attachables::ContentAttachment.from_node(node)
+          attachable
+        elsif attachable = ActionText::Attachables::RemoteImage.from_node(node)
+          attachable
+        else
+          ActionText::Attachables::MissingAttachable.new(node["sgid"])
+        end
+      end
+ + See on GitHub + +
+ + @@ -253,22 +253,22 @@

- -
- - -
-
# File actiontext/lib/action_text/attachable.rb, line 81
-def attachable_content_type
-  try(:content_type) || "application/octet-stream"
-end
-
-
- - + +
+ + Source code + + +
# File actiontext/lib/action_text/attachable.rb, line 81
+    def attachable_content_type
+      try(:content_type) || "application/octet-stream"
+    end
+ + See on GitHub + +
+ +

@@ -288,22 +288,22 @@

- -
- - -
-
# File actiontext/lib/action_text/attachable.rb, line 85
-def attachable_filename
-  filename.to_s if respond_to?(:filename)
-end
-
-
- -

+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachable.rb, line 85
+    def attachable_filename
+      filename.to_s if respond_to?(:filename)
+    end
+ + See on GitHub + +
+ +

@@ -323,22 +323,22 @@

- -
- - -
-
# File actiontext/lib/action_text/attachable.rb, line 89
-def attachable_filesize
-  try(:byte_size) || try(:filesize)
-end
-
-
- -

+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachable.rb, line 89
+    def attachable_filesize
+      try(:byte_size) || try(:filesize)
+    end
+ + See on GitHub + +
+ +

@@ -358,22 +358,22 @@

- -
- - -
-
# File actiontext/lib/action_text/attachable.rb, line 93
-def attachable_metadata
-  try(:metadata) || {}
-end
-
-
- -

+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachable.rb, line 93
+    def attachable_metadata
+      try(:metadata) || {}
+    end
+ + See on GitHub + +
+ +

@@ -393,22 +393,22 @@

- -
- - -
-
# File actiontext/lib/action_text/attachable.rb, line 77
-def attachable_sgid
-  to_sgid(expires_in: nil, for: LOCATOR_NAME).to_s
-end
-
-
- -

+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachable.rb, line 77
+    def attachable_sgid
+      to_sgid(expires_in: nil, for: LOCATOR_NAME).to_s
+    end
+ + See on GitHub + +
+ +

@@ -428,22 +428,22 @@

- -
- - -
-
# File actiontext/lib/action_text/attachable.rb, line 56
-def from_attachable_sgid(sgid)
-  ActionText::Attachable.from_attachable_sgid(sgid, only: self)
-end
-
-
- -

+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachable.rb, line 56
+      def from_attachable_sgid(sgid)
+        ActionText::Attachable.from_attachable_sgid(sgid, only: self)
+      end
+ + See on GitHub + +
+ +

@@ -463,22 +463,22 @@

- -
- - -
-
# File actiontext/lib/action_text/attachable.rb, line 97
-def previewable_attachable?
-  false
-end
-
-
- -

+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachable.rb, line 97
+    def previewable_attachable?
+      false
+    end
+ + See on GitHub + +
+ +

@@ -507,22 +507,22 @@

- -
- - -
-
# File actiontext/lib/action_text/attachable.rb, line 125
-def to_attachable_partial_path
-  to_partial_path
-end
-
-
- -

+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachable.rb, line 125
+    def to_attachable_partial_path
+      to_partial_path
+    end
+ + See on GitHub + +
+ +

@@ -551,22 +551,22 @@

- -
- - -
-
# File actiontext/lib/action_text/attachable.rb, line 70
-def to_missing_attachable_partial_path
-  ActionText::Attachables::MissingAttachable::DEFAULT_PARTIAL_PATH
-end
-
-
- -

+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachable.rb, line 70
+      def to_missing_attachable_partial_path
+        ActionText::Attachables::MissingAttachable::DEFAULT_PARTIAL_PATH
+      end
+ + See on GitHub + +
+ +

@@ -586,30 +586,30 @@

- -
- - -
-
# File actiontext/lib/action_text/attachable.rb, line 129
-def to_rich_text_attributes(attributes = {})
-  attributes.dup.tap do |attrs|
-    attrs[:sgid] = attachable_sgid
-    attrs[:content_type] = attachable_content_type
-    attrs[:previewable] = true if previewable_attachable?
-    attrs[:filename] = attachable_filename
-    attrs[:filesize] = attachable_filesize
-    attrs[:width] = attachable_metadata[:width]
-    attrs[:height] = attachable_metadata[:height]
-  end.compact
-end
-
-
- -

+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachable.rb, line 129
+    def to_rich_text_attributes(attributes = {})
+      attributes.dup.tap do |attrs|
+        attrs[:sgid] = attachable_sgid
+        attrs[:content_type] = attachable_content_type
+        attrs[:previewable] = true if previewable_attachable?
+        attrs[:filename] = attachable_filename
+        attrs[:filesize] = attachable_filesize
+        attrs[:width] = attachable_metadata[:width]
+        attrs[:height] = attachable_metadata[:height]
+      end.compact
+    end
+ + See on GitHub + +
+ +

@@ -638,22 +638,22 @@

- -
- - -
-
# File actiontext/lib/action_text/attachable.rb, line 111
-def to_trix_content_attachment_partial_path
-  to_partial_path
-end
-
-
- -

+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachable.rb, line 111
+    def to_trix_content_attachment_partial_path
+      to_partial_path
+    end
+ + See on GitHub + +
+ + diff --git a/src/classes/ActionText/Attachables/ContentAttachment.html b/src/classes/ActionText/Attachables/ContentAttachment.html deleted file mode 100644 index 8aae5b3c35..0000000000 --- a/src/classes/ActionText/Attachables/ContentAttachment.html +++ /dev/null @@ -1,265 +0,0 @@ ---- -title: ActionText::Attachables::ContentAttachment -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - -

Included Modules

- - - - - - - - - - - - -

Attributes

- - - - - - - - -
- [RW] - name
- - - - -

Class Public methods

- -
-

- - from_node(node) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actiontext/lib/action_text/attachables/content_attachment.rb, line 8
-def self.from_node(node)
-  if node["content-type"]
-    if matches = node["content-type"].match(/vnd\.rubyonrails\.(.+)\.html/)
-      attachment = new(name: matches[1])
-      attachment if attachment.valid?
-    end
-  end
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - attachable_plain_text_representation(caption) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actiontext/lib/action_text/attachables/content_attachment.rb, line 20
-def attachable_plain_text_representation(caption)
-  case name
-  when "horizontal-rule"
-    " ┄ "
-  else
-    " "
-  end
-end
-
-
- -
- -
-

- - to_partial_path() - -

- - -
- -
- - - - - - - - -
- - -
-
# File actiontext/lib/action_text/attachables/content_attachment.rb, line 29
-def to_partial_path
-  "action_text/attachables/content_attachment"
-end
-
-
- -
- -
-

- - to_trix_content_attachment_partial_path() - -

- - -
- -
- - - - - - - - -
- - -
-
# File actiontext/lib/action_text/attachables/content_attachment.rb, line 33
-def to_trix_content_attachment_partial_path
-  "action_text/attachables/content_attachments/#{name.underscore}"
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActionText/Attachables/MissingAttachable.html b/src/classes/ActionText/Attachables/MissingAttachable.html index 22398d6a73..0760efb39e 100644 --- a/src/classes/ActionText/Attachables/MissingAttachable.html +++ b/src/classes/ActionText/Attachables/MissingAttachable.html @@ -106,22 +106,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachables/missing_attachable.rb, line 10
+      def initialize(sgid)
+        @sgid = SignedGlobalID.parse(sgid, for: ActionText::Attachable::LOCATOR_NAME)
+      end
- -
-
# File actiontext/lib/action_text/attachables/missing_attachable.rb, line 10
-def initialize(sgid)
-  @sgid = SignedGlobalID.parse(sgid, for: ActionText::Attachable::LOCATOR_NAME)
-end
-
-
- - + See on GitHub + + + + @@ -145,22 +145,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachables/missing_attachable.rb, line 22
+      def model
+        @sgid&.model_name.to_s.safe_constantize
+      end
- -
-
# File actiontext/lib/action_text/attachables/missing_attachable.rb, line 22
-def model
-  @sgid&.model_name.to_s.safe_constantize
-end
-
-
- - + See on GitHub + + + +

@@ -180,26 +180,26 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachables/missing_attachable.rb, line 14
+      def to_partial_path
+        if model
+          model.to_missing_attachable_partial_path
+        else
+          DEFAULT_PARTIAL_PATH
+        end
+      end
- -
-
# File actiontext/lib/action_text/attachables/missing_attachable.rb, line 14
-def to_partial_path
-  if model
-    model.to_missing_attachable_partial_path
-  else
-    DEFAULT_PARTIAL_PATH
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionText/Attachables/RemoteImage.html b/src/classes/ActionText/Attachables/RemoteImage.html index eaeb60aea0..d14eb3b2e1 100644 --- a/src/classes/ActionText/Attachables/RemoteImage.html +++ b/src/classes/ActionText/Attachables/RemoteImage.html @@ -130,24 +130,24 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachables/remote_image.rb, line 9
+        def from_node(node)
+          if node["url"] && content_type_is_image?(node["content-type"])
+            new(attributes_from_node(node))
+          end
+        end
- -
-
# File actiontext/lib/action_text/attachables/remote_image.rb, line 9
-def from_node(node)
-  if node["url"] && content_type_is_image?(node["content-type"])
-    new(attributes_from_node(node))
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -167,25 +167,25 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachables/remote_image.rb, line 30
+      def initialize(attributes = {})
+        @url = attributes[:url]
+        @content_type = attributes[:content_type]
+        @width = attributes[:width]
+        @height = attributes[:height]
+      end
- -
-
# File actiontext/lib/action_text/attachables/remote_image.rb, line 30
-def initialize(attributes = {})
-  @url = attributes[:url]
-  @content_type = attributes[:content_type]
-  @width = attributes[:width]
-  @height = attributes[:height]
-end
-
-
- -

+ See on GitHub + + + + @@ -209,22 +209,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachables/remote_image.rb, line 37
+      def attachable_plain_text_representation(caption)
+        "[#{caption || "Image"}]"
+      end
- -
-
# File actiontext/lib/action_text/attachables/remote_image.rb, line 37
-def attachable_plain_text_representation(caption)
-  "[#{caption || "Image"}]"
-end
-
-
- - + See on GitHub + + + +

@@ -244,22 +244,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachables/remote_image.rb, line 41
+      def to_partial_path
+        "action_text/attachables/remote_image"
+      end
- -
-
# File actiontext/lib/action_text/attachables/remote_image.rb, line 41
-def to_partial_path
-  "action_text/attachables/remote_image"
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionText/Attachment.html b/src/classes/ActionText/Attachment.html index 3484c120b0..7216074bf6 100644 --- a/src/classes/ActionText/Attachment.html +++ b/src/classes/ActionText/Attachment.html @@ -185,22 +185,22 @@

- -
- - -
-
# File actiontext/lib/action_text/attachment.rb, line 25
-def fragment_by_canonicalizing_attachments(content)
-  fragment_by_minifying_attachments(fragment_by_converting_trix_attachments(content))
-end
-
-
- - + +
+ + Source code + + +
# File actiontext/lib/action_text/attachment.rb, line 25
+      def fragment_by_canonicalizing_attachments(content)
+        fragment_by_minifying_attachments(fragment_by_converting_trix_attachments(content))
+      end
+ + See on GitHub + +
+ +

@@ -220,24 +220,24 @@

- -
- - -
-
# File actiontext/lib/action_text/attachment.rb, line 37
-def from_attachable(attachable, attributes = {})
-  if node = node_from_attributes(attachable.to_rich_text_attributes(attributes))
-    new(node, attachable)
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachment.rb, line 37
+      def from_attachable(attachable, attributes = {})
+        if node = node_from_attributes(attachable.to_rich_text_attributes(attributes))
+          new(node, attachable)
+        end
+      end
+ + See on GitHub + +
+ +

@@ -257,22 +257,22 @@

- -
- - -
-
# File actiontext/lib/action_text/attachment.rb, line 33
-def from_attachables(attachables)
-  Array(attachables).filter_map { |attachable| from_attachable(attachable) }
-end
-
-
- -

+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachment.rb, line 33
+      def from_attachables(attachables)
+        Array(attachables).filter_map { |attachable| from_attachable(attachable) }
+      end
+ + See on GitHub + +
+ +

@@ -292,24 +292,24 @@

- -
- - -
-
# File actiontext/lib/action_text/attachment.rb, line 43
-def from_attributes(attributes, attachable = nil)
-  if node = node_from_attributes(attributes)
-    from_node(node, attachable)
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachment.rb, line 43
+      def from_attributes(attributes, attachable = nil)
+        if node = node_from_attributes(attributes)
+          from_node(node, attachable)
+        end
+      end
+ + See on GitHub + +
+ +

@@ -329,22 +329,22 @@

- -
- - -
-
# File actiontext/lib/action_text/attachment.rb, line 29
-def from_node(node, attachable = nil)
-  new(node, attachable || ActionText::Attachable.from_node(node))
-end
-
-
- -

+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachment.rb, line 29
+      def from_node(node, attachable = nil)
+        new(node, attachable || ActionText::Attachable.from_node(node))
+      end
+ + See on GitHub + +
+ +

@@ -364,23 +364,23 @@

- -
- - -
-
# File actiontext/lib/action_text/attachment.rb, line 66
-def initialize(node, attachable)
-  @node = node
-  @attachable = attachable
-end
-
-
- -

+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachment.rb, line 66
+    def initialize(node, attachable)
+      @node = node
+      @attachable = attachable
+    end
+ + See on GitHub + +
+ + @@ -404,22 +404,22 @@

- -
- - -
-
# File actiontext/lib/action_text/attachment.rb, line 71
-def caption
-  node_attributes["caption"].presence
-end
-
-
- - + +
+ + Source code + + +
# File actiontext/lib/action_text/attachment.rb, line 71
+    def caption
+      node_attributes["caption"].presence
+    end
+ + See on GitHub + +
+ +

@@ -439,22 +439,22 @@

- -
- - -
-
# File actiontext/lib/action_text/attachment.rb, line 75
-def full_attributes
-  node_attributes.merge(attachable_attributes).merge(sgid_attributes)
-end
-
-
- -

+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachment.rb, line 75
+    def full_attributes
+      node_attributes.merge(attachable_attributes).merge(sgid_attributes)
+    end
+ + See on GitHub + +
+ +

@@ -474,22 +474,22 @@

- -
- - -
-
# File actiontext/lib/action_text/attachment.rb, line 129
-def inspect
-  "#<#{self.class.name} attachable=#{attachable.inspect}>"
-end
-
-
- -

+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachment.rb, line 129
+    def inspect
+      "#<#{self.class.name} attachable=#{attachable.inspect}>"
+    end
+ + See on GitHub + +
+ +

@@ -514,22 +514,22 @@

- -
- - -
-
# File actiontext/lib/action_text/attachment.rb, line 121
-def to_html
-  HtmlConversion.node_to_html(node)
-end
-
-
- -

+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachment.rb, line 121
+    def to_html
+      HtmlConversion.node_to_html(node)
+    end
+ + See on GitHub + +
+ +

@@ -575,26 +575,26 @@

- -
- - -
-
# File actiontext/lib/action_text/attachment.rb, line 108
-def to_plain_text
-  if respond_to?(:attachable_plain_text_representation)
-    attachable_plain_text_representation(caption)
-  else
-    caption.to_s
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachment.rb, line 108
+    def to_plain_text
+      if respond_to?(:attachable_plain_text_representation)
+        attachable_plain_text_representation(caption)
+      else
+        caption.to_s
+      end
+    end
+ + See on GitHub + +
+ +

@@ -614,22 +614,22 @@

- -
- - -
-
# File actiontext/lib/action_text/attachment.rb, line 125
-def to_s
-  to_html
-end
-
-
- -

+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachment.rb, line 125
+    def to_s
+      to_html
+    end
+ + See on GitHub + +
+ +

@@ -649,22 +649,22 @@

- -
- - -
-
# File actiontext/lib/action_text/attachment.rb, line 79
-def with_full_attributes
-  self.class.from_attributes(full_attributes, attachable)
-end
-
-
- -

+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachment.rb, line 79
+    def with_full_attributes
+      self.class.from_attributes(full_attributes, attachable)
+    end
+ + See on GitHub + +
+ + diff --git a/src/classes/ActionText/AttachmentGallery.html b/src/classes/ActionText/AttachmentGallery.html index 1494850115..5b7dc8d8ab 100644 --- a/src/classes/ActionText/AttachmentGallery.html +++ b/src/classes/ActionText/AttachmentGallery.html @@ -144,22 +144,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachment_gallery.rb, line 41
+      def attachment_selector
+        "#{ActionText::Attachment.tag_name}[presentation=gallery]"
+      end
- -
-
# File actiontext/lib/action_text/attachment_gallery.rb, line 41
-def attachment_selector
-  "#{ActionText::Attachment.tag_name}[presentation=gallery]"
-end
-
-
- - + See on GitHub + + + +
+ See on GitHub + + + +

@@ -222,24 +222,24 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachment_gallery.rb, line 11
+      def fragment_by_canonicalizing_attachment_galleries(content)
+        fragment_by_replacing_attachment_gallery_nodes(content) do |node|
+          "<#{TAG_NAME}>#{node.inner_html}"
+        end
+      end
- -
-
# File actiontext/lib/action_text/attachment_gallery.rb, line 11
-def fragment_by_canonicalizing_attachment_galleries(content)
-  fragment_by_replacing_attachment_gallery_nodes(content) do |node|
-    "<#{TAG_NAME}>#{node.inner_html}</#{TAG_NAME}>"
-  end
-end
-
-
- -

+ See on GitHub + + + +
+ See on GitHub + + + +

@@ -298,22 +298,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachment_gallery.rb, line 37
+      def from_node(node)
+        new(node)
+      end
- -
-
# File actiontext/lib/action_text/attachment_gallery.rb, line 37
-def from_node(node)
-  new(node)
-end
-
-
- -

+ See on GitHub + + + +

@@ -333,22 +333,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachment_gallery.rb, line 52
+    def initialize(node)
+      @node = node
+    end
- -
-
# File actiontext/lib/action_text/attachment_gallery.rb, line 52
-def initialize(node)
-  @node = node
-end
-
-
- -

+ See on GitHub + + + +

@@ -368,22 +368,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachment_gallery.rb, line 45
+      def selector
+        "#{TAG_NAME}:has(#{attachment_selector} + #{attachment_selector})"
+      end
- -
-
# File actiontext/lib/action_text/attachment_gallery.rb, line 45
-def selector
-  "#{TAG_NAME}:has(#{attachment_selector} + #{attachment_selector})"
-end
-
-
- -

+ See on GitHub + + + + @@ -407,24 +407,24 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachment_gallery.rb, line 56
+    def attachments
+      @attachments ||= node.css(ActionText::AttachmentGallery.attachment_selector).map do |node|
+        ActionText::Attachment.from_node(node).with_full_attributes
+      end
+    end
- -
-
# File actiontext/lib/action_text/attachment_gallery.rb, line 56
-def attachments
-  @attachments ||= node.css(ActionText::AttachmentGallery.attachment_selector).map do |node|
-    ActionText::Attachment.from_node(node).with_full_attributes
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -444,22 +444,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachment_gallery.rb, line 66
+    def inspect
+      "#<#{self.class.name} size=#{size.inspect}>"
+    end
- -
-
# File actiontext/lib/action_text/attachment_gallery.rb, line 66
-def inspect
-  "#<#{self.class.name} size=#{size.inspect}>"
-end
-
-
- -

+ See on GitHub + + + +

@@ -479,22 +479,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachment_gallery.rb, line 62
+    def size
+      attachments.size
+    end
- -
-
# File actiontext/lib/action_text/attachment_gallery.rb, line 62
-def size
-  attachments.size
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionText/Attachments/Caching.html b/src/classes/ActionText/Attachments/Caching.html index 2af80206e9..22c6681445 100644 --- a/src/classes/ActionText/Attachments/Caching.html +++ b/src/classes/ActionText/Attachments/Caching.html @@ -75,22 +75,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachments/caching.rb, line 6
+      def cache_key(*args)
+        [self.class.name, cache_digest, *attachable.cache_key(*args)].join("/")
+      end
- -
-
# File actiontext/lib/action_text/attachments/caching.rb, line 6
-def cache_key(*args)
-  [self.class.name, cache_digest, *attachable.cache_key(*args)].join("/")
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionText/Attachments/Minification.html b/src/classes/ActionText/Attachments/Minification.html index 28bb06e598..8a2ae2e9eb 100644 --- a/src/classes/ActionText/Attachments/Minification.html +++ b/src/classes/ActionText/Attachments/Minification.html @@ -75,24 +75,24 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachments/minification.rb, line 9
+        def fragment_by_minifying_attachments(content)
+          Fragment.wrap(content).replace(ActionText::Attachment.tag_name) do |node|
+            node.tap { |n| n.inner_html = "" }
+          end
+        end
- -
-
# File actiontext/lib/action_text/attachments/minification.rb, line 9
-def fragment_by_minifying_attachments(content)
-  Fragment.wrap(content).replace(ActionText::Attachment.tag_name) do |node|
-    node.tap { |n| n.inner_html = "" }
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionText/Attachments/TrixConversion.html b/src/classes/ActionText/Attachments/TrixConversion.html index fb94047ef5..bfeca84428 100644 --- a/src/classes/ActionText/Attachments/TrixConversion.html +++ b/src/classes/ActionText/Attachments/TrixConversion.html @@ -83,24 +83,24 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachments/trix_conversion.rb, line 11
+        def fragment_by_converting_trix_attachments(content)
+          Fragment.wrap(content).replace(TrixAttachment::SELECTOR) do |node|
+            from_trix_attachment(TrixAttachment.new(node))
+          end
+        end
- -
-
# File actiontext/lib/action_text/attachments/trix_conversion.rb, line 11
-def fragment_by_converting_trix_attachments(content)
-  Fragment.wrap(content).replace(TrixAttachment::SELECTOR) do |node|
-    from_trix_attachment(TrixAttachment.new(node))
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -120,22 +120,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachments/trix_conversion.rb, line 17
+        def from_trix_attachment(trix_attachment)
+          from_attributes(trix_attachment.attributes)
+        end
- -
-
# File actiontext/lib/action_text/attachments/trix_conversion.rb, line 17
-def from_trix_attachment(trix_attachment)
-  from_attributes(trix_attachment.attributes)
-end
-
-
- -

+ See on GitHub + + + +

@@ -155,24 +155,24 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/attachments/trix_conversion.rb, line 22
+      def to_trix_attachment(content = trix_attachment_content)
+        attributes = full_attributes.dup
+        attributes["content"] = content if content
+        TrixAttachment.from_attributes(attributes)
+      end
- -
-
# File actiontext/lib/action_text/attachments/trix_conversion.rb, line 22
-def to_trix_attachment(content = trix_attachment_content)
-  attributes = full_attributes.dup
-  attributes["content"] = content if content
-  TrixAttachment.from_attributes(attributes)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionText/Attribute.html b/src/classes/ActionText/Attribute.html index 707e01cd78..68a89ce2de 100644 --- a/src/classes/ActionText/Attribute.html +++ b/src/classes/ActionText/Attribute.html @@ -109,18 +109,16 @@

Options

- -
- - -
-
# File actiontext/lib/action_text/attribute.rb, line 37
-      def has_rich_text(name, encrypted: false, strict_loading: strict_loading_by_default)
-        class_eval <<-CODE, __FILE__, __LINE__ + 1
-          def #{name}
+          
+            
+ + Source code + + +
# File actiontext/lib/action_text/attribute.rb, line 37
+      def has_rich_text(name, encrypted: false, strict_loading: strict_loading_by_default)
+        class_eval <<-CODE, __FILE__, __LINE__ + 1
+          def #{name}
             rich_text_#{name} || build_rich_text_#{name}
           end
 
@@ -131,20 +129,22 @@ 

Options

def #{name}=(body) self.#{name}.body = body end - CODE + CODE - rich_text_class_name = encrypted ? "ActionText::EncryptedRichText" : "ActionText::RichText" - has_one :"rich_text_#{name}", -> { where(name: name) }, - class_name: rich_text_class_name, as: :record, inverse_of: :record, autosave: true, dependent: :destroy, - strict_loading: strict_loading + rich_text_class_name = encrypted ? "ActionText::EncryptedRichText" : "ActionText::RichText" + has_one :"rich_text_#{name}", -> { where(name: name) }, + class_name: rich_text_class_name, as: :record, inverse_of: :record, autosave: true, dependent: :destroy, + strict_loading: strict_loading - scope :"with_rich_text_#{name}", -> { includes("rich_text_#{name}") } - scope :"with_rich_text_#{name}_and_embeds", -> { includes("rich_text_#{name}": { embeds_attachments: :blob }) } - end
-
-
- - + scope :"with_rich_text_#{name}", -> { includes("rich_text_#{name}") } + scope :"with_rich_text_#{name}_and_embeds", -> { includes("rich_text_#{name}": { embeds_attachments: :blob }) } + end + + See on GitHub + + + +

@@ -164,22 +164,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/attribute.rb, line 66
+      def rich_text_association_names
+        reflect_on_all_associations(:has_one).collect(&:name).select { |n| n.start_with?("rich_text_") }
+      end
- -
-
# File actiontext/lib/action_text/attribute.rb, line 66
-def rich_text_association_names
-  reflect_on_all_associations(:has_one).collect(&:name).select { |n| n.start_with?("rich_text_") }
-end
-
-
- -

+ See on GitHub + + + +

@@ -199,22 +199,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/attribute.rb, line 62
+      def with_all_rich_text
+        eager_load(rich_text_association_names)
+      end
- -
-
# File actiontext/lib/action_text/attribute.rb, line 62
-def with_all_rich_text
-  eager_load(rich_text_association_names)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionText/Content.html b/src/classes/ActionText/Content.html index 3784f0a53c..c36e06115c 100644 --- a/src/classes/ActionText/Content.html +++ b/src/classes/ActionText/Content.html @@ -186,24 +186,24 @@

- -
- - -
-
# File actiontext/lib/action_text/content.rb, line 30
-def fragment_by_canonicalizing_content(content)
-  fragment = ActionText::Attachment.fragment_by_canonicalizing_attachments(content)
-  fragment = ActionText::AttachmentGallery.fragment_by_canonicalizing_attachment_galleries(fragment)
-  fragment
-end
-
-
- - + +
+ + Source code + + +
# File actiontext/lib/action_text/content.rb, line 30
+      def fragment_by_canonicalizing_content(content)
+        fragment = ActionText::Attachment.fragment_by_canonicalizing_attachments(content)
+        fragment = ActionText::AttachmentGallery.fragment_by_canonicalizing_attachment_galleries(fragment)
+        fragment
+      end
+ + See on GitHub + +
+ +

@@ -223,28 +223,28 @@

- -
- - -
-
# File actiontext/lib/action_text/content.rb, line 37
-def initialize(content = nil, options = {})
-  options.with_defaults! canonicalize: true
+          
+            
+ + Source code + - if options[:canonicalize] - @fragment = self.class.fragment_by_canonicalizing_content(content) - else - @fragment = ActionText::Fragment.wrap(content) - end -end
-
-
- -

+
# File actiontext/lib/action_text/content.rb, line 37
+    def initialize(content = nil, options = {})
+      options.with_defaults! canonicalize: true
+
+      if options[:canonicalize]
+        @fragment = self.class.fragment_by_canonicalizing_content(content)
+      else
+        @fragment = ActionText::Fragment.wrap(content)
+      end
+    end
+ + See on GitHub + + + + @@ -268,26 +268,26 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/content.rb, line 145
+    def ==(other)
+      if self.class == other.class
+        to_html == other.to_html
+      elsif other.is_a?(self.class)
+        to_s == other.to_s
+      end
+    end
- -
-
# File actiontext/lib/action_text/content.rb, line 145
-def ==(other)
-  if self.class == other.class
-    to_html == other.to_html
-  elsif other.is_a?(self.class)
-    to_s == other.to_s
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -307,23 +307,23 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/content.rb, line 90
+    def append_attachables(attachables)
+      attachments = ActionText::Attachment.from_attachables(attachables)
+      self.class.new([self.to_s.presence, *attachments].compact.join("\n"))
+    end
- -
-
# File actiontext/lib/action_text/content.rb, line 90
-def append_attachables(attachables)
-  attachments = ActionText::Attachment.from_attachables(attachables)
-  self.class.new([self.to_s.presence, *attachments].compact.join("\n"))
-end
-
-
- -

+ See on GitHub + + + +

@@ -343,22 +343,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/content.rb, line 137
+    def as_json(*)
+      to_html
+    end
- -
-
# File actiontext/lib/action_text/content.rb, line 137
-def as_json(*)
-  to_html
-end
-
-
- -

+ See on GitHub + + + +

@@ -384,24 +384,24 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/content.rb, line 84
+    def attachables
+      @attachables ||= attachment_nodes.map do |node|
+        ActionText::Attachable.from_node(node)
+      end
+    end
- -
-
# File actiontext/lib/action_text/content.rb, line 84
-def attachables
-  @attachables ||= attachment_nodes.map do |node|
-    ActionText::Attachable.from_node(node)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -421,24 +421,24 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/content.rb, line 68
+    def attachment_galleries
+      @attachment_galleries ||= attachment_gallery_nodes.map do |node|
+        attachment_gallery_for_node(node)
+      end
+    end
- -
-
# File actiontext/lib/action_text/content.rb, line 68
-def attachment_galleries
-  @attachment_galleries ||= attachment_gallery_nodes.map do |node|
-    attachment_gallery_for_node(node)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -464,24 +464,24 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/content.rb, line 62
+    def attachments
+      @attachments ||= attachment_nodes.map do |node|
+        attachment_for_node(node)
+      end
+    end
- -
-
# File actiontext/lib/action_text/content.rb, line 62
-def attachments
-  @attachments ||= attachment_nodes.map do |node|
-    attachment_for_node(node)
-  end
-end
-
-
- -

+ See on GitHub + + + +
+ See on GitHub + + + +

@@ -536,22 +536,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/content.rb, line 141
+    def inspect
+      "#<#{self.class.name} #{to_html.truncate(25).inspect}>"
+    end
- -
-
# File actiontext/lib/action_text/content.rb, line 141
-def inspect
-  "#<#{self.class.name} #{to_html.truncate(25).inspect}>"
-end
-
-
- -

+ See on GitHub + + + +
+ See on GitHub + + + +

@@ -611,25 +611,25 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/content.rb, line 102
+    def render_attachment_galleries(&block)
+      content = ActionText::AttachmentGallery.fragment_by_replacing_attachment_gallery_nodes(fragment) do |node|
+        block.call(attachment_gallery_for_node(node))
+      end
+      self.class.new(content, canonicalize: false)
+    end
- -
-
# File actiontext/lib/action_text/content.rb, line 102
-def render_attachment_galleries(&block)
-  content = ActionText::AttachmentGallery.fragment_by_replacing_attachment_gallery_nodes(fragment) do |node|
-    block.call(attachment_gallery_for_node(node))
-  end
-  self.class.new(content, canonicalize: false)
-end
-
-
- -

+ See on GitHub + + + +

@@ -649,25 +649,25 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/content.rb, line 95
+    def render_attachments(**options, &block)
+      content = fragment.replace(ActionText::Attachment.tag_name) do |node|
+        block.call(attachment_for_node(node, **options))
+      end
+      self.class.new(content, canonicalize: false)
+    end
- -
-
# File actiontext/lib/action_text/content.rb, line 95
-def render_attachments(**options, &block)
-  content = fragment.replace(ActionText::Attachment.tag_name) do |node|
-    block.call(attachment_for_node(node, **options))
-  end
-  self.class.new(content, canonicalize: false)
-end
-
-
- -

+ See on GitHub + + + +

@@ -687,22 +687,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/content.rb, line 121
+    def to_html
+      fragment.to_html
+    end
- -
-
# File actiontext/lib/action_text/content.rb, line 121
-def to_html
-  fragment.to_html
-end
-
-
- -

+ See on GitHub + + + +

@@ -722,22 +722,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/content.rb, line 129
+    def to_partial_path
+      "action_text/contents/content"
+    end
- -
-
# File actiontext/lib/action_text/content.rb, line 129
-def to_partial_path
-  "action_text/contents/content"
-end
-
-
- -

+ See on GitHub + + + +

@@ -761,22 +761,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/content.rb, line 113
+    def to_plain_text
+      render_attachments(with_full_attributes: false, &:to_plain_text).fragment.to_plain_text
+    end
- -
-
# File actiontext/lib/action_text/content.rb, line 113
-def to_plain_text
-  render_attachments(with_full_attributes: false, &:to_plain_text).fragment.to_plain_text
-end
-
-
- -

+ See on GitHub + + + +

@@ -796,22 +796,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/content.rb, line 125
+    def to_rendered_html_with_layout
+      render layout: "action_text/contents/content", partial: to_partial_path, formats: :html, locals: { content: self }
+    end
- -
-
# File actiontext/lib/action_text/content.rb, line 125
-def to_rendered_html_with_layout
-  render layout: "action_text/contents/content", partial: to_partial_path, formats: :html, locals: { content: self }
-end
-
-
- -

+ See on GitHub + + + +

@@ -831,22 +831,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/content.rb, line 133
+    def to_s
+      to_rendered_html_with_layout
+    end
- -
-
# File actiontext/lib/action_text/content.rb, line 133
-def to_s
-  to_rendered_html_with_layout
-end
-
-
- -

+ See on GitHub + + + +

@@ -866,22 +866,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/content.rb, line 117
+    def to_trix_html
+      render_attachments(&:to_trix_attachment).to_html
+    end
- -
-
# File actiontext/lib/action_text/content.rb, line 117
-def to_trix_html
-  render_attachments(&:to_trix_attachment).to_html
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionText/ContentHelper.html b/src/classes/ActionText/ContentHelper.html index 104830f58c..9add00a57b 100644 --- a/src/classes/ActionText/ContentHelper.html +++ b/src/classes/ActionText/ContentHelper.html @@ -91,35 +91,35 @@

- -
+ +
+ + Source code + + +
# File actiontext/app/helpers/action_text/content_helper.rb, line 26
+    def render_action_text_attachments(content)
+      content.render_attachments do |attachment|
+        unless attachment.in?(content.gallery_attachments)
+          attachment.node.tap do |node|
+            node.inner_html = render_action_text_attachment attachment, locals: { in_gallery: false }
+          end
+        end
+      end.render_attachment_galleries do |attachment_gallery|
+        render(layout: attachment_gallery, object: attachment_gallery) do
+          attachment_gallery.attachments.map do |attachment|
+            attachment.node.inner_html = render_action_text_attachment attachment, locals: { in_gallery: true }
+            attachment.to_html
+          end.join.html_safe
+        end.chomp
+      end
+    end
- -
-
# File actiontext/app/helpers/action_text/content_helper.rb, line 26
-def render_action_text_attachments(content)
-  content.render_attachments do |attachment|
-    unless attachment.in?(content.gallery_attachments)
-      attachment.node.tap do |node|
-        node.inner_html = render_action_text_attachment attachment, locals: { in_gallery: false }
-      end
-    end
-  end.render_attachment_galleries do |attachment_gallery|
-    render(layout: attachment_gallery, object: attachment_gallery) do
-      attachment_gallery.attachments.map do |attachment|
-        attachment.node.inner_html = render_action_text_attachment attachment, locals: { in_gallery: true }
-        attachment.to_html
-      end.join.html_safe
-    end.chomp
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -139,23 +139,23 @@

- -
+ +
+ + Source code + + +
# File actiontext/app/helpers/action_text/content_helper.rb, line 12
+    def render_action_text_content(content)
+      self.prefix_partial_path_with_controller_namespace = false
+      sanitize_action_text_content(render_action_text_attachments(content))
+    end
- -
-
# File actiontext/app/helpers/action_text/content_helper.rb, line 12
-def render_action_text_content(content)
-  self.prefix_partial_path_with_controller_namespace = false
-  sanitize_action_text_content(render_action_text_attachments(content))
-end
-
-
- -

+ See on GitHub + + + +

@@ -175,27 +175,27 @@

- -
+ +
+ + Source code + + +
# File actiontext/app/helpers/action_text/content_helper.rb, line 17
+    def sanitize_action_text_content(content)
+      sanitizer.sanitize(
+        content.to_html,
+        tags: sanitizer_allowed_tags,
+        attributes: sanitizer_allowed_attributes,
+        scrubber: scrubber,
+      ).html_safe
+    end
- -
-
# File actiontext/app/helpers/action_text/content_helper.rb, line 17
-def sanitize_action_text_content(content)
-  sanitizer.sanitize(
-    content.to_html,
-    tags: sanitizer_allowed_tags,
-    attributes: sanitizer_allowed_attributes,
-    scrubber: scrubber,
-  ).html_safe
-end
-
-
- -

+ See on GitHub + + + +

@@ -215,22 +215,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/app/helpers/action_text/content_helper.rb, line 61
+    def sanitizer_allowed_attributes
+      allowed_attributes || (sanitizer.class.allowed_attributes + ActionText::Attachment::ATTRIBUTES)
+    end
- -
-
# File actiontext/app/helpers/action_text/content_helper.rb, line 61
-def sanitizer_allowed_attributes
-  allowed_attributes || (sanitizer.class.allowed_attributes + ActionText::Attachment::ATTRIBUTES)
-end
-
-
- -

+ See on GitHub + + + +

@@ -250,22 +250,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/app/helpers/action_text/content_helper.rb, line 57
+    def sanitizer_allowed_tags
+      allowed_tags || (sanitizer.class.allowed_tags + [ ActionText::Attachment.tag_name, "figure", "figcaption" ])
+    end
- -
-
# File actiontext/app/helpers/action_text/content_helper.rb, line 57
-def sanitizer_allowed_tags
-  allowed_tags || (sanitizer.class.allowed_tags + [ ActionText::Attachment.tag_name, "figure", "figcaption" ])
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionText/Encryption.html b/src/classes/ActionText/Encryption.html index e4dae1482d..6261511ae1 100644 --- a/src/classes/ActionText/Encryption.html +++ b/src/classes/ActionText/Encryption.html @@ -79,25 +79,25 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/encryption.rb, line 12
+    def decrypt
+      transaction do
+        super
+        decrypt_rich_texts if has_encrypted_rich_texts?
+      end
+    end
- -
-
# File actiontext/lib/action_text/encryption.rb, line 12
-def decrypt
-  transaction do
-    super
-    decrypt_rich_texts if has_encrypted_rich_texts?
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -117,25 +117,25 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/encryption.rb, line 5
+    def encrypt
+      transaction do
+        super
+        encrypt_rich_texts if has_encrypted_rich_texts?
+      end
+    end
- -
-
# File actiontext/lib/action_text/encryption.rb, line 5
-def encrypt
-  transaction do
-    super
-    encrypt_rich_texts if has_encrypted_rich_texts?
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionText/Engine.html b/src/classes/ActionText/Engine.html index 06c53902ad..c3f1f1986f 100644 --- a/src/classes/ActionText/Engine.html +++ b/src/classes/ActionText/Engine.html @@ -119,22 +119,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/engine.rb, line 47
+        def attachable_plain_text_representation(caption = nil)
+          "[#{caption || filename}]"
+        end
- -
-
# File actiontext/lib/action_text/engine.rb, line 47
-def attachable_plain_text_representation(caption = nil)
-  "[#{caption || filename}]"
-end
-
-
- - + See on GitHub + + + +

@@ -154,22 +154,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/engine.rb, line 43
+        def previewable_attachable?
+          representable?
+        end
- -
-
# File actiontext/lib/action_text/engine.rb, line 43
-def previewable_attachable?
-  representable?
-end
-
-
- -

+ See on GitHub + + + +

@@ -189,22 +189,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/engine.rb, line 51
+        def to_trix_content_attachment_partial_path
+          nil
+        end
- -
-
# File actiontext/lib/action_text/engine.rb, line 51
-def to_trix_content_attachment_partial_path
-  nil
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionText/FixtureSet.html b/src/classes/ActionText/FixtureSet.html index 895e4af453..9e84c95f3b 100644 --- a/src/classes/ActionText/FixtureSet.html +++ b/src/classes/ActionText/FixtureSet.html @@ -133,25 +133,25 @@

Examples

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/fixture_set.rb, line 61
+    def self.attachment(fixture_set_name, label, column_type: :integer)
+      signed_global_id = ActiveRecord::FixtureSet.signed_global_id fixture_set_name, label,
+        column_type: column_type, for: ActionText::Attachable::LOCATOR_NAME
+
+      %()
+    end
- -
-
# File actiontext/lib/action_text/fixture_set.rb, line 61
-def self.attachment(fixture_set_name, label, column_type: :integer)
-  signed_global_id = ActiveRecord::FixtureSet.signed_global_id fixture_set_name, label,
-    column_type: column_type, for: ActionText::Attachable::LOCATOR_NAME
-
-  %(<action-text-attachment sgid="#{signed_global_id}"></action-text-attachment>)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionText/Fragment.html b/src/classes/ActionText/Fragment.html index b4fbe2e6ab..f755f86dde 100644 --- a/src/classes/ActionText/Fragment.html +++ b/src/classes/ActionText/Fragment.html @@ -126,22 +126,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/fragment.rb, line 17
+      def from_html(html)
+        new(ActionText::HtmlConversion.fragment_for_html(html.to_s.strip))
+      end
- -
-
# File actiontext/lib/action_text/fragment.rb, line 17
-def from_html(html)
-  new(ActionText::HtmlConversion.fragment_for_html(html.to_s.strip))
-end
-
-
- - + See on GitHub + + + +

@@ -161,22 +161,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/fragment.rb, line 24
+    def initialize(source)
+      @source = source
+    end
- -
-
# File actiontext/lib/action_text/fragment.rb, line 24
-def initialize(source)
-  @source = source
-end
-
-
- -

+ See on GitHub + + + +

@@ -196,29 +196,29 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/fragment.rb, line 6
+      def wrap(fragment_or_html)
+        case fragment_or_html
+        when self
+          fragment_or_html
+        when Nokogiri::XML::DocumentFragment # base class for all fragments
+          new(fragment_or_html)
+        else
+          from_html(fragment_or_html)
+        end
+      end
- -
-
# File actiontext/lib/action_text/fragment.rb, line 6
-def wrap(fragment_or_html)
-  case fragment_or_html
-  when self
-    fragment_or_html
-  when Nokogiri::XML::DocumentFragment # base class for all fragments
-    new(fragment_or_html)
-  else
-    from_html(fragment_or_html)
-  end
-end
-
-
- -

+ See on GitHub + + + + @@ -242,22 +242,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/fragment.rb, line 28
+    def find_all(selector)
+      source.css(selector)
+    end
- -
-
# File actiontext/lib/action_text/fragment.rb, line 28
-def find_all(selector)
-  source.css(selector)
-end
-
-
- - + See on GitHub + + + +

@@ -277,27 +277,27 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/fragment.rb, line 37
+    def replace(selector)
+      update do |source|
+        source.css(selector).each do |node|
+          replacement_node = yield(node)
+          node.replace(replacement_node.to_s) if node != replacement_node
+        end
+      end
+    end
- -
-
# File actiontext/lib/action_text/fragment.rb, line 37
-def replace(selector)
-  update do |source|
-    source.css(selector).each do |node|
-      replacement_node = yield(node)
-      node.replace(replacement_node.to_s) if node != replacement_node
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -317,22 +317,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/fragment.rb, line 50
+    def to_html
+      @html ||= HtmlConversion.node_to_html(source)
+    end
- -
-
# File actiontext/lib/action_text/fragment.rb, line 50
-def to_html
-  @html ||= HtmlConversion.node_to_html(source)
-end
-
-
- -

+ See on GitHub + + + +

@@ -352,22 +352,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/fragment.rb, line 46
+    def to_plain_text
+      @plain_text ||= PlainTextConversion.node_to_plain_text(source)
+    end
- -
-
# File actiontext/lib/action_text/fragment.rb, line 46
-def to_plain_text
-  @plain_text ||= PlainTextConversion.node_to_plain_text(source)
-end
-
-
- -

+ See on GitHub + + + +

@@ -387,22 +387,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/fragment.rb, line 54
+    def to_s
+      to_html
+    end
- -
-
# File actiontext/lib/action_text/fragment.rb, line 54
-def to_s
-  to_html
-end
-
-
- -

+ See on GitHub + + + +

@@ -422,23 +422,23 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/fragment.rb, line 32
+    def update
+      yield source = self.source.dup
+      self.class.new(source)
+    end
- -
-
# File actiontext/lib/action_text/fragment.rb, line 32
-def update
-  yield source = self.source.dup
-  self.class.new(source)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionText/HtmlConversion.html b/src/classes/ActionText/HtmlConversion.html index c9138ca92f..53ccde6b3f 100644 --- a/src/classes/ActionText/HtmlConversion.html +++ b/src/classes/ActionText/HtmlConversion.html @@ -83,22 +83,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/html_conversion.rb, line 15
+    def create_element(tag_name, attributes = {})
+      document.create_element(tag_name, attributes)
+    end
- -
-
# File actiontext/lib/action_text/html_conversion.rb, line 15
-def create_element(tag_name, attributes = {})
-  document.create_element(tag_name, attributes)
-end
-
-
- - + See on GitHub + + + +

@@ -118,22 +118,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/html_conversion.rb, line 11
+    def fragment_for_html(html)
+      document.fragment(html)
+    end
- -
-
# File actiontext/lib/action_text/html_conversion.rb, line 11
-def fragment_for_html(html)
-  document.fragment(html)
-end
-
-
- -

+ See on GitHub + + + +

@@ -153,22 +153,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/html_conversion.rb, line 7
+    def node_to_html(node)
+      node.to_html(save_with: Nokogiri::XML::Node::SaveOptions::AS_HTML)
+    end
- -
-
# File actiontext/lib/action_text/html_conversion.rb, line 7
-def node_to_html(node)
-  node.to_html(save_with: Nokogiri::XML::Node::SaveOptions::AS_HTML)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionText/PlainTextConversion.html b/src/classes/ActionText/PlainTextConversion.html index 7fbf4fd5ac..2ff1b50bab 100644 --- a/src/classes/ActionText/PlainTextConversion.html +++ b/src/classes/ActionText/PlainTextConversion.html @@ -75,22 +75,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/plain_text_conversion.rb, line 7
+    def node_to_plain_text(node)
+      remove_trailing_newlines(plain_text_for_node(node))
+    end
- -
-
# File actiontext/lib/action_text/plain_text_conversion.rb, line 7
-def node_to_plain_text(node)
-  remove_trailing_newlines(plain_text_for_node(node))
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionText/RichText.html b/src/classes/ActionText/RichText.html index 277c370e60..f7b1001ce2 100644 --- a/src/classes/ActionText/RichText.html +++ b/src/classes/ActionText/RichText.html @@ -107,22 +107,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/app/models/action_text/rich_text.rb, line 37
+    def to_plain_text
+      body&.to_plain_text.to_s
+    end
- -
-
# File actiontext/app/models/action_text/rich_text.rb, line 37
-def to_plain_text
-  body&.to_plain_text.to_s
-end
-
-
- - + See on GitHub + + + +

@@ -153,22 +153,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/app/models/action_text/rich_text.rb, line 53
+    def to_trix_html
+      body&.to_trix_html
+    end
- -
-
# File actiontext/app/models/action_text/rich_text.rb, line 53
-def to_trix_html
-  body&.to_trix_html
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionText/Serialization.html b/src/classes/ActionText/Serialization.html index eb5777e842..ae28b1d975 100644 --- a/src/classes/ActionText/Serialization.html +++ b/src/classes/ActionText/Serialization.html @@ -83,22 +83,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/serialization.rb, line 32
+    def _dump(*)
+      self.class.dump(self)
+    end
- -
-
# File actiontext/lib/action_text/serialization.rb, line 32
-def _dump(*)
-  self.class.dump(self)
-end
-
-
- - + See on GitHub + + + +

@@ -118,31 +118,31 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/serialization.rb, line 12
+      def dump(content)
+        case content
+        when nil
+          nil
+        when self
+          content.to_html
+        when ActionText::RichText
+          content.body.to_html
+        else
+          new(content).to_html
+        end
+      end
- -
-
# File actiontext/lib/action_text/serialization.rb, line 12
-def dump(content)
-  case content
-  when nil
-    nil
-  when self
-    content.to_html
-  when ActionText::RichText
-    content.body.to_html
-  else
-    new(content).to_html
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -162,22 +162,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/serialization.rb, line 8
+      def load(content)
+        new(content) if content
+      end
- -
-
# File actiontext/lib/action_text/serialization.rb, line 8
-def load(content)
-  new(content) if content
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionText/SystemTestHelper.html b/src/classes/ActionText/SystemTestHelper.html index dee84c2c90..c8b9ab7ac1 100644 --- a/src/classes/ActionText/SystemTestHelper.html +++ b/src/classes/ActionText/SystemTestHelper.html @@ -108,22 +108,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/system_test_helper.rb, line 32
+    def fill_in_rich_text_area(locator = nil, with:)
+      find(:rich_text_area, locator).execute_script("this.editor.loadHTML(arguments[0])", with.to_s)
+    end
- -
-
# File actiontext/lib/action_text/system_test_helper.rb, line 32
-def fill_in_rich_text_area(locator = nil, with:)
-  find(:rich_text_area, locator).execute_script("this.editor.loadHTML(arguments[0])", with.to_s)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionText/TagHelper.html b/src/classes/ActionText/TagHelper.html index 823511f513..efe8c72bb9 100644 --- a/src/classes/ActionText/TagHelper.html +++ b/src/classes/ActionText/TagHelper.html @@ -91,35 +91,35 @@

Example

- -
+ +
+ + Source code + + +
# File actiontext/app/helpers/action_text/tag_helper.rb, line 24
+    def rich_text_area_tag(name, value = nil, options = {})
+      options = options.symbolize_keys
+      form = options.delete(:form)
+
+      options[:input] ||= "trix_input_#{ActionText::TagHelper.id += 1}"
+      options[:class] ||= "trix-content"
+
+      options[:data] ||= {}
+      options[:data][:direct_upload_url] ||= main_app.rails_direct_uploads_url
+      options[:data][:blob_url_template] ||= main_app.rails_service_blob_url(":signed_id", ":filename")
+
+      editor_tag = content_tag("trix-editor", "", options)
+      input_tag = hidden_field_tag(name, value.try(:to_trix_html) || value, id: options[:input], form: form)
+
+      input_tag + editor_tag
+    end
- -
-
# File actiontext/app/helpers/action_text/tag_helper.rb, line 24
-def rich_text_area_tag(name, value = nil, options = {})
-  options = options.symbolize_keys
-  form = options.delete(:form)
-
-  options[:input] ||= "trix_input_#{ActionText::TagHelper.id += 1}"
-  options[:class] ||= "trix-content"
-
-  options[:data] ||= {}
-  options[:data][:direct_upload_url] ||= main_app.rails_direct_uploads_url
-  options[:data][:blob_url_template] ||= main_app.rails_service_blob_url(":signed_id", ":filename")
-
-  editor_tag = content_tag("trix-editor", "", options)
-  input_tag = hidden_field_tag(name, value.try(:to_trix_html) || value, id: options[:input], form: form)
-
-  input_tag + editor_tag
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionText/TrixAttachment.html b/src/classes/ActionText/TrixAttachment.html index 009e8f2cf3..35c6de63b5 100644 --- a/src/classes/ActionText/TrixAttachment.html +++ b/src/classes/ActionText/TrixAttachment.html @@ -182,31 +182,31 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/trix_attachment.rb, line 19
+      def from_attributes(attributes)
+        attributes = process_attributes(attributes)
+
+        trix_attachment_attributes = attributes.except(*COMPOSED_ATTRIBUTES)
+        trix_attributes = attributes.slice(*COMPOSED_ATTRIBUTES)
+
+        node = ActionText::HtmlConversion.create_element(TAG_NAME)
+        node["data-trix-attachment"] = JSON.generate(trix_attachment_attributes)
+        node["data-trix-attributes"] = JSON.generate(trix_attributes) if trix_attributes.any?
+
+        new(node)
+      end
- -
-
# File actiontext/lib/action_text/trix_attachment.rb, line 19
-def from_attributes(attributes)
-  attributes = process_attributes(attributes)
-
-  trix_attachment_attributes = attributes.except(*COMPOSED_ATTRIBUTES)
-  trix_attributes = attributes.slice(*COMPOSED_ATTRIBUTES)
-
-  node = ActionText::HtmlConversion.create_element(TAG_NAME)
-  node["data-trix-attachment"] = JSON.generate(trix_attachment_attributes)
-  node["data-trix-attributes"] = JSON.generate(trix_attributes) if trix_attributes.any?
-
-  new(node)
-end
-
-
- - + See on GitHub + + + +

@@ -226,22 +226,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/trix_attachment.rb, line 51
+    def initialize(node)
+      @node = node
+    end
- -
-
# File actiontext/lib/action_text/trix_attachment.rb, line 51
-def initialize(node)
-  @node = node
-end
-
-
- -

+ See on GitHub + + + + @@ -265,22 +265,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/trix_attachment.rb, line 55
+    def attributes
+      @attributes ||= attachment_attributes.merge(composed_attributes).slice(*ATTRIBUTES)
+    end
- -
-
# File actiontext/lib/action_text/trix_attachment.rb, line 55
-def attributes
-  @attributes ||= attachment_attributes.merge(composed_attributes).slice(*ATTRIBUTES)
-end
-
-
- - + See on GitHub + + + +

@@ -300,22 +300,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/trix_attachment.rb, line 59
+    def to_html
+      ActionText::HtmlConversion.node_to_html(node)
+    end
- -
-
# File actiontext/lib/action_text/trix_attachment.rb, line 59
-def to_html
-  ActionText::HtmlConversion.node_to_html(node)
-end
-
-
- -

+ See on GitHub + + + +

@@ -335,22 +335,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/lib/action_text/trix_attachment.rb, line 63
+    def to_s
+      to_html
+    end
- -
-
# File actiontext/lib/action_text/trix_attachment.rb, line 63
-def to_s
-  to_html
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView.html b/src/classes/ActionView.html index 914f87455e..e8de26f301 100644 --- a/src/classes/ActionView.html +++ b/src/classes/ActionView.html @@ -466,24 +466,24 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view.rb, line 93
+  def self.eager_load!
+    super
+    ActionView::Helpers.eager_load!
+    ActionView::Template.eager_load!
+  end
- -
-
# File actionview/lib/action_view.rb, line 93
-def self.eager_load!
-  super
-  ActionView::Helpers.eager_load!
-  ActionView::Template.eager_load!
-end
-
-
- - + See on GitHub + + + +

@@ -503,22 +503,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/gem_version.rb, line 5
+  def self.gem_version
+    Gem::Version.new VERSION::STRING
+  end
- -
-
# File actionview/lib/action_view/gem_version.rb, line 5
-def self.gem_version
-  Gem::Version.new VERSION::STRING
-end
-
-
- -

+ See on GitHub + + + +

@@ -538,22 +538,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/version.rb, line 7
+  def self.version
+    gem_version
+  end
- -
-
# File actionview/lib/action_view/version.rb, line 7
-def self.version
-  gem_version
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/AbstractRenderer/RenderedCollection/EmptyCollection.html b/src/classes/ActionView/AbstractRenderer/RenderedCollection/EmptyCollection.html index a14f36441d..f98d5d349b 100644 --- a/src/classes/ActionView/AbstractRenderer/RenderedCollection/EmptyCollection.html +++ b/src/classes/ActionView/AbstractRenderer/RenderedCollection/EmptyCollection.html @@ -98,22 +98,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/renderer/abstract_renderer.rb, line 133
+        def initialize(format)
+          @format = format
+        end
- -
-
# File actionview/lib/action_view/renderer/abstract_renderer.rb, line 133
-def initialize(format)
-  @format = format
-end
-
-
- - + See on GitHub + + + + @@ -137,20 +137,20 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/renderer/abstract_renderer.rb, line 137
+        def body; nil; end
- -
-
# File actionview/lib/action_view/renderer/abstract_renderer.rb, line 137
-def body; nil; end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionView/Base.html b/src/classes/ActionView/Base.html index 4f09aacd8a..7328732409 100644 --- a/src/classes/ActionView/Base.html +++ b/src/classes/ActionView/Base.html @@ -252,22 +252,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/base.rb, line 171
+      def cache_template_loading
+        ActionView::Resolver.caching?
+      end
- -
-
# File actionview/lib/action_view/base.rb, line 171
-def cache_template_loading
-  ActionView::Resolver.caching?
-end
-
-
- - + See on GitHub + + + +

@@ -287,22 +287,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/base.rb, line 175
+      def cache_template_loading=(value)
+        ActionView::Resolver.caching = value
+      end
- -
-
# File actionview/lib/action_view/base.rb, line 175
-def cache_template_loading=(value)
-  ActionView::Resolver.caching = value
-end
-
-
- -

+ See on GitHub + + + +

@@ -322,22 +322,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/base.rb, line 191
+          def inspect
+            "#"
+          end
- -
-
# File actionview/lib/action_view/base.rb, line 191
-def inspect
-  "#<ActionView::Base:#{'%#016x' % (object_id << 1)}>"
-end
-
-
- -

+ See on GitHub + + + + @@ -361,43 +361,43 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/base.rb, line 245
+    def _run(method, template, locals, buffer, add_to_stack: true, has_strict_locals: false, &block)
+      _old_output_buffer, _old_virtual_path, _old_template = @output_buffer, @virtual_path, @current_template
+      @current_template = template if add_to_stack
+      @output_buffer = buffer
+
+      if has_strict_locals
+        begin
+          public_send(method, buffer, **locals, &block)
+        rescue ArgumentError => argument_error
+          raise(
+            ArgumentError,
+            argument_error.
+              message.
+                gsub("unknown keyword:", "unknown local:").
+                gsub("missing keyword:", "missing local:").
+                gsub("no keywords accepted", "no locals accepted")
+          )
+        end
+      else
+        public_send(method, locals, buffer, &block)
+      end
+    ensure
+      @output_buffer, @virtual_path, @current_template = _old_output_buffer, _old_virtual_path, _old_template
+    end
- -
-
# File actionview/lib/action_view/base.rb, line 245
-def _run(method, template, locals, buffer, add_to_stack: true, has_strict_locals: false, &block)
-  _old_output_buffer, _old_virtual_path, _old_template = @output_buffer, @virtual_path, @current_template
-  @current_template = template if add_to_stack
-  @output_buffer = buffer
-
-  if has_strict_locals
-    begin
-      public_send(method, buffer, **locals, &block)
-    rescue ArgumentError => argument_error
-      raise(
-        ArgumentError,
-        argument_error.
-          message.
-            gsub("unknown keyword:", "unknown local:").
-            gsub("missing keyword:", "missing local:").
-            gsub("no keywords accepted", "no locals accepted")
-      )
-    end
-  else
-    public_send(method, locals, buffer, &block)
-  end
-ensure
-  @output_buffer, @virtual_path, @current_template = _old_output_buffer, _old_virtual_path, _old_template
-end
-
-
- - + See on GitHub + + + +

@@ -417,26 +417,26 @@

- -
- - -
-
# File actionview/lib/action_view/base.rb, line 270
-    def compiled_method_container
-      raise NotImplementedError, <<~msg.squish
-        Subclasses of ActionView::Base must implement `compiled_method_container`
+          
+            
+ + Source code + + +
# File actionview/lib/action_view/base.rb, line 270
+    def compiled_method_container
+      raise NotImplementedError, <<~msg.squish
+        Subclasses of ActionView::Base must implement `compiled_method_container`
         or use the class method `with_empty_template_cache` for constructing
         an ActionView::Base subclass that has an empty cache.
-      msg
-    end
-
-
- -

+ msg + end + + See on GitHub + + + +

@@ -456,37 +456,37 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/base.rb, line 278
+    def in_rendering_context(options)
+      old_view_renderer  = @view_renderer
+      old_lookup_context = @lookup_context
+
+      if !lookup_context.html_fallback_for_js && options[:formats]
+        formats = Array(options[:formats])
+        if formats == [:js]
+          formats << :html
+        end
+        @lookup_context = lookup_context.with_prepended_formats(formats)
+        @view_renderer = ActionView::Renderer.new @lookup_context
+      end
+
+      yield @view_renderer
+    ensure
+      @view_renderer = old_view_renderer
+      @lookup_context = old_lookup_context
+    end
- -
-
# File actionview/lib/action_view/base.rb, line 278
-def in_rendering_context(options)
-  old_view_renderer  = @view_renderer
-  old_lookup_context = @lookup_context
-
-  if !lookup_context.html_fallback_for_js && options[:formats]
-    formats = Array(options[:formats])
-    if formats == [:js]
-      formats << :html
-    end
-    @lookup_context = lookup_context.with_prepended_formats(formats)
-    @view_renderer = ActionView::Renderer.new @lookup_context
-  end
-
-  yield @view_renderer
-ensure
-  @view_renderer = old_view_renderer
-  @lookup_context = old_lookup_context
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/CacheExpiry/Executor.html b/src/classes/ActionView/CacheExpiry/Executor.html deleted file mode 100644 index 2e55f1c6fd..0000000000 --- a/src/classes/ActionView/CacheExpiry/Executor.html +++ /dev/null @@ -1,194 +0,0 @@ ---- -title: ActionView::CacheExpiry::Executor -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - new(watcher:) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionview/lib/action_view/cache_expiry.rb, line 6
-def initialize(watcher:)
-  @execution_lock = Concurrent::ReentrantReadWriteLock.new
-  @cache_expiry = ViewModificationWatcher.new(watcher: watcher) do
-    clear_cache
-  end
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - complete(_) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionview/lib/action_view/cache_expiry.rb, line 20
-def complete(_)
-  @execution_lock.release_read_lock
-end
-
-
- -
- -
-

- - run() - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionview/lib/action_view/cache_expiry.rb, line 13
-def run
-  ActiveSupport::Dependencies.interlock.permit_concurrent_loads do
-    @cache_expiry.execute_if_updated
-    @execution_lock.acquire_read_lock
-  end
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActionView/CacheExpiry/ViewModificationWatcher.html b/src/classes/ActionView/CacheExpiry/ViewModificationWatcher.html deleted file mode 100644 index 2d0bfc2c97..0000000000 --- a/src/classes/ActionView/CacheExpiry/ViewModificationWatcher.html +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: ActionView::CacheExpiry::ViewModificationWatcher -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - new(watcher:, &block) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionview/lib/action_view/cache_expiry.rb, line 33
-def initialize(watcher:, &block)
-  @watched_dirs = nil
-  @watcher_class = watcher
-  @watcher = nil
-  @mutex = Mutex.new
-  @block = block
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - execute_if_updated() - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionview/lib/action_view/cache_expiry.rb, line 41
-def execute_if_updated
-  @mutex.synchronize do
-    watched_dirs = dirs_to_watch
-    return if watched_dirs.empty?
-
-    if watched_dirs != @watched_dirs
-      @watched_dirs = watched_dirs
-      @watcher = @watcher_class.new([], watched_dirs, &@block)
-      @watcher.execute
-    else
-      @watcher.execute_if_updated
-    end
-  end
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActionView/Context.html b/src/classes/ActionView/Context.html index 0d369be8c9..cda77fa675 100644 --- a/src/classes/ActionView/Context.html +++ b/src/classes/ActionView/Context.html @@ -111,23 +111,23 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/context.rb, line 27
+    def _layout_for(name = nil)
+      name ||= :layout
+      view_flow.get(name).html_safe
+    end
- -
-
# File actionview/lib/action_view/context.rb, line 27
-def _layout_for(name = nil)
-  name ||= :layout
-  view_flow.get(name).html_safe
-end
-
-
- - + See on GitHub + + + +

@@ -147,24 +147,24 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/context.rb, line 18
+    def _prepare_context
+      @view_flow     = OutputFlow.new
+      @output_buffer = ActionView::OutputBuffer.new
+      @virtual_path  = nil
+    end
- -
-
# File actionview/lib/action_view/context.rb, line 18
-def _prepare_context
-  @view_flow     = OutputFlow.new
-  @output_buffer = ActionView::OutputBuffer.new
-  @virtual_path  = nil
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/Digestor.html b/src/classes/ActionView/Digestor.html index 41a0a5e017..00f15cc16d 100644 --- a/src/classes/ActionView/Digestor.html +++ b/src/classes/ActionView/Digestor.html @@ -118,40 +118,40 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/digestor.rb, line 16
+      def digest(name:, format: nil, finder:, dependencies: nil)
+        if dependencies.nil? || dependencies.empty?
+          cache_key = "#{name}.#{format}"
+        else
+          dependencies_suffix = dependencies.flatten.tap(&:compact!).join(".")
+          cache_key = "#{name}.#{format}.#{dependencies_suffix}"
+        end
+
+        # this is a correctly done double-checked locking idiom
+        # (Concurrent::Map's lookups have volatile semantics)
+        finder.digest_cache[cache_key] || @@digest_mutex.synchronize do
+          finder.digest_cache.fetch(cache_key) do # re-check under lock
+            path = TemplatePath.parse(name)
+            root = tree(path.to_s, finder, path.partial?)
+            dependencies.each do |injected_dep|
+              root.children << Injected.new(injected_dep, nil, nil)
+            end if dependencies
+            finder.digest_cache[cache_key] = root.digest(finder)
+          end
+        end
+      end
- -
-
# File actionview/lib/action_view/digestor.rb, line 16
-def digest(name:, format: nil, finder:, dependencies: nil)
-  if dependencies.nil? || dependencies.empty?
-    cache_key = "#{name}.#{format}"
-  else
-    dependencies_suffix = dependencies.flatten.tap(&:compact!).join(".")
-    cache_key = "#{name}.#{format}.#{dependencies_suffix}"
-  end
-
-  # this is a correctly done double-checked locking idiom
-  # (Concurrent::Map's lookups have volatile semantics)
-  finder.digest_cache[cache_key] || @@digest_mutex.synchronize do
-    finder.digest_cache.fetch(cache_key) do # re-check under lock
-      path = TemplatePath.parse(name)
-      root = tree(path.to_s, finder, path.partial?)
-      dependencies.each do |injected_dep|
-        root.children << Injected.new(injected_dep, nil, nil)
-      end if dependencies
-      finder.digest_cache[cache_key] = root.digest(finder)
-    end
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -171,22 +171,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/digestor.rb, line 38
+      def logger
+        ActionView::Base.logger || NullLogger
+      end
- -
-
# File actionview/lib/action_view/digestor.rb, line 38
-def logger
-  ActionView::Base.logger || NullLogger
-end
-
-
- -

+ See on GitHub + + + +

@@ -206,45 +206,45 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/digestor.rb, line 43
+      def tree(name, finder, partial = false, seen = {})
+        logical_name = name.gsub(%r|/_|, "/")
+        interpolated = name.include?("#")
+
+        path = TemplatePath.parse(name)
+
+        if !interpolated && (template = find_template(finder, path.name, [path.prefix], partial, []))
+          if node = seen[template.identifier] # handle cycles in the tree
+            node
+          else
+            node = seen[template.identifier] = Node.create(name, logical_name, template, partial)
+
+            deps = DependencyTracker.find_dependencies(name, template, finder.view_paths)
+            deps.uniq { |n| n.gsub(%r|/_|, "/") }.each do |dep_file|
+              node.children << tree(dep_file, finder, true, seen)
+            end
+            node
+          end
+        else
+          unless interpolated # Dynamic template partial names can never be tracked
+            logger.error "  Couldn't find template for digesting: #{name}"
+          end
+
+          seen[name] ||= Missing.new(name, logical_name, nil)
+        end
+      end
- -
-
# File actionview/lib/action_view/digestor.rb, line 43
-def tree(name, finder, partial = false, seen = {})
-  logical_name = name.gsub(%r|/_|, "/")
-  interpolated = name.include?("#")
-
-  path = TemplatePath.parse(name)
-
-  if !interpolated && (template = find_template(finder, path.name, [path.prefix], partial, []))
-    if node = seen[template.identifier] # handle cycles in the tree
-      node
-    else
-      node = seen[template.identifier] = Node.create(name, logical_name, template, partial)
-
-      deps = DependencyTracker.find_dependencies(name, template, finder.view_paths)
-      deps.uniq { |n| n.gsub(%r|/_|, "/") }.each do |dep_file|
-        node.children << tree(dep_file, finder, true, seen)
-      end
-      node
-    end
-  else
-    unless interpolated # Dynamic template partial names can never be tracked
-      logger.error "  Couldn't find template for digesting: #{name}"
-    end
-
-    seen[name] ||= Missing.new(name, logical_name, nil)
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/Digestor/Injected.html b/src/classes/ActionView/Digestor/Injected.html index 9a831f6ec0..e50f761477 100644 --- a/src/classes/ActionView/Digestor/Injected.html +++ b/src/classes/ActionView/Digestor/Injected.html @@ -81,20 +81,20 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/digestor.rb, line 122
+      def digest(finder, _ = []) name end
- -
-
# File actionview/lib/action_view/digestor.rb, line 122
-def digest(finder, _ = []) name end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionView/Digestor/Missing.html b/src/classes/ActionView/Digestor/Missing.html index b6ba0b9182..a7104274bb 100644 --- a/src/classes/ActionView/Digestor/Missing.html +++ b/src/classes/ActionView/Digestor/Missing.html @@ -81,20 +81,20 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/digestor.rb, line 118
+      def digest(finder, _ = []) "" end
- -
-
# File actionview/lib/action_view/digestor.rb, line 118
-def digest(finder, _ = []) "" end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionView/Digestor/Node.html b/src/classes/ActionView/Digestor/Node.html index 6bf80b9be2..21993530ac 100644 --- a/src/classes/ActionView/Digestor/Node.html +++ b/src/classes/ActionView/Digestor/Node.html @@ -134,23 +134,23 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/digestor.rb, line 81
+      def self.create(name, logical_name, template, partial)
+        klass = partial ? Partial : Node
+        klass.new(name, logical_name, template, [])
+      end
- -
-
# File actionview/lib/action_view/digestor.rb, line 81
-def self.create(name, logical_name, template, partial)
-  klass = partial ? Partial : Node
-  klass.new(name, logical_name, template, [])
-end
-
-
- - + See on GitHub + + + +

@@ -170,25 +170,25 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/digestor.rb, line 86
+      def initialize(name, logical_name, template, children = [])
+        @name         = name
+        @logical_name = logical_name
+        @template     = template
+        @children     = children
+      end
- -
-
# File actionview/lib/action_view/digestor.rb, line 86
-def initialize(name, logical_name, template, children = [])
-  @name         = name
-  @logical_name = logical_name
-  @template     = template
-  @children     = children
-end
-
-
- -

+ See on GitHub + + + + @@ -212,31 +212,31 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/digestor.rb, line 97
+      def dependency_digest(finder, stack)
+        children.map do |node|
+          if stack.include?(node)
+            false
+          else
+            finder.digest_cache[node.name] ||= begin
+                                                 stack.push node
+                                                 node.digest(finder, stack).tap { stack.pop }
+                                               end
+          end
+        end.join("-")
+      end
- -
-
# File actionview/lib/action_view/digestor.rb, line 97
-def dependency_digest(finder, stack)
-  children.map do |node|
-    if stack.include?(node)
-      false
-    else
-      finder.digest_cache[node.name] ||= begin
-                                           stack.push node
-                                           node.digest(finder, stack).tap { stack.pop }
-                                         end
-    end
-  end.join("-")
-end
-
-
- - + See on GitHub + + + +

@@ -256,22 +256,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/digestor.rb, line 93
+      def digest(finder, stack = [])
+        ActiveSupport::Digest.hexdigest("#{template.source}-#{dependency_digest(finder, stack)}")
+      end
- -
-
# File actionview/lib/action_view/digestor.rb, line 93
-def digest(finder, stack = [])
-  ActiveSupport::Digest.hexdigest("#{template.source}-#{dependency_digest(finder, stack)}")
-end
-
-
- -

+ See on GitHub + + + +

@@ -291,22 +291,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/digestor.rb, line 110
+      def to_dep_map
+        children.any? ? { name => children.map(&:to_dep_map) } : name
+      end
- -
-
# File actionview/lib/action_view/digestor.rb, line 110
-def to_dep_map
-  children.any? ? { name => children.map(&:to_dep_map) } : name
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/Digestor/NullLogger.html b/src/classes/ActionView/Digestor/NullLogger.html index 93f0dc0377..64273b8b48 100644 --- a/src/classes/ActionView/Digestor/NullLogger.html +++ b/src/classes/ActionView/Digestor/NullLogger.html @@ -84,20 +84,20 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/digestor.rb, line 126
+      def self.debug(_); end
- -
-
# File actionview/lib/action_view/digestor.rb, line 126
-def self.debug(_); end
-
-
- - + See on GitHub + + + +

@@ -117,20 +117,20 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/digestor.rb, line 127
+      def self.error(_); end
- -
-
# File actionview/lib/action_view/digestor.rb, line 127
-def self.error(_); end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/Digestor/PerExecutionDigestCacheExpiry.html b/src/classes/ActionView/Digestor/PerExecutionDigestCacheExpiry.html deleted file mode 100644 index 3992859679..0000000000 --- a/src/classes/ActionView/Digestor/PerExecutionDigestCacheExpiry.html +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: ActionView::Digestor::PerExecutionDigestCacheExpiry -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - before(target) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionview/lib/action_view/digestor.rb, line 12
-def self.before(target)
-  ActionView::LookupContext::DetailsKey.clear
-end
-
-
- -
- - - - - -
- -
-
diff --git a/src/classes/ActionView/FileSystemResolver.html b/src/classes/ActionView/FileSystemResolver.html index 4e7bd4ba75..770e2f16c0 100644 --- a/src/classes/ActionView/FileSystemResolver.html +++ b/src/classes/ActionView/FileSystemResolver.html @@ -120,26 +120,26 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template/resolver.rb, line 96
+    def initialize(path)
+      raise ArgumentError, "path already is a Resolver class" if path.is_a?(Resolver)
+      @unbound_templates = Concurrent::Map.new
+      @path_parser = PathParser.new
+      @path = File.expand_path(path)
+      super()
+    end
- -
-
# File actionview/lib/action_view/template/resolver.rb, line 96
-def initialize(path)
-  raise ArgumentError, "path already is a Resolver class" if path.is_a?(Resolver)
-  @unbound_templates = Concurrent::Map.new
-  @path_parser = PathParser.new
-  @path = File.expand_path(path)
-  super()
-end
-
-
- - + See on GitHub + + + + @@ -167,7 +167,8 @@

- + +

@@ -187,24 +188,24 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template/resolver.rb, line 104
+    def clear_cache
+      @unbound_templates.clear
+      @path_parser = PathParser.new
+      super
+    end
- -
-
# File actionview/lib/action_view/template/resolver.rb, line 104
-def clear_cache
-  @unbound_templates.clear
-  @path_parser = PathParser.new
-  super
-end
-
-
- -

+ See on GitHub + + + +

@@ -228,22 +229,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template/resolver.rb, line 115
+    def eql?(resolver)
+      self.class.equal?(resolver.class) && to_path == resolver.to_path
+    end
- -
-
# File actionview/lib/action_view/template/resolver.rb, line 115
-def eql?(resolver)
-  self.class.equal?(resolver.class) && to_path == resolver.to_path
-end
-
-
- -

+ See on GitHub + + + +

@@ -267,7 +268,8 @@

-

+ +

@@ -291,22 +293,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template/resolver.rb, line 110
+    def to_s
+      @path.to_s
+    end
- -
-
# File actionview/lib/action_view/template/resolver.rb, line 110
-def to_s
-  @path.to_s
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/FileTemplate.html b/src/classes/ActionView/FileTemplate.html deleted file mode 100644 index 6dfbd0acd1..0000000000 --- a/src/classes/ActionView/FileTemplate.html +++ /dev/null @@ -1,218 +0,0 @@ ---- -title: ActionView::FileTemplate -layout: default ---- -
- -
-
- - - - - - - - - - - - -

Methods

-
- -
N
-
-
    - - -
  • - new -
  • - -
-
- -
R
-
- -
- -
S
-
- -
- -
- - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - new(filename, handler, details) - - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionview/lib/action_view/file_template.rb, line 7
-def initialize(filename, handler, details)
-  @filename = filename
-
-  super(nil, filename, handler, details)
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - refresh(_) - - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionview/lib/action_view/file_template.rb, line 17
-def refresh(_)
-  self
-end
-
-
- -
- -
-

- - source() - - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionview/lib/action_view/file_template.rb, line 13
-def source
-  File.binread @filename
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActionView/FixtureResolver.html b/src/classes/ActionView/FixtureResolver.html index 0beb4c298b..5e9a555b7e 100644 --- a/src/classes/ActionView/FixtureResolver.html +++ b/src/classes/ActionView/FixtureResolver.html @@ -94,24 +94,24 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/testing/resolvers.rb, line 11
+    def initialize(hash = {})
+      super("")
+      @hash = hash
+      @path = ""
+    end
- -
-
# File actionview/lib/action_view/testing/resolvers.rb, line 11
-def initialize(hash = {})
-  super("")
-  @hash = hash
-  @path = ""
-end
-
-
- - + See on GitHub + + + + @@ -135,22 +135,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/testing/resolvers.rb, line 17
+    def data
+      @hash
+    end
- -
-
# File actionview/lib/action_view/testing/resolvers.rb, line 17
-def data
-  @hash
-end
-
-
- - + See on GitHub + + + +

@@ -170,22 +170,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/testing/resolvers.rb, line 21
+    def to_s
+      @hash.keys.join(", ")
+    end
- -
-
# File actionview/lib/action_view/testing/resolvers.rb, line 21
-def to_s
-  @hash.keys.join(", ")
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/Helpers/ActiveModelInstanceTag.html b/src/classes/ActionView/Helpers/ActiveModelInstanceTag.html index ad7768a4de..cf6825a9a1 100644 --- a/src/classes/ActionView/Helpers/ActiveModelInstanceTag.html +++ b/src/classes/ActionView/Helpers/ActiveModelInstanceTag.html @@ -97,22 +97,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/active_model_helper.rb, line 20
+      def content_tag(type, options, *)
+        select_markup_helper?(type) ? super : error_wrapping(super)
+      end
- -
-
# File actionview/lib/action_view/helpers/active_model_helper.rb, line 20
-def content_tag(type, options, *)
-  select_markup_helper?(type) ? super : error_wrapping(super)
-end
-
-
- - + See on GitHub + + + +

@@ -132,22 +132,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/active_model_helper.rb, line 36
+      def error_message
+        object.errors[@method_name]
+      end
- -
-
# File actionview/lib/action_view/helpers/active_model_helper.rb, line 36
-def error_message
-  object.errors[@method_name]
-end
-
-
- -

+ See on GitHub + + + +

@@ -167,26 +167,26 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/active_model_helper.rb, line 28
+      def error_wrapping(html_tag)
+        if object_has_errors?
+          @template_object.instance_exec(html_tag, self, &Base.field_error_proc)
+        else
+          html_tag
+        end
+      end
- -
-
# File actionview/lib/action_view/helpers/active_model_helper.rb, line 28
-def error_wrapping(html_tag)
-  if object_has_errors?
-    @template_object.instance_exec(html_tag, self, &Base.field_error_proc)
-  else
-    html_tag
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -206,25 +206,25 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/active_model_helper.rb, line 13
+      def object
+        @active_model_object ||= begin
+          object = super
+          object.respond_to?(:to_model) ? object.to_model : object
+        end
+      end
- -
-
# File actionview/lib/action_view/helpers/active_model_helper.rb, line 13
-def object
-  @active_model_object ||= begin
-    object = super
-    object.respond_to?(:to_model) ? object.to_model : object
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -244,22 +244,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/active_model_helper.rb, line 24
+      def tag(type, options, *)
+        tag_generate_errors?(options) ? error_wrapping(super) : super
+      end
- -
-
# File actionview/lib/action_view/helpers/active_model_helper.rb, line 24
-def tag(type, options, *)
-  tag_generate_errors?(options) ? error_wrapping(super) : super
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/Helpers/AssetTagHelper.html b/src/classes/ActionView/Helpers/AssetTagHelper.html index 8f9fa96be8..df2a4c8921 100644 --- a/src/classes/ActionView/Helpers/AssetTagHelper.html +++ b/src/classes/ActionView/Helpers/AssetTagHelper.html @@ -161,22 +161,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/asset_tag_helper.rb, line 581
+      def audio_tag(*sources)
+        multiple_sources_tag_builder("audio", sources)
+      end
- -
-
# File actionview/lib/action_view/helpers/asset_tag_helper.rb, line 581
-def audio_tag(*sources)
-  multiple_sources_tag_builder("audio", sources)
-end
-
-
- - + See on GitHub + + + +
- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/asset_tag_helper.rb, line 259
+      def auto_discovery_link_tag(type = :rss, url_options = {}, tag_options = {})
+        if !(type == :rss || type == :atom || type == :json) && tag_options[:type].blank?
+          raise ArgumentError.new("You should pass :type tag_option key explicitly, because you have passed #{type} type other than :rss, :atom, or :json.")
+        end
+
+        tag(
+          "link",
+          "rel"   => tag_options[:rel] || "alternate",
+          "type"  => tag_options[:type] || Template::Types[type].to_s,
+          "title" => tag_options[:title] || type.to_s.upcase,
+          "href"  => url_options.is_a?(Hash) ? url_for(url_options.merge(only_path: false)) : url_options
+        )
+      end
- - -
- -
+ See on GitHub + + + +
+ See on GitHub + + + +

@@ -369,40 +369,40 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/asset_tag_helper.rb, line 418
+      def image_tag(source, options = {})
+        options = options.symbolize_keys
+        check_for_image_tag_errors(options)
+        skip_pipeline = options.delete(:skip_pipeline)
+
+        options[:src] = resolve_asset_source("image", source, skip_pipeline)
+
+        if options[:srcset] && !options[:srcset].is_a?(String)
+          options[:srcset] = options[:srcset].map do |src_path, size|
+            src_path = path_to_image(src_path, skip_pipeline: skip_pipeline)
+            "#{src_path} #{size}"
+          end.join(", ")
+        end
+
+        options[:width], options[:height] = extract_dimensions(options.delete(:size)) if options[:size]
+
+        options[:loading] ||= image_loading if image_loading
+        options[:decoding] ||= image_decoding if image_decoding
+
+        tag("img", options)
+      end
- -
-
# File actionview/lib/action_view/helpers/asset_tag_helper.rb, line 418
-def image_tag(source, options = {})
-  options = options.symbolize_keys
-  check_for_image_tag_errors(options)
-  skip_pipeline = options.delete(:skip_pipeline)
-
-  options[:src] = resolve_asset_source("image", source, skip_pipeline)
-
-  if options[:srcset] && !options[:srcset].is_a?(String)
-    options[:srcset] = options[:srcset].map do |src_path, size|
-      src_path = path_to_image(src_path, skip_pipeline: skip_pipeline)
-      "#{src_path} #{size}"
-    end.join(", ")
-  end
-
-  options[:width], options[:height] = extract_dimensions(options.delete(:size)) if options[:size]
-
-  options[:loading] ||= image_loading if image_loading
-  options[:decoding] ||= image_decoding if image_decoding
-
-  tag("img", options)
-end
-
-
- -
+ See on GitHub + + + +

@@ -489,55 +489,55 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/asset_tag_helper.rb, line 111
+      def javascript_include_tag(*sources)
+        options = sources.extract_options!.stringify_keys
+        path_options = options.extract!("protocol", "extname", "host", "skip_pipeline").symbolize_keys
+        preload_links = []
+        use_preload_links_header = options["preload_links_header"].nil? ? preload_links_header : options.delete("preload_links_header")
+        nopush = options["nopush"].nil? ? true : options.delete("nopush")
+        crossorigin = options.delete("crossorigin")
+        crossorigin = "anonymous" if crossorigin == true
+        integrity = options["integrity"]
+        rel = options["type"] == "module" ? "modulepreload" : "preload"
+
+        sources_tags = sources.uniq.map { |source|
+          href = path_to_javascript(source, path_options)
+          if use_preload_links_header && !options["defer"] && href.present? && !href.start_with?("data:")
+            preload_link = "<#{href}>; rel=#{rel}; as=script"
+            preload_link += "; crossorigin=#{crossorigin}" unless crossorigin.nil?
+            preload_link += "; integrity=#{integrity}" unless integrity.nil?
+            preload_link += "; nopush" if nopush
+            preload_links << preload_link
+          end
+          tag_options = {
+            "src" => href,
+            "crossorigin" => crossorigin
+          }.merge!(options)
+          if tag_options["nonce"] == true
+            tag_options["nonce"] = content_security_policy_nonce
+          end
+          content_tag("script", "", tag_options)
+        }.join("\n").html_safe
+
+        if use_preload_links_header
+          send_preload_links_header(preload_links)
+        end
+
+        sources_tags
+      end
- -
-
# File actionview/lib/action_view/helpers/asset_tag_helper.rb, line 111
-def javascript_include_tag(*sources)
-  options = sources.extract_options!.stringify_keys
-  path_options = options.extract!("protocol", "extname", "host", "skip_pipeline").symbolize_keys
-  preload_links = []
-  use_preload_links_header = options["preload_links_header"].nil? ? preload_links_header : options.delete("preload_links_header")
-  nopush = options["nopush"].nil? ? true : options.delete("nopush")
-  crossorigin = options.delete("crossorigin")
-  crossorigin = "anonymous" if crossorigin == true
-  integrity = options["integrity"]
-  rel = options["type"] == "module" ? "modulepreload" : "preload"
-
-  sources_tags = sources.uniq.map { |source|
-    href = path_to_javascript(source, path_options)
-    if use_preload_links_header && !options["defer"] && href.present? && !href.start_with?("data:")
-      preload_link = "<#{href}>; rel=#{rel}; as=script"
-      preload_link += "; crossorigin=#{crossorigin}" unless crossorigin.nil?
-      preload_link += "; integrity=#{integrity}" unless integrity.nil?
-      preload_link += "; nopush" if nopush
-      preload_links << preload_link
-    end
-    tag_options = {
-      "src" => href,
-      "crossorigin" => crossorigin
-    }.merge!(options)
-    if tag_options["nonce"] == true
-      tag_options["nonce"] = content_security_policy_nonce
-    end
-    content_tag("script", "", tag_options)
-  }.join("\n").html_safe
-
-  if use_preload_links_header
-    send_preload_links_header(preload_links)
-  end
-
-  sources_tags
-end
-
-
- -
+ See on GitHub + + + +

@@ -590,40 +590,40 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/asset_tag_helper.rb, line 479
+      def picture_tag(*sources, &block)
+        sources.flatten!
+        options = sources.extract_options!.symbolize_keys
+        image_options = options.delete(:image) || {}
+        skip_pipeline = options.delete(:skip_pipeline)
+
+        content_tag("picture", options) do
+          if block.present?
+            capture(&block).html_safe
+          elsif sources.size <= 1
+            image_tag(sources.last, image_options)
+          else
+            source_tags = sources.map do |source|
+              tag("source",
+               srcset: resolve_asset_source("image", source, skip_pipeline),
+               type: Template::Types[File.extname(source)[1..]]&.to_s)
+            end
+            safe_join(source_tags << image_tag(sources.last, image_options))
+          end
+        end
+      end
- -
-
# File actionview/lib/action_view/helpers/asset_tag_helper.rb, line 479
-def picture_tag(*sources, &block)
-  sources.flatten!
-  options = sources.extract_options!.symbolize_keys
-  image_options = options.delete(:image) || {}
-  skip_pipeline = options.delete(:skip_pipeline)
-
-  content_tag("picture", options) do
-    if block.present?
-      capture(&block).html_safe
-    elsif sources.size <= 1
-      image_tag(sources.last, image_options)
-    else
-      source_tags = sources.map do |source|
-        tag("source",
-         srcset: resolve_asset_source("image", source, skip_pipeline),
-         type: Template::Types[File.extname(source)[1..]]&.to_s)
-      end
-      safe_join(source_tags << image_tag(sources.last, image_options))
-    end
-  end
-end
-
-
- -
+ See on GitHub + + + +
- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/asset_tag_helper.rb, line 343
+      def preload_link_tag(source, options = {})
+        href = path_to_asset(source, skip_pipeline: options.delete(:skip_pipeline))
+        extname = File.extname(source).downcase.delete(".")
+        mime_type = options.delete(:type) || Template::Types[extname]&.to_s
+        as_type = options.delete(:as) || resolve_link_as(extname, mime_type)
+        crossorigin = options.delete(:crossorigin)
+        crossorigin = "anonymous" if crossorigin == true || (crossorigin.blank? && as_type == "font")
+        integrity = options[:integrity]
+        nopush = options.delete(:nopush) || false
+        rel = mime_type == "module" ? "modulepreload" : "preload"
+
+        link_tag = tag.link(**{
+          rel: rel,
+          href: href,
+          as: as_type,
+          type: mime_type,
+          crossorigin: crossorigin
+        }.merge!(options.symbolize_keys))
+
+        preload_link = "<#{href}>; rel=#{rel}; as=#{as_type}"
+        preload_link += "; type=#{mime_type}" if mime_type
+        preload_link += "; crossorigin=#{crossorigin}" if crossorigin
+        preload_link += "; integrity=#{integrity}" if integrity
+        preload_link += "; nopush" if nopush
+
+        send_preload_links_header([preload_link])
+
+        link_tag
+      end
- - -
- -
+ See on GitHub + + + +
- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/asset_tag_helper.rb, line 193
+      def stylesheet_link_tag(*sources)
+        options = sources.extract_options!.stringify_keys
+        path_options = options.extract!("protocol", "extname", "host", "skip_pipeline").symbolize_keys
+        use_preload_links_header = options["preload_links_header"].nil? ? preload_links_header : options.delete("preload_links_header")
+        preload_links = []
+        crossorigin = options.delete("crossorigin")
+        crossorigin = "anonymous" if crossorigin == true
+        nopush = options["nopush"].nil? ? true : options.delete("nopush")
+        integrity = options["integrity"]
+
+        sources_tags = sources.uniq.map { |source|
+          href = path_to_stylesheet(source, path_options)
+          if use_preload_links_header && href.present? && !href.start_with?("data:")
+            preload_link = "<#{href}>; rel=preload; as=style"
+            preload_link += "; crossorigin=#{crossorigin}" unless crossorigin.nil?
+            preload_link += "; integrity=#{integrity}" unless integrity.nil?
+            preload_link += "; nopush" if nopush
+            preload_links << preload_link
+          end
+          tag_options = {
+            "rel" => "stylesheet",
+            "crossorigin" => crossorigin,
+            "href" => href
+          }.merge!(options)
+
+          if apply_stylesheet_media_default && tag_options["media"].blank?
+            tag_options["media"] = "screen"
+          end
+
+          tag(:link, tag_options)
+        }.join("\n").html_safe
+
+        if use_preload_links_header
+          send_preload_links_header(preload_links)
+        end
+
+        sources_tags
+      end
- - -
- -
+ See on GitHub + + + +

@@ -894,28 +894,28 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/asset_tag_helper.rb, line 549
+      def video_tag(*sources)
+        options = sources.extract_options!.symbolize_keys
+        public_poster_folder = options.delete(:poster_skip_pipeline)
+        sources << options
+        multiple_sources_tag_builder("video", sources) do |tag_options|
+          tag_options[:poster] = path_to_image(tag_options[:poster], skip_pipeline: public_poster_folder) if tag_options[:poster]
+          tag_options[:width], tag_options[:height] = extract_dimensions(tag_options.delete(:size)) if tag_options[:size]
+        end
+      end
- -
-
# File actionview/lib/action_view/helpers/asset_tag_helper.rb, line 549
-def video_tag(*sources)
-  options = sources.extract_options!.symbolize_keys
-  public_poster_folder = options.delete(:poster_skip_pipeline)
-  sources << options
-  multiple_sources_tag_builder("video", sources) do |tag_options|
-    tag_options[:poster] = path_to_image(tag_options[:poster], skip_pipeline: public_poster_folder) if tag_options[:poster]
-    tag_options[:width], tag_options[:height] = extract_dimensions(tag_options.delete(:size)) if tag_options[:size]
-  end
-end
-
-
- -
+ See on GitHub + + + + diff --git a/src/classes/ActionView/Helpers/AssetUrlHelper.html b/src/classes/ActionView/Helpers/AssetUrlHelper.html index f5f03200b3..47bd8c09ce 100644 --- a/src/classes/ActionView/Helpers/AssetUrlHelper.html +++ b/src/classes/ActionView/Helpers/AssetUrlHelper.html @@ -404,51 +404,51 @@

Options applyi - -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 187
+      def asset_path(source, options = {})
+        raise ArgumentError, "nil is not a valid asset source" if source.nil?
+
+        source = source.to_s
+        return "" if source.blank?
+        return source if URI_REGEXP.match?(source)
+
+        tail, source = source[/([?#].+)$/], source.sub(/([?#].+)$/, "")
+
+        if extname = compute_asset_extname(source, options)
+          source = "#{source}#{extname}"
+        end
+
+        unless source.start_with?(?/)
+          if options[:skip_pipeline]
+            source = public_compute_asset_path(source, options)
+          else
+            source = compute_asset_path(source, options)
+          end
+        end
+
+        relative_url_root = defined?(config.relative_url_root) && config.relative_url_root
+        if relative_url_root
+          source = File.join(relative_url_root, source) unless source.start_with?("#{relative_url_root}/")
+        end
+
+        if host = compute_asset_host(source, options)
+          source = File.join(host, source)
+        end
+
+        "#{source}#{tail}"
+      end
- -
-
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 187
-def asset_path(source, options = {})
-  raise ArgumentError, "nil is not a valid asset source" if source.nil?
-
-  source = source.to_s
-  return "" if source.blank?
-  return source if URI_REGEXP.match?(source)
-
-  tail, source = source[/([?#].+)$/], source.sub(/([?#].+)$/, "")
-
-  if extname = compute_asset_extname(source, options)
-    source = "#{source}#{extname}"
-  end
-
-  unless source.start_with?(?/)
-    if options[:skip_pipeline]
-      source = public_compute_asset_path(source, options)
-    else
-      source = compute_asset_path(source, options)
-    end
-  end
-
-  relative_url_root = defined?(config.relative_url_root) && config.relative_url_root
-  if relative_url_root
-    source = File.join(relative_url_root, source) unless source.start_with?("#{relative_url_root}/")
-  end
-
-  if host = compute_asset_host(source, options)
-    source = File.join(host, source)
-  end
-
-  "#{source}#{tail}"
-end
-
-
- - + See on GitHub + + + +

@@ -478,22 +478,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 231
+      def asset_url(source, options = {})
+        path_to_asset(source, options.merge(protocol: :request))
+      end
- -
-
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 231
-def asset_url(source, options = {})
-  path_to_asset(source, options.merge(protocol: :request))
-end
-
-
- -

+ See on GitHub + + + +

@@ -524,22 +524,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 430
+      def audio_path(source, options = {})
+        path_to_asset(source, { type: :audio }.merge!(options))
+      end
- -
-
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 430
-def audio_path(source, options = {})
-  path_to_asset(source, { type: :audio }.merge!(options))
-end
-
-
- -

+ See on GitHub + + + +

@@ -566,22 +566,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 442
+      def audio_url(source, options = {})
+        url_to_asset(source, { type: :audio }.merge!(options))
+      end
- -
-
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 442
-def audio_url(source, options = {})
-  url_to_asset(source, { type: :audio }.merge!(options))
-end
-
-
- -

+ See on GitHub + + + +

@@ -601,28 +601,28 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 243
+      def compute_asset_extname(source, options = {})
+        return if options[:extname] == false
+        extname = options[:extname] || ASSET_EXTENSIONS[options[:type]]
+        if extname && File.extname(source) != extname
+          extname
+        else
+          nil
+        end
+      end
- -
-
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 243
-def compute_asset_extname(source, options = {})
-  return if options[:extname] == false
-  extname = options[:extname] || ASSET_EXTENSIONS[options[:type]]
-  if extname && File.extname(source) != extname
-    extname
-  else
-    nil
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -642,52 +642,52 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 277
+      def compute_asset_host(source = "", options = {})
+        request = self.request if respond_to?(:request)
+        host = options[:host]
+        host ||= config.asset_host if defined? config.asset_host
+
+        if host
+          if host.respond_to?(:call)
+            arity = host.respond_to?(:arity) ? host.arity : host.method(:call).arity
+            args = [source]
+            args << request if request && (arity > 1 || arity < 0)
+            host = host.call(*args)
+          elsif host.include?("%d")
+            host = host % (Zlib.crc32(source) % 4)
+          end
+        end
+
+        host ||= request.base_url if request && options[:protocol] == :request
+        return unless host
+
+        if URI_REGEXP.match?(host)
+          host
+        else
+          protocol = options[:protocol] || config.default_asset_host_protocol || (request ? :request : :relative)
+          case protocol
+          when :relative
+            "//#{host}"
+          when :request
+            "#{request.protocol}#{host}"
+          else
+            "#{protocol}://#{host}"
+          end
+        end
+      end
- -
-
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 277
-def compute_asset_host(source = "", options = {})
-  request = self.request if respond_to?(:request)
-  host = options[:host]
-  host ||= config.asset_host if defined? config.asset_host
-
-  if host
-    if host.respond_to?(:call)
-      arity = host.respond_to?(:arity) ? host.arity : host.method(:call).arity
-      args = [source]
-      args << request if request && (arity > 1 || arity < 0)
-      host = host.call(*args)
-    elsif host.include?("%d")
-      host = host % (Zlib.crc32(source) % 4)
-    end
-  end
-
-  host ||= request.base_url if request && options[:protocol] == :request
-  return unless host
-
-  if URI_REGEXP.match?(host)
-    host
-  else
-    protocol = options[:protocol] || config.default_asset_host_protocol || (request ? :request : :relative)
-    case protocol
-    when :relative
-      "//#{host}"
-    when :request
-      "#{request.protocol}#{host}"
-    else
-      "#{protocol}://#{host}"
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -711,23 +711,23 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 266
+      def compute_asset_path(source, options = {})
+        dir = ASSET_PUBLIC_DIRECTORIES[options[:type]] || ""
+        File.join(dir, source)
+      end
- -
-
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 266
-def compute_asset_path(source, options = {})
-  dir = ASSET_PUBLIC_DIRECTORIES[options[:type]] || ""
-  File.join(dir, source)
-end
-
-
- -

+ See on GitHub + + + +

@@ -758,22 +758,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 455
+      def font_path(source, options = {})
+        path_to_asset(source, { type: :font }.merge!(options))
+      end
- -
-
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 455
-def font_path(source, options = {})
-  path_to_asset(source, { type: :font }.merge!(options))
-end
-
-
- -

+ See on GitHub + + + +

@@ -800,22 +800,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 467
+      def font_url(source, options = {})
+        url_to_asset(source, { type: :font }.merge!(options))
+      end
- -
-
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 467
-def font_url(source, options = {})
-  url_to_asset(source, { type: :font }.merge!(options))
-end
-
-
- -

+ See on GitHub + + + +

@@ -848,22 +848,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 378
+      def image_path(source, options = {})
+        path_to_asset(source, { type: :image }.merge!(options))
+      end
- -
-
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 378
-def image_path(source, options = {})
-  path_to_asset(source, { type: :image }.merge!(options))
-end
-
-
- -

+ See on GitHub + + + +

@@ -890,22 +890,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 390
+      def image_url(source, options = {})
+        url_to_asset(source, { type: :image }.merge!(options))
+      end
- -
-
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 390
-def image_url(source, options = {})
-  url_to_asset(source, { type: :image }.merge!(options))
-end
-
-
- -

+ See on GitHub + + + +

@@ -936,22 +936,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 321
+      def javascript_path(source, options = {})
+        path_to_asset(source, { type: :javascript }.merge!(options))
+      end
- -
-
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 321
-def javascript_path(source, options = {})
-  path_to_asset(source, { type: :javascript }.merge!(options))
-end
-
-
- -

+ See on GitHub + + + +

@@ -978,22 +978,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 333
+      def javascript_url(source, options = {})
+        url_to_asset(source, { type: :javascript }.merge!(options))
+      end
- -
-
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 333
-def javascript_url(source, options = {})
-  url_to_asset(source, { type: :javascript }.merge!(options))
-end
-
-
- -

+ See on GitHub + + + +

@@ -1017,7 +1017,8 @@

-

+ +

@@ -1041,7 +1042,8 @@

-

+ +

@@ -1065,7 +1067,8 @@

-

+ +

@@ -1089,7 +1092,8 @@

-

+ +

@@ -1113,7 +1117,8 @@

-

+ +

@@ -1137,7 +1142,8 @@

-

+ +

@@ -1161,7 +1167,8 @@

-

+ +

@@ -1185,7 +1192,8 @@

-

+ +

@@ -1216,22 +1224,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 348
+      def stylesheet_path(source, options = {})
+        path_to_asset(source, { type: :stylesheet }.merge!(options))
+      end
- -
-
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 348
-def stylesheet_path(source, options = {})
-  path_to_asset(source, { type: :stylesheet }.merge!(options))
-end
-
-
- -

+ See on GitHub + + + +

@@ -1258,22 +1266,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 360
+      def stylesheet_url(source, options = {})
+        url_to_asset(source, { type: :stylesheet }.merge!(options))
+      end
- -
-
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 360
-def stylesheet_url(source, options = {})
-  url_to_asset(source, { type: :stylesheet }.merge!(options))
-end
-
-
- -

+ See on GitHub + + + +

@@ -1297,7 +1305,8 @@

-

+ +

@@ -1321,7 +1330,8 @@

-

+ +

@@ -1345,7 +1355,8 @@

-

+ +

@@ -1369,7 +1380,8 @@

-

+ +

@@ -1393,7 +1405,8 @@

-

+ +

@@ -1417,7 +1430,8 @@

-

+ +

@@ -1441,7 +1455,8 @@

-

+ +

@@ -1472,22 +1487,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 404
+      def video_path(source, options = {})
+        path_to_asset(source, { type: :video }.merge!(options))
+      end
- -
-
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 404
-def video_path(source, options = {})
-  path_to_asset(source, { type: :video }.merge!(options))
-end
-
-
- -

+ See on GitHub + + + +

@@ -1514,22 +1529,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 416
+      def video_url(source, options = {})
+        url_to_asset(source, { type: :video }.merge!(options))
+      end
- -
-
# File actionview/lib/action_view/helpers/asset_url_helper.rb, line 416
-def video_url(source, options = {})
-  url_to_asset(source, { type: :video }.merge!(options))
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/Helpers/AtomFeedHelper.html b/src/classes/ActionView/Helpers/AtomFeedHelper.html index 15f039e1a5..99870f8ef5 100644 --- a/src/classes/ActionView/Helpers/AtomFeedHelper.html +++ b/src/classes/ActionView/Helpers/AtomFeedHelper.html @@ -170,49 +170,49 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/atom_feed_helper.rb, line 98
+      def atom_feed(options = {}, &block)
+        if options[:schema_date]
+          options[:schema_date] = options[:schema_date].strftime("%Y-%m-%d") if options[:schema_date].respond_to?(:strftime)
+        else
+          options[:schema_date] = "2005" # The Atom spec copyright date
+        end
+
+        xml = options.delete(:xml) || block.binding.local_variable_get(:xml)
+        xml.instruct!
+        if options[:instruct]
+          options[:instruct].each do |target, attrs|
+            if attrs.respond_to?(:keys)
+              xml.instruct!(target, attrs)
+            elsif attrs.respond_to?(:each)
+              attrs.each { |attr_group| xml.instruct!(target, attr_group) }
+            end
+          end
+        end
+
+        feed_opts = { "xml:lang" => options[:language] || "en-US", "xmlns" => "http://www.w3.org/2005/Atom" }
+        feed_opts.merge!(options).select! { |k, _| k.start_with?("xml") }
+
+        xml.feed(feed_opts) do
+          xml.id(options[:id] || "tag:#{request.host},#{options[:schema_date]}:#{request.fullpath.split(".")[0]}")
+          xml.link(rel: "alternate", type: "text/html", href: options[:root_url] || (request.protocol + request.host_with_port))
+          xml.link(rel: "self", type: "application/atom+xml", href: options[:url] || request.url)
+
+          yield AtomFeedBuilder.new(xml, self, options)
+        end
+      end
- -
-
# File actionview/lib/action_view/helpers/atom_feed_helper.rb, line 98
-def atom_feed(options = {}, &block)
-  if options[:schema_date]
-    options[:schema_date] = options[:schema_date].strftime("%Y-%m-%d") if options[:schema_date].respond_to?(:strftime)
-  else
-    options[:schema_date] = "2005" # The Atom spec copyright date
-  end
-
-  xml = options.delete(:xml) || block.binding.local_variable_get(:xml)
-  xml.instruct!
-  if options[:instruct]
-    options[:instruct].each do |target, attrs|
-      if attrs.respond_to?(:keys)
-        xml.instruct!(target, attrs)
-      elsif attrs.respond_to?(:each)
-        attrs.each { |attr_group| xml.instruct!(target, attr_group) }
-      end
-    end
-  end
-
-  feed_opts = { "xml:lang" => options[:language] || "en-US", "xmlns" => "http://www.w3.org/2005/Atom" }
-  feed_opts.merge!(options).select! { |k, _| k.start_with?("xml") }
-
-  xml.feed(feed_opts) do
-    xml.id(options[:id] || "tag:#{request.host},#{options[:schema_date]}:#{request.fullpath.split(".")[0]}")
-    xml.link(rel: "alternate", type: "text/html", href: options[:root_url] || (request.protocol + request.host_with_port))
-    xml.link(rel: "self", type: "application/atom+xml", href: options[:url] || request.url)
-
-    yield AtomFeedBuilder.new(xml, self, options)
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionView/Helpers/CacheHelper.html b/src/classes/ActionView/Helpers/CacheHelper.html index 2a73df5377..5ca1593c12 100644 --- a/src/classes/ActionView/Helpers/CacheHelper.html +++ b/src/classes/ActionView/Helpers/CacheHelper.html @@ -249,31 +249,31 @@

Collection Caching

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/cache_helper.rb, line 168
+      def cache(name = {}, options = {}, &block)
+        if controller.respond_to?(:perform_caching) && controller.perform_caching
+          CachingRegistry.track_caching do
+            name_options = options.slice(:skip_digest)
+            safe_concat(fragment_for(cache_fragment_name(name, **name_options), options, &block))
+          end
+        else
+          yield
+        end
+
+        nil
+      end
- -
-
# File actionview/lib/action_view/helpers/cache_helper.rb, line 168
-def cache(name = {}, options = {}, &block)
-  if controller.respond_to?(:perform_caching) && controller.perform_caching
-    CachingRegistry.track_caching do
-      name_options = options.slice(:skip_digest)
-      safe_concat(fragment_for(cache_fragment_name(name, **name_options), options, &block))
-    end
-  else
-    yield
-  end
-
-  nil
-end
-
-
- - + See on GitHub + + + +

@@ -293,26 +293,26 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/cache_helper.rb, line 240
+      def cache_fragment_name(name = {}, skip_digest: nil, digest_path: nil)
+        if skip_digest
+          name
+        else
+          fragment_name_with_digest(name, digest_path)
+        end
+      end
- -
-
# File actionview/lib/action_view/helpers/cache_helper.rb, line 240
-def cache_fragment_name(name = {}, skip_digest: nil, digest_path: nil)
-  if skip_digest
-    name
-  else
-    fragment_name_with_digest(name, digest_path)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -338,28 +338,28 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/cache_helper.rb, line 215
+      def cache_if(condition, name = {}, options = {}, &block)
+        if condition
+          cache(name, options, &block)
+        else
+          yield
+        end
+
+        nil
+      end
- -
-
# File actionview/lib/action_view/helpers/cache_helper.rb, line 215
-def cache_if(condition, name = {}, options = {}, &block)
-  if condition
-    cache(name, options, &block)
-  else
-    yield
-  end
-
-  nil
-end
-
-
- -

+ See on GitHub + + + +

@@ -385,22 +385,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/cache_helper.rb, line 231
+      def cache_unless(condition, name = {}, options = {}, &block)
+        cache_if !condition, name, options, &block
+      end
- -
-
# File actionview/lib/action_view/helpers/cache_helper.rb, line 231
-def cache_unless(condition, name = {}, options = {}, &block)
-  cache_if !condition, name, options, &block
-end
-
-
- -

+ See on GitHub + + + +

@@ -427,22 +427,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/cache_helper.rb, line 188
+      def caching?
+        CachingRegistry.caching?
+      end
- -
-
# File actionview/lib/action_view/helpers/cache_helper.rb, line 188
-def caching?
-  CachingRegistry.caching?
-end
-
-
- -

+ See on GitHub + + + +

@@ -475,22 +475,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/cache_helper.rb, line 205
+      def uncacheable!
+        raise UncacheableFragmentError, "can't be fragment cached" if caching?
+      end
- -
-
# File actionview/lib/action_view/helpers/cache_helper.rb, line 205
-def uncacheable!
-  raise UncacheableFragmentError, "can't be fragment cached" if caching?
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/Helpers/CacheHelper/CachingRegistry.html b/src/classes/ActionView/Helpers/CacheHelper/CachingRegistry.html deleted file mode 100644 index b70cc245c9..0000000000 --- a/src/classes/ActionView/Helpers/CacheHelper/CachingRegistry.html +++ /dev/null @@ -1,134 +0,0 @@ ---- -title: ActionView::Helpers::CacheHelper::CachingRegistry -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - -

Attributes

- - - - - - - - - - - - - - -
- [RW] - caching
- [RW] - caching?
- - - - -

Class Public methods

- -
-

- - track_caching() - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionview/lib/action_view/helpers/cache_helper.rb, line 301
-def self.track_caching
-  caching_was = self.caching
-  self.caching = true
-
-  yield
-ensure
-  self.caching = caching_was
-end
-
-
- -
- - - - - -
- -
-
diff --git a/src/classes/ActionView/Helpers/CaptureHelper.html b/src/classes/ActionView/Helpers/CaptureHelper.html index 872760806e..f2418ec4d0 100644 --- a/src/classes/ActionView/Helpers/CaptureHelper.html +++ b/src/classes/ActionView/Helpers/CaptureHelper.html @@ -129,33 +129,33 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/capture_helper.rb, line 47
+      def capture(*args, &block)
+        value = nil
+        @output_buffer ||= ActionView::OutputBuffer.new
+        buffer = @output_buffer.capture { value = yield(*args) }
+
+        case string = buffer.presence || value
+        when OutputBuffer
+          string.to_s
+        when ActiveSupport::SafeBuffer
+          string
+        when String
+          ERB::Util.html_escape(string)
+        end
+      end
- -
-
# File actionview/lib/action_view/helpers/capture_helper.rb, line 47
-def capture(*args, &block)
-  value = nil
-  @output_buffer ||= ActionView::OutputBuffer.new
-  buffer = @output_buffer.capture { value = yield(*args) }
-
-  case string = buffer.presence || value
-  when OutputBuffer
-    string.to_s
-  when ActiveSupport::SafeBuffer
-    string
-  when String
-    ERB::Util.html_escape(string)
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -285,33 +285,33 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/capture_helper.rb, line 166
+      def content_for(name, content = nil, options = {}, &block)
+        if content || block_given?
+          if block_given?
+            options = content if content
+            content = capture(&block)
+          end
+          if content
+            options[:flush] ? @view_flow.set(name, content) : @view_flow.append(name, content)
+          end
+          nil
+        else
+          @view_flow.get(name).presence
+        end
+      end
- -
-
# File actionview/lib/action_view/helpers/capture_helper.rb, line 166
-def content_for(name, content = nil, options = {}, &block)
-  if content || block_given?
-    if block_given?
-      options = content if content
-      content = capture(&block)
-    end
-    if content
-      options[:flush] ? @view_flow.set(name, content) : @view_flow.append(name, content)
-    end
-    nil
-  else
-    @view_flow.get(name).presence
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -346,22 +346,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/capture_helper.rb, line 209
+      def content_for?(name)
+        @view_flow.get(name).present?
+      end
- -
-
# File actionview/lib/action_view/helpers/capture_helper.rb, line 209
-def content_for?(name)
-  @view_flow.get(name).present?
-end
-
-
- -

+ See on GitHub + + + +

@@ -383,24 +383,24 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/capture_helper.rb, line 188
+      def provide(name, content = nil, &block)
+        content = capture(&block) if block_given?
+        result = @view_flow.append!(name, content) if content
+        result unless content
+      end
- -
-
# File actionview/lib/action_view/helpers/capture_helper.rb, line 188
-def provide(name, content = nil, &block)
-  content = capture(&block) if block_given?
-  result = @view_flow.append!(name, content) if content
-  result unless content
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/Helpers/ContentExfiltrationPreventionHelper.html b/src/classes/ActionView/Helpers/ContentExfiltrationPreventionHelper.html index bddb4b76f5..a374363fb2 100644 --- a/src/classes/ActionView/Helpers/ContentExfiltrationPreventionHelper.html +++ b/src/classes/ActionView/Helpers/ContentExfiltrationPreventionHelper.html @@ -169,26 +169,26 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/content_exfiltration_prevention_helper.rb, line 61
+      def prevent_content_exfiltration(html)
+        if prepend_content_exfiltration_prevention
+          CONTENT_EXFILTRATION_PREVENTION_MARKUP + html
+        else
+          html
+        end
+      end
- -
-
# File actionview/lib/action_view/helpers/content_exfiltration_prevention_helper.rb, line 61
-def prevent_content_exfiltration(html)
-  if prepend_content_exfiltration_prevention
-    CONTENT_EXFILTRATION_PREVENTION_MARKUP + html
-  else
-    html
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionView/Helpers/CspHelper.html b/src/classes/ActionView/Helpers/CspHelper.html index 2317158d93..681f6d0d0b 100644 --- a/src/classes/ActionView/Helpers/CspHelper.html +++ b/src/classes/ActionView/Helpers/CspHelper.html @@ -88,26 +88,26 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/csp_helper.rb, line 17
+      def csp_meta_tag(**options)
+        if content_security_policy?
+          options[:name] = "csp-nonce"
+          options[:content] = content_security_policy_nonce
+          tag("meta", options)
+        end
+      end
- -
-
# File actionview/lib/action_view/helpers/csp_helper.rb, line 17
-def csp_meta_tag(**options)
-  if content_security_policy?
-    options[:name] = "csp-nonce"
-    options[:content] = content_security_policy_nonce
-    tag("meta", options)
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionView/Helpers/CsrfHelper.html b/src/classes/ActionView/Helpers/CsrfHelper.html index 7b209d9d77..3df8078042 100644 --- a/src/classes/ActionView/Helpers/CsrfHelper.html +++ b/src/classes/ActionView/Helpers/CsrfHelper.html @@ -89,7 +89,8 @@

- + +

@@ -124,27 +125,27 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/csrf_helper.rb, line 22
+      def csrf_meta_tags
+        if defined?(protect_against_forgery?) && protect_against_forgery?
+          [
+            tag("meta", name: "csrf-param", content: request_forgery_protection_token),
+            tag("meta", name: "csrf-token", content: form_authenticity_token)
+          ].join("\n").html_safe
+        end
+      end
- -
-
# File actionview/lib/action_view/helpers/csrf_helper.rb, line 22
-def csrf_meta_tags
-  if defined?(protect_against_forgery?) && protect_against_forgery?
-    [
-      tag("meta", name: "csrf-param", content: request_forgery_protection_token),
-      tag("meta", name: "csrf-token", content: form_authenticity_token)
-    ].join("\n").html_safe
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/Helpers/DateHelper.html b/src/classes/ActionView/Helpers/DateHelper.html index ce3e994ed5..b313f15acf 100644 --- a/src/classes/ActionView/Helpers/DateHelper.html +++ b/src/classes/ActionView/Helpers/DateHelper.html @@ -298,22 +298,22 @@

Options

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/date_helper.rb, line 290
+      def date_select(object_name, method, options = {}, html_options = {})
+        Tags::DateSelect.new(object_name, method, self, options, html_options).render
+      end
- -
-
# File actionview/lib/action_view/helpers/date_helper.rb, line 290
-def date_select(object_name, method, options = {}, html_options = {})
-  Tags::DateSelect.new(object_name, method, self, options, html_options).render
-end
-
-
- - + See on GitHub + + + +

@@ -362,22 +362,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/date_helper.rb, line 366
+      def datetime_select(object_name, method, options = {}, html_options = {})
+        Tags::DatetimeSelect.new(object_name, method, self, options, html_options).render
+      end
- -
-
# File actionview/lib/action_view/helpers/date_helper.rb, line 366
-def datetime_select(object_name, method, options = {}, html_options = {})
-  Tags::DatetimeSelect.new(object_name, method, self, options, html_options).render
-end
-
-
- -

+ See on GitHub + + + +

@@ -463,83 +463,83 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/date_helper.rb, line 95
+      def distance_of_time_in_words(from_time, to_time = 0, options = {})
+        options = {
+          scope: :'datetime.distance_in_words'
+        }.merge!(options)
+
+        from_time = normalize_distance_of_time_argument_to_time(from_time)
+        to_time = normalize_distance_of_time_argument_to_time(to_time)
+        from_time, to_time = to_time, from_time if from_time > to_time
+        distance_in_minutes = ((to_time - from_time) / 60.0).round
+        distance_in_seconds = (to_time - from_time).round
+
+        I18n.with_options locale: options[:locale], scope: options[:scope] do |locale|
+          case distance_in_minutes
+          when 0..1
+            return distance_in_minutes == 0 ?
+                   locale.t(:less_than_x_minutes, count: 1) :
+                   locale.t(:x_minutes, count: distance_in_minutes) unless options[:include_seconds]
+
+            case distance_in_seconds
+            when 0..4   then locale.t :less_than_x_seconds, count: 5
+            when 5..9   then locale.t :less_than_x_seconds, count: 10
+            when 10..19 then locale.t :less_than_x_seconds, count: 20
+            when 20..39 then locale.t :half_a_minute
+            when 40..59 then locale.t :less_than_x_minutes, count: 1
+            else             locale.t :x_minutes,           count: 1
+            end
+
+          when 2...45           then locale.t :x_minutes,      count: distance_in_minutes
+          when 45...90          then locale.t :about_x_hours,  count: 1
+            # 90 mins up to 24 hours
+          when 90...1440        then locale.t :about_x_hours,  count: (distance_in_minutes.to_f / 60.0).round
+            # 24 hours up to 42 hours
+          when 1440...2520      then locale.t :x_days,         count: 1
+            # 42 hours up to 30 days
+          when 2520...43200     then locale.t :x_days,         count: (distance_in_minutes.to_f / 1440.0).round
+            # 30 days up to 60 days
+          when 43200...86400    then locale.t :about_x_months, count: (distance_in_minutes.to_f / 43200.0).round
+            # 60 days up to 365 days
+          when 86400...525600   then locale.t :x_months,       count: (distance_in_minutes.to_f / 43200.0).round
+          else
+            from_year = from_time.year
+            from_year += 1 if from_time.month >= 3
+            to_year = to_time.year
+            to_year -= 1 if to_time.month < 3
+            leap_years = (from_year > to_year) ? 0 : (from_year..to_year).count { |x| Date.leap?(x) }
+            minute_offset_for_leap_year = leap_years * 1440
+            # Discount the leap year days when calculating year distance.
+            # e.g. if there are 20 leap year days between 2 dates having the same day
+            # and month then based on 365 days calculation
+            # the distance in years will come out to over 80 years when in written
+            # English it would read better as about 80 years.
+            minutes_with_offset = distance_in_minutes - minute_offset_for_leap_year
+            remainder                   = (minutes_with_offset % MINUTES_IN_YEAR)
+            distance_in_years           = (minutes_with_offset.div MINUTES_IN_YEAR)
+            if remainder < MINUTES_IN_QUARTER_YEAR
+              locale.t(:about_x_years,  count: distance_in_years)
+            elsif remainder < MINUTES_IN_THREE_QUARTERS_YEAR
+              locale.t(:over_x_years,   count: distance_in_years)
+            else
+              locale.t(:almost_x_years, count: distance_in_years + 1)
+            end
+          end
+        end
+      end
- -
-
# File actionview/lib/action_view/helpers/date_helper.rb, line 95
-def distance_of_time_in_words(from_time, to_time = 0, options = {})
-  options = {
-    scope: :'datetime.distance_in_words'
-  }.merge!(options)
-
-  from_time = normalize_distance_of_time_argument_to_time(from_time)
-  to_time = normalize_distance_of_time_argument_to_time(to_time)
-  from_time, to_time = to_time, from_time if from_time > to_time
-  distance_in_minutes = ((to_time - from_time) / 60.0).round
-  distance_in_seconds = (to_time - from_time).round
-
-  I18n.with_options locale: options[:locale], scope: options[:scope] do |locale|
-    case distance_in_minutes
-    when 0..1
-      return distance_in_minutes == 0 ?
-             locale.t(:less_than_x_minutes, count: 1) :
-             locale.t(:x_minutes, count: distance_in_minutes) unless options[:include_seconds]
-
-      case distance_in_seconds
-      when 0..4   then locale.t :less_than_x_seconds, count: 5
-      when 5..9   then locale.t :less_than_x_seconds, count: 10
-      when 10..19 then locale.t :less_than_x_seconds, count: 20
-      when 20..39 then locale.t :half_a_minute
-      when 40..59 then locale.t :less_than_x_minutes, count: 1
-      else             locale.t :x_minutes,           count: 1
-      end
-
-    when 2...45           then locale.t :x_minutes,      count: distance_in_minutes
-    when 45...90          then locale.t :about_x_hours,  count: 1
-      # 90 mins up to 24 hours
-    when 90...1440        then locale.t :about_x_hours,  count: (distance_in_minutes.to_f / 60.0).round
-      # 24 hours up to 42 hours
-    when 1440...2520      then locale.t :x_days,         count: 1
-      # 42 hours up to 30 days
-    when 2520...43200     then locale.t :x_days,         count: (distance_in_minutes.to_f / 1440.0).round
-      # 30 days up to 60 days
-    when 43200...86400    then locale.t :about_x_months, count: (distance_in_minutes.to_f / 43200.0).round
-      # 60 days up to 365 days
-    when 86400...525600   then locale.t :x_months,       count: (distance_in_minutes.to_f / 43200.0).round
-    else
-      from_year = from_time.year
-      from_year += 1 if from_time.month >= 3
-      to_year = to_time.year
-      to_year -= 1 if to_time.month < 3
-      leap_years = (from_year > to_year) ? 0 : (from_year..to_year).count { |x| Date.leap?(x) }
-      minute_offset_for_leap_year = leap_years * 1440
-      # Discount the leap year days when calculating year distance.
-      # e.g. if there are 20 leap year days between 2 dates having the same day
-      # and month then based on 365 days calculation
-      # the distance in years will come out to over 80 years when in written
-      # English it would read better as about 80 years.
-      minutes_with_offset = distance_in_minutes - minute_offset_for_leap_year
-      remainder                   = (minutes_with_offset % MINUTES_IN_YEAR)
-      distance_in_years           = (minutes_with_offset.div MINUTES_IN_YEAR)
-      if remainder < MINUTES_IN_QUARTER_YEAR
-        locale.t(:about_x_years,  count: distance_in_years)
-      elsif remainder < MINUTES_IN_THREE_QUARTERS_YEAR
-        locale.t(:over_x_years,   count: distance_in_years)
-      else
-        locale.t(:almost_x_years, count: distance_in_years + 1)
-      end
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -563,7 +563,8 @@

-

+ +

@@ -615,22 +616,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/date_helper.rb, line 454
+      def select_date(date = Date.current, options = {}, html_options = {})
+        DateTimeSelector.new(date, options, html_options).select_date
+      end
- -
-
# File actionview/lib/action_view/helpers/date_helper.rb, line 454
-def select_date(date = Date.current, options = {}, html_options = {})
-  DateTimeSelector.new(date, options, html_options).select_date
-end
-
-
- -

+ See on GitHub + + + +

@@ -690,22 +691,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/date_helper.rb, line 415
+      def select_datetime(datetime = Time.current, options = {}, html_options = {})
+        DateTimeSelector.new(datetime, options, html_options).select_datetime
+      end
- -
-
# File actionview/lib/action_view/helpers/date_helper.rb, line 415
-def select_datetime(datetime = Time.current, options = {}, html_options = {})
-  DateTimeSelector.new(datetime, options, html_options).select_datetime
-end
-
-
- -

+ See on GitHub + + + +

@@ -745,22 +746,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/date_helper.rb, line 597
+      def select_day(date, options = {}, html_options = {})
+        DateTimeSelector.new(date, options, html_options).select_day
+      end
- -
-
# File actionview/lib/action_view/helpers/date_helper.rb, line 597
-def select_day(date, options = {}, html_options = {})
-  DateTimeSelector.new(date, options, html_options).select_day
-end
-
-
- -

+ See on GitHub + + + +

@@ -803,22 +804,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/date_helper.rb, line 570
+      def select_hour(datetime, options = {}, html_options = {})
+        DateTimeSelector.new(datetime, options, html_options).select_hour
+      end
- -
-
# File actionview/lib/action_view/helpers/date_helper.rb, line 570
-def select_hour(datetime, options = {}, html_options = {})
-  DateTimeSelector.new(datetime, options, html_options).select_hour
-end
-
-
- -

+ See on GitHub + + + +

@@ -855,22 +856,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/date_helper.rb, line 541
+      def select_minute(datetime, options = {}, html_options = {})
+        DateTimeSelector.new(datetime, options, html_options).select_minute
+      end
- -
-
# File actionview/lib/action_view/helpers/date_helper.rb, line 541
-def select_minute(datetime, options = {}, html_options = {})
-  DateTimeSelector.new(datetime, options, html_options).select_minute
-end
-
-
- -

+ See on GitHub + + + +

@@ -923,22 +924,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/date_helper.rb, line 642
+      def select_month(date, options = {}, html_options = {})
+        DateTimeSelector.new(date, options, html_options).select_month
+      end
- -
-
# File actionview/lib/action_view/helpers/date_helper.rb, line 642
-def select_month(date, options = {}, html_options = {})
-  DateTimeSelector.new(date, options, html_options).select_month
-end
-
-
- -

+ See on GitHub + + + +

@@ -975,22 +976,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/date_helper.rb, line 517
+      def select_second(datetime, options = {}, html_options = {})
+        DateTimeSelector.new(datetime, options, html_options).select_second
+      end
- -
-
# File actionview/lib/action_view/helpers/date_helper.rb, line 517
-def select_second(datetime, options = {}, html_options = {})
-  DateTimeSelector.new(datetime, options, html_options).select_second
-end
-
-
- -

+ See on GitHub + + + +

@@ -1044,22 +1045,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/date_helper.rb, line 494
+      def select_time(datetime = Time.current, options = {}, html_options = {})
+        DateTimeSelector.new(datetime, options, html_options).select_time
+      end
- -
-
# File actionview/lib/action_view/helpers/date_helper.rb, line 494
-def select_time(datetime = Time.current, options = {}, html_options = {})
-  DateTimeSelector.new(datetime, options, html_options).select_time
-end
-
-
- -

+ See on GitHub + + + +

@@ -1100,22 +1101,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/date_helper.rb, line 671
+      def select_year(date, options = {}, html_options = {})
+        DateTimeSelector.new(date, options, html_options).select_year
+      end
- -
-
# File actionview/lib/action_view/helpers/date_helper.rb, line 671
-def select_year(date, options = {}, html_options = {})
-  DateTimeSelector.new(date, options, html_options).select_year
-end
-
-
- -

+ See on GitHub + + + +

@@ -1154,22 +1155,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/date_helper.rb, line 176
+      def time_ago_in_words(from_time, options = {})
+        distance_of_time_in_words(from_time, Time.now, options)
+      end
- -
-
# File actionview/lib/action_view/helpers/date_helper.rb, line 176
-def time_ago_in_words(from_time, options = {})
-  distance_of_time_in_words(from_time, Time.now, options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1220,22 +1221,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/date_helper.rb, line 331
+      def time_select(object_name, method, options = {}, html_options = {})
+        Tags::TimeSelect.new(object_name, method, self, options, html_options).render
+      end
- -
-
# File actionview/lib/action_view/helpers/date_helper.rb, line 331
-def time_select(object_name, method, options = {}, html_options = {})
-  Tags::TimeSelect.new(object_name, method, self, options, html_options).render
-end
-
-
- -

+ See on GitHub + + + +

@@ -1270,26 +1271,26 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/date_helper.rb, line 690
+      def time_tag(date_or_time, *args, &block)
+        options  = args.extract_options!
+        format   = options.delete(:format) || :long
+        content  = args.first || I18n.l(date_or_time, format: format)
+
+        content_tag("time", content, options.reverse_merge(datetime: date_or_time.iso8601), &block)
+      end
- -
-
# File actionview/lib/action_view/helpers/date_helper.rb, line 690
-def time_tag(date_or_time, *args, &block)
-  options  = args.extract_options!
-  format   = options.delete(:format) || :long
-  content  = args.first || I18n.l(date_or_time, format: format)
-
-  content_tag("time", content, options.reverse_merge(datetime: date_or_time.iso8601), &block)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/Helpers/DebugHelper.html b/src/classes/ActionView/Helpers/DebugHelper.html index e1fd4e3988..ed76cb3790 100644 --- a/src/classes/ActionView/Helpers/DebugHelper.html +++ b/src/classes/ActionView/Helpers/DebugHelper.html @@ -110,27 +110,27 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/debug_helper.rb, line 28
+      def debug(object)
+        Marshal.dump(object)
+        object = ERB::Util.html_escape(object.to_yaml)
+        content_tag(:pre, object, class: "debug_dump")
+      rescue # errors from Marshal or YAML
+        # Object couldn't be dumped, perhaps because of singleton methods -- this is the fallback
+        content_tag(:code, object.inspect, class: "debug_dump")
+      end
- -
-
# File actionview/lib/action_view/helpers/debug_helper.rb, line 28
-def debug(object)
-  Marshal.dump(object)
-  object = ERB::Util.html_escape(object.to_yaml)
-  content_tag(:pre, object, class: "debug_dump")
-rescue # errors from Marshal or YAML
-  # Object couldn't be dumped, perhaps because of singleton methods -- this is the fallback
-  content_tag(:code, object.inspect, class: "debug_dump")
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionView/Helpers/FormBuilder.html b/src/classes/ActionView/Helpers/FormBuilder.html index 0664bd82fa..d3cac64769 100644 --- a/src/classes/ActionView/Helpers/FormBuilder.html +++ b/src/classes/ActionView/Helpers/FormBuilder.html @@ -359,22 +359,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 1701
+      def self._to_partial_path
+        @_to_partial_path ||= name.demodulize.underscore.sub!(/_builder$/, "")
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1701
-def self._to_partial_path
-  @_to_partial_path ||= name.demodulize.underscore.sub!(/_builder$/, "")
-end
-
-
- - + See on GitHub + + + +

@@ -394,38 +394,38 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 1713
+      def initialize(object_name, object, template, options)
+        @nested_child_index = {}
+        @object_name, @object, @template, @options = object_name, object, template, options
+        @default_options = @options ? @options.slice(:index, :namespace, :skip_default_ids, :allow_method_names_outside_object) : {}
+        @default_html_options = @default_options.except(:skip_default_ids, :allow_method_names_outside_object)
+
+        convert_to_legacy_options(@options)
+
+        if @object_name&.end_with?("[]")
+          if (object ||= @template.instance_variable_get("@#{@object_name[0..-3]}")) && object.respond_to?(:to_param)
+            @auto_index = object.to_param
+          else
+            raise ArgumentError, "object[] naming but object param and @object var don't exist or don't respond to to_param: #{object.inspect}"
+          end
+        end
+
+        @multipart = nil
+        @index = options[:index] || options[:child_index]
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1713
-def initialize(object_name, object, template, options)
-  @nested_child_index = {}
-  @object_name, @object, @template, @options = object_name, object, template, options
-  @default_options = @options ? @options.slice(:index, :namespace, :skip_default_ids, :allow_method_names_outside_object) : {}
-  @default_html_options = @default_options.except(:skip_default_ids, :allow_method_names_outside_object)
-
-  convert_to_legacy_options(@options)
-
-  if @object_name&.end_with?("[]")
-    if (object ||= @template.instance_variable_get("@#{@object_name[0..-3]}")) && object.respond_to?(:to_param)
-      @auto_index = object.to_param
-    else
-      raise ArgumentError, "object[] naming but object param and @object var don't exist or don't respond to to_param: #{object.inspect}"
-    end
-  end
-
-  @multipart = nil
-  @index = options[:index] || options[:child_index]
-end
-
-
- -

+ See on GitHub + + + + @@ -504,39 +504,39 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 2640
+      def button(value = nil, options = {}, &block)
+        case value
+        when Hash
+          value, options = nil, value
+        when Symbol
+          value, options = nil, { name: field_name(value), id: field_id(value) }.merge!(options.to_h)
+        end
+        value ||= submit_default_value
+
+        if block_given?
+          value = @template.capture { yield(value) }
+        end
+
+        formmethod = options[:formmethod]
+        if formmethod.present? && !/post|get/i.match?(formmethod) && !options.key?(:name) && !options.key?(:value)
+          options.merge! formmethod: :post, name: "_method", value: formmethod
+        end
+
+        @template.button_tag(value, options)
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 2640
-def button(value = nil, options = {}, &block)
-  case value
-  when Hash
-    value, options = nil, value
-  when Symbol
-    value, options = nil, { name: field_name(value), id: field_id(value) }.merge!(options.to_h)
-  end
-  value ||= submit_default_value
-
-  if block_given?
-    value = @template.capture { yield(value) }
-  end
-
-  formmethod = options[:formmethod]
-  if formmethod.present? && !/post|get/i.match?(formmethod) && !options.key?(:name) && !options.key?(:value)
-    options.merge! formmethod: :post, name: "_method", value: formmethod
-  end
-
-  @template.button_tag(value, options)
-end
-
-
- - + See on GitHub + + + +

@@ -608,22 +608,22 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 2464
+      def check_box(method, options = {}, checked_value = "1", unchecked_value = "0")
+        @template.check_box(@object_name, method, objectify_options(options), checked_value, unchecked_value)
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 2464
-def check_box(method, options = {}, checked_value = "1", unchecked_value = "0")
-  @template.check_box(@object_name, method, objectify_options(options), checked_value, unchecked_value)
-end
-
-
- -
+ See on GitHub + + + +

@@ -651,22 +651,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 908
+      def collection_check_boxes(method, collection, value_method, text_method, options = {}, html_options = {}, &block)
+        @template.collection_check_boxes(@object_name, method, collection, value_method, text_method, objectify_options(options), @default_html_options.merge(html_options), &block)
+      end
- -
-
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 908
-def collection_check_boxes(method, collection, value_method, text_method, options = {}, html_options = {}, &block)
-  @template.collection_check_boxes(@object_name, method, collection, value_method, text_method, objectify_options(options), @default_html_options.merge(html_options), &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -694,22 +694,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 920
+      def collection_radio_buttons(method, collection, value_method, text_method, options = {}, html_options = {}, &block)
+        @template.collection_radio_buttons(@object_name, method, collection, value_method, text_method, objectify_options(options), @default_html_options.merge(html_options), &block)
+      end
- -
-
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 920
-def collection_radio_buttons(method, collection, value_method, text_method, options = {}, html_options = {}, &block)
-  @template.collection_radio_buttons(@object_name, method, collection, value_method, text_method, objectify_options(options), @default_html_options.merge(html_options), &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -737,22 +737,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 860
+      def collection_select(method, collection, value_method, text_method, options = {}, html_options = {})
+        @template.collection_select(@object_name, method, collection, value_method, text_method, objectify_options(options), @default_html_options.merge(html_options))
+      end
- -
-
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 860
-def collection_select(method, collection, value_method, text_method, options = {}, html_options = {})
-  @template.collection_select(@object_name, method, collection, value_method, text_method, objectify_options(options), @default_html_options.merge(html_options))
-end
-
-
- -

+ See on GitHub + + + +

@@ -780,20 +780,10 @@

- -
- - -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1836
-      
-
-
- -

+ + See on GitHub + +

@@ -821,20 +811,10 @@

- -
- - -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1888
-      
-
-
- -

+ + See on GitHub + +

@@ -862,22 +842,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/date_helper.rb, line 1237
+      def date_select(method, options = {}, html_options = {})
+        @template.date_select(@object_name, method, objectify_options(options), html_options)
+      end
- -
-
# File actionview/lib/action_view/helpers/date_helper.rb, line 1237
-def date_select(method, options = {}, html_options = {})
-  @template.date_select(@object_name, method, objectify_options(options), html_options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -905,20 +885,10 @@

- -
- - -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1914
-      
-
-
- -

+ + See on GitHub + +

@@ -946,20 +916,10 @@

- -
- - -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1927
-      
-
-
- -

+ + See on GitHub + +

@@ -987,22 +947,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/date_helper.rb, line 1261
+      def datetime_select(method, options = {}, html_options = {})
+        @template.datetime_select(@object_name, method, objectify_options(options), html_options)
+      end
- -
-
# File actionview/lib/action_view/helpers/date_helper.rb, line 1261
-def datetime_select(method, options = {}, html_options = {})
-  @template.datetime_select(@object_name, method, objectify_options(options), html_options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1030,20 +990,10 @@

- -
- - -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1979
-      
-
-
- -

+ + See on GitHub + +

@@ -1074,22 +1024,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 1770
+      def field_id(method, *suffixes, namespace: @options[:namespace], index: @options[:index])
+        @template.field_id(@object_name, method, *suffixes, namespace: namespace, index: index)
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1770
-def field_id(method, *suffixes, namespace: @options[:namespace], index: @options[:index])
-  @template.field_id(@object_name, method, *suffixes, namespace: namespace, index: index)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1122,24 +1072,24 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 1790
+      def field_name(method, *methods, multiple: false, index: @options[:index])
+        object_name = @options.fetch(:as) { @object_name }
+
+        @template.field_name(object_name, method, *methods, index: index, multiple: multiple)
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1790
-def field_name(method, *methods, multiple: false, index: @options[:index])
-  object_name = @options.fetch(:as) { @object_name }
-
-  @template.field_name(object_name, method, *methods, index: index, multiple: multiple)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1159,27 +1109,27 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 2320
+      def fields(scope = nil, model: nil, **options, &block)
+        options[:allow_method_names_outside_object] = true
+        options[:skip_default_ids] = !FormHelper.form_with_generates_ids
+
+        convert_to_legacy_options(options)
+
+        fields_for(scope || model, model, options, &block)
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 2320
-def fields(scope = nil, model: nil, **options, &block)
-  options[:allow_method_names_outside_object] = true
-  options[:skip_default_ids] = !FormHelper.form_with_generates_ids
-
-  convert_to_legacy_options(options)
-
-  fields_for(scope || model, model, options, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1406,55 +1356,55 @@

One-to-many

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 2282
+      def fields_for(record_name, record_object = nil, fields_options = nil, &block)
+        fields_options, record_object = record_object, nil if fields_options.nil? && record_object.is_a?(Hash) && record_object.extractable_options?
+        fields_options ||= {}
+        fields_options[:builder] ||= options[:builder]
+        fields_options[:namespace] = options[:namespace]
+        fields_options[:parent_builder] = self
+
+        case record_name
+        when String, Symbol
+          if nested_attributes_association?(record_name)
+            return fields_for_with_nested_attributes(record_name, record_object, fields_options, block)
+          end
+        else
+          record_object = @template._object_for_form_builder(record_name)
+          record_name   = model_name_from_record_or_class(record_object).param_key
+        end
+
+        object_name = @object_name
+        index = if options.has_key?(:index)
+          options[:index]
+        elsif defined?(@auto_index)
+          object_name = object_name.to_s.delete_suffix("[]")
+          @auto_index
+        end
+
+        record_name = if index
+          "#{object_name}[#{index}][#{record_name}]"
+        elsif record_name.end_with?("[]")
+          "#{object_name}[#{record_name[0..-3]}][#{record_object.id}]"
+        else
+          "#{object_name}[#{record_name}]"
+        end
+        fields_options[:child_index] = index
+
+        @template.fields_for(record_name, record_object, fields_options, &block)
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 2282
-def fields_for(record_name, record_object = nil, fields_options = nil, &block)
-  fields_options, record_object = record_object, nil if fields_options.nil? && record_object.is_a?(Hash) && record_object.extractable_options?
-  fields_options ||= {}
-  fields_options[:builder] ||= options[:builder]
-  fields_options[:namespace] = options[:namespace]
-  fields_options[:parent_builder] = self
-
-  case record_name
-  when String, Symbol
-    if nested_attributes_association?(record_name)
-      return fields_for_with_nested_attributes(record_name, record_object, fields_options, block)
-    end
-  else
-    record_object = @template._object_for_form_builder(record_name)
-    record_name   = model_name_from_record_or_class(record_object).param_key
-  end
-
-  object_name = @object_name
-  index = if options.has_key?(:index)
-    options[:index]
-  elsif defined?(@auto_index)
-    object_name = object_name.to_s.delete_suffix("[]")
-    @auto_index
-  end
-
-  record_name = if index
-    "#{object_name}[#{index}][#{record_name}]"
-  elsif record_name.end_with?("[]")
-    "#{object_name}[#{record_name[0..-3]}][#{record_object.id}]"
-  else
-    "#{object_name}[#{record_name}]"
-  end
-  fields_options[:child_index] = index
-
-  @template.fields_for(record_name, record_object, fields_options, &block)
-end
-
-
- -
+ See on GitHub + + + +

@@ -1512,23 +1462,23 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 2547
+      def file_field(method, options = {})
+        self.multipart = true
+        @template.file_field(@object_name, method, objectify_options(options))
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 2547
-def file_field(method, options = {})
-  self.multipart = true
-  @template.file_field(@object_name, method, objectify_options(options))
-end
-
-
- -
+ See on GitHub + + + +

@@ -1556,22 +1506,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 872
+      def grouped_collection_select(method, collection, group_method, group_label_method, option_key_method, option_value_method, options = {}, html_options = {})
+        @template.grouped_collection_select(@object_name, method, collection, group_method, group_label_method, option_key_method, option_value_method, objectify_options(options), @default_html_options.merge(html_options))
+      end
- -
-
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 872
-def grouped_collection_select(method, collection, group_method, group_label_method, option_key_method, option_value_method, options = {}, html_options = {})
-  @template.grouped_collection_select(@object_name, method, collection, group_method, group_label_method, option_key_method, option_value_method, objectify_options(options), @default_html_options.merge(html_options))
-end
-
-
- -

+ See on GitHub + + + +

@@ -1606,23 +1556,23 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 2508
+      def hidden_field(method, options = {})
+        @emitted_hidden_id = true if method == :id
+        @template.hidden_field(@object_name, method, objectify_options(options))
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 2508
-def hidden_field(method, options = {})
-  @emitted_hidden_id = true if method == :id
-  @template.hidden_field(@object_name, method, objectify_options(options))
-end
-
-
- -
+ See on GitHub + + + +

@@ -1655,22 +1605,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 1750
+      def id
+        options.dig(:html, :id) || options[:id]
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1750
-def id
-  options.dig(:html, :id) || options[:id]
-end
-
-
- -

+ See on GitHub + + + +

@@ -1753,22 +1703,22 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 2395
+      def label(method, text = nil, options = {}, &block)
+        @template.label(@object_name, method, text, objectify_options(options), &block)
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 2395
-def label(method, text = nil, options = {}, &block)
-  @template.label(@object_name, method, text, objectify_options(options), &block)
-end
-
-
- -
+ See on GitHub + + + +

@@ -1796,20 +1746,10 @@

- -
- - -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1940
-      
-
-
- -

+ + See on GitHub + +

@@ -1829,26 +1769,26 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 1693
+      def multipart=(multipart)
+        @multipart = multipart
+
+        if parent_builder = @options[:parent_builder]
+          parent_builder.multipart = multipart
+        end
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1693
-def multipart=(multipart)
-  @multipart = multipart
-
-  if parent_builder = @options[:parent_builder]
-    parent_builder.multipart = multipart
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1876,20 +1816,10 @@

- -
- - -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1992
-      
-
-
- -

+ + See on GitHub + +

@@ -1917,20 +1847,10 @@

- -
- - -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1810
-      
-
-
- -

+ + See on GitHub + +

@@ -1958,20 +1878,10 @@

- -
- - -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1875
-      
-
-
- -

+ + See on GitHub + +

@@ -2006,22 +1916,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 2486
+      def radio_button(method, tag_value, options = {})
+        @template.radio_button(@object_name, method, tag_value, objectify_options(options))
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 2486
-def radio_button(method, tag_value, options = {})
-  @template.radio_button(@object_name, method, tag_value, objectify_options(options))
-end
-
-
- -

+ See on GitHub + + + +

@@ -2049,20 +1959,10 @@

- -
- - -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 2005
-      
-
-
- -

+ + See on GitHub + +

@@ -2089,22 +1989,22 @@

- -
+ +
+ + Source code + + +
# File actiontext/app/helpers/action_text/tag_helper.rb, line 93
+    def rich_text_area(method, options = {})
+      @template.rich_text_area(@object_name, method, objectify_options(options))
+    end
- -
-
# File actiontext/app/helpers/action_text/tag_helper.rb, line 93
-def rich_text_area(method, options = {})
-  @template.rich_text_area(@object_name, method, objectify_options(options))
-end
-
-
- -

+ See on GitHub + + + +

@@ -2132,20 +2032,10 @@

- -
- - -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1849
-      
-
-
- -

+ + See on GitHub + +

@@ -2173,22 +2063,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 848
+      def select(method, choices = nil, options = {}, html_options = {}, &block)
+        @template.select(@object_name, method, choices, objectify_options(options), @default_html_options.merge(html_options), &block)
+      end
- -
-
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 848
-def select(method, choices = nil, options = {}, html_options = {}, &block)
-  @template.select(@object_name, method, choices, objectify_options(options), @default_html_options.merge(html_options), &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2233,24 +2123,24 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 2579
+      def submit(value = nil, options = {})
+        value, options = nil, value if value.is_a?(Hash)
+        value ||= submit_default_value
+        @template.submit_tag(value, options)
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 2579
-def submit(value = nil, options = {})
-  value, options = nil, value if value.is_a?(Hash)
-  value ||= submit_default_value
-  @template.submit_tag(value, options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2278,20 +2168,10 @@

- -
- - -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1862
-      
-
-
- -

+ + See on GitHub + +

@@ -2319,20 +2199,10 @@

- -
- - -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1823
-      
-
-
- -

+ + See on GitHub + +

@@ -2360,20 +2230,10 @@

- -
- - -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1797
-      
-
-
- -

+ + See on GitHub + +

@@ -2401,20 +2261,10 @@

- -
- - -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1901
-      
-
-
- -

+ + See on GitHub + +

@@ -2442,22 +2292,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/date_helper.rb, line 1249
+      def time_select(method, options = {}, html_options = {})
+        @template.time_select(@object_name, method, objectify_options(options), html_options)
+      end
- -
-
# File actionview/lib/action_view/helpers/date_helper.rb, line 1249
-def time_select(method, options = {}, html_options = {})
-  @template.time_select(@object_name, method, objectify_options(options), html_options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2485,22 +2335,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 884
+      def time_zone_select(method, priority_zones = nil, options = {}, html_options = {})
+        @template.time_zone_select(@object_name, method, priority_zones, objectify_options(options), @default_html_options.merge(html_options))
+      end
- -
-
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 884
-def time_zone_select(method, priority_zones = nil, options = {}, html_options = {})
-  @template.time_zone_select(@object_name, method, priority_zones, objectify_options(options), @default_html_options.merge(html_options))
-end
-
-
- -

+ See on GitHub + + + +

@@ -2520,22 +2370,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 1709
+      def to_model
+        self
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1709
-def to_model
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -2555,22 +2405,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 1705
+      def to_partial_path
+        self.class._to_partial_path
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1705
-def to_partial_path
-  self.class._to_partial_path
-end
-
-
- -

+ See on GitHub + + + +

@@ -2598,20 +2448,10 @@

- -
- - -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1966
-      
-
-
- -

+ + See on GitHub + +

@@ -2639,20 +2479,10 @@

- -
- - -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1953
-      
-
-
- -

+ + See on GitHub + +

@@ -2680,22 +2510,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 896
+      def weekday_select(method, options = {}, html_options = {})
+        @template.weekday_select(@object_name, method, objectify_options(options), @default_html_options.merge(html_options))
+      end
- -
-
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 896
-def weekday_select(method, options = {}, html_options = {})
-  @template.weekday_select(@object_name, method, objectify_options(options), @default_html_options.merge(html_options))
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/Helpers/FormHelper.html b/src/classes/ActionView/Helpers/FormHelper.html index 1cd18d3cc7..e9d1d862a4 100644 --- a/src/classes/ActionView/Helpers/FormHelper.html +++ b/src/classes/ActionView/Helpers/FormHelper.html @@ -341,22 +341,22 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 1341
+      def check_box(object_name, method, options = {}, checked_value = "1", unchecked_value = "0")
+        Tags::CheckBox.new(object_name, method, self, checked_value, unchecked_value, options).render
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1341
-def check_box(object_name, method, options = {}, checked_value = "1", unchecked_value = "0")
-  Tags::CheckBox.new(object_name, method, self, checked_value, unchecked_value, options).render
-end
-
-
- - + See on GitHub + + + +

@@ -380,22 +380,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 1371
+      def color_field(object_name, method, options = {})
+        Tags::ColorField.new(object_name, method, self, options).render
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1371
-def color_field(object_name, method, options = {})
-  Tags::ColorField.new(object_name, method, self, options).render
-end
-
-
- -

+ See on GitHub + + + +

@@ -438,22 +438,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 1435
+      def date_field(object_name, method, options = {})
+        Tags::DateField.new(object_name, method, self, options).render
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1435
-def date_field(object_name, method, options = {})
-  Tags::DateField.new(object_name, method, self, options).render
-end
-
-
- -

+ See on GitHub + + + +

@@ -507,22 +507,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 1508
+      def datetime_field(object_name, method, options = {})
+        Tags::DatetimeLocalField.new(object_name, method, self, options).render
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1508
-def datetime_field(object_name, method, options = {})
-  Tags::DatetimeLocalField.new(object_name, method, self, options).render
-end
-
-
- -

+ See on GitHub + + + +

@@ -546,7 +546,8 @@

-

+ +

@@ -570,22 +571,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 1562
+      def email_field(object_name, method, options = {})
+        Tags::EmailField.new(object_name, method, self, options).render
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1562
-def email_field(object_name, method, options = {})
-  Tags::EmailField.new(object_name, method, self, options).render
-end
-
-
- -

+ See on GitHub + + + +

@@ -643,30 +644,30 @@

Mixing with other - -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 1077
+      def fields(scope = nil, model: nil, **options, &block)
+        options = { allow_method_names_outside_object: true, skip_default_ids: !form_with_generates_ids }.merge!(options)
+
+        if model
+          model   = _object_for_form_builder(model)
+          scope ||= model_name_from_record_or_class(model).param_key
+        end
+
+        builder = instantiate_builder(scope, model, options)
+        capture(builder, &block)
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1077
-def fields(scope = nil, model: nil, **options, &block)
-  options = { allow_method_names_outside_object: true, skip_default_ids: !form_with_generates_ids }.merge!(options)
-
-  if model
-    model   = _object_for_form_builder(model)
-    scope ||= model_name_from_record_or_class(model).param_key
-  end
-
-  builder = instantiate_builder(scope, model, options)
-  capture(builder, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -882,24 +883,24 @@

One-to-many

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 1026
+      def fields_for(record_name, record_object = nil, options = {}, &block)
+        options = { model: record_object, allow_method_names_outside_object: false, skip_default_ids: false }.merge!(options)
+
+        fields(record_name, **options, &block)
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1026
-def fields_for(record_name, record_object = nil, options = {}, &block)
-  options = { model: record_object, allow_method_names_outside_object: false, skip_default_ids: false }.merge!(options)
-
-  fields(record_name, **options, &block)
-end
-
-
- -
+ See on GitHub + + + +

@@ -952,24 +953,24 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 1243
+      def file_field(object_name, method, options = {})
+        options = { include_hidden: multiple_file_field_include_hidden }.merge!(options)
+
+        Tags::FileField.new(object_name, method, self, convert_direct_upload_option_to_url(options.dup)).render
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1243
-def file_field(object_name, method, options = {})
-  options = { include_hidden: multiple_file_field_include_hidden }.merge!(options)
-
-  Tags::FileField.new(object_name, method, self, convert_direct_upload_option_to_url(options.dup)).render
-end
-
-
- -
+ See on GitHub + + + +

@@ -1253,48 +1254,48 @@

Form to external res - -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 434
+      def form_for(record, options = {}, &block)
+        raise ArgumentError, "Missing block" unless block_given?
+
+        case record
+        when String, Symbol
+          model       = nil
+          object_name = record
+        else
+          model       = record
+          object      = _object_for_form_builder(record)
+          raise ArgumentError, "First argument in form cannot contain nil or be empty" unless object
+          object_name = options[:as] || model_name_from_record_or_class(object).param_key
+          apply_form_for_options!(object, options)
+        end
+
+        remote = options.delete(:remote)
+
+        if remote && !embed_authenticity_token_in_remote_forms && options[:authenticity_token].blank?
+          options[:authenticity_token] = false
+        end
+
+        options[:model]                               = model
+        options[:scope]                               = object_name
+        options[:local]                               = !remote
+        options[:skip_default_ids]                    = false
+        options[:allow_method_names_outside_object]   = options.fetch(:allow_method_names_outside_object, false)
+
+        form_with(**options, &block)
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 434
-def form_for(record, options = {}, &block)
-  raise ArgumentError, "Missing block" unless block_given?
-
-  case record
-  when String, Symbol
-    model       = nil
-    object_name = record
-  else
-    model       = record
-    object      = _object_for_form_builder(record)
-    raise ArgumentError, "First argument in form cannot contain nil or be empty" unless object
-    object_name = options[:as] || model_name_from_record_or_class(object).param_key
-    apply_form_for_options!(object, options)
-  end
-
-  remote = options.delete(:remote)
-
-  if remote && !embed_authenticity_token_in_remote_forms && options[:authenticity_token].blank?
-    options[:authenticity_token] = false
-  end
-
-  options[:model]                               = model
-  options[:scope]                               = object_name
-  options[:local]                               = !remote
-  options[:skip_default_ids]                    = false
-  options[:allow_method_names_outside_object]   = options.fetch(:allow_method_names_outside_object, false)
-
-  form_with(**options, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1550,47 +1551,47 @@

Customized form build - -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 755
+      def form_with(model: nil, scope: nil, url: nil, format: nil, **options, &block)
+        options = { allow_method_names_outside_object: true, skip_default_ids: !form_with_generates_ids }.merge!(options)
+
+        if model
+          if url != false
+            url ||= if format.nil?
+              polymorphic_path(model, {})
+            else
+              polymorphic_path(model, format: format)
+            end
+          end
+
+          model   = convert_to_model(_object_for_form_builder(model))
+          scope ||= model_name_from_record_or_class(model).param_key
+        end
+
+        if block_given?
+          builder = instantiate_builder(scope, model, options)
+          output  = capture(builder, &block)
+          options[:multipart] ||= builder.multipart?
+
+          html_options = html_options_for_form_with(url, model, **options)
+          form_tag_with_body(html_options, output)
+        else
+          html_options = html_options_for_form_with(url, model, **options)
+          form_tag_html(html_options)
+        end
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 755
-def form_with(model: nil, scope: nil, url: nil, format: nil, **options, &block)
-  options = { allow_method_names_outside_object: true, skip_default_ids: !form_with_generates_ids }.merge!(options)
-
-  if model
-    if url != false
-      url ||= if format.nil?
-        polymorphic_path(model, {})
-      else
-        polymorphic_path(model, format: format)
-      end
-    end
-
-    model   = convert_to_model(_object_for_form_builder(model))
-    scope ||= model_name_from_record_or_class(model).param_key
-  end
-
-  if block_given?
-    builder = instantiate_builder(scope, model, options)
-    output  = capture(builder, &block)
-    options[:multipart] ||= builder.multipart?
-
-    html_options = html_options_for_form_with(url, model, **options)
-    form_tag_with_body(html_options, output)
-  else
-    html_options = html_options_for_form_with(url, model, **options)
-    form_tag_html(html_options)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1622,22 +1623,22 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 1210
+      def hidden_field(object_name, method, options = {})
+        Tags::HiddenField.new(object_name, method, self, options).render
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1210
-def hidden_field(object_name, method, options = {})
-  Tags::HiddenField.new(object_name, method, self, options).render
-end
-
-
- -
+ See on GitHub + + + +

@@ -1712,22 +1713,22 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 1147
+      def label(object_name, method, content_or_options = nil, options = nil, &block)
+        Tags::Label.new(object_name, method, self, content_or_options, options).render(&block)
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1147
-def label(object_name, method, content_or_options = nil, options = nil, &block)
-  Tags::Label.new(object_name, method, self, content_or_options, options).render(&block)
-end
-
-
- -
+ See on GitHub + + + +

@@ -1758,22 +1759,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 1527
+      def month_field(object_name, method, options = {})
+        Tags::MonthField.new(object_name, method, self, options).render
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1527
-def month_field(object_name, method, options = {})
-  Tags::MonthField.new(object_name, method, self, options).render
-end
-
-
- -

+ See on GitHub + + + +

@@ -1797,22 +1798,22 @@

Options

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 1571
+      def number_field(object_name, method, options = {})
+        Tags::NumberField.new(object_name, method, self, options).render
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1571
-def number_field(object_name, method, options = {})
-  Tags::NumberField.new(object_name, method, self, options).render
-end
-
-
- -
+ See on GitHub + + + +

@@ -1847,22 +1848,22 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 1192
+      def password_field(object_name, method, options = {})
+        Tags::PasswordField.new(object_name, method, self, options).render
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1192
-def password_field(object_name, method, options = {})
-  Tags::PasswordField.new(object_name, method, self, options).render
-end
-
-
- -
+ See on GitHub + + + +

@@ -1886,7 +1887,8 @@

-

+ +

@@ -1921,22 +1923,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 1363
+      def radio_button(object_name, method, tag_value, options = {})
+        Tags::RadioButton.new(object_name, method, self, tag_value, options).render
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1363
-def radio_button(object_name, method, tag_value, options = {})
-  Tags::RadioButton.new(object_name, method, self, tag_value, options).render
-end
-
-
- -

+ See on GitHub + + + +

@@ -1960,22 +1962,22 @@

Options

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 1580
+      def range_field(object_name, method, options = {})
+        Tags::RangeField.new(object_name, method, self, options).render
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1580
-def range_field(object_name, method, options = {})
-  Tags::RangeField.new(object_name, method, self, options).render
-end
-
-
- -
+ See on GitHub + + + +

@@ -2021,22 +2023,22 @@

Example

- -
+ +
+ + Source code + + +
# File actiontext/app/helpers/action_text/tag_helper.rb, line 80
+    def rich_text_area(object_name, method, options = {})
+      Tags::ActionText.new(object_name, method, self, options).render
+    end
- -
-
# File actiontext/app/helpers/action_text/tag_helper.rb, line 80
-def rich_text_area(object_name, method, options = {})
-  Tags::ActionText.new(object_name, method, self, options).render
-end
-
-
- -
+ See on GitHub + + + +

@@ -2073,22 +2075,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 1394
+      def search_field(object_name, method, options = {})
+        Tags::SearchField.new(object_name, method, self, options).render
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1394
-def search_field(object_name, method, options = {})
-  Tags::SearchField.new(object_name, method, self, options).render
-end
-
-
- -

+ See on GitHub + + + +

@@ -2116,22 +2118,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 1403
+      def telephone_field(object_name, method, options = {})
+        Tags::TelField.new(object_name, method, self, options).render
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1403
-def telephone_field(object_name, method, options = {})
-  Tags::TelField.new(object_name, method, self, options).render
-end
-
-
- -

+ See on GitHub + + + +

@@ -2174,22 +2176,22 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 1273
+      def text_area(object_name, method, options = {})
+        Tags::TextArea.new(object_name, method, self, options).render
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1273
-def text_area(object_name, method, options = {})
-  Tags::TextArea.new(object_name, method, self, options).render
-end
-
-
- -
+ See on GitHub + + + +

@@ -2227,22 +2229,22 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 1171
+      def text_field(object_name, method, options = {})
+        Tags::TextField.new(object_name, method, self, options).render
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1171
-def text_field(object_name, method, options = {})
-  Tags::TextField.new(object_name, method, self, options).render
-end
-
-
- -
+ See on GitHub + + + +

@@ -2292,22 +2294,22 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 1473
+      def time_field(object_name, method, options = {})
+        Tags::TimeField.new(object_name, method, self, options).render
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1473
-def time_field(object_name, method, options = {})
-  Tags::TimeField.new(object_name, method, self, options).render
-end
-
-
- -
+ See on GitHub + + + +

@@ -2331,22 +2333,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 1553
+      def url_field(object_name, method, options = {})
+        Tags::UrlField.new(object_name, method, self, options).render
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1553
-def url_field(object_name, method, options = {})
-  Tags::UrlField.new(object_name, method, self, options).render
-end
-
-
- -

+ See on GitHub + + + +

@@ -2377,22 +2379,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_helper.rb, line 1544
+      def week_field(object_name, method, options = {})
+        Tags::WeekField.new(object_name, method, self, options).render
+      end
- -
-
# File actionview/lib/action_view/helpers/form_helper.rb, line 1544
-def week_field(object_name, method, options = {})
-  Tags::WeekField.new(object_name, method, self, options).render
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/Helpers/FormOptionsHelper.html b/src/classes/ActionView/Helpers/FormOptionsHelper.html index a51e954b59..19cff9ea42 100644 --- a/src/classes/ActionView/Helpers/FormOptionsHelper.html +++ b/src/classes/ActionView/Helpers/FormOptionsHelper.html @@ -306,22 +306,22 @@

Gotcha

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 782
+      def collection_check_boxes(object, method, collection, value_method, text_method, options = {}, html_options = {}, &block)
+        Tags::CollectionCheckBoxes.new(object, method, self, collection, value_method, text_method, options, html_options).render(&block)
+      end
- -
-
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 782
-def collection_check_boxes(object, method, collection, value_method, text_method, options = {}, html_options = {}, &block)
-  Tags::CollectionCheckBoxes.new(object, method, self, collection, value_method, text_method, options, html_options).render(&block)
-end
-
-
- - + See on GitHub + + + +

@@ -409,22 +409,22 @@

Gotcha

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 698
+      def collection_radio_buttons(object, method, collection, value_method, text_method, options = {}, html_options = {}, &block)
+        Tags::CollectionRadioButtons.new(object, method, self, collection, value_method, text_method, options, html_options).render(&block)
+      end
- -
-
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 698
-def collection_radio_buttons(object, method, collection, value_method, text_method, options = {}, html_options = {}, &block)
-  Tags::CollectionRadioButtons.new(object, method, self, collection, value_method, text_method, options, html_options).render(&block)
-end
-
-
- -
+ See on GitHub + + + +

@@ -476,22 +476,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 199
+      def collection_select(object, method, collection, value_method, text_method, options = {}, html_options = {})
+        Tags::CollectionSelect.new(object, method, self, collection, value_method, text_method, options, html_options).render
+      end
- -
-
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 199
-def collection_select(object, method, collection, value_method, text_method, options = {}, html_options = {})
-  Tags::CollectionSelect.new(object, method, self, collection, value_method, text_method, options, html_options).render
-end
-
-
- -

+ See on GitHub + + + +

@@ -565,22 +565,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 258
+      def grouped_collection_select(object, method, collection, group_method, group_label_method, option_key_method, option_value_method, options = {}, html_options = {})
+        Tags::GroupedCollectionSelect.new(object, method, self, collection, group_method, group_label_method, option_key_method, option_value_method, options, html_options).render
+      end
- -
-
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 258
-def grouped_collection_select(object, method, collection, group_method, group_label_method, option_key_method, option_value_method, options = {}, html_options = {})
-  Tags::GroupedCollectionSelect.new(object, method, self, collection, group_method, group_label_method, option_key_method, option_value_method, options, html_options).render
-end
-
-
- -

+ See on GitHub + + + +

@@ -672,44 +672,44 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 534
+      def grouped_options_for_select(grouped_options, selected_key = nil, options = {})
+        prompt  = options[:prompt]
+        divider = options[:divider]
+
+        body = "".html_safe
+
+        if prompt
+          body.safe_concat content_tag("option", prompt_text(prompt), value: "")
+        end
+
+        grouped_options.each do |container|
+          html_attributes = option_html_attributes(container)
+
+          if divider
+            label = divider
+          else
+            label, container = container
+          end
+
+          html_attributes = { label: label }.merge!(html_attributes)
+          body.safe_concat content_tag("optgroup", options_for_select(container, selected_key), html_attributes)
+        end
+
+        body
+      end
- -
-
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 534
-def grouped_options_for_select(grouped_options, selected_key = nil, options = {})
-  prompt  = options[:prompt]
-  divider = options[:divider]
-
-  body = "".html_safe
-
-  if prompt
-    body.safe_concat content_tag("option", prompt_text(prompt), value: "")
-  end
-
-  grouped_options.each do |container|
-    html_attributes = option_html_attributes(container)
-
-    if divider
-      label = divider
-    else
-      label, container = container
-    end
-
-    html_attributes = { label: label }.merge!(html_attributes)
-    body.safe_concat content_tag("optgroup", options_for_select(container, selected_key), html_attributes)
-  end
-
-  body
-end
-
-
- -

+ See on GitHub + + + +

@@ -779,27 +779,27 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 462
+      def option_groups_from_collection_for_select(collection, group_method, group_label_method, option_key_method, option_value_method, selected_key = nil)
+        collection.map do |group|
+          option_tags = options_from_collection_for_select(
+            value_for_collection(group, group_method), option_key_method, option_value_method, selected_key)
+
+          content_tag("optgroup", option_tags, label: value_for_collection(group, group_label_method))
+        end.join.html_safe
+      end
- -
-
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 462
-def option_groups_from_collection_for_select(collection, group_method, group_label_method, option_key_method, option_value_method, selected_key = nil)
-  collection.map do |group|
-    option_tags = options_from_collection_for_select(
-      value_for_collection(group, group_method), option_key_method, option_value_method, selected_key)
-
-    content_tag("optgroup", option_tags, label: value_for_collection(group, group_label_method))
-  end.join.html_safe
-end
-
-
- -

+ See on GitHub + + + +

@@ -872,37 +872,37 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 358
+      def options_for_select(container, selected = nil)
+        return container if String === container
+
+        selected, disabled = extract_selected_and_disabled(selected).map do |r|
+          Array(r).map(&:to_s)
+        end
+
+        container.map do |element|
+          html_attributes = option_html_attributes(element)
+          text, value = option_text_and_value(element).map(&:to_s)
+
+          html_attributes[:selected] ||= option_value_selected?(value, selected)
+          html_attributes[:disabled] ||= disabled && option_value_selected?(value, disabled)
+          html_attributes[:value] = value
+
+          tag_builder.content_tag_string(:option, text, html_attributes)
+        end.join("\n").html_safe
+      end
- -
-
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 358
-def options_for_select(container, selected = nil)
-  return container if String === container
-
-  selected, disabled = extract_selected_and_disabled(selected).map do |r|
-    Array(r).map(&:to_s)
-  end
-
-  container.map do |element|
-    html_attributes = option_html_attributes(element)
-    text, value = option_text_and_value(element).map(&:to_s)
-
-    html_attributes[:selected] ||= option_value_selected?(value, selected)
-    html_attributes[:disabled] ||= disabled && option_value_selected?(value, disabled)
-    html_attributes[:value] = value
-
-    tag_builder.content_tag_string(:option, text, html_attributes)
-  end.join("\n").html_safe
-end
-
-
- -

+ See on GitHub + + + +

@@ -949,31 +949,31 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 401
+      def options_from_collection_for_select(collection, value_method, text_method, selected = nil)
+        options = collection.map do |element|
+          [value_for_collection(element, text_method), value_for_collection(element, value_method), option_html_attributes(element)]
+        end
+        selected, disabled = extract_selected_and_disabled(selected)
+        select_deselect = {
+          selected: extract_values_from_collection(collection, value_method, selected),
+          disabled: extract_values_from_collection(collection, value_method, disabled)
+        }
+
+        options_for_select(options, select_deselect)
+      end
- -
-
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 401
-def options_from_collection_for_select(collection, value_method, text_method, selected = nil)
-  options = collection.map do |element|
-    [value_for_collection(element, text_method), value_for_collection(element, value_method), option_html_attributes(element)]
-  end
-  selected, disabled = extract_selected_and_disabled(selected)
-  select_deselect = {
-    selected: extract_values_from_collection(collection, value_method, selected),
-    disabled: extract_values_from_collection(collection, value_method, disabled)
-  }
-
-  options_for_select(options, select_deselect)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1043,22 +1043,22 @@

Gotcha

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 159
+      def select(object, method, choices = nil, options = {}, html_options = {}, &block)
+        Tags::Select.new(object, method, self, choices, options, html_options, &block).render
+      end
- -
-
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 159
-def select(object, method, choices = nil, options = {}, html_options = {}, &block)
-  Tags::Select.new(object, method, self, choices, options, html_options, &block).render
-end
-
-
- -
+ See on GitHub + + + +

@@ -1084,39 +1084,39 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 579
+      def time_zone_options_for_select(selected = nil, priority_zones = nil, model = ::ActiveSupport::TimeZone)
+        zone_options = "".html_safe
+
+        zones = model.all
+        convert_zones = lambda { |list| list.map { |z| [ z.to_s, z.name ] } }
+
+        if priority_zones
+          if priority_zones.is_a?(Regexp)
+            priority_zones = zones.select { |z| z.match?(priority_zones) }
+          end
+
+          zone_options.safe_concat options_for_select(convert_zones[priority_zones], selected)
+          zone_options.safe_concat content_tag("option", "-------------", value: "", disabled: true)
+          zone_options.safe_concat "\n"
+
+          zones = zones - priority_zones
+        end
+
+        zone_options.safe_concat options_for_select(convert_zones[zones], selected)
+      end
- -
-
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 579
-def time_zone_options_for_select(selected = nil, priority_zones = nil, model = ::ActiveSupport::TimeZone)
-  zone_options = "".html_safe
-
-  zones = model.all
-  convert_zones = lambda { |list| list.map { |z| [ z.to_s, z.name ] } }
-
-  if priority_zones
-    if priority_zones.is_a?(Regexp)
-      priority_zones = zones.select { |z| z.match?(priority_zones) }
-    end
-
-    zone_options.safe_concat options_for_select(convert_zones[priority_zones], selected)
-    zone_options.safe_concat content_tag("option", "-------------", value: "", disabled: true)
-    zone_options.safe_concat "\n"
-
-    zones = zones - priority_zones
-  end
-
-  zone_options.safe_concat options_for_select(convert_zones[zones], selected)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1155,22 +1155,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 292
+      def time_zone_select(object, method, priority_zones = nil, options = {}, html_options = {})
+        Tags::TimeZoneSelect.new(object, method, self, priority_zones, options, html_options).render
+      end
- -
-
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 292
-def time_zone_select(object, method, priority_zones = nil, options = {}, html_options = {})
-  Tags::TimeZoneSelect.new(object, method, self, priority_zones, options, html_options).render
-end
-
-
- -

+ See on GitHub + + + +

@@ -1201,26 +1201,26 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 611
+      def weekday_options_for_select(selected = nil, index_as_value: false, day_format: :day_names, beginning_of_week: Date.beginning_of_week)
+        day_names = I18n.translate("date.#{day_format}")
+        day_names = day_names.map.with_index.to_a if index_as_value
+        day_names = day_names.rotate(Date::DAYS_INTO_WEEK.fetch(beginning_of_week))
+
+        options_for_select(day_names, selected)
+      end
- -
-
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 611
-def weekday_options_for_select(selected = nil, index_as_value: false, day_format: :day_names, beginning_of_week: Date.beginning_of_week)
-  day_names = I18n.translate("date.#{day_format}")
-  day_names = day_names.map.with_index.to_a if index_as_value
-  day_names = day_names.rotate(Date::DAYS_INTO_WEEK.fetch(beginning_of_week))
-
-  options_for_select(day_names, selected)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1240,22 +1240,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 298
+      def weekday_select(object, method, options = {}, html_options = {}, &block)
+        Tags::WeekdaySelect.new(object, method, self, options, html_options, &block).render
+      end
- -
-
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 298
-def weekday_select(object, method, options = {}, html_options = {}, &block)
-  Tags::WeekdaySelect.new(object, method, self, options, html_options, &block).render
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/Helpers/FormTagHelper.html b/src/classes/ActionView/Helpers/FormTagHelper.html index cfc1cb7b26..dfba7d7e2d 100644 --- a/src/classes/ActionView/Helpers/FormTagHelper.html +++ b/src/classes/ActionView/Helpers/FormTagHelper.html @@ -279,34 +279,34 @@

Deprecated - -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 605
+      def button_tag(content_or_options = nil, options = nil, &block)
+        if content_or_options.is_a? Hash
+          options = content_or_options
+        else
+          options ||= {}
+        end
+
+        options = { "name" => "button", "type" => "submit" }.merge!(options.stringify_keys)
+
+        if block_given?
+          content_tag :button, options, &block
+        else
+          content_tag :button, content_or_options || "Button", options
+        end
+      end
- -
-
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 605
-def button_tag(content_or_options = nil, options = nil, &block)
-  if content_or_options.is_a? Hash
-    options = content_or_options
-  else
-    options ||= {}
-  end
-
-  options = { "name" => "button", "type" => "submit" }.merge!(options.stringify_keys)
-
-  if block_given?
-    content_tag :button, options, &block
-  else
-    content_tag :button, content_or_options || "Button", options
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -356,29 +356,29 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 455
+      def check_box_tag(name, *args)
+        if args.length >= 4
+          raise ArgumentError, "wrong number of arguments (given #{args.length + 1}, expected 1..4)"
+        end
+        options = args.extract_options!
+        value, checked = args.empty? ? ["1", false] : [*args, false]
+        html_options = { "type" => "checkbox", "name" => name, "id" => sanitize_to_id(name), "value" => value }.update(options.stringify_keys)
+        html_options["checked"] = "checked" if checked
+        tag :input, html_options
+      end
- -
-
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 455
-def check_box_tag(name, *args)
-  if args.length >= 4
-    raise ArgumentError, "wrong number of arguments (given #{args.length + 1}, expected 1..4)"
-  end
-  options = args.extract_options!
-  value, checked = args.empty? ? ["1", false] : [*args, false]
-  html_options = { "type" => "checkbox", "name" => name, "id" => sanitize_to_id(name), "value" => value }.update(options.stringify_keys)
-  html_options["checked"] = "checked" if checked
-  tag :input, html_options
-end
-
-
- -
+ See on GitHub + + + +

@@ -417,22 +417,22 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 703
+      def color_field_tag(name, value = nil, options = {})
+        text_field_tag(name, value, options.merge(type: :color))
+      end
- -
-
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 703
-def color_field_tag(name, value = nil, options = {})
-  text_field_tag(name, value, options.merge(type: :color))
-end
-
-
- -
+ See on GitHub + + + +

@@ -471,22 +471,22 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 773
+      def date_field_tag(name, value = nil, options = {})
+        text_field_tag(name, value, options.merge(type: :date))
+      end
- -
-
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 773
-def date_field_tag(name, value = nil, options = {})
-  text_field_tag(name, value, options.merge(type: :date))
-end
-
-
- -
+ See on GitHub + + + +

@@ -523,22 +523,22 @@

Options

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 801
+      def datetime_field_tag(name, value = nil, options = {})
+        text_field_tag(name, value, options.merge(type: "datetime-local"))
+      end
- -
-
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 801
-def datetime_field_tag(name, value = nil, options = {})
-  text_field_tag(name, value, options.merge(type: "datetime-local"))
-end
-
-
- -
+ See on GitHub + + + +

@@ -562,7 +562,8 @@

-

+ +

@@ -601,22 +602,22 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 875
+      def email_field_tag(name, value = nil, options = {})
+        text_field_tag(name, value, options.merge(type: :email))
+      end
- -
-
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 875
-def email_field_tag(name, value = nil, options = {})
-  text_field_tag(name, value, options.merge(type: :email))
-end
-
-
- -
+ See on GitHub + + + +

@@ -645,36 +646,36 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 102
+      def field_id(object_name, method_name, *suffixes, index: nil, namespace: nil)
+        if object_name.respond_to?(:model_name)
+          object_name = object_name.model_name.singular
+        end
+
+        sanitized_object_name = object_name.to_s.gsub(/\]\[|[^-a-zA-Z0-9:.]/, "_").delete_suffix("_")
+
+        sanitized_method_name = method_name.to_s.delete_suffix("?")
+
+        [
+          namespace,
+          sanitized_object_name.presence,
+          (index unless sanitized_object_name.empty?),
+          sanitized_method_name,
+          *suffixes,
+        ].tap(&:compact!).join("_")
+      end
- -
-
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 102
-def field_id(object_name, method_name, *suffixes, index: nil, namespace: nil)
-  if object_name.respond_to?(:model_name)
-    object_name = object_name.model_name.singular
-  end
-
-  sanitized_object_name = object_name.to_s.gsub(/\]\[|[^-a-zA-Z0-9:.]/, "_").delete_suffix("_")
-
-  sanitized_method_name = method_name.to_s.delete_suffix("?")
-
-  [
-    namespace,
-    sanitized_object_name.presence,
-    (index unless sanitized_object_name.empty?),
-    sanitized_method_name,
-    *suffixes,
-  ].tap(&:compact!).join("_")
-end
-
-
- -

+ See on GitHub + + + +

@@ -703,32 +704,32 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 132
+      def field_name(object_name, method_name, *method_names, multiple: false, index: nil)
+        names = method_names.map! { |name| "[#{name}]" }.join
+
+        # a little duplication to construct fewer strings
+        case
+        when object_name.blank?
+          "#{method_name}#{names}#{multiple ? "[]" : ""}"
+        when index
+          "#{object_name}[#{index}][#{method_name}]#{names}#{multiple ? "[]" : ""}"
+        else
+          "#{object_name}[#{method_name}]#{names}#{multiple ? "[]" : ""}"
+        end
+      end
- -
-
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 132
-def field_name(object_name, method_name, *method_names, multiple: false, index: nil)
-  names = method_names.map! { |name| "[#{name}]" }.join
-
-  # a little duplication to construct fewer strings
-  case
-  when object_name.blank?
-    "#{method_name}#{names}#{multiple ? "[]" : ""}"
-  when index
-    "#{object_name}[#{index}][#{method_name}]#{names}#{multiple ? "[]" : ""}"
-  else
-    "#{object_name}[#{method_name}]#{names}#{multiple ? "[]" : ""}"
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -768,25 +769,25 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 677
+      def field_set_tag(legend = nil, options = nil, &block)
+        output = tag(:fieldset, options, true)
+        output.safe_concat(content_tag("legend", legend)) unless legend.blank?
+        output.concat(capture(&block)) if block_given?
+        output.safe_concat("")
+      end
- -
-
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 677
-def field_set_tag(legend = nil, options = nil, &block)
-  output = tag(:fieldset, options, true)
-  output.safe_concat(content_tag("legend", legend)) unless legend.blank?
-  output.concat(capture(&block)) if block_given?
-  output.safe_concat("</fieldset>")
-end
-
-
- -
+ See on GitHub + + + +

@@ -846,22 +847,22 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 347
+      def file_field_tag(name, options = {})
+        text_field_tag(name, nil, convert_direct_upload_option_to_url(options.merge(type: :file)))
+      end
- -
-
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 347
-def file_field_tag(name, options = {})
-  text_field_tag(name, nil, convert_direct_upload_option_to_url(options.merge(type: :file)))
-end
-
-
- -
+ See on GitHub + + + +

@@ -925,27 +926,27 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 78
+      def form_tag(url_for_options = {}, options = {}, &block)
+        html_options = html_options_for_form(url_for_options, options)
+        if block_given?
+          form_tag_with_body(html_options, capture(&block))
+        else
+          form_tag_html(html_options)
+        end
+      end
- -
-
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 78
-def form_tag(url_for_options = {}, options = {}, &block)
-  html_options = html_options_for_form(url_for_options, options)
-  if block_given?
-    form_tag_with_body(html_options, capture(&block))
-  else
-    form_tag_html(html_options)
-  end
-end
-
-
- -
+ See on GitHub + + + +

@@ -983,22 +984,22 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 308
+      def hidden_field_tag(name, value = nil, options = {})
+        text_field_tag(name, value, options.merge(type: :hidden, autocomplete: "off"))
+      end
- -
-
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 308
-def hidden_field_tag(name, value = nil, options = {})
-  text_field_tag(name, value, options.merge(type: :hidden, autocomplete: "off"))
-end
-
-
- -
+ See on GitHub + + + +

@@ -1052,24 +1053,24 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 651
+      def image_submit_tag(source, options = {})
+        options = options.stringify_keys
+        src = path_to_image(source, skip_pipeline: options.delete("skip_pipeline"))
+        tag :input, { "type" => "image", "src" => src }.update(options)
+      end
- -
-
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 651
-def image_submit_tag(source, options = {})
-  options = options.stringify_keys
-  src = path_to_image(source, skip_pipeline: options.delete("skip_pipeline"))
-  tag :input, { "type" => "image", "src" => src }.update(options)
-end
-
-
- -
+ See on GitHub + + + +

@@ -1106,29 +1107,29 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 281
+      def label_tag(name = nil, content_or_options = nil, options = nil, &block)
+        if block_given? && content_or_options.is_a?(Hash)
+          options = content_or_options = content_or_options.stringify_keys
+        else
+          options ||= {}
+          options = options.stringify_keys
+        end
+        options["for"] = sanitize_to_id(name) unless name.blank? || options.has_key?("for")
+        content_tag :label, content_or_options || name.to_s.humanize, options, &block
+      end
- -
-
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 281
-def label_tag(name = nil, content_or_options = nil, options = nil, &block)
-  if block_given? && content_or_options.is_a?(Hash)
-    options = content_or_options = content_or_options.stringify_keys
-  else
-    options ||= {}
-    options = options.stringify_keys
-  end
-  options["for"] = sanitize_to_id(name) unless name.blank? || options.has_key?("for")
-  content_tag :label, content_or_options || name.to_s.humanize, options, &block
-end
-
-
- -
+ See on GitHub + + + +

@@ -1159,22 +1160,22 @@

Options

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 816
+      def month_field_tag(name, value = nil, options = {})
+        text_field_tag(name, value, options.merge(type: :month))
+      end
- -
-
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 816
-def month_field_tag(name, value = nil, options = {})
-  text_field_tag(name, value, options.merge(type: :month))
-end
-
-
- -
+ See on GitHub + + + +

@@ -1242,27 +1243,27 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 923
+      def number_field_tag(name, value = nil, options = {})
+        options = options.stringify_keys
+        options["type"] ||= "number"
+        if range = options.delete("in") || options.delete("within")
+          options.update("min" => range.min, "max" => range.max)
+        end
+        text_field_tag(name, value, options)
+      end
- -
-
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 923
-def number_field_tag(name, value = nil, options = {})
-  options = options.stringify_keys
-  options["type"] ||= "number"
-  if range = options.delete("in") || options.delete("within")
-    options.update("min" => range.min, "max" => range.max)
-  end
-  text_field_tag(name, value, options)
-end
-
-
- -
+ See on GitHub + + + +

@@ -1317,22 +1318,22 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 380
+      def password_field_tag(name = "password", value = nil, options = {})
+        text_field_tag(name, value, options.merge(type: :password))
+      end
- -
-
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 380
-def password_field_tag(name = "password", value = nil, options = {})
-  text_field_tag(name, value, options.merge(type: :password))
-end
-
-
- -
+ See on GitHub + + + +

@@ -1356,7 +1357,8 @@

-

+ +

@@ -1401,29 +1403,29 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 491
+      def radio_button_tag(name, value, *args)
+        if args.length >= 3
+          raise ArgumentError, "wrong number of arguments (given #{args.length + 2}, expected 2..4)"
+        end
+        options = args.extract_options!
+        checked = args.empty? ? false : args.first
+        html_options = { "type" => "radio", "name" => name, "id" => "#{sanitize_to_id(name)}_#{sanitize_to_id(value)}", "value" => value }.update(options.stringify_keys)
+        html_options["checked"] = "checked" if checked
+        tag :input, html_options
+      end
- -
-
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 491
-def radio_button_tag(name, value, *args)
-  if args.length >= 3
-    raise ArgumentError, "wrong number of arguments (given #{args.length + 2}, expected 2..4)"
-  end
-  options = args.extract_options!
-  checked = args.empty? ? false : args.first
-  html_options = { "type" => "radio", "name" => name, "id" => "#{sanitize_to_id(name)}_#{sanitize_to_id(value)}", "value" => value }.update(options.stringify_keys)
-  html_options["checked"] = "checked" if checked
-  tag :input, html_options
-end
-
-
- -
+ See on GitHub + + + +

@@ -1447,22 +1449,22 @@

Options

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 937
+      def range_field_tag(name, value = nil, options = {})
+        number_field_tag(name, value, options.merge(type: :range))
+      end
- -
-
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 937
-def range_field_tag(name, value = nil, options = {})
-  number_field_tag(name, value, options.merge(type: :range))
-end
-
-
- -
+ See on GitHub + + + +

@@ -1501,22 +1503,22 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 726
+      def search_field_tag(name, value = nil, options = {})
+        text_field_tag(name, value, options.merge(type: :search))
+      end
- -
-
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 726
-def search_field_tag(name, value = nil, options = {})
-  text_field_tag(name, value, options.merge(type: :search))
-end
-
-
- -
+ See on GitHub + + + +

@@ -1596,44 +1598,44 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 201
+      def select_tag(name, option_tags = nil, options = {})
+        option_tags ||= ""
+        html_name = (options[:multiple] == true && !name.end_with?("[]")) ? "#{name}[]" : name
+
+        if options.include?(:include_blank)
+          include_blank = options[:include_blank]
+          options = options.except(:include_blank)
+          options_for_blank_options_tag = { value: "" }
+
+          if include_blank == true
+            include_blank = ""
+            options_for_blank_options_tag[:label] = " "
+          end
+
+          if include_blank
+            option_tags = content_tag("option", include_blank, options_for_blank_options_tag).safe_concat(option_tags)
+          end
+        end
+
+        if prompt = options.delete(:prompt)
+          option_tags = content_tag("option", prompt, value: "").safe_concat(option_tags)
+        end
+
+        content_tag "select", option_tags, { "name" => html_name, "id" => sanitize_to_id(name) }.update(options.stringify_keys)
+      end
- -
-
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 201
-def select_tag(name, option_tags = nil, options = {})
-  option_tags ||= ""
-  html_name = (options[:multiple] == true && !name.end_with?("[]")) ? "#{name}[]" : name
-
-  if options.include?(:include_blank)
-    include_blank = options[:include_blank]
-    options = options.except(:include_blank)
-    options_for_blank_options_tag = { value: "" }
-
-    if include_blank == true
-      include_blank = ""
-      options_for_blank_options_tag[:label] = " "
-    end
-
-    if include_blank
-      option_tags = content_tag("option", include_blank, options_for_blank_options_tag).safe_concat(option_tags)
-    end
-  end
-
-  if prompt = options.delete(:prompt)
-    option_tags = content_tag("option", prompt, value: "").safe_concat(option_tags)
-  end
-
-  content_tag "select", option_tags, { "name" => html_name, "id" => sanitize_to_id(name) }.update(options.stringify_keys)
-end
-
-
- -
+ See on GitHub + + + +

@@ -1693,25 +1695,25 @@

Deprecated - -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 544
+      def submit_tag(value = "Save changes", options = {})
+        options = options.deep_stringify_keys
+        tag_options = { "type" => "submit", "name" => "commit", "value" => value }.update(options)
+        set_default_disable_with value, tag_options
+        tag :input, tag_options
+      end
- -
-
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 544
-def submit_tag(value = "Save changes", options = {})
-  options = options.deep_stringify_keys
-  tag_options = { "type" => "submit", "name" => "commit", "value" => value }.update(options)
-  set_default_disable_with value, tag_options
-  tag :input, tag_options
-end
-
-
- -

+ See on GitHub + + + +

@@ -1754,22 +1756,22 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 749
+      def telephone_field_tag(name, value = nil, options = {})
+        text_field_tag(name, value, options.merge(type: :tel))
+      end
- -
-
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 749
-def telephone_field_tag(name, value = nil, options = {})
-  text_field_tag(name, value, options.merge(type: :tel))
-end
-
-
- -
+ See on GitHub + + + +

@@ -1825,31 +1827,31 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 413
+      def text_area_tag(name, content = nil, options = {})
+        options = options.stringify_keys
+
+        if size = options.delete("size")
+          options["cols"], options["rows"] = size.split("x") if size.respond_to?(:split)
+        end
+
+        escape = options.delete("escape") { true }
+        content = ERB::Util.html_escape(content) if escape
+
+        content_tag :textarea, content.to_s.html_safe, { "name" => name, "id" => sanitize_to_id(name) }.update(options)
+      end
- -
-
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 413
-def text_area_tag(name, content = nil, options = {})
-  options = options.stringify_keys
-
-  if size = options.delete("size")
-    options["cols"], options["rows"] = size.split("x") if size.respond_to?(:split)
-  end
-
-  escape = options.delete("escape") { true }
-  content = ERB::Util.html_escape(content) if escape
-
-  content_tag :textarea, content.to_s.html_safe, { "name" => name, "id" => sanitize_to_id(name) }.update(options)
-end
-
-
- -
+ See on GitHub + + + +

@@ -1909,22 +1911,22 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 263
+      def text_field_tag(name, value = nil, options = {})
+        tag :input, { "type" => "text", "name" => name, "id" => sanitize_to_id(name), "value" => value }.update(options.stringify_keys)
+      end
- -
-
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 263
-def text_field_tag(name, value = nil, options = {})
-  tag :input, { "type" => "text", "name" => name, "id" => sanitize_to_id(name), "value" => value }.update(options.stringify_keys)
-end
-
-
- -
+ See on GitHub + + + +

@@ -1957,22 +1959,22 @@

Options

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 787
+      def time_field_tag(name, value = nil, options = {})
+        text_field_tag(name, value, options.merge(type: :time))
+      end
- -
-
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 787
-def time_field_tag(name, value = nil, options = {})
-  text_field_tag(name, value, options.merge(type: :time))
-end
-
-
- -
+ See on GitHub + + + +

@@ -2011,22 +2013,22 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 852
+      def url_field_tag(name, value = nil, options = {})
+        text_field_tag(name, value, options.merge(type: :url))
+      end
- -
-
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 852
-def url_field_tag(name, value = nil, options = {})
-  text_field_tag(name, value, options.merge(type: :url))
-end
-
-
- -
+ See on GitHub + + + +

@@ -2046,25 +2048,25 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 943
+      def utf8_enforcer_tag
+        # Use raw HTML to ensure the value is written as an HTML entity; it
+        # needs to be the right character regardless of which encoding the
+        # browser infers.
+        ''.html_safe
+      end
- -
-
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 943
-def utf8_enforcer_tag
-  # Use raw HTML to ensure the value is written as an HTML entity; it
-  # needs to be the right character regardless of which encoding the
-  # browser infers.
-  '<input name="utf8" type="hidden" value="&#x2713;" autocomplete="off" />'.html_safe
-end
-
-
- -

+ See on GitHub + + + +

@@ -2095,22 +2097,22 @@

Options

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 829
+      def week_field_tag(name, value = nil, options = {})
+        text_field_tag(name, value, options.merge(type: :week))
+      end
- -
-
# File actionview/lib/action_view/helpers/form_tag_helper.rb, line 829
-def week_field_tag(name, value = nil, options = {})
-  text_field_tag(name, value, options.merge(type: :week))
-end
-
-
- -
+ See on GitHub + + + + diff --git a/src/classes/ActionView/Helpers/JavaScriptHelper.html b/src/classes/ActionView/Helpers/JavaScriptHelper.html index ae81891ce6..0f796a1a12 100644 --- a/src/classes/ActionView/Helpers/JavaScriptHelper.html +++ b/src/classes/ActionView/Helpers/JavaScriptHelper.html @@ -126,28 +126,28 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/javascript_helper.rb, line 28
+      def escape_javascript(javascript)
+        javascript = javascript.to_s
+        if javascript.empty?
+          result = ""
+        else
+          result = javascript.gsub(/(\\|<\/|\r\n|\342\200\250|\342\200\251|[\n\r"']|[`]|[$])/u, JS_ESCAPE_MAP)
+        end
+        javascript.html_safe? ? result.html_safe : result
+      end
- -
-
# File actionview/lib/action_view/helpers/javascript_helper.rb, line 28
-def escape_javascript(javascript)
-  javascript = javascript.to_s
-  if javascript.empty?
-    result = ""
-  else
-    result = javascript.gsub(/(\\|<\/|\r\n|\342\200\250|\342\200\251|[\n\r"']|[`]|[$])/u, JS_ESCAPE_MAP)
-  end
-  javascript.html_safe? ? result.html_safe : result
-end
-
-
- - + See on GitHub + + + +

@@ -171,7 +171,8 @@

-

+ +

@@ -231,34 +232,34 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/javascript_helper.rb, line 75
+      def javascript_tag(content_or_options_with_block = nil, html_options = {}, &block)
+        content =
+          if block_given?
+            html_options = content_or_options_with_block if content_or_options_with_block.is_a?(Hash)
+            capture(&block)
+          else
+            content_or_options_with_block
+          end
+
+        if html_options[:nonce] == true
+          html_options[:nonce] = content_security_policy_nonce
+        end
+
+        content_tag("script", javascript_cdata_section(content), html_options)
+      end
- -
-
# File actionview/lib/action_view/helpers/javascript_helper.rb, line 75
-def javascript_tag(content_or_options_with_block = nil, html_options = {}, &block)
-  content =
-    if block_given?
-      html_options = content_or_options_with_block if content_or_options_with_block.is_a?(Hash)
-      capture(&block)
-    else
-      content_or_options_with_block
-    end
-
-  if html_options[:nonce] == true
-    html_options[:nonce] = content_security_policy_nonce
-  end
-
-  content_tag("script", javascript_cdata_section(content), html_options)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/Helpers/NumberHelper.html b/src/classes/ActionView/Helpers/NumberHelper.html index 5c2e9b7b1e..6105c20f2c 100644 --- a/src/classes/ActionView/Helpers/NumberHelper.html +++ b/src/classes/ActionView/Helpers/NumberHelper.html @@ -167,22 +167,22 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/number_helper.rb, line 128
+      def number_to_currency(number, options = {})
+        delegate_number_helper_method(:number_to_currency, number, options)
+      end
- -
-
# File actionview/lib/action_view/helpers/number_helper.rb, line 128
-def number_to_currency(number, options = {})
-  delegate_number_helper_method(:number_to_currency, number, options)
-end
-
-
- - + See on GitHub + + + +

@@ -297,22 +297,22 @@

Custom Unit Quan - -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/number_helper.rb, line 405
+      def number_to_human(number, options = {})
+        delegate_number_helper_method(:number_to_human, number, options)
+      end
- -
-
# File actionview/lib/action_view/helpers/number_helper.rb, line 405
-def number_to_human(number, options = {})
-  delegate_number_helper_method(:number_to_human, number, options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -368,22 +368,22 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/number_helper.rb, line 298
+      def number_to_human_size(number, options = {})
+        delegate_number_helper_method(:number_to_human_size, number, options)
+      end
- -
-
# File actionview/lib/action_view/helpers/number_helper.rb, line 298
-def number_to_human_size(number, options = {})
-  delegate_number_helper_method(:number_to_human_size, number, options)
-end
-
-
- -
+ See on GitHub + + + +

@@ -436,22 +436,22 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/number_helper.rb, line 168
+      def number_to_percentage(number, options = {})
+        delegate_number_helper_method(:number_to_percentage, number, options)
+      end
- -
-
# File actionview/lib/action_view/helpers/number_helper.rb, line 168
-def number_to_percentage(number, options = {})
-  delegate_number_helper_method(:number_to_percentage, number, options)
-end
-
-
- -
+ See on GitHub + + + +

@@ -507,26 +507,26 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/number_helper.rb, line 63
+      def number_to_phone(number, options = {})
+        return unless number
+        options = options.symbolize_keys
+
+        parse_float(number, true) if options.delete(:raise)
+        ERB::Util.html_escape(ActiveSupport::NumberHelper.number_to_phone(number, options))
+      end
- -
-
# File actionview/lib/action_view/helpers/number_helper.rb, line 63
-def number_to_phone(number, options = {})
-  return unless number
-  options = options.symbolize_keys
-
-  parse_float(number, true) if options.delete(:raise)
-  ERB::Util.html_escape(ActiveSupport::NumberHelper.number_to_phone(number, options))
-end
-
-
- -
+ See on GitHub + + + +

@@ -578,22 +578,22 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/number_helper.rb, line 207
+      def number_with_delimiter(number, options = {})
+        delegate_number_helper_method(:number_to_delimited, number, options)
+      end
- -
-
# File actionview/lib/action_view/helpers/number_helper.rb, line 207
-def number_with_delimiter(number, options = {})
-  delegate_number_helper_method(:number_to_delimited, number, options)
-end
-
-
- -
+ See on GitHub + + + +

@@ -649,22 +649,22 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/number_helper.rb, line 252
+      def number_with_precision(number, options = {})
+        delegate_number_helper_method(:number_to_rounded, number, options)
+      end
- -
-
# File actionview/lib/action_view/helpers/number_helper.rb, line 252
-def number_with_precision(number, options = {})
-  delegate_number_helper_method(:number_to_rounded, number, options)
-end
-
-
- -
+ See on GitHub + + + + diff --git a/src/classes/ActionView/Helpers/NumberHelper/InvalidNumberError.html b/src/classes/ActionView/Helpers/NumberHelper/InvalidNumberError.html index c1a0f9b16a..d063d4e67e 100644 --- a/src/classes/ActionView/Helpers/NumberHelper/InvalidNumberError.html +++ b/src/classes/ActionView/Helpers/NumberHelper/InvalidNumberError.html @@ -100,22 +100,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/number_helper.rb, line 22
+        def initialize(number)
+          @number = number
+        end
- -
-
# File actionview/lib/action_view/helpers/number_helper.rb, line 22
-def initialize(number)
-  @number = number
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionView/Helpers/OutputSafetyHelper.html b/src/classes/ActionView/Helpers/OutputSafetyHelper.html index 0f065f96ab..59e928e166 100644 --- a/src/classes/ActionView/Helpers/OutputSafetyHelper.html +++ b/src/classes/ActionView/Helpers/OutputSafetyHelper.html @@ -95,22 +95,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/output_safety_helper.rb, line 18
+      def raw(stringish)
+        stringish.to_s.html_safe
+      end
- -
-
# File actionview/lib/action_view/helpers/output_safety_helper.rb, line 18
-def raw(stringish)
-  stringish.to_s.html_safe
-end
-
-
- - + See on GitHub + + + +

@@ -137,24 +137,24 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/output_safety_helper.rb, line 33
+      def safe_join(array, sep = $,)
+        sep = ERB::Util.unwrapped_html_escape(sep)
+
+        array.flatten.map! { |i| ERB::Util.unwrapped_html_escape(i) }.join(sep).html_safe
+      end
- -
-
# File actionview/lib/action_view/helpers/output_safety_helper.rb, line 33
-def safe_join(array, sep = $,)
-  sep = ERB::Util.unwrapped_html_escape(sep)
-
-  array.flatten.map! { |i| ERB::Util.unwrapped_html_escape(i) }.join(sep).html_safe
-end
-
-
- -

+ See on GitHub + + + +

@@ -174,44 +174,44 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/output_safety_helper.rb, line 43
+      def to_sentence(array, options = {})
+        options.assert_valid_keys(:words_connector, :two_words_connector, :last_word_connector, :locale)
+
+        default_connectors = {
+          words_connector: ", ",
+          two_words_connector: " and ",
+          last_word_connector: ", and "
+        }
+        if defined?(I18n)
+          i18n_connectors = I18n.translate(:'support.array', locale: options[:locale], default: {})
+          default_connectors.merge!(i18n_connectors)
+        end
+        options = default_connectors.merge!(options)
+
+        case array.length
+        when 0
+          "".html_safe
+        when 1
+          ERB::Util.html_escape(array[0])
+        when 2
+          safe_join([array[0], array[1]], options[:two_words_connector])
+        else
+          safe_join([safe_join(array[0...-1], options[:words_connector]), options[:last_word_connector], array[-1]], nil)
+        end
+      end
- -
-
# File actionview/lib/action_view/helpers/output_safety_helper.rb, line 43
-def to_sentence(array, options = {})
-  options.assert_valid_keys(:words_connector, :two_words_connector, :last_word_connector, :locale)
-
-  default_connectors = {
-    words_connector: ", ",
-    two_words_connector: " and ",
-    last_word_connector: ", and "
-  }
-  if defined?(I18n)
-    i18n_connectors = I18n.translate(:'support.array', locale: options[:locale], default: {})
-    default_connectors.merge!(i18n_connectors)
-  end
-  options = default_connectors.merge!(options)
-
-  case array.length
-  when 0
-    "".html_safe
-  when 1
-    ERB::Util.html_escape(array[0])
-  when 2
-    safe_join([array[0], array[1]], options[:two_words_connector])
-  else
-    safe_join([safe_join(array[0...-1], options[:words_connector]), options[:last_word_connector], array[-1]], nil)
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/Helpers/RecordTagHelper.html b/src/classes/ActionView/Helpers/RecordTagHelper.html deleted file mode 100644 index aed8216d9d..0000000000 --- a/src/classes/ActionView/Helpers/RecordTagHelper.html +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: ActionView::Helpers::RecordTagHelper -layout: default ---- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActionView/Helpers/RenderingHelper.html b/src/classes/ActionView/Helpers/RenderingHelper.html index 83657d770e..6dae91756c 100644 --- a/src/classes/ActionView/Helpers/RenderingHelper.html +++ b/src/classes/ActionView/Helpers/RenderingHelper.html @@ -129,28 +129,28 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/rendering_helper.rb, line 97
+      def _layout_for(*args, &block)
+        name = args.first
+
+        if block && !name.is_a?(Symbol)
+          capture(*args, &block)
+        else
+          super
+        end
+      end
- -
-
# File actionview/lib/action_view/helpers/rendering_helper.rb, line 97
-def _layout_for(*args, &block)
-  name = args.first
-
-  if block && !name.is_a?(Symbol)
-    capture(*args, &block)
-  else
-    super
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -189,37 +189,37 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/rendering_helper.rb, line 30
+      def render(options = {}, locals = {}, &block)
+        case options
+        when Hash
+          in_rendering_context(options) do |renderer|
+            if block_given?
+              view_renderer.render_partial(self, options.merge(partial: options[:layout]), &block)
+            else
+              view_renderer.render(self, options)
+            end
+          end
+        else
+          if options.respond_to?(:render_in)
+            options.render_in(self, &block)
+          else
+            view_renderer.render_partial(self, partial: options, locals: locals, &block)
+          end
+        end
+      end
- -
-
# File actionview/lib/action_view/helpers/rendering_helper.rb, line 30
-def render(options = {}, locals = {}, &block)
-  case options
-  when Hash
-    in_rendering_context(options) do |renderer|
-      if block_given?
-        view_renderer.render_partial(self, options.merge(partial: options[:layout]), &block)
-      else
-        view_renderer.render(self, options)
-      end
-    end
-  else
-    if options.respond_to?(:render_in)
-      options.render_in(self, &block)
-    else
-      view_renderer.render_partial(self, partial: options, locals: locals, &block)
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/Helpers/SanitizeHelper.html b/src/classes/ActionView/Helpers/SanitizeHelper.html index 72ef22415b..0160f58406 100644 --- a/src/classes/ActionView/Helpers/SanitizeHelper.html +++ b/src/classes/ActionView/Helpers/SanitizeHelper.html @@ -175,22 +175,22 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/sanitize_helper.rb, line 100
+      def sanitize(html, options = {})
+        self.class.safe_list_sanitizer.sanitize(html, options)&.html_safe
+      end
- -
-
# File actionview/lib/action_view/helpers/sanitize_helper.rb, line 100
-def sanitize(html, options = {})
-  self.class.safe_list_sanitizer.sanitize(html, options)&.html_safe
-end
-
-
- - + See on GitHub + + + +

@@ -210,22 +210,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/sanitize_helper.rb, line 105
+      def sanitize_css(style)
+        self.class.safe_list_sanitizer.sanitize_css(style)
+      end
- -
-
# File actionview/lib/action_view/helpers/sanitize_helper.rb, line 105
-def sanitize_css(style)
-  self.class.safe_list_sanitizer.sanitize_css(style)
-end
-
-
- -

+ See on GitHub + + + +
+ See on GitHub + + + +

@@ -306,22 +306,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/sanitize_helper.rb, line 122
+      def strip_tags(html)
+        self.class.full_sanitizer.sanitize(html)&.html_safe
+      end
- -
-
# File actionview/lib/action_view/helpers/sanitize_helper.rb, line 122
-def strip_tags(html)
-  self.class.full_sanitizer.sanitize(html)&.html_safe
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/Helpers/TagHelper.html b/src/classes/ActionView/Helpers/TagHelper.html index 8388281330..c582312de5 100644 --- a/src/classes/ActionView/Helpers/TagHelper.html +++ b/src/classes/ActionView/Helpers/TagHelper.html @@ -202,37 +202,37 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/tag_helper.rb, line 403
+        def build_tag_values(*args)
+          tag_values = []
+
+          args.each do |tag_value|
+            case tag_value
+            when Hash
+              tag_value.each do |key, val|
+                tag_values << key.to_s if val && key.present?
+              end
+            when Array
+              tag_values.concat build_tag_values(*tag_value)
+            else
+              tag_values << tag_value.to_s if tag_value.present?
+            end
+          end
+
+          tag_values
+        end
- -
-
# File actionview/lib/action_view/helpers/tag_helper.rb, line 403
-def build_tag_values(*args)
-  tag_values = []
-
-  args.each do |tag_value|
-    case tag_value
-    when Hash
-      tag_value.each do |key, val|
-        tag_values << key.to_s if val && key.present?
-      end
-    when Array
-      tag_values.concat build_tag_values(*tag_value)
-    else
-      tag_values << tag_value.to_s if tag_value.present?
-    end
-  end
-
-  tag_values
-end
-
-
- - + See on GitHub + + + + @@ -266,23 +266,23 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/tag_helper.rb, line 386
+      def cdata_section(content)
+        splitted = content.to_s.gsub(/\]\]>/, "]]]]>")
+        "".html_safe
+      end
- -
-
# File actionview/lib/action_view/helpers/tag_helper.rb, line 386
-def cdata_section(content)
-  splitted = content.to_s.gsub(/\]\]>/, "]]]]><![CDATA[>")
-  "<![CDATA[#{splitted}]]>".html_safe
-end
-
-
- - + See on GitHub + + + +

@@ -306,7 +306,8 @@

-

+ +

@@ -349,27 +350,27 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/tag_helper.rb, line 346
+      def content_tag(name, content_or_options_with_block = nil, options = nil, escape = true, &block)
+        if block_given?
+          options = content_or_options_with_block if content_or_options_with_block.is_a?(Hash)
+          tag_builder.content_tag_string(name, capture(&block), options, escape)
+        else
+          tag_builder.content_tag_string(name, content_or_options_with_block, options, escape)
+        end
+      end
- -
-
# File actionview/lib/action_view/helpers/tag_helper.rb, line 346
-def content_tag(name, content_or_options_with_block = nil, options = nil, escape = true, &block)
-  if block_given?
-    options = content_or_options_with_block if content_or_options_with_block.is_a?(Hash)
-    tag_builder.content_tag_string(name, capture(&block), options, escape)
-  else
-    tag_builder.content_tag_string(name, content_or_options_with_block, options, escape)
-  end
-end
-
-
- -
+ See on GitHub + + + +

@@ -396,22 +397,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/tag_helper.rb, line 398
+      def escape_once(html)
+        ERB::Util.html_escape_once(html)
+      end
- -
-
# File actionview/lib/action_view/helpers/tag_helper.rb, line 398
-def escape_once(html)
-  ERB::Util.html_escape_once(html)
-end
-
-
- -

+ See on GitHub + + + +

@@ -563,27 +564,27 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/tag_helper.rb, line 309
+      def tag(name = nil, options = nil, open = false, escape = true)
+        if name.nil?
+          tag_builder
+        else
+          name = ERB::Util.xml_name_escape(name) if escape
+          "<#{name}#{tag_builder.tag_options(options, escape) if options}#{open ? ">" : " />"}".html_safe
+        end
+      end
- -
-
# File actionview/lib/action_view/helpers/tag_helper.rb, line 309
-def tag(name = nil, options = nil, open = false, escape = true)
-  if name.nil?
-    tag_builder
-  else
-    name = ERB::Util.xml_name_escape(name) if escape
-    "<#{name}#{tag_builder.tag_options(options, escape) if options}#{open ? ">" : " />"}".html_safe
-  end
-end
-
-
- -
+ See on GitHub + + + +

@@ -619,24 +620,24 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/tag_helper.rb, line 366
+      def token_list(*args)
+        tokens = build_tag_values(*args).flat_map { |value| CGI.unescape_html(value.to_s).split(/\s+/) }.uniq
+
+        safe_join(tokens, " ")
+      end
- -
-
# File actionview/lib/action_view/helpers/tag_helper.rb, line 366
-def token_list(*args)
-  tokens = build_tag_values(*args).flat_map { |value| CGI.unescape_html(value.to_s).split(/\s+/) }.uniq
-
-  safe_join(tokens, " ")
-end
-
-
- -
+ See on GitHub + + + + diff --git a/src/classes/ActionView/Helpers/Tags/ActionText.html b/src/classes/ActionView/Helpers/Tags/ActionText.html index fe82629719..44b5ef073a 100644 --- a/src/classes/ActionView/Helpers/Tags/ActionText.html +++ b/src/classes/ActionView/Helpers/Tags/ActionText.html @@ -81,26 +81,26 @@

- -
+ +
+ + Source code + + +
# File actiontext/app/helpers/action_text/tag_helper.rb, line 49
+    def render
+      options = @options.stringify_keys
+      add_default_name_and_id(options)
+      options["input"] ||= dom_id(object, [options["id"], :trix_input].compact.join("_")) if object
+      html_tag = @template_object.rich_text_area_tag(options.delete("name"), options.fetch("value") { value }, options.except("value"))
+      error_wrapping(html_tag)
+    end
- -
-
# File actiontext/app/helpers/action_text/tag_helper.rb, line 49
-def render
-  options = @options.stringify_keys
-  add_default_name_and_id(options)
-  options["input"] ||= dom_id(object, [options["id"], :trix_input].compact.join("_")) if object
-  html_tag = @template_object.rich_text_area_tag(options.delete("name"), options.fetch("value") { value }, options.except("value"))
-  error_wrapping(html_tag)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionView/Helpers/TextHelper.html b/src/classes/ActionView/Helpers/TextHelper.html index 501ca2e3af..1c833223b8 100644 --- a/src/classes/ActionView/Helpers/TextHelper.html +++ b/src/classes/ActionView/Helpers/TextHelper.html @@ -183,22 +183,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/text_helper.rb, line 59
+      def concat(string)
+        output_buffer << string
+      end
- -
-
# File actionview/lib/action_view/helpers/text_helper.rb, line 59
-def concat(string)
-  output_buffer << string
-end
-
-
- - + See on GitHub + + + +

@@ -227,23 +227,23 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/text_helper.rb, line 398
+      def current_cycle(name = "default")
+        cycle = get_cycle(name)
+        cycle.current_value if cycle
+      end
- -
-
# File actionview/lib/action_view/helpers/text_helper.rb, line 398
-def current_cycle(name = "default")
-  cycle = get_cycle(name)
-  cycle.current_value if cycle
-end
-
-
- -

+ See on GitHub + + + +

@@ -292,31 +292,31 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/text_helper.rb, line 374
+      def cycle(first_value, *values)
+        options = values.extract_options!
+        name = options.fetch(:name, "default")
+
+        values.unshift(*first_value)
+
+        cycle = get_cycle(name)
+        unless cycle && cycle.values == values
+          cycle = set_cycle(name, Cycle.new(*values))
+        end
+        cycle.to_s
+      end
- -
-
# File actionview/lib/action_view/helpers/text_helper.rb, line 374
-def cycle(first_value, *values)
-  options = values.extract_options!
-  name = options.fetch(:name, "default")
-
-  values.unshift(*first_value)
-
-  cycle = get_cycle(name)
-  unless cycle && cycle.values == values
-    cycle = set_cycle(name, Cycle.new(*values))
-  end
-  cycle.to_s
-end
-
-
- -

+ See on GitHub + + + +

@@ -355,50 +355,50 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/text_helper.rb, line 183
+      def excerpt(text, phrase, options = {})
+        return unless text && phrase
+
+        separator = options.fetch(:separator, nil) || ""
+        case phrase
+        when Regexp
+          regex = phrase
+        else
+          regex = /#{Regexp.escape(phrase)}/i
+        end
+
+        return unless matches = text.match(regex)
+        phrase = matches[0]
+
+        unless separator.empty?
+          text.split(separator).each do |value|
+            if value.match?(regex)
+              phrase = value
+              break
+            end
+          end
+        end
+
+        first_part, second_part = text.split(phrase, 2)
+
+        prefix, first_part   = cut_excerpt_part(:first, first_part, separator, options)
+        postfix, second_part = cut_excerpt_part(:second, second_part, separator, options)
+
+        affix = [first_part, separator, phrase, separator, second_part].join.strip
+        [prefix, affix, postfix].join
+      end
- -
-
# File actionview/lib/action_view/helpers/text_helper.rb, line 183
-def excerpt(text, phrase, options = {})
-  return unless text && phrase
-
-  separator = options.fetch(:separator, nil) || ""
-  case phrase
-  when Regexp
-    regex = phrase
-  else
-    regex = /#{Regexp.escape(phrase)}/i
-  end
-
-  return unless matches = text.match(regex)
-  phrase = matches[0]
-
-  unless separator.empty?
-    text.split(separator).each do |value|
-      if value.match?(regex)
-        phrase = value
-        break
-      end
-    end
-  end
-
-  first_part, second_part = text.split(phrase, 2)
-
-  prefix, first_part   = cut_excerpt_part(:first, first_part, separator, options)
-  postfix, second_part = cut_excerpt_part(:second, second_part, separator, options)
-
-  affix = [first_part, separator, phrase, separator, second_part].join.strip
-  [prefix, affix, postfix].join
-end
-
-
- -

+ See on GitHub + + + +

@@ -440,40 +440,40 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/text_helper.rb, line 137
+      def highlight(text, phrases, options = {}, &block)
+        text = sanitize(text) if options.fetch(:sanitize, true)
+
+        if text.blank? || phrases.blank?
+          text || ""
+        else
+          patterns = Array(phrases).map { |phrase| Regexp === phrase ? phrase : Regexp.escape(phrase) }
+          pattern = /(#{patterns.join("|")})/i
+          highlighter = options.fetch(:highlighter, '\1') unless block
+
+          text.scan(/<[^>]*|[^<]+/).each do |segment|
+            if !segment.start_with?("<")
+              if block
+                segment.gsub!(pattern, &block)
+              else
+                segment.gsub!(pattern, highlighter)
+              end
+            end
+          end.join
+        end.html_safe
+      end
- -
-
# File actionview/lib/action_view/helpers/text_helper.rb, line 137
-def highlight(text, phrases, options = {}, &block)
-  text = sanitize(text) if options.fetch(:sanitize, true)
-
-  if text.blank? || phrases.blank?
-    text || ""
-  else
-    patterns = Array(phrases).map { |phrase| Regexp === phrase ? phrase : Regexp.escape(phrase) }
-    pattern = /(#{patterns.join("|")})/i
-    highlighter = options.fetch(:highlighter, '<mark>\1</mark>') unless block
-
-    text.scan(/<[^>]*|[^<]+/).each do |segment|
-      if !segment.start_with?("<")
-        if block
-          segment.gsub!(pattern, &block)
-        else
-          segment.gsub!(pattern, highlighter)
-        end
-      end
-    end.join
-  end.html_safe
-end
-
-
- -

+ See on GitHub + + + +

@@ -511,28 +511,28 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/text_helper.rb, line 238
+      def pluralize(count, singular, plural_arg = nil, plural: plural_arg, locale: I18n.locale)
+        word = if count == 1 || count.to_s.match?(/^1(\.0+)?$/)
+          singular
+        else
+          plural || singular.pluralize(locale)
+        end
+
+        "#{count || 0} #{word}"
+      end
- -
-
# File actionview/lib/action_view/helpers/text_helper.rb, line 238
-def pluralize(count, singular, plural_arg = nil, plural: plural_arg, locale: I18n.locale)
-  word = if count == 1 || count.to_s.match?(/^1(\.0+)?$/)
-    singular
-  else
-    plural || singular.pluralize(locale)
-  end
-
-  "#{count || 0} #{word}"
-end
-
-
- -

+ See on GitHub + + + +

@@ -569,23 +569,23 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/text_helper.rb, line 421
+      def reset_cycle(name = "default")
+        cycle = get_cycle(name)
+        cycle.reset if cycle
+      end
- -
-
# File actionview/lib/action_view/helpers/text_helper.rb, line 421
-def reset_cycle(name = "default")
-  cycle = get_cycle(name)
-  cycle.reset if cycle
-end
-
-
- -

+ See on GitHub + + + +

@@ -605,22 +605,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/text_helper.rb, line 63
+      def safe_concat(string)
+        output_buffer.respond_to?(:safe_concat) ? output_buffer.safe_concat(string) : concat(string)
+      end
- -
-
# File actionview/lib/action_view/helpers/text_helper.rb, line 63
-def safe_concat(string)
-  output_buffer.respond_to?(:safe_concat) ? output_buffer.safe_concat(string) : concat(string)
-end
-
-
- -

+ See on GitHub + + + +

@@ -679,33 +679,33 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/text_helper.rb, line 322
+      def simple_format(text, html_options = {}, options = {})
+        wrapper_tag = options[:wrapper_tag] || "p"
+
+        text = sanitize(text, options.fetch(:sanitize_options, {})) if options.fetch(:sanitize, true)
+        paragraphs = split_paragraphs(text)
+
+        if paragraphs.empty?
+          content_tag(wrapper_tag, nil, html_options)
+        else
+          paragraphs.map! { |paragraph|
+            content_tag(wrapper_tag, raw(paragraph), html_options)
+          }.join("\n\n").html_safe
+        end
+      end
- -
-
# File actionview/lib/action_view/helpers/text_helper.rb, line 322
-def simple_format(text, html_options = {}, options = {})
-  wrapper_tag = options[:wrapper_tag] || "p"
-
-  text = sanitize(text, options.fetch(:sanitize_options, {})) if options.fetch(:sanitize, true)
-  paragraphs = split_paragraphs(text)
-
-  if paragraphs.empty?
-    content_tag(wrapper_tag, nil, html_options)
-  else
-    paragraphs.map! { |paragraph|
-      content_tag(wrapper_tag, raw(paragraph), html_options)
-    }.join("\n\n").html_safe
-  end
-end
-
-
- -
+ See on GitHub + + + +

@@ -753,29 +753,29 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/text_helper.rb, line 99
+      def truncate(text, options = {}, &block)
+        if text
+          length  = options.fetch(:length, 30)
+
+          content = text.truncate(length, options)
+          content = options[:escape] == false ? content.html_safe : ERB::Util.html_escape(content)
+          content << capture(&block) if block_given? && text.length > length
+          content
+        end
+      end
- -
-
# File actionview/lib/action_view/helpers/text_helper.rb, line 99
-def truncate(text, options = {}, &block)
-  if text
-    length  = options.fetch(:length, 30)
-
-    content = text.truncate(length, options)
-    content = options[:escape] == false ? content.html_safe : ERB::Util.html_escape(content)
-    content << capture(&block) if block_given? && text.length > length
-    content
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -813,32 +813,32 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/text_helper.rb, line 268
+      def word_wrap(text, line_width: 80, break_sequence: "\n")
+        # Match up to `line_width` characters, followed by one of
+        #   (1) non-newline whitespace plus an optional newline
+        #   (2) the end of the string, ignoring any trailing newlines
+        #   (3) a newline
+        #
+        # -OR-
+        #
+        # Match an empty line
+        pattern = /(.{1,#{line_width}})(?:[^\S\n]+\n?|\n*\Z|\n)|\n/
+
+        text.gsub(pattern, "\\1#{break_sequence}").chomp!(break_sequence)
+      end
- -
-
# File actionview/lib/action_view/helpers/text_helper.rb, line 268
-def word_wrap(text, line_width: 80, break_sequence: "\n")
-  # Match up to `line_width` characters, followed by one of
-  #   (1) non-newline whitespace plus an optional newline
-  #   (2) the end of the string, ignoring any trailing newlines
-  #   (3) a newline
-  #
-  # -OR-
-  #
-  # Match an empty line
-  pattern = /(.{1,#{line_width}})(?:[^\S\n]+\n?|\n*\Z|\n)|\n/
-
-  text.gsub(pattern, "\\1#{break_sequence}").chomp!(break_sequence)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/Helpers/TranslationHelper.html b/src/classes/ActionView/Helpers/TranslationHelper.html index 57b1b52155..ab471860da 100644 --- a/src/classes/ActionView/Helpers/TranslationHelper.html +++ b/src/classes/ActionView/Helpers/TranslationHelper.html @@ -125,7 +125,8 @@

- + +

@@ -151,22 +152,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/translation_helper.rb, line 116
+      def localize(object, **options)
+        I18n.localize(object, **options)
+      end
- -
-
# File actionview/lib/action_view/helpers/translation_helper.rb, line 116
-def localize(object, **options)
-  I18n.localize(object, **options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -190,7 +191,8 @@

-

+ +

@@ -247,56 +249,56 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/translation_helper.rb, line 73
+      def translate(key, **options)
+        return key.map { |k| translate(k, **options) } if key.is_a?(Array)
+        key = key&.to_s unless key.is_a?(Symbol)
+
+        alternatives = if options.key?(:default)
+          options[:default].is_a?(Array) ? options.delete(:default).compact : [options.delete(:default)]
+        end
+
+        options[:raise] = true if options[:raise].nil? && TranslationHelper.raise_on_missing_translations
+        default = MISSING_TRANSLATION
+
+        translation = while key || alternatives.present?
+          if alternatives.blank? && !options[:raise].nil?
+            default = NO_DEFAULT # let I18n handle missing translation
+          end
+
+          key = scope_key_by_partial(key)
+
+          translated = ActiveSupport::HtmlSafeTranslation.translate(key, **options, default: default)
+
+          break translated unless translated == MISSING_TRANSLATION
+
+          if alternatives.present? && !alternatives.first.is_a?(Symbol)
+            break alternatives.first && I18n.translate(nil, **options, default: alternatives)
+          end
+
+          first_key ||= key
+          key = alternatives&.shift
+        end
+
+        if key.nil? && !first_key.nil?
+          translation = missing_translation(first_key, options)
+          key = first_key
+        end
+
+        block_given? ? yield(translation, key) : translation
+      end
- -
-
# File actionview/lib/action_view/helpers/translation_helper.rb, line 73
-def translate(key, **options)
-  return key.map { |k| translate(k, **options) } if key.is_a?(Array)
-  key = key&.to_s unless key.is_a?(Symbol)
-
-  alternatives = if options.key?(:default)
-    options[:default].is_a?(Array) ? options.delete(:default).compact : [options.delete(:default)]
-  end
-
-  options[:raise] = true if options[:raise].nil? && TranslationHelper.raise_on_missing_translations
-  default = MISSING_TRANSLATION
-
-  translation = while key || alternatives.present?
-    if alternatives.blank? && !options[:raise].nil?
-      default = NO_DEFAULT # let I18n handle missing translation
-    end
-
-    key = scope_key_by_partial(key)
-
-    translated = ActiveSupport::HtmlSafeTranslation.translate(key, **options, default: default)
-
-    break translated unless translated == MISSING_TRANSLATION
-
-    if alternatives.present? && !alternatives.first.is_a?(Symbol)
-      break alternatives.first && I18n.translate(nil, **options, default: alternatives)
-    end
-
-    first_key ||= key
-    key = alternatives&.shift
-  end
-
-  if key.nil? && !first_key.nil?
-    translation = missing_translation(first_key, options)
-    key = first_key
-  end
-
-  block_given? ? yield(translation, key) : translation
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/Helpers/UrlHelper.html b/src/classes/ActionView/Helpers/UrlHelper.html index a553254a53..69d63628e4 100644 --- a/src/classes/ActionView/Helpers/UrlHelper.html +++ b/src/classes/ActionView/Helpers/UrlHelper.html @@ -194,7 +194,8 @@

- + +

@@ -315,74 +316,74 @@

Rails UJS Examples
- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/url_helper.rb, line 357
+      def button_to(name = nil, options = nil, html_options = nil, &block)
+        html_options, options = options, name if block_given?
+        html_options ||= {}
+        html_options = html_options.stringify_keys
+
+        url =
+          case options
+          when FalseClass then nil
+          else url_for(options)
+          end
+
+        remote = html_options.delete("remote")
+        params = html_options.delete("params")
+
+        authenticity_token = html_options.delete("authenticity_token")
+
+        method     = (html_options.delete("method").presence || method_for_options(options)).to_s
+        method_tag = BUTTON_TAG_METHOD_VERBS.include?(method) ? method_tag(method) : "".html_safe
+
+        form_method  = method == "get" ? "get" : "post"
+        form_options = html_options.delete("form") || {}
+        form_options[:class] ||= html_options.delete("form_class") || "button_to"
+        form_options[:method] = form_method
+        form_options[:action] = url
+        form_options[:'data-remote'] = true if remote
+
+        request_token_tag = if form_method == "post"
+          request_method = method.empty? ? "post" : method
+          token_tag(authenticity_token, form_options: { action: url, method: request_method })
+        else
+          ""
+        end
+
+        html_options = convert_options_to_data_attributes(options, html_options)
+        html_options["type"] = "submit"
+
+        button = if block_given?
+          content_tag("button", html_options, &block)
+        elsif button_to_generates_button_tag
+          content_tag("button", name || url, html_options, &block)
+        else
+          html_options["value"] = name || url
+          tag("input", html_options)
+        end
+
+        inner_tags = method_tag.safe_concat(button).safe_concat(request_token_tag)
+        if params
+          to_form_params(params).each do |param|
+            inner_tags.safe_concat tag(:input, type: "hidden", name: param[:name], value: param[:value],
+                                       autocomplete: "off")
+          end
+        end
+        html = content_tag("form", inner_tags, form_options)
+        prevent_content_exfiltration(html)
+      end
- -
-
# File actionview/lib/action_view/helpers/url_helper.rb, line 357
-def button_to(name = nil, options = nil, html_options = nil, &block)
-  html_options, options = options, name if block_given?
-  html_options ||= {}
-  html_options = html_options.stringify_keys
-
-  url =
-    case options
-    when FalseClass then nil
-    else url_for(options)
-    end
-
-  remote = html_options.delete("remote")
-  params = html_options.delete("params")
-
-  authenticity_token = html_options.delete("authenticity_token")
-
-  method     = (html_options.delete("method").presence || method_for_options(options)).to_s
-  method_tag = BUTTON_TAG_METHOD_VERBS.include?(method) ? method_tag(method) : "".html_safe
-
-  form_method  = method == "get" ? "get" : "post"
-  form_options = html_options.delete("form") || {}
-  form_options[:class] ||= html_options.delete("form_class") || "button_to"
-  form_options[:method] = form_method
-  form_options[:action] = url
-  form_options[:'data-remote'] = true if remote
-
-  request_token_tag = if form_method == "post"
-    request_method = method.empty? ? "post" : method
-    token_tag(authenticity_token, form_options: { action: url, method: request_method })
-  else
-    ""
-  end
-
-  html_options = convert_options_to_data_attributes(options, html_options)
-  html_options["type"] = "submit"
-
-  button = if block_given?
-    content_tag("button", html_options, &block)
-  elsif button_to_generates_button_tag
-    content_tag("button", name || url, html_options, &block)
-  else
-    html_options["value"] = name || url
-    tag("input", html_options)
-  end
-
-  inner_tags = method_tag.safe_concat(button).safe_concat(request_token_tag)
-  if params
-    to_form_params(params).each do |param|
-      inner_tags.safe_concat tag(:input, type: "hidden", name: param[:name], value: param[:value],
-                                 autocomplete: "off")
-    end
-  end
-  html = content_tag("form", inner_tags, form_options)
-  prevent_content_exfiltration(html)
-end
-
-
- -
+ See on GitHub + + + +

@@ -452,48 +453,48 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/url_helper.rb, line 609
+      def current_page?(options = nil, check_parameters: false, **options_as_kwargs)
+        unless request
+          raise "You cannot use helpers that need to determine the current " \
+                "page unless your view context provides a Request object " \
+                "in a #request method"
+        end
+
+        return false unless request.get? || request.head?
+
+        options ||= options_as_kwargs
+        check_parameters ||= options.is_a?(Hash) && options.delete(:check_parameters)
+        url_string = URI::DEFAULT_PARSER.unescape(url_for(options)).force_encoding(Encoding::BINARY)
+
+        # We ignore any extra parameters in the request_uri if the
+        # submitted URL doesn't have any either. This lets the function
+        # work with things like ?order=asc
+        # the behavior can be disabled with check_parameters: true
+        request_uri = url_string.index("?") || check_parameters ? request.fullpath : request.path
+        request_uri = URI::DEFAULT_PARSER.unescape(request_uri).force_encoding(Encoding::BINARY)
+
+        if %r{^\w+://}.match?(url_string)
+          request_uri = +"#{request.protocol}#{request.host_with_port}#{request_uri}"
+        end
+
+        remove_trailing_slash!(url_string)
+        remove_trailing_slash!(request_uri)
+
+        url_string == request_uri
+      end
- -
-
# File actionview/lib/action_view/helpers/url_helper.rb, line 609
-def current_page?(options = nil, check_parameters: false, **options_as_kwargs)
-  unless request
-    raise "You cannot use helpers that need to determine the current " \
-          "page unless your view context provides a Request object " \
-          "in a #request method"
-  end
-
-  return false unless request.get? || request.head?
-
-  options ||= options_as_kwargs
-  check_parameters ||= options.is_a?(Hash) && options.delete(:check_parameters)
-  url_string = URI::DEFAULT_PARSER.unescape(url_for(options)).force_encoding(Encoding::BINARY)
-
-  # We ignore any extra parameters in the request_uri if the
-  # submitted URL doesn't have any either. This lets the function
-  # work with things like ?order=asc
-  # the behavior can be disabled with check_parameters: true
-  request_uri = url_string.index("?") || check_parameters ? request.fullpath : request.path
-  request_uri = URI::DEFAULT_PARSER.unescape(request_uri).force_encoding(Encoding::BINARY)
-
-  if %r{^\w+://}.match?(url_string)
-    request_uri = +"#{request.protocol}#{request.host_with_port}#{request_uri}"
-  end
-
-  remove_trailing_slash!(url_string)
-  remove_trailing_slash!(request_uri)
-
-  url_string == request_uri
-end
-
-
- -
+ See on GitHub + + + +
- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/url_helper.rb, line 234
+      def link_to(name = nil, options = nil, html_options = nil, &block)
+        html_options, options, name = options, name, block if block_given?
+        options ||= {}
+
+        html_options = convert_options_to_data_attributes(options, html_options)
+
+        url = url_target(name, options)
+        html_options["href"] ||= url
+
+        content_tag("a", name || url, html_options, &block)
+      end
- - -
- -
+ See on GitHub + + + +
- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/url_helper.rb, line 498
+      def link_to_if(condition, name, options = {}, html_options = {}, &block)
+        if condition
+          link_to(name, options, html_options)
+        else
+          if block_given?
+            block.arity <= 1 ? capture(name, &block) : capture(name, options, html_options, &block)
+          else
+            ERB::Util.html_escape(name)
+          end
+        end
+      end
- - -
- -
+ See on GitHub + + + +
- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/url_helper.rb, line 475
+      def link_to_unless(condition, name, options = {}, html_options = {}, &block)
+        link_to_if !condition, name, options, html_options, &block
+      end
- - -
- -
+ See on GitHub + + + +
- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/url_helper.rb, line 451
+      def link_to_unless_current(name, options = {}, html_options = {}, &block)
+        link_to_unless current_page?(options), name, options, html_options, &block
+      end
- - -
- -
+ See on GitHub + + + +

@@ -940,34 +941,34 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/url_helper.rb, line 548
+      def mail_to(email_address, name = nil, html_options = {}, &block)
+        html_options, name = name, nil if name.is_a?(Hash)
+        html_options = (html_options || {}).stringify_keys
+
+        extras = %w{ cc bcc body subject reply_to }.map! { |item|
+          option = html_options.delete(item).presence || next
+          "#{item.dasherize}=#{ERB::Util.url_encode(option)}"
+        }.compact
+        extras = extras.empty? ? "" : "?" + extras.join("&")
+
+        encoded_email_address = ERB::Util.url_encode(email_address).gsub("%40", "@")
+        html_options["href"] = "mailto:#{encoded_email_address}#{extras}"
+
+        content_tag("a", name || email_address, html_options, &block)
+      end
- -
-
# File actionview/lib/action_view/helpers/url_helper.rb, line 548
-def mail_to(email_address, name = nil, html_options = {}, &block)
-  html_options, name = name, nil if name.is_a?(Hash)
-  html_options = (html_options || {}).stringify_keys
-
-  extras = %w{ cc bcc body subject reply_to }.map! { |item|
-    option = html_options.delete(item).presence || next
-    "#{item.dasherize}=#{ERB::Util.url_encode(option)}"
-  }.compact
-  extras = extras.empty? ? "" : "?" + extras.join("&")
-
-  encoded_email_address = ERB::Util.url_encode(email_address).gsub("%40", "@")
-  html_options["href"] = "mailto:#{encoded_email_address}#{extras}"
-
-  content_tag("a", name || email_address, html_options, &block)
-end
-
-
- -
+ See on GitHub + + + +

@@ -1020,31 +1021,31 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/url_helper.rb, line 743
+      def phone_to(phone_number, name = nil, html_options = {}, &block)
+        html_options, name = name, nil if name.is_a?(Hash)
+        html_options = (html_options || {}).stringify_keys
+
+        country_code = html_options.delete("country_code").presence
+        country_code = country_code.nil? ? "" : "+#{ERB::Util.url_encode(country_code)}"
+
+        encoded_phone_number = ERB::Util.url_encode(phone_number)
+        html_options["href"] = "tel:#{country_code}#{encoded_phone_number}"
+
+        content_tag("a", name || phone_number, html_options, &block)
+      end
- -
-
# File actionview/lib/action_view/helpers/url_helper.rb, line 743
-def phone_to(phone_number, name = nil, html_options = {}, &block)
-  html_options, name = name, nil if name.is_a?(Hash)
-  html_options = (html_options || {}).stringify_keys
-
-  country_code = html_options.delete("country_code").presence
-  country_code = country_code.nil? ? "" : "+#{ERB::Util.url_encode(country_code)}"
-
-  encoded_phone_number = ERB::Util.url_encode(phone_number)
-  html_options["href"] = "tel:#{country_code}#{encoded_phone_number}"
-
-  content_tag("a", name || phone_number, html_options, &block)
-end
-
-
- -
+ See on GitHub + + + +

@@ -1102,34 +1103,34 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/url_helper.rb, line 692
+      def sms_to(phone_number, name = nil, html_options = {}, &block)
+        html_options, name = name, nil if name.is_a?(Hash)
+        html_options = (html_options || {}).stringify_keys
+
+        country_code = html_options.delete("country_code").presence
+        country_code = country_code ? "+#{ERB::Util.url_encode(country_code)}" : ""
+
+        body = html_options.delete("body").presence
+        body = body ? "?&body=#{ERB::Util.url_encode(body)}" : ""
+
+        encoded_phone_number = ERB::Util.url_encode(phone_number)
+        html_options["href"] = "sms:#{country_code}#{encoded_phone_number};#{body}"
+
+        content_tag("a", name || phone_number, html_options, &block)
+      end
- -
-
# File actionview/lib/action_view/helpers/url_helper.rb, line 692
-def sms_to(phone_number, name = nil, html_options = {}, &block)
-  html_options, name = name, nil if name.is_a?(Hash)
-  html_options = (html_options || {}).stringify_keys
-
-  country_code = html_options.delete("country_code").presence
-  country_code = country_code ? "+#{ERB::Util.url_encode(country_code)}" : ""
-
-  body = html_options.delete("body").presence
-  body = body ? "?&body=#{ERB::Util.url_encode(body)}" : ""
-
-  encoded_phone_number = ERB::Util.url_encode(phone_number)
-  html_options["href"] = "sms:#{country_code}#{encoded_phone_number};#{body}"
-
-  content_tag("a", name || phone_number, html_options, &block)
-end
-
-
- -
+ See on GitHub + + + + diff --git a/src/classes/ActionView/Helpers/UrlHelper/ClassMethods.html b/src/classes/ActionView/Helpers/UrlHelper/ClassMethods.html index a8d5758592..4b38a1435b 100644 --- a/src/classes/ActionView/Helpers/UrlHelper/ClassMethods.html +++ b/src/classes/ActionView/Helpers/UrlHelper/ClassMethods.html @@ -75,22 +75,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/helpers/url_helper.rb, line 30
+        def _url_for_modules
+          ActionView::RoutingUrlFor
+        end
- -
-
# File actionview/lib/action_view/helpers/url_helper.rb, line 30
-def _url_for_modules
-  ActionView::RoutingUrlFor
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionView/Layouts.html b/src/classes/ActionView/Layouts.html index 20ebe2acb0..a09159c1d9 100644 --- a/src/classes/ActionView/Layouts.html +++ b/src/classes/ActionView/Layouts.html @@ -307,22 +307,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/layouts.rb, line 374
+    def action_has_layout?
+      @_action_has_layout
+    end
- -
-
# File actionview/lib/action_view/layouts.rb, line 374
-def action_has_layout?
-  @_action_has_layout
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionView/Layouts/ClassMethods.html b/src/classes/ActionView/Layouts/ClassMethods.html index a90fb01cee..e70bb6bbc6 100644 --- a/src/classes/ActionView/Layouts/ClassMethods.html +++ b/src/classes/ActionView/Layouts/ClassMethods.html @@ -110,28 +110,28 @@

Options (conditions)

+ +
+ + Source code + + +
# File actionview/lib/action_view/layouts.rb, line 271
+      def layout(layout, conditions = {})
+        include LayoutConditions unless conditions.empty?
+
+        conditions.each { |k, v| conditions[k] = Array(v).map(&:to_s) }
+        self._layout_conditions = conditions
+
+        self._layout = layout
+        _write_layout_method
+      end
- -
-
# File actionview/lib/action_view/layouts.rb, line 271
-def layout(layout, conditions = {})
-  include LayoutConditions unless conditions.empty?
-
-  conditions.each { |k, v| conditions[k] = Array(v).map(&:to_s) }
-  self._layout_conditions = conditions
-
-  self._layout = layout
-  _write_layout_method
-end
-
- - - + See on GitHub + +
+ + diff --git a/src/classes/ActionView/LogSubscriber.html b/src/classes/ActionView/LogSubscriber.html index f5d99e27ee..de58dce797 100644 --- a/src/classes/ActionView/LogSubscriber.html +++ b/src/classes/ActionView/LogSubscriber.html @@ -134,25 +134,25 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/log_subscriber.rb, line 101
+    def self.attach_to(*)
+      ActiveSupport::Notifications.subscribe("render_template.action_view", ActionView::LogSubscriber::Start.new)
+      ActiveSupport::Notifications.subscribe("render_layout.action_view", ActionView::LogSubscriber::Start.new)
+
+      super
+    end
- -
-
# File actionview/lib/action_view/log_subscriber.rb, line 101
-def self.attach_to(*)
-  ActiveSupport::Notifications.subscribe("render_template.action_view", ActionView::LogSubscriber::Start.new)
-  ActiveSupport::Notifications.subscribe("render_layout.action_view", ActionView::LogSubscriber::Start.new)
-
-  super
-end
-
-
- - + See on GitHub + + + +

@@ -172,23 +172,23 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/log_subscriber.rb, line 12
+    def initialize
+      @root = nil
+      super
+    end
- -
-
# File actionview/lib/action_view/log_subscriber.rb, line 12
-def initialize
-  @root = nil
-  super
-end
-
-
- -

+ See on GitHub + + + + @@ -212,29 +212,29 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/log_subscriber.rb, line 45
+    def render_collection(event)
+      identifier = event.payload[:identifier] || "templates"
+
+      debug do
+        message = +"  Rendered collection of #{from_rails_root(identifier)}"
+        message << " within #{from_rails_root(event.payload[:layout])}" if event.payload[:layout]
+        message << " #{render_count(event.payload)} (Duration: #{event.duration.round(1)}ms | Allocations: #{event.allocations})"
+        message
+      end
+    end
- -
-
# File actionview/lib/action_view/log_subscriber.rb, line 45
-def render_collection(event)
-  identifier = event.payload[:identifier] || "templates"
-
-  debug do
-    message = +"  Rendered collection of #{from_rails_root(identifier)}"
-    message << " within #{from_rails_root(event.payload[:layout])}" if event.payload[:layout]
-    message << " #{render_count(event.payload)} (Duration: #{event.duration.round(1)}ms | Allocations: #{event.allocations})"
-    message
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -254,25 +254,25 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/log_subscriber.rb, line 37
+    def render_layout(event)
+      info do
+        message = +"  Rendered layout #{from_rails_root(event.payload[:identifier])}"
+        message << " (Duration: #{event.duration.round(1)}ms | Allocations: #{event.allocations})"
+      end
+    end
- -
-
# File actionview/lib/action_view/log_subscriber.rb, line 37
-def render_layout(event)
-  info do
-    message = +"  Rendered layout #{from_rails_root(event.payload[:identifier])}"
-    message << " (Duration: #{event.duration.round(1)}ms | Allocations: #{event.allocations})"
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -292,28 +292,28 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/log_subscriber.rb, line 26
+    def render_partial(event)
+      debug do
+        message = +"  Rendered #{from_rails_root(event.payload[:identifier])}"
+        message << " within #{from_rails_root(event.payload[:layout])}" if event.payload[:layout]
+        message << " (Duration: #{event.duration.round(1)}ms | Allocations: #{event.allocations})"
+        message << " #{cache_message(event.payload)}" unless event.payload[:cache_hit].nil?
+        message
+      end
+    end
- -
-
# File actionview/lib/action_view/log_subscriber.rb, line 26
-def render_partial(event)
-  debug do
-    message = +"  Rendered #{from_rails_root(event.payload[:identifier])}"
-    message << " within #{from_rails_root(event.payload[:layout])}" if event.payload[:layout]
-    message << " (Duration: #{event.duration.round(1)}ms | Allocations: #{event.allocations})"
-    message << " #{cache_message(event.payload)}" unless event.payload[:cache_hit].nil?
-    message
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -333,26 +333,26 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/log_subscriber.rb, line 17
+    def render_template(event)
+      info do
+        message = +"  Rendered #{from_rails_root(event.payload[:identifier])}"
+        message << " within #{from_rails_root(event.payload[:layout])}" if event.payload[:layout]
+        message << " (Duration: #{event.duration.round(1)}ms | Allocations: #{event.allocations})"
+      end
+    end
- -
-
# File actionview/lib/action_view/log_subscriber.rb, line 17
-def render_template(event)
-  info do
-    message = +"  Rendered #{from_rails_root(event.payload[:identifier])}"
-    message << " within #{from_rails_root(event.payload[:layout])}" if event.payload[:layout]
-    message << " (Duration: #{event.duration.round(1)}ms | Allocations: #{event.allocations})"
-  end
-end
-
-
- -

+ See on GitHub + + + +

Instance Private methods

@@ -375,27 +375,27 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/log_subscriber.rb, line 117
+    def cache_message(payload) # :doc:
+      case payload[:cache_hit]
+      when :hit
+        "[cache hit]"
+      when :miss
+        "[cache miss]"
+      end
+    end
- -
-
# File actionview/lib/action_view/log_subscriber.rb, line 117
-def cache_message(payload) # :doc:
-  case payload[:cache_hit]
-  when :hit
-    "[cache hit]"
-  when :miss
-    "[cache miss]"
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -415,26 +415,26 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/log_subscriber.rb, line 109
+    def render_count(payload) # :doc:
+      if payload[:cache_hits]
+        "[#{payload[:cache_hits]} / #{payload[:count]} cache hits]"
+      else
+        "[#{payload[:count]} times]"
+      end
+    end
- -
-
# File actionview/lib/action_view/log_subscriber.rb, line 109
-def render_count(payload) # :doc:
-  if payload[:cache_hits]
-    "[#{payload[:cache_hits]} / #{payload[:count]} cache hits]"
-  else
-    "[#{payload[:count]} times]"
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/LookupContext/DetailsCache.html b/src/classes/ActionView/LookupContext/DetailsCache.html index af51861ee7..15311e2759 100644 --- a/src/classes/ActionView/LookupContext/DetailsCache.html +++ b/src/classes/ActionView/LookupContext/DetailsCache.html @@ -99,25 +99,25 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/lookup_context.rb, line 108
+      def disable_cache
+        old_value, @cache = @cache, false
+        yield
+      ensure
+        @cache = old_value
+      end
- -
-
# File actionview/lib/action_view/lookup_context.rb, line 108
-def disable_cache
-  old_value, @cache = @cache, false
-  yield
-ensure
-  @cache = old_value
-end
-
-
- - + See on GitHub + + + +

Instance Private methods

@@ -140,25 +140,25 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/lookup_context.rb, line 116
+      def _set_detail(key, value) # :doc:
+        @details = @details.dup if @digest_cache || @details_key
+        @digest_cache = nil
+        @details_key = nil
+        @details[key] = value
+      end
- -
-
# File actionview/lib/action_view/lookup_context.rb, line 116
-def _set_detail(key, value) # :doc:
-  @details = @details.dup if @digest_cache || @details_key
-  @digest_cache = nil
-  @details_key = nil
-  @details[key] = value
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionView/LookupContext/ViewPaths.html b/src/classes/ActionView/LookupContext/ViewPaths.html index 7ad8656e19..35e5f9dfe2 100644 --- a/src/classes/ActionView/LookupContext/ViewPaths.html +++ b/src/classes/ActionView/LookupContext/ViewPaths.html @@ -143,24 +143,24 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/lookup_context.rb, line 148
+      def any?(name, prefixes = [], partial = false)
+        name, prefixes = normalize_name(name, prefixes)
+        details, details_key = detail_args_for_any
+        @view_paths.exists?(name, prefixes, partial, details, details_key, [])
+      end
- -
-
# File actionview/lib/action_view/lookup_context.rb, line 148
-def any?(name, prefixes = [], partial = false)
-  name, prefixes = normalize_name(name, prefixes)
-  details, details_key = detail_args_for_any
-  @view_paths.exists?(name, prefixes, partial, details, details_key, [])
-end
-
-
- - + See on GitHub + + + +

@@ -184,7 +184,8 @@

-

+ +

@@ -204,22 +205,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/lookup_context.rb, line 155
+      def append_view_paths(paths)
+        @view_paths = build_view_paths(@view_paths.to_a + paths)
+      end
- -
-
# File actionview/lib/action_view/lookup_context.rb, line 155
-def append_view_paths(paths)
-  @view_paths = build_view_paths(@view_paths.to_a + paths)
-end
-
-
- -

+ See on GitHub + + + +

@@ -243,24 +244,24 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/lookup_context.rb, line 141
+      def exists?(name, prefixes = [], partial = false, keys = [], **options)
+        name, prefixes = normalize_name(name, prefixes)
+        details, details_key = detail_args_for(options)
+        @view_paths.exists?(name, prefixes, partial, details, details_key, keys)
+      end
- -
-
# File actionview/lib/action_view/lookup_context.rb, line 141
-def exists?(name, prefixes = [], partial = false, keys = [], **options)
-  name, prefixes = normalize_name(name, prefixes)
-  details, details_key = detail_args_for(options)
-  @view_paths.exists?(name, prefixes, partial, details, details_key, keys)
-end
-
-
- -

+ See on GitHub + + + +

@@ -284,24 +285,24 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/lookup_context.rb, line 128
+      def find(name, prefixes = [], partial = false, keys = [], options = {})
+        name, prefixes = normalize_name(name, prefixes)
+        details, details_key = detail_args_for(options)
+        @view_paths.find(name, prefixes, partial, details, details_key, keys)
+      end
- -
-
# File actionview/lib/action_view/lookup_context.rb, line 128
-def find(name, prefixes = [], partial = false, keys = [], options = {})
-  name, prefixes = normalize_name(name, prefixes)
-  details, details_key = detail_args_for(options)
-  @view_paths.find(name, prefixes, partial, details, details_key, keys)
-end
-
-
- -

+ See on GitHub + + + +

@@ -321,24 +322,24 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/lookup_context.rb, line 135
+      def find_all(name, prefixes = [], partial = false, keys = [], options = {})
+        name, prefixes = normalize_name(name, prefixes)
+        details, details_key = detail_args_for(options)
+        @view_paths.find_all(name, prefixes, partial, details, details_key, keys)
+      end
- -
-
# File actionview/lib/action_view/lookup_context.rb, line 135
-def find_all(name, prefixes = [], partial = false, keys = [], options = {})
-  name, prefixes = normalize_name(name, prefixes)
-  details, details_key = detail_args_for(options)
-  @view_paths.find_all(name, prefixes, partial, details, details_key, keys)
-end
-
-
- -

+ See on GitHub + + + +

@@ -362,7 +363,8 @@

-

+ +

@@ -382,22 +384,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/lookup_context.rb, line 159
+      def prepend_view_paths(paths)
+        @view_paths = build_view_paths(paths + @view_paths.to_a)
+      end
- -
-
# File actionview/lib/action_view/lookup_context.rb, line 159
-def prepend_view_paths(paths)
-  @view_paths = build_view_paths(paths + @view_paths.to_a)
-end
-
-
- -

+ See on GitHub + + + +

@@ -421,7 +423,8 @@

-

+ +

Instance Private methods

@@ -444,31 +447,31 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/lookup_context.rb, line 175
+      def detail_args_for(options) # :doc:
+        return @details, details_key if options.empty? # most common path.
+        user_details = @details.merge(options)
+
+        if @cache
+          details_key = DetailsKey.details_cache_key(user_details)
+        else
+          details_key = nil
+        end
+
+        [user_details, details_key]
+      end
- -
-
# File actionview/lib/action_view/lookup_context.rb, line 175
-def detail_args_for(options) # :doc:
-  return @details, details_key if options.empty? # most common path.
-  user_details = @details.merge(options)
-
-  if @cache
-    details_key = DetailsKey.details_cache_key(user_details)
-  else
-    details_key = nil
-  end
-
-  [user_details, details_key]
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionView/NullResolver.html b/src/classes/ActionView/NullResolver.html index 06f9cedc02..b1d177fdd6 100644 --- a/src/classes/ActionView/NullResolver.html +++ b/src/classes/ActionView/NullResolver.html @@ -81,24 +81,24 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/testing/resolvers.rb, line 38
+    def find_templates(name, prefix, partial, details, locals = [])
+      path = TemplatePath.build(name, prefix, partial)
+      handler = ActionView::Template::Handlers::Raw
+      [ActionView::Template.new("Template generated by Null Resolver", path.virtual, handler, virtual_path: path.virtual, format: nil, variant: nil, locals: locals)]
+    end
- -
-
# File actionview/lib/action_view/testing/resolvers.rb, line 38
-def find_templates(name, prefix, partial, details, locals = [])
-  path = TemplatePath.build(name, prefix, partial)
-  handler = ActionView::Template::Handlers::Raw
-  [ActionView::Template.new("Template generated by Null Resolver", path.virtual, handler, virtual_path: path.virtual, format: nil, variant: nil, locals: locals)]
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionView/PartialIteration.html b/src/classes/ActionView/PartialIteration.html index 14476f4926..26ec8807fa 100644 --- a/src/classes/ActionView/PartialIteration.html +++ b/src/classes/ActionView/PartialIteration.html @@ -110,23 +110,23 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/renderer/collection_renderer.rb, line 13
+    def initialize(size)
+      @size  = size
+      @index = 0
+    end
- -
-
# File actionview/lib/action_view/renderer/collection_renderer.rb, line 13
-def initialize(size)
-  @size  = size
-  @index = 0
-end
-
-
- - + See on GitHub + + + + @@ -150,22 +150,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/renderer/collection_renderer.rb, line 19
+    def first?
+      index == 0
+    end
- -
-
# File actionview/lib/action_view/renderer/collection_renderer.rb, line 19
-def first?
-  index == 0
-end
-
-
- - + See on GitHub + + + +

@@ -185,22 +185,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/renderer/collection_renderer.rb, line 24
+    def last?
+      index == size - 1
+    end
- -
-
# File actionview/lib/action_view/renderer/collection_renderer.rb, line 24
-def last?
-  index == size - 1
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/PartialRenderer.html b/src/classes/ActionView/PartialRenderer.html index b1a37829a4..c0c5d011f4 100644 --- a/src/classes/ActionView/PartialRenderer.html +++ b/src/classes/ActionView/PartialRenderer.html @@ -296,25 +296,25 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/renderer/partial_renderer.rb, line 223
+    def initialize(lookup_context, options)
+      super(lookup_context)
+      @options = options
+      @locals  = @options[:locals] || {}
+      @details = extract_details(@options)
+    end
- -
-
# File actionview/lib/action_view/renderer/partial_renderer.rb, line 223
-def initialize(lookup_context, options)
-  super(lookup_context)
-  @options = options
-  @locals  = @options[:locals] || {}
-  @details = extract_details(@options)
-end
-
-
- - + See on GitHub + + + + @@ -338,28 +338,28 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/renderer/partial_renderer.rb, line 230
+    def render(partial, context, block)
+      template = find_template(partial, template_keys(partial))
+
+      if !block && (layout = @options[:layout])
+        layout = find_template(layout.to_s, template_keys(partial))
+      end
+
+      render_partial_template(context, @locals, template, layout, block)
+    end
- -
-
# File actionview/lib/action_view/renderer/partial_renderer.rb, line 230
-def render(partial, context, block)
-  template = find_template(partial, template_keys(partial))
-
-  if !block && (layout = @options[:layout])
-    layout = find_template(layout.to_s, template_keys(partial))
-  end
-
-  render_partial_template(context, @locals, template, layout, block)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionView/RecordIdentifier.html b/src/classes/ActionView/RecordIdentifier.html index ce79baa6ba..871213ded3 100644 --- a/src/classes/ActionView/RecordIdentifier.html +++ b/src/classes/ActionView/RecordIdentifier.html @@ -177,23 +177,23 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/record_identifier.rb, line 78
+    def dom_class(record_or_class, prefix = nil)
+      singular = model_name_from_record_or_class(record_or_class).param_key
+      prefix ? "#{prefix}#{JOIN}#{singular}" : singular
+    end
- -
-
# File actionview/lib/action_view/record_identifier.rb, line 78
-def dom_class(record_or_class, prefix = nil)
-  singular = model_name_from_record_or_class(record_or_class).param_key
-  prefix ? "#{prefix}#{JOIN}#{singular}" : singular
-end
-
-
- - + See on GitHub + + + +

@@ -223,29 +223,29 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/record_identifier.rb, line 93
+    def dom_id(record_or_class, prefix = nil)
+      raise ArgumentError, "dom_id must be passed a record_or_class as the first argument, you passed #{record_or_class.inspect}" unless record_or_class
+
+      record_id = record_key_for_dom_id(record_or_class) unless record_or_class.is_a?(Class)
+      if record_id
+        "#{dom_class(record_or_class, prefix)}#{JOIN}#{record_id}"
+      else
+        dom_class(record_or_class, prefix || NEW)
+      end
+    end
- -
-
# File actionview/lib/action_view/record_identifier.rb, line 93
-def dom_id(record_or_class, prefix = nil)
-  raise ArgumentError, "dom_id must be passed a record_or_class as the first argument, you passed #{record_or_class.inspect}" unless record_or_class
-
-  record_id = record_key_for_dom_id(record_or_class) unless record_or_class.is_a?(Class)
-  if record_id
-    "#{dom_class(record_or_class, prefix)}#{JOIN}#{record_id}"
-  else
-    dom_class(record_or_class, prefix || NEW)
-  end
-end
-
-
- -

+ See on GitHub + + + +

Instance Private methods

@@ -268,23 +268,23 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/record_identifier.rb, line 113
+    def record_key_for_dom_id(record) # :doc:
+      key = convert_to_model(record).to_key
+      key && key.all? ? key.join(JOIN) : nil
+    end
- -
-
# File actionview/lib/action_view/record_identifier.rb, line 113
-def record_key_for_dom_id(record) # :doc:
-  key = convert_to_model(record).to_key
-  key && key.all? ? key.join(JOIN) : nil
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionView/Renderer.html b/src/classes/ActionView/Renderer.html index 9883815d7d..88fc0d2efb 100644 --- a/src/classes/ActionView/Renderer.html +++ b/src/classes/ActionView/Renderer.html @@ -112,22 +112,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/renderer/renderer.rb, line 18
+    def initialize(lookup_context)
+      @lookup_context = lookup_context
+    end
- -
-
# File actionview/lib/action_view/renderer/renderer.rb, line 18
-def initialize(lookup_context)
-  @lookup_context = lookup_context
-end
-
-
- - + See on GitHub + + + + @@ -151,22 +151,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/renderer/renderer.rb, line 23
+    def render(context, options)
+      render_to_object(context, options).body
+    end
- -
-
# File actionview/lib/action_view/renderer/renderer.rb, line 23
-def render(context, options)
-  render_to_object(context, options).body
-end
-
-
- - + See on GitHub + + + +

@@ -188,26 +188,26 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/renderer/renderer.rb, line 40
+    def render_body(context, options)
+      if options.key?(:partial)
+        [render_partial(context, options)]
+      else
+        StreamingTemplateRenderer.new(@lookup_context).render(context, options)
+      end
+    end
- -
-
# File actionview/lib/action_view/renderer/renderer.rb, line 40
-def render_body(context, options)
-  if options.key?(:partial)
-    [render_partial(context, options)]
-  else
-    StreamingTemplateRenderer.new(@lookup_context).render(context, options)
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/Rendering.html b/src/classes/ActionView/Rendering.html index 588db01603..ad945a70b3 100644 --- a/src/classes/ActionView/Rendering.html +++ b/src/classes/ActionView/Rendering.html @@ -127,23 +127,23 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/rendering.rb, line 32
+    def initialize
+      @rendered_format = nil
+      super
+    end
- -
-
# File actionview/lib/action_view/rendering.rb, line 32
-def initialize
-  @rendered_format = nil
-  super
-end
-
-
- - + See on GitHub + + + + @@ -167,23 +167,23 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/rendering.rb, line 119
+    def render_to_body(options = {})
+      _process_options(options)
+      _render_template(options)
+    end
- -
-
# File actionview/lib/action_view/rendering.rb, line 119
-def render_to_body(options = {})
-  _process_options(options)
-  _render_template(options)
-end
-
-
- - + See on GitHub + + + +

@@ -212,22 +212,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/rendering.rb, line 109
+    def view_context
+      view_context_class.new(lookup_context, view_assigns, self)
+    end
- -
-
# File actionview/lib/action_view/rendering.rb, line 109
-def view_context
-  view_context_class.new(lookup_context, view_assigns, self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -247,22 +247,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/rendering.rb, line 95
+    def view_context_class
+      self.class.view_context_class
+    end
- -
-
# File actionview/lib/action_view/rendering.rb, line 95
-def view_context_class
-  self.class.view_context_class
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/Rendering/ClassMethods.html b/src/classes/ActionView/Rendering/ClassMethods.html index 118db80849..70a03365ff 100644 --- a/src/classes/ActionView/Rendering/ClassMethods.html +++ b/src/classes/ActionView/Rendering/ClassMethods.html @@ -95,21 +95,21 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/rendering.rb, line 49
+      def _helpers
+      end
- -
-
# File actionview/lib/action_view/rendering.rb, line 49
-def _helpers
-end
-
-
- - + See on GitHub + + + +

@@ -129,21 +129,21 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/rendering.rb, line 46
+      def _routes
+      end
- -
-
# File actionview/lib/action_view/rendering.rb, line 46
-def _routes
-end
-
-
- -

+ See on GitHub + + + +

@@ -163,35 +163,35 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/rendering.rb, line 59
+      def build_view_context_class(klass, supports_path, routes, helpers)
+        if inherit_view_context_class?
+          return superclass.view_context_class
+        end
+
+        Class.new(klass) do
+          if routes
+            include routes.url_helpers(supports_path)
+            include routes.mounted_helpers
+          end
+
+          if helpers
+            include helpers
+          end
+        end
+      end
- -
-
# File actionview/lib/action_view/rendering.rb, line 59
-def build_view_context_class(klass, supports_path, routes, helpers)
-  if inherit_view_context_class?
-    return superclass.view_context_class
-  end
-
-  Class.new(klass) do
-    if routes
-      include routes.url_helpers(supports_path)
-      include routes.mounted_helpers
-    end
-
-    if helpers
-      include helpers
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -211,24 +211,24 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/rendering.rb, line 76
+      def eager_load!
+        super
+        view_context_class
+        nil
+      end
- -
-
# File actionview/lib/action_view/rendering.rb, line 76
-def eager_load!
-  super
-  view_context_class
-  nil
-end
-
-
- -

+ See on GitHub + + + +

@@ -248,25 +248,25 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/rendering.rb, line 52
+      def inherit_view_context_class?
+        superclass.respond_to?(:view_context_class) &&
+          supports_path? == superclass.supports_path? &&
+          _routes.equal?(superclass._routes) &&
+          _helpers.equal?(superclass._helpers)
+      end
- -
-
# File actionview/lib/action_view/rendering.rb, line 52
-def inherit_view_context_class?
-  superclass.respond_to?(:view_context_class) &&
-    supports_path? == superclass.supports_path? &&
-    _routes.equal?(superclass._routes) &&
-    _helpers.equal?(superclass._helpers)
-end
-
-
- -

+ See on GitHub + + + +

@@ -286,30 +286,30 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/rendering.rb, line 82
+      def view_context_class
+        klass = ActionView::LookupContext::DetailsKey.view_context_class
+
+        @view_context_class ||= build_view_context_class(klass, supports_path?, _routes, _helpers)
+
+        if klass.changed?(@view_context_class)
+          @view_context_class = build_view_context_class(klass, supports_path?, _routes, _helpers)
+        end
+
+        @view_context_class
+      end
- -
-
# File actionview/lib/action_view/rendering.rb, line 82
-def view_context_class
-  klass = ActionView::LookupContext::DetailsKey.view_context_class
-
-  @view_context_class ||= build_view_context_class(klass, supports_path?, _routes, _helpers)
-
-  if klass.changed?(@view_context_class)
-    @view_context_class = build_view_context_class(klass, supports_path?, _routes, _helpers)
-  end
-
-  @view_context_class
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/Resolver.html b/src/classes/ActionView/Resolver.html index 5c967c14df..6f9bf92af6 100644 --- a/src/classes/ActionView/Resolver.html +++ b/src/classes/ActionView/Resolver.html @@ -105,21 +105,21 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template/resolver.rb, line 59
+    def clear_cache
+    end
- -
-
# File actionview/lib/action_view/template/resolver.rb, line 59
-def clear_cache
-end
-
-
- - + See on GitHub + + + +

@@ -139,22 +139,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template/resolver.rb, line 63
+    def find_all(name, prefix = nil, partial = false, details = {}, key = nil, locals = [])
+      _find_all(name, prefix, partial, details, key, locals)
+    end
- -
-
# File actionview/lib/action_view/template/resolver.rb, line 63
-def find_all(name, prefix = nil, partial = false, details = {}, key = nil, locals = [])
-  _find_all(name, prefix, partial, details, key, locals)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/Resolver/Cache.html b/src/classes/ActionView/Resolver/Cache.html deleted file mode 100644 index bebf714158..0000000000 --- a/src/classes/ActionView/Resolver/Cache.html +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: ActionView::Resolver::Cache -layout: default ---- -
- -
-
- - - - - - - - - -

Namespace

- - - - -

Class

- - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActionView/Resolver/Cache/SmallCache.html b/src/classes/ActionView/Resolver/Cache/SmallCache.html deleted file mode 100644 index d5508db769..0000000000 --- a/src/classes/ActionView/Resolver/Cache/SmallCache.html +++ /dev/null @@ -1,107 +0,0 @@ ---- -title: ActionView::Resolver::Cache::SmallCache -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

-
    - -
  • - new -
  • - -
- - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - new(options = {}) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionview/lib/action_view/template/resolver.rb, line 76
-def initialize(options = {})
-  super(options.merge(initial_capacity: 2))
-end
-
-
- -
- - - - - -
- -
-
diff --git a/src/classes/ActionView/Resolver/Path.html b/src/classes/ActionView/Resolver/Path.html deleted file mode 100644 index bb09e86152..0000000000 --- a/src/classes/ActionView/Resolver/Path.html +++ /dev/null @@ -1,278 +0,0 @@ ---- -title: ActionView::Resolver::Path -layout: default ---- -
- -
-
- -
- -

Keeps all information about view path and builds virtual path.

- -
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- [R] - name
- [R] - partial
- [R] - partial?
- [R] - prefix
- [R] - virtual
- - - - -

Class Public methods

- -
-

- - build(name, prefix, partial) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionview/lib/action_view/template/resolver.rb, line 18
-def self.build(name, prefix, partial)
-  virtual = +""
-  virtual << "#{prefix}/" unless prefix.empty?
-  virtual << (partial ? "_#{name}" : name)
-  new name, prefix, partial, virtual
-end
-
-
- -
- -
-

- - new(name, prefix, partial, virtual) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionview/lib/action_view/template/resolver.rb, line 25
-def initialize(name, prefix, partial, virtual)
-  @name    = name
-  @prefix  = prefix
-  @partial = partial
-  @virtual = virtual
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - to_s() - -

- - -
- -
- - - - - -
- Alias for: to_str -
- - - -
- -
-

- - to_str() - -

- - -
- -
- - - -
- Also aliased as: to_s -
- - - - - - -
- - -
-
# File actionview/lib/action_view/template/resolver.rb, line 32
-def to_str
-  @virtual
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActionView/RoutingUrlFor.html b/src/classes/ActionView/RoutingUrlFor.html index eb6dc16369..2cfeb8a4e8 100644 --- a/src/classes/ActionView/RoutingUrlFor.html +++ b/src/classes/ActionView/RoutingUrlFor.html @@ -151,60 +151,60 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/routing_url_for.rb, line 82
+    def url_for(options = nil)
+      case options
+      when String
+        options
+      when nil
+        super(only_path: _generate_paths_by_default)
+      when Hash
+        options = options.symbolize_keys
+        ensure_only_path_option(options)
+
+        super(options)
+      when ActionController::Parameters
+        ensure_only_path_option(options)
+
+        super(options)
+      when :back
+        _back_url
+      when Array
+        components = options.dup
+        options = components.extract_options!
+        ensure_only_path_option(options)
+
+        if options[:only_path]
+          polymorphic_path(components, options)
+        else
+          polymorphic_url(components, options)
+        end
+      else
+        method = _generate_paths_by_default ? :path : :url
+        builder = ActionDispatch::Routing::PolymorphicRoutes::HelperMethodBuilder.public_send(method)
+
+        case options
+        when Symbol
+          builder.handle_string_call(self, options)
+        when Class
+          builder.handle_class_call(self, options)
+        else
+          builder.handle_model_call(self, options)
+        end
+      end
+    end
- -
-
# File actionview/lib/action_view/routing_url_for.rb, line 82
-def url_for(options = nil)
-  case options
-  when String
-    options
-  when nil
-    super(only_path: _generate_paths_by_default)
-  when Hash
-    options = options.symbolize_keys
-    ensure_only_path_option(options)
-
-    super(options)
-  when ActionController::Parameters
-    ensure_only_path_option(options)
-
-    super(options)
-  when :back
-    _back_url
-  when Array
-    components = options.dup
-    options = components.extract_options!
-    ensure_only_path_option(options)
-
-    if options[:only_path]
-      polymorphic_path(components, options)
-    else
-      polymorphic_url(components, options)
-    end
-  else
-    method = _generate_paths_by_default ? :path : :url
-    builder = ActionDispatch::Routing::PolymorphicRoutes::HelperMethodBuilder.public_send(method)
-
-    case options
-    when Symbol
-      builder.handle_string_call(self, options)
-    when Class
-      builder.handle_class_call(self, options)
-    else
-      builder.handle_model_call(self, options)
-    end
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionView/SyntaxErrorInTemplate.html b/src/classes/ActionView/SyntaxErrorInTemplate.html deleted file mode 100644 index bd7167ea52..0000000000 --- a/src/classes/ActionView/SyntaxErrorInTemplate.html +++ /dev/null @@ -1,194 +0,0 @@ ---- -title: ActionView::SyntaxErrorInTemplate -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - new(template, offending_code_string) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionview/lib/action_view/template/error.rb, line 138
-def initialize(template, offending_code_string)
-  @offending_code_string = offending_code_string
-  super(template)
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - annotated_source_code() - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionview/lib/action_view/template/error.rb, line 149
-def annotated_source_code
-  @offending_code_string.split("\n").map.with_index(1) { |line, index|
-    indentation = " " * 4
-    "#{index}:#{indentation}#{line}"
-  }
-end
-
-
- -
- -
-

- - message() - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionview/lib/action_view/template/error.rb, line 143
-    def message
-      <<~MESSAGE
-        Encountered a syntax error while rendering template: check #{@offending_code_string}
-      MESSAGE
-    end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActionView/Template.html b/src/classes/ActionView/Template.html index 1e79b94833..6a2307eef1 100644 --- a/src/classes/ActionView/Template.html +++ b/src/classes/ActionView/Template.html @@ -283,27 +283,27 @@

- -
- - -
-
# File actionview/lib/action_view/template.rb, line 171
-def mime_types_implementation=(implementation)
-  # This method isn't thread-safe, but it's not supposed
-  # to be called after initialization
-  if self::Types != implementation
-    remove_const(:Types)
-    const_set(:Types, implementation)
-  end
-end
-
-
- - + +
+ + Source code + + +
# File actionview/lib/action_view/template.rb, line 171
+      def mime_types_implementation=(implementation)
+        # This method isn't thread-safe, but it's not supposed
+        # to be called after initialization
+        if self::Types != implementation
+          remove_const(:Types)
+          const_set(:Types, implementation)
+        end
+      end
+ + See on GitHub + +
+ +

@@ -323,39 +323,39 @@

- -
- - -
-
# File actionview/lib/action_view/template.rb, line 186
-def initialize(source, identifier, handler, locals:, format: nil, variant: nil, virtual_path: nil)
-  @source            = source.dup
-  @identifier        = identifier
-  @handler           = handler
-  @compiled          = false
-  @locals            = locals
-  @virtual_path      = virtual_path
+          
+            
+ + Source code + - @variable = if @virtual_path - base = @virtual_path.end_with?("/") ? "" : ::File.basename(@virtual_path) - base =~ /\A_?(.*?)(?:\.\w+)*\z/ - $1.to_sym - end +
# File actionview/lib/action_view/template.rb, line 186
+    def initialize(source, identifier, handler, locals:, format: nil, variant: nil, virtual_path: nil)
+      @source            = source.dup
+      @identifier        = identifier
+      @handler           = handler
+      @compiled          = false
+      @locals            = locals
+      @virtual_path      = virtual_path
 
-  @format            = format
-  @variant           = variant
-  @compile_mutex     = Mutex.new
-  @strict_locals     = NONE
-  @type              = nil
-end
-
-
- -

+ @variable = if @virtual_path + base = @virtual_path.end_with?("/") ? "" : ::File.basename(@virtual_path) + base =~ /\A_?(.*?)(?:\.\w+)*\z/ + $1.to_sym + end + + @format = format + @variant = variant + @compile_mutex = Mutex.new + @strict_locals = NONE + @type = nil + end + + See on GitHub + + + + @@ -381,54 +381,54 @@

- -
- - -
-
# File actionview/lib/action_view/template.rb, line 290
-def encode!
-  source = self.source
+          
+            
+ + Source code + - return source unless source.encoding == Encoding::BINARY +
# File actionview/lib/action_view/template.rb, line 290
+    def encode!
+      source = self.source
 
-  # Look for # encoding: *. If we find one, we'll encode the
-  # String in that encoding, otherwise, we'll use the
-  # default external encoding.
-  if source.sub!(LEADING_ENCODING_REGEXP, "")
-    encoding = magic_encoding = $1
-  else
-    encoding = Encoding.default_external
-  end
+      return source unless source.encoding == Encoding::BINARY
 
-  # Tag the source with the default external encoding
-  # or the encoding specified in the file
-  source.force_encoding(encoding)
+      # Look for # encoding: *. If we find one, we'll encode the
+      # String in that encoding, otherwise, we'll use the
+      # default external encoding.
+      if source.sub!(LEADING_ENCODING_REGEXP, "")
+        encoding = magic_encoding = $1
+      else
+        encoding = Encoding.default_external
+      end
 
-  # If the user didn't specify an encoding, and the handler
-  # handles encodings, we simply pass the String as is to
-  # the handler (with the default_external tag)
-  if !magic_encoding && @handler.respond_to?(:handles_encoding?) && @handler.handles_encoding?
-    source
-  # Otherwise, if the String is valid in the encoding,
-  # encode immediately to default_internal. This means
-  # that if a handler doesn't handle encodings, it will
-  # always get Strings in the default_internal
-  elsif source.valid_encoding?
-    source.encode!
-  # Otherwise, since the String is invalid in the encoding
-  # specified, raise an exception
-  else
-    raise WrongEncodingError.new(source, encoding)
-  end
-end
-
-
- - + # Tag the source with the default external encoding + # or the encoding specified in the file + source.force_encoding(encoding) + + # If the user didn't specify an encoding, and the handler + # handles encodings, we simply pass the String as is to + # the handler (with the default_external tag) + if !magic_encoding && @handler.respond_to?(:handles_encoding?) && @handler.handles_encoding? + source + # Otherwise, if the String is valid in the encoding, + # encode immediately to default_internal. This means + # that if a handler doesn't handle encodings, it will + # always get Strings in the default_internal + elsif source.valid_encoding? + source.encode! + # Otherwise, since the String is invalid in the encoding + # specified, raise an exception + else + raise WrongEncodingError.new(source, encoding) + end + end + + See on GitHub + + + +

@@ -448,22 +448,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template.rb, line 269
+    def inspect
+      "#<#{self.class.name} #{short_identifier} locals=#{locals.inspect}>"
+    end
- -
-
# File actionview/lib/action_view/template.rb, line 269
-def inspect
-  "#<#{self.class.name} #{short_identifier} locals=#{locals.inspect}>"
-end
-
-
- -

+ See on GitHub + + + +

@@ -538,31 +538,31 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template.rb, line 152
+    eager_autoload do
+      autoload :Error
+      autoload :RawFile
+      autoload :Renderable
+      autoload :Handlers
+      autoload :HTML
+      autoload :Inline
+      autoload :Types
+      autoload :Sources
+      autoload :Text
+      autoload :Types
+    end
- -
-
# File actionview/lib/action_view/template.rb, line 152
-eager_autoload do
-  autoload :Error
-  autoload :RawFile
-  autoload :Renderable
-  autoload :Handlers
-  autoload :HTML
-  autoload :Inline
-  autoload :Types
-  autoload :Sources
-  autoload :Text
-  autoload :Types
-end
-
-
- -

+ See on GitHub + + + +

@@ -582,26 +582,26 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template.rb, line 209
+    def locals
+      if strict_locals?
+        nil
+      else
+        @locals
+      end
+    end
- -
-
# File actionview/lib/action_view/template.rb, line 209
-def locals
-  if strict_locals?
-    nil
-  else
-    @locals
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -623,32 +623,32 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template.rb, line 247
+    def render(view, locals, buffer = nil, add_to_stack: true, &block)
+      instrument_render_template do
+        compile!(view)
+        if buffer
+          view._run(method_name, self, locals, buffer, add_to_stack: add_to_stack, has_strict_locals: strict_locals?, &block)
+          nil
+        else
+          view._run(method_name, self, locals, OutputBuffer.new, add_to_stack: add_to_stack, has_strict_locals: strict_locals?, &block)&.to_s
+        end
+      end
+    rescue => e
+      handle_render_error(view, e)
+    end
- -
-
# File actionview/lib/action_view/template.rb, line 247
-def render(view, locals, buffer = nil, add_to_stack: true, &block)
-  instrument_render_template do
-    compile!(view)
-    if buffer
-      view._run(method_name, self, locals, buffer, add_to_stack: add_to_stack, has_strict_locals: strict_locals?, &block)
-      nil
-    else
-      view._run(method_name, self, locals, OutputBuffer.new, add_to_stack: add_to_stack, has_strict_locals: strict_locals?, &block)&.to_s
-    end
-  end
-rescue => e
-  handle_render_error(view, e)
-end
-
-
- -

+ See on GitHub + + + +

@@ -668,22 +668,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template.rb, line 265
+    def short_identifier
+      @short_identifier ||= defined?(Rails.root) ? identifier.delete_prefix("#{Rails.root}/") : identifier
+    end
- -
-
# File actionview/lib/action_view/template.rb, line 265
-def short_identifier
-  @short_identifier ||= defined?(Rails.root) ? identifier.delete_prefix("#{Rails.root}/") : identifier
-end
-
-
- -

+ See on GitHub + + + +

@@ -703,22 +703,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template.rb, line 273
+    def source
+      @source.to_s
+    end
- -
-
# File actionview/lib/action_view/template.rb, line 273
-def source
-  @source.to_s
-end
-
-
- -

+ See on GitHub + + + +

@@ -743,31 +743,31 @@

- -
- - -
-
# File actionview/lib/action_view/template.rb, line 335
-def strict_locals!
-  if @strict_locals == NONE
-    self.source.sub!(STRICT_LOCALS_REGEX, "")
-    @strict_locals = $1
+          
+            
+ + Source code + - return if @strict_locals.nil? # Magic comment not found +
# File actionview/lib/action_view/template.rb, line 335
+    def strict_locals!
+      if @strict_locals == NONE
+        self.source.sub!(STRICT_LOCALS_REGEX, "")
+        @strict_locals = $1
 
-    @strict_locals = "**nil" if @strict_locals.blank?
-  end
+        return if @strict_locals.nil? # Magic comment not found
 
-  @strict_locals
-end
-
-
- -

+ @strict_locals = "**nil" if @strict_locals.blank? + end + + @strict_locals + end + + See on GitHub + + + +

@@ -787,22 +787,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template.rb, line 349
+    def strict_locals?
+      strict_locals!
+    end
- -
-
# File actionview/lib/action_view/template.rb, line 349
-def strict_locals?
-  strict_locals!
-end
-
-
- -

+ See on GitHub + + + +

@@ -822,22 +822,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template.rb, line 237
+    def supports_streaming?
+      handler.respond_to?(:supports_streaming?) && handler.supports_streaming?
+    end
- -
-
# File actionview/lib/action_view/template.rb, line 237
-def supports_streaming?
-  handler.respond_to?(:supports_streaming?) && handler.supports_streaming?
-end
-
-
- -

+ See on GitHub + + + +

@@ -857,26 +857,26 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template.rb, line 227
+    def translate_location(backtrace_location, spot)
+      if handler.respond_to?(:translate_location)
+        handler.translate_location(spot, backtrace_location, encode!) || spot
+      else
+        spot
+      end
+    end
- -
-
# File actionview/lib/action_view/template.rb, line 227
-def translate_location(backtrace_location, spot)
-  if handler.respond_to?(:translate_location)
-    handler.translate_location(spot, backtrace_location, encode!) || spot
-  else
-    spot
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -896,22 +896,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template.rb, line 261
+    def type
+      @type ||= Types[format]
+    end
- -
-
# File actionview/lib/action_view/template.rb, line 261
-def type
-  @type ||= Types[format]
-end
-
-
- -

+ See on GitHub + + + +

Instance Private methods

@@ -934,22 +934,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template.rb, line 530
+      def instrument(action, &block) # :doc:
+        ActiveSupport::Notifications.instrument("#{action}.action_view", instrument_payload, &block)
+      end
- -
-
# File actionview/lib/action_view/template.rb, line 530
-def instrument(action, &block) # :doc:
-  ActiveSupport::Notifications.instrument("#{action}.action_view", instrument_payload, &block)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionView/Template/Handlers/Builder.html b/src/classes/ActionView/Template/Handlers/Builder.html index 1134ea30cb..81d013a993 100644 --- a/src/classes/ActionView/Template/Handlers/Builder.html +++ b/src/classes/ActionView/Template/Handlers/Builder.html @@ -85,26 +85,26 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template/handlers/builder.rb, line 8
+      def call(template, source)
+        require_engine
+        # the double assignment is to silence "assigned but unused variable" warnings
+        "xml = xml = ::Builder::XmlMarkup.new(indent: 2, target: output_buffer.raw);" \
+          "#{source};" \
+          "output_buffer.to_s"
+      end
- -
-
# File actionview/lib/action_view/template/handlers/builder.rb, line 8
-def call(template, source)
-  require_engine
-  # the double assignment is to silence "assigned but unused variable" warnings
-  "xml = xml = ::Builder::XmlMarkup.new(indent: 2, target: output_buffer.raw);" \
-    "#{source};" \
-    "output_buffer.to_s"
-end
-
-
- - + See on GitHub + + + +

Instance Private methods

@@ -127,25 +127,25 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template/handlers/builder.rb, line 17
+        def require_engine # :doc:
+          @required ||= begin
+            require "builder"
+            true
+          end
+        end
- -
-
# File actionview/lib/action_view/template/handlers/builder.rb, line 17
-def require_engine # :doc:
-  @required ||= begin
-    require "builder"
-    true
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionView/Template/Handlers/ERB.html b/src/classes/ActionView/Template/Handlers/ERB.html index b23cb0c979..2b1f224e3e 100644 --- a/src/classes/ActionView/Template/Handlers/ERB.html +++ b/src/classes/ActionView/Template/Handlers/ERB.html @@ -116,22 +116,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template/handlers/erb.rb, line 29
+        def self.call(template, source)
+          new.call(template, source)
+        end
- -
-
# File actionview/lib/action_view/template/handlers/erb.rb, line 29
-def self.call(template, source)
-  new.call(template, source)
-end
-
-
- - + See on GitHub + + + + @@ -155,49 +155,49 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template/handlers/erb.rb, line 61
+        def call(template, source)
+          # First, convert to BINARY, so in case the encoding is
+          # wrong, we can still find an encoding tag
+          # (<%# encoding %>) inside the String using a regular
+          # expression
+          template_source = source.b
+
+          erb = template_source.gsub(ENCODING_TAG, "")
+          encoding = $2
+
+          erb.force_encoding valid_encoding(source.dup, encoding)
+
+          # Always make sure we return a String in the default_internal
+          erb.encode!
+
+          # Strip trailing newlines from the template if enabled
+          erb.chomp! if strip_trailing_newlines
+
+          options = {
+            escape: (self.class.escape_ignore_list.include? template.type),
+            trim: (self.class.erb_trim_mode == "-")
+          }
+
+          if ActionView::Base.annotate_rendered_view_with_filenames && template.format == :html
+            options[:preamble] = "@output_buffer.safe_append='';"
+            options[:postamble] = "@output_buffer.safe_append='';@output_buffer"
+          end
+
+          self.class.erb_implementation.new(erb, options).src
+        end
- -
-
# File actionview/lib/action_view/template/handlers/erb.rb, line 61
-def call(template, source)
-  # First, convert to BINARY, so in case the encoding is
-  # wrong, we can still find an encoding tag
-  # (<%# encoding %>) inside the String using a regular
-  # expression
-  template_source = source.b
-
-  erb = template_source.gsub(ENCODING_TAG, "")
-  encoding = $2
-
-  erb.force_encoding valid_encoding(source.dup, encoding)
-
-  # Always make sure we return a String in the default_internal
-  erb.encode!
-
-  # Strip trailing newlines from the template if enabled
-  erb.chomp! if strip_trailing_newlines
-
-  options = {
-    escape: (self.class.escape_ignore_list.include? template.type),
-    trim: (self.class.erb_trim_mode == "-")
-  }
-
-  if ActionView::Base.annotate_rendered_view_with_filenames && template.format == :html
-    options[:preamble] = "@output_buffer.safe_append='<!-- BEGIN #{template.short_identifier} -->';"
-    options[:postamble] = "@output_buffer.safe_append='<!-- END #{template.short_identifier} -->';@output_buffer"
-  end
-
-  self.class.erb_implementation.new(erb, options).src
-end
-
-
- - + See on GitHub + + + +

@@ -217,22 +217,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template/handlers/erb.rb, line 37
+        def handles_encoding?
+          true
+        end
- -
-
# File actionview/lib/action_view/template/handlers/erb.rb, line 37
-def handles_encoding?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -252,22 +252,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template/handlers/erb.rb, line 33
+        def supports_streaming?
+          true
+        end
- -
-
# File actionview/lib/action_view/template/handlers/erb.rb, line 33
-def supports_streaming?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -287,36 +287,36 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template/handlers/erb.rb, line 43
+        def translate_location(spot, backtrace_location, source)
+          # Tokenize the source line
+          tokens = ::ERB::Util.tokenize(source.lines[backtrace_location.lineno - 1])
+          new_first_column = find_offset(spot[:snippet], tokens, spot[:first_column])
+          lineno_delta = spot[:first_lineno] - backtrace_location.lineno
+          spot[:first_lineno] -= lineno_delta
+          spot[:last_lineno] -= lineno_delta
+
+          column_delta = spot[:first_column] - new_first_column
+          spot[:first_column] -= column_delta
+          spot[:last_column] -= column_delta
+          spot[:script_lines] = source.lines
+
+          spot
+        rescue NotImplementedError, LocationParsingError
+          nil
+        end
- -
-
# File actionview/lib/action_view/template/handlers/erb.rb, line 43
-def translate_location(spot, backtrace_location, source)
-  # Tokenize the source line
-  tokens = ::ERB::Util.tokenize(source.lines[backtrace_location.lineno - 1])
-  new_first_column = find_offset(spot[:snippet], tokens, spot[:first_column])
-  lineno_delta = spot[:first_lineno] - backtrace_location.lineno
-  spot[:first_lineno] -= lineno_delta
-  spot[:last_lineno] -= lineno_delta
-
-  column_delta = spot[:first_column] - new_first_column
-  spot[:first_column] -= column_delta
-  spot[:last_column] -= column_delta
-  spot[:script_lines] = source.lines
-
-  spot
-rescue NotImplementedError, LocationParsingError
-  nil
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/Template/Handlers/Html.html b/src/classes/ActionView/Template/Handlers/Html.html index 68238a661a..1d94c9c77f 100644 --- a/src/classes/ActionView/Template/Handlers/Html.html +++ b/src/classes/ActionView/Template/Handlers/Html.html @@ -81,22 +81,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template/handlers/html.rb, line 6
+      def call(template, source)
+        "ActionView::OutputBuffer.new #{super}"
+      end
- -
-
# File actionview/lib/action_view/template/handlers/html.rb, line 6
-def call(template, source)
-  "ActionView::OutputBuffer.new #{super}"
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionView/Template/Handlers/Raw.html b/src/classes/ActionView/Template/Handlers/Raw.html index c5ec7c86ab..5958cdeb8f 100644 --- a/src/classes/ActionView/Template/Handlers/Raw.html +++ b/src/classes/ActionView/Template/Handlers/Raw.html @@ -81,22 +81,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template/handlers/raw.rb, line 6
+      def call(template, source)
+        "#{source.inspect}.html_safe;"
+      end
- -
-
# File actionview/lib/action_view/template/handlers/raw.rb, line 6
-def call(template, source)
-  "#{source.inspect}.html_safe;"
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionView/Template/Sources/File.html b/src/classes/ActionView/Template/Sources/File.html index 90b4127404..8d19f3c7c2 100644 --- a/src/classes/ActionView/Template/Sources/File.html +++ b/src/classes/ActionView/Template/Sources/File.html @@ -84,22 +84,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template/sources/file.rb, line 7
+        def initialize(filename)
+          @filename = filename
+        end
- -
-
# File actionview/lib/action_view/template/sources/file.rb, line 7
-def initialize(filename)
-  @filename = filename
-end
-
-
- - + See on GitHub + + + + @@ -123,22 +123,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template/sources/file.rb, line 11
+        def to_s
+          ::File.binread @filename
+        end
- -
-
# File actionview/lib/action_view/template/sources/file.rb, line 11
-def to_s
-  ::File.binread @filename
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionView/Template/Types.html b/src/classes/ActionView/Template/Types.html deleted file mode 100644 index 575f58cac9..0000000000 --- a/src/classes/ActionView/Template/Types.html +++ /dev/null @@ -1,206 +0,0 @@ ---- -title: ActionView::Template::Types -layout: default ---- -
- -
-
- - - - - - - - - -

Namespace

- - - - -

Class

- - - - - -

Methods

- - - - - - - - - - - - - - -

Attributes

- - - - - - - - -
- [RW] - type_klass
- - - - -

Class Public methods

- -
-

- - [](type) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionview/lib/action_view/template/types.rb, line 47
-def [](type)
-  type_klass[type]
-end
-
-
- -
- -
-

- - delegate_to(klass) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionview/lib/action_view/template/types.rb, line 43
-def delegate_to(klass)
-  self.type_klass = klass
-end
-
-
- -
- -
-

- - symbols() - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionview/lib/action_view/template/types.rb, line 51
-def symbols
-  type_klass::SET.symbols
-end
-
-
- -
- - - - - -
- -
-
diff --git a/src/classes/ActionView/Template/Types/Type.html b/src/classes/ActionView/Template/Types/Type.html deleted file mode 100644 index e4cff3881f..0000000000 --- a/src/classes/ActionView/Template/Types/Type.html +++ /dev/null @@ -1,366 +0,0 @@ ---- -title: ActionView::Template::Types::Type -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - -

Constants

- - - - - - - - - - - - - - -
SET=Struct.new(:symbols).new([ :html, :text, :js, :css, :xml, :json ])
 
- - - - -

Attributes

- - - - - - - - -
- [R] - symbol
- - - - -

Class Public methods

- -
-

- - [](type) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionview/lib/action_view/template/types.rb, line 11
-def self.[](type)
-  if type.is_a?(self)
-    type
-  else
-    new(type)
-  end
-end
-
-
- -
- -
-

- - new(symbol) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionview/lib/action_view/template/types.rb, line 21
-def initialize(symbol)
-  @symbol = symbol.to_sym
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - ==(type) - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionview/lib/action_view/template/types.rb, line 35
-def ==(type)
-  @symbol == type.to_sym unless type.blank?
-end
-
-
- -
- -
-

- - ref() - -

- - -
- -
- - - -
- Also aliased as: to_sym -
- - - - - - -
- - -
-
# File actionview/lib/action_view/template/types.rb, line 30
-def ref
-  @symbol
-end
-
-
- -
- -
-

- - to_s() - -

- - -
- -
- - - -
- Also aliased as: to_str -
- - - - - - -
- - -
-
# File actionview/lib/action_view/template/types.rb, line 25
-def to_s
-  @symbol.to_s
-end
-
-
- -
- -
-

- - to_str() - -

- - -
- -
- - - - - -
- Alias for: to_s -
- - - -
- -
-

- - to_sym() - -

- - -
- -
- - - - - -
- Alias for: ref -
- - - -
- - - - -
- -
-
diff --git a/src/classes/ActionView/TemplateDetails/Requested.html b/src/classes/ActionView/TemplateDetails/Requested.html index ee43ac1644..780b4311ba 100644 --- a/src/classes/ActionView/TemplateDetails/Requested.html +++ b/src/classes/ActionView/TemplateDetails/Requested.html @@ -168,34 +168,34 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template_details.rb, line 11
+      def initialize(locale:, handlers:, formats:, variants:)
+        @locale = locale
+        @handlers = handlers
+        @formats = formats
+        @variants = variants
+
+        @locale_idx   = build_idx_hash(locale)
+        @handlers_idx = build_idx_hash(handlers)
+        @formats_idx  = build_idx_hash(formats)
+        if variants == :any
+          @variants_idx = ANY_HASH
+        else
+          @variants_idx = build_idx_hash(variants)
+        end
+      end
- -
-
# File actionview/lib/action_view/template_details.rb, line 11
-def initialize(locale:, handlers:, formats:, variants:)
-  @locale = locale
-  @handlers = handlers
-  @formats = formats
-  @variants = variants
-
-  @locale_idx   = build_idx_hash(locale)
-  @handlers_idx = build_idx_hash(handlers)
-  @formats_idx  = build_idx_hash(formats)
-  if variants == :any
-    @variants_idx = ANY_HASH
-  else
-    @variants_idx = build_idx_hash(variants)
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionView/TemplatePath.html b/src/classes/ActionView/TemplatePath.html index 4b6bebf89e..b026b0f825 100644 --- a/src/classes/ActionView/TemplatePath.html +++ b/src/classes/ActionView/TemplatePath.html @@ -172,22 +172,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template_path.rb, line 43
+    def self.build(name, prefix, partial)
+      new name, prefix, partial, virtual(name, prefix, partial)
+    end
- -
-
# File actionview/lib/action_view/template_path.rb, line 43
-def self.build(name, prefix, partial)
-  new name, prefix, partial, virtual(name, prefix, partial)
-end
-
-
- - + See on GitHub + + + +

@@ -207,25 +207,25 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template_path.rb, line 47
+    def initialize(name, prefix, partial, virtual)
+      @name    = name
+      @prefix  = prefix
+      @partial = partial
+      @virtual = virtual
+    end
- -
-
# File actionview/lib/action_view/template_path.rb, line 47
-def initialize(name, prefix, partial, virtual)
-  @name    = name
-  @prefix  = prefix
-  @partial = partial
-  @virtual = virtual
-end
-
-
- -

+ See on GitHub + + + +

@@ -245,32 +245,32 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template_path.rb, line 28
+    def self.parse(virtual)
+      if nameidx = virtual.rindex("/")
+        prefix = virtual[0, nameidx]
+        name = virtual.from(nameidx + 1)
+        prefix = prefix[1..] if prefix.start_with?("/")
+      else
+        prefix = ""
+        name = virtual
+      end
+      partial = name.start_with?("_")
+      name = name[1..] if partial
+      new name, prefix, partial, virtual
+    end
- -
-
# File actionview/lib/action_view/template_path.rb, line 28
-def self.parse(virtual)
-  if nameidx = virtual.rindex("/")
-    prefix = virtual[0, nameidx]
-    name = virtual.from(nameidx + 1)
-    prefix = prefix[1..] if prefix.start_with?("/")
-  else
-    prefix = ""
-    name = virtual
-  end
-  partial = name.start_with?("_")
-  name = name[1..] if partial
-  new name, prefix, partial, virtual
-end
-
-
- -

+ See on GitHub + + + +

@@ -290,28 +290,28 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/template_path.rb, line 17
+    def self.virtual(name, prefix, partial)
+      if prefix.empty?
+        "#{partial ? "_" : ""}#{name}"
+      elsif partial
+        "#{prefix}/_#{name}"
+      else
+        "#{prefix}/#{name}"
+      end
+    end
- -
-
# File actionview/lib/action_view/template_path.rb, line 17
-def self.virtual(name, prefix, partial)
-  if prefix.empty?
-    "#{partial ? "_" : ""}#{name}"
-  elsif partial
-    "#{prefix}/_#{name}"
-  else
-    "#{prefix}/#{name}"
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/TestCase/Behavior.html b/src/classes/ActionView/TestCase/Behavior.html index a57cbb2248..8dc11c1b9c 100644 --- a/src/classes/ActionView/TestCase/Behavior.html +++ b/src/classes/ActionView/TestCase/Behavior.html @@ -276,22 +276,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/test_case.rb, line 296
+      def _routes
+        @controller._routes if @controller.respond_to?(:_routes)
+      end
- -
-
# File actionview/lib/action_view/test_case.rb, line 296
-def _routes
-  @controller._routes if @controller.respond_to?(:_routes)
-end
-
-
- - + See on GitHub + + + +

@@ -311,22 +311,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/test_case.rb, line 213
+          def _test_case
+            controller._test_case
+          end
- -
-
# File actionview/lib/action_view/test_case.rb, line 213
-def _test_case
-  controller._test_case
-end
-
-
- -

+ See on GitHub + + + +

@@ -346,22 +346,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/test_case.rb, line 231
+      def config
+        @controller.config if @controller.respond_to?(:config)
+      end
- -
-
# File actionview/lib/action_view/test_case.rb, line 231
-def config
-  @controller.config if @controller.respond_to?(:config)
-end
-
-
- -

+ See on GitHub + + + +

@@ -381,22 +381,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/test_case.rb, line 209
+          def protect_against_forgery?
+            false
+          end
- -
-
# File actionview/lib/action_view/test_case.rb, line 209
-def protect_against_forgery?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -416,24 +416,24 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/test_case.rb, line 235
+      def render(options = {}, local_assigns = {}, &block)
+        view.assign(view_assigns)
+        @rendered << output = view.render(options, local_assigns, &block)
+        output
+      end
- -
-
# File actionview/lib/action_view/test_case.rb, line 235
-def render(options = {}, local_assigns = {}, &block)
-  view.assign(view_assigns)
-  @rendered << output = view.render(options, local_assigns, &block)
-  output
-end
-
-
- -

+ See on GitHub + + + +

@@ -496,22 +496,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/test_case.rb, line 292
+      def rendered
+        @_rendered ||= self.class.content_class.new(@rendered)
+      end
- -
-
# File actionview/lib/action_view/test_case.rb, line 292
-def rendered
-  @_rendered ||= self.class.content_class.new(@rendered)
-end
-
-
- -

+ See on GitHub + + + +

@@ -531,22 +531,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/test_case.rb, line 241
+      def rendered_views
+        @_rendered_views ||= RenderedViewsCollection.new
+      end
- -
-
# File actionview/lib/action_view/test_case.rb, line 241
-def rendered_views
-  @_rendered_views ||= RenderedViewsCollection.new
-end
-
-
- -

+ See on GitHub + + + +

@@ -566,30 +566,30 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/test_case.rb, line 219
+      def setup_with_controller
+        controller_class = Class.new(ActionView::TestCase::TestController)
+        @controller = controller_class.new
+        @request = @controller.request
+        @view_flow = ActionView::OutputFlow.new
+        @output_buffer = ActionView::OutputBuffer.new
+        @rendered = +""
+
+        test_case_instance = self
+        controller_class.define_method(:_test_case) { test_case_instance }
+      end
- -
-
# File actionview/lib/action_view/test_case.rb, line 219
-def setup_with_controller
-  controller_class = Class.new(ActionView::TestCase::TestController)
-  @controller = controller_class.new
-  @request = @controller.request
-  @view_flow = ActionView::OutputFlow.new
-  @output_buffer = ActionView::OutputBuffer.new
-  @rendered = +""
-
-  test_case_instance = self
-  controller_class.define_method(:_test_case) { test_case_instance }
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/TestCase/Behavior/ClassMethods.html b/src/classes/ActionView/TestCase/Behavior/ClassMethods.html index 8e93faca0d..2bdcb5f58c 100644 --- a/src/classes/ActionView/TestCase/Behavior/ClassMethods.html +++ b/src/classes/ActionView/TestCase/Behavior/ClassMethods.html @@ -109,24 +109,24 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/test_case.rb, line 162
+        def determine_default_helper_class(name)
+          determine_constant_from_test_name(name) do |constant|
+            Module === constant && !(Class === constant)
+          end
+        end
- -
-
# File actionview/lib/action_view/test_case.rb, line 162
-def determine_default_helper_class(name)
-  determine_constant_from_test_name(name) do |constant|
-    Module === constant && !(Class === constant)
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -146,22 +146,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/test_case.rb, line 182
+        def helper_class
+          @helper_class ||= determine_default_helper_class(name)
+        end
- -
-
# File actionview/lib/action_view/test_case.rb, line 182
-def helper_class
-  @helper_class ||= determine_default_helper_class(name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -181,30 +181,30 @@

- -
- - -
-
# File actionview/lib/action_view/test_case.rb, line 168
-        def helper_method(*methods)
-          # Almost a duplicate from ActionController::Helpers
-          methods.flatten.each do |method|
-            _helpers_for_modification.module_eval <<~end_eval, __FILE__, __LINE__ + 1
-              def #{method}(*args, &block)                    # def current_user(*args, &block)
-                _test_case.send(:'#{method}', *args, &block)  #   _test_case.send(:'current_user', *args, &block)
+          
+            
+ + Source code + + +
# File actionview/lib/action_view/test_case.rb, line 168
+        def helper_method(*methods)
+          # Almost a duplicate from ActionController::Helpers
+          methods.flatten.each do |method|
+            _helpers_for_modification.module_eval <<~end_eval, __FILE__, __LINE__ + 1
+              def #{method}(*args, &block)                    # def current_user(*args, &block)
+                _test_case.send(:'#{method}', *args, &block)  #   _test_case.send(:'current_user', *args, &block)
               end                                             # end
-              ruby2_keywords(:'#{method}')
-            end_eval
-          end
-        end
-
-
- -

+ ruby2_keywords(:'#{method}') + end_eval + end + end + + See on GitHub + + + +

@@ -224,23 +224,23 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/test_case.rb, line 186
+        def new(*)
+          include_helper_modules!
+          super
+        end
- -
-
# File actionview/lib/action_view/test_case.rb, line 186
-def new(*)
-  include_helper_modules!
-  super
-end
-
-
- -

+ See on GitHub + + + +

@@ -331,25 +331,25 @@

Examples

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/test_case.rb, line 146
+        def register_parser(format, callable = nil, &block)
+          parser = callable || block || :itself.to_proc
+          content_class.redefine_method(format) do
+            parser.call(to_s)
+          end
+        end
- -
-
# File actionview/lib/action_view/test_case.rb, line 146
-def register_parser(format, callable = nil, &block)
-  parser = callable || block || :itself.to_proc
-  content_class.redefine_method(format) do
-    parser.call(to_s)
-  end
-end
-
-
- -
+ See on GitHub + + + +

@@ -369,27 +369,27 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/test_case.rb, line 153
+        def tests(helper_class)
+          case helper_class
+          when String, Symbol
+            self.helper_class = "#{helper_class.to_s.underscore}_helper".camelize.safe_constantize
+          when Module
+            self.helper_class = helper_class
+          end
+        end
- -
-
# File actionview/lib/action_view/test_case.rb, line 153
-def tests(helper_class)
-  case helper_class
-  when String, Symbol
-    self.helper_class = "#{helper_class.to_s.underscore}_helper".camelize.safe_constantize
-  when Module
-    self.helper_class = helper_class
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/TestCase/Behavior/Locals.html b/src/classes/ActionView/TestCase/Behavior/Locals.html index f514c65dfb..ce912e1840 100644 --- a/src/classes/ActionView/TestCase/Behavior/Locals.html +++ b/src/classes/ActionView/TestCase/Behavior/Locals.html @@ -89,33 +89,33 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/test_case.rb, line 338
+        def render(options = {}, local_assigns = {})
+          case options
+          when Hash
+            if block_given?
+              rendered_views.add options[:layout], options[:locals]
+            elsif options.key?(:partial)
+              rendered_views.add options[:partial], options[:locals]
+            end
+          else
+            rendered_views.add options, local_assigns
+          end
+
+          super
+        end
- -
-
# File actionview/lib/action_view/test_case.rb, line 338
-def render(options = {}, local_assigns = {})
-  case options
-  when Hash
-    if block_given?
-      rendered_views.add options[:layout], options[:locals]
-    elsif options.key?(:partial)
-      rendered_views.add options[:partial], options[:locals]
-    end
-  else
-    rendered_views.add options, local_assigns
-  end
-
-  super
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionView/TestCase/Behavior/RenderedViewsCollection.html b/src/classes/ActionView/TestCase/Behavior/RenderedViewsCollection.html index 6e27988af5..5fe37bcbc0 100644 --- a/src/classes/ActionView/TestCase/Behavior/RenderedViewsCollection.html +++ b/src/classes/ActionView/TestCase/Behavior/RenderedViewsCollection.html @@ -102,22 +102,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/test_case.rb, line 305
+        def initialize
+          @rendered_views ||= Hash.new { |hash, key| hash[key] = [] }
+        end
- -
-
# File actionview/lib/action_view/test_case.rb, line 305
-def initialize
-  @rendered_views ||= Hash.new { |hash, key| hash[key] = [] }
-end
-
-
- - + See on GitHub + + + + @@ -141,23 +141,23 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/test_case.rb, line 309
+        def add(view, locals)
+          @rendered_views[view] ||= []
+          @rendered_views[view] << locals
+        end
- -
-
# File actionview/lib/action_view/test_case.rb, line 309
-def add(view, locals)
-  @rendered_views[view] ||= []
-  @rendered_views[view] << locals
-end
-
-
- - + See on GitHub + + + +

@@ -177,22 +177,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/test_case.rb, line 314
+        def locals_for(view)
+          @rendered_views[view]
+        end
- -
-
# File actionview/lib/action_view/test_case.rb, line 314
-def locals_for(view)
-  @rendered_views[view]
-end
-
-
- -

+ See on GitHub + + + +

@@ -212,22 +212,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/test_case.rb, line 318
+        def rendered_views
+          @rendered_views.keys
+        end
- -
-
# File actionview/lib/action_view/test_case.rb, line 318
-def rendered_views
-  @rendered_views.keys
-end
-
-
- -

+ See on GitHub + + + +

@@ -247,24 +247,24 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/test_case.rb, line 322
+        def view_rendered?(view, expected_locals)
+          locals_for(view).any? do |actual_locals|
+            expected_locals.all? { |key, value| value == actual_locals[key] }
+          end
+        end
- -
-
# File actionview/lib/action_view/test_case.rb, line 322
-def view_rendered?(view, expected_locals)
-  locals_for(view).any? do |actual_locals|
-    expected_locals.all? { |key, value| value == actual_locals[key] }
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActionView/TestCase/TestController.html b/src/classes/ActionView/TestCase/TestController.html index f66c8c1dfb..c40c6a20c0 100644 --- a/src/classes/ActionView/TestCase/TestController.html +++ b/src/classes/ActionView/TestCase/TestController.html @@ -140,22 +140,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/test_case.rb, line 30
+      def self.controller_name
+        "test"
+      end
- -
-
# File actionview/lib/action_view/test_case.rb, line 30
-def self.controller_name
-  "test"
-end
-
-
- - + See on GitHub + + + +

@@ -175,28 +175,28 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/test_case.rb, line 34
+      def initialize
+        super
+        self.class.controller_path = ""
+        @request = ActionController::TestRequest.create(self.class)
+        @response = ActionDispatch::TestResponse.new
+
+        @request.env.delete("PATH_INFO")
+        @params = ActionController::Parameters.new
+      end
- -
-
# File actionview/lib/action_view/test_case.rb, line 34
-def initialize
-  super
-  self.class.controller_path = ""
-  @request = ActionController::TestRequest.create(self.class)
-  @response = ActionDispatch::TestResponse.new
-
-  @request.env.delete("PATH_INFO")
-  @params = ActionController::Parameters.new
-end
-
-
- -

+ See on GitHub + + + + @@ -220,22 +220,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/test_case.rb, line 26
+      def controller_path=(path)
+        self.class.controller_path = path
+      end
- -
-
# File actionview/lib/action_view/test_case.rb, line 26
-def controller_path=(path)
-  self.class.controller_path = path
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionView/UnboundTemplate.html b/src/classes/ActionView/UnboundTemplate.html index 4e94889408..07ad3db6c1 100644 --- a/src/classes/ActionView/UnboundTemplate.html +++ b/src/classes/ActionView/UnboundTemplate.html @@ -106,28 +106,28 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/unbound_template.rb, line 10
+    def initialize(source, identifier, details:, virtual_path:)
+      @source = source
+      @identifier = identifier
+      @details = details
+      @virtual_path = virtual_path
+
+      @templates = Concurrent::Map.new(initial_capacity: 2)
+      @write_lock = Mutex.new
+    end
- -
-
# File actionview/lib/action_view/unbound_template.rb, line 10
-def initialize(source, identifier, details:, virtual_path:)
-  @source = source
-  @identifier = identifier
-  @details = details
-  @virtual_path = virtual_path
-
-  @templates = Concurrent::Map.new(initial_capacity: 2)
-  @write_lock = Mutex.new
-end
-
-
- - + See on GitHub + + + + @@ -151,42 +151,42 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/unbound_template.rb, line 20
+    def bind_locals(locals)
+      unless template = @templates[locals]
+        @write_lock.synchronize do
+          normalized_locals = normalize_locals(locals)
+
+          # We need ||=, both to dedup on the normalized locals and to check
+          # while holding the lock.
+          template = (@templates[normalized_locals] ||= build_template(normalized_locals))
+
+          # This may have already been assigned, but we've already de-dup'd so
+          # reassignment is fine.
+          @templates[locals.dup] = template
+
+          if template.strict_locals?
+            # Under strict locals, we only need one template.
+            # This replaces the @templates Concurrent::Map with a hash which
+            # returns this template for every key.
+            @templates = Hash.new(template).freeze
+          end
+        end
+      end
+      template
+    end
- -
-
# File actionview/lib/action_view/unbound_template.rb, line 20
-def bind_locals(locals)
-  unless template = @templates[locals]
-    @write_lock.synchronize do
-      normalized_locals = normalize_locals(locals)
-
-      # We need ||=, both to dedup on the normalized locals and to check
-      # while holding the lock.
-      template = (@templates[normalized_locals] ||= build_template(normalized_locals))
-
-      # This may have already been assigned, but we've already de-dup'd so
-      # reassignment is fine.
-      @templates[locals.dup] = template
-
-      if template.strict_locals?
-        # Under strict locals, we only need one template.
-        # This replaces the @templates Concurrent::Map with a hash which
-        # returns this template for every key.
-        @templates = Hash.new(template).freeze
-      end
-    end
-  end
-  template
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActionView/ViewPaths.html b/src/classes/ActionView/ViewPaths.html index f73da9caa7..527048ab4b 100644 --- a/src/classes/ActionView/ViewPaths.html +++ b/src/classes/ActionView/ViewPaths.html @@ -105,22 +105,22 @@

Parameters

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/view_paths.rb, line 103
+    def append_view_path(path)
+      lookup_context.append_view_paths(self.class._build_view_paths(path))
+    end
- -
-
# File actionview/lib/action_view/view_paths.rb, line 103
-def append_view_path(path)
-  lookup_context.append_view_paths(self.class._build_view_paths(path))
-end
-
-
- - + See on GitHub + + + +

@@ -140,22 +140,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/view_paths.rb, line 93
+    def details_for_lookup
+      {}
+    end
- -
-
# File actionview/lib/action_view/view_paths.rb, line 93
-def details_for_lookup
-  {}
-end
-
-
- -

+ See on GitHub + + + +

@@ -175,23 +175,23 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/view_paths.rb, line 88
+    def lookup_context
+      @_lookup_context ||=
+        ActionView::LookupContext.new(self.class._view_paths, details_for_lookup, _prefixes)
+    end
- -
-
# File actionview/lib/action_view/view_paths.rb, line 88
-def lookup_context
-  @_lookup_context ||=
-    ActionView::LookupContext.new(self.class._view_paths, details_for_lookup, _prefixes)
-end
-
-
- -

+ See on GitHub + + + +

@@ -216,22 +216,22 @@

Parameters

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/view_paths.rb, line 113
+    def prepend_view_path(path)
+      lookup_context.prepend_view_paths(self.class._build_view_paths(path))
+    end
- -
-
# File actionview/lib/action_view/view_paths.rb, line 113
-def prepend_view_path(path)
-  lookup_context.prepend_view_paths(self.class._build_view_paths(path))
-end
-
-
- -
+ See on GitHub + + + + diff --git a/src/classes/ActionView/ViewPaths/ClassMethods.html b/src/classes/ActionView/ViewPaths/ClassMethods.html index f34d5098d6..5d8f5f9686 100644 --- a/src/classes/ActionView/ViewPaths/ClassMethods.html +++ b/src/classes/ActionView/ViewPaths/ClassMethods.html @@ -95,22 +95,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/view_paths.rb, line 15
+      def _view_paths
+        ActionView::PathRegistry.get_view_paths(self)
+      end
- -
-
# File actionview/lib/action_view/view_paths.rb, line 15
-def _view_paths
-  ActionView::PathRegistry.get_view_paths(self)
-end
-
-
- - + See on GitHub + + + +

@@ -130,22 +130,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/view_paths.rb, line 19
+      def _view_paths=(paths)
+        ActionView::PathRegistry.set_view_paths(self, paths)
+      end
- -
-
# File actionview/lib/action_view/view_paths.rb, line 19
-def _view_paths=(paths)
-  ActionView::PathRegistry.set_view_paths(self, paths)
-end
-
-
- -

+ See on GitHub + + + +

@@ -170,22 +170,22 @@

Parameters

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/view_paths.rb, line 44
+      def append_view_path(path)
+        self._view_paths = view_paths + _build_view_paths(path)
+      end
- -
-
# File actionview/lib/action_view/view_paths.rb, line 44
-def append_view_path(path)
-  self._view_paths = view_paths + _build_view_paths(path)
-end
-
-
- -
+ See on GitHub + + + +

@@ -210,22 +210,22 @@

Parameters

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/view_paths.rb, line 54
+      def prepend_view_path(path)
+        self._view_paths = _build_view_paths(path) + view_paths
+      end
- -
-
# File actionview/lib/action_view/view_paths.rb, line 54
-def prepend_view_path(path)
-  self._view_paths = _build_view_paths(path) + view_paths
-end
-
-
- -
+ See on GitHub + + + +

@@ -245,22 +245,22 @@

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/view_paths.rb, line 59
+      def view_paths
+        _view_paths
+      end
- -
-
# File actionview/lib/action_view/view_paths.rb, line 59
-def view_paths
-  _view_paths
-end
-
-
- -

+ See on GitHub + + + +

@@ -285,22 +285,22 @@

Parameters

- -
+ +
+ + Source code + + +
# File actionview/lib/action_view/view_paths.rb, line 68
+      def view_paths=(paths)
+        self._view_paths = _build_view_paths(paths)
+      end
- -
-
# File actionview/lib/action_view/view_paths.rb, line 68
-def view_paths=(paths)
-  self._view_paths = _build_view_paths(paths)
-end
-
-
- -
+ See on GitHub + + + + diff --git a/src/classes/ActiveJob.html b/src/classes/ActiveJob.html index f0de1c1ca3..52ee16b434 100644 --- a/src/classes/ActiveJob.html +++ b/src/classes/ActiveJob.html @@ -339,22 +339,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/gem_version.rb, line 5
+  def self.gem_version
+    Gem::Version.new VERSION::STRING
+  end
- -
-
# File activejob/lib/active_job/gem_version.rb, line 5
-def self.gem_version
-  Gem::Version.new VERSION::STRING
-end
-
-
- - + See on GitHub + + + +

@@ -374,43 +374,43 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/enqueuing.rb, line 16
+    def perform_all_later(*jobs)
+      jobs.flatten!
+      jobs.group_by(&:queue_adapter).each do |queue_adapter, adapter_jobs|
+        instrument_enqueue_all(queue_adapter, adapter_jobs) do
+          if queue_adapter.respond_to?(:enqueue_all)
+            queue_adapter.enqueue_all(adapter_jobs)
+          else
+            adapter_jobs.each do |job|
+              job.successfully_enqueued = false
+              if job.scheduled_at
+                queue_adapter.enqueue_at(job, job._scheduled_at_time.to_f)
+              else
+                queue_adapter.enqueue(job)
+              end
+              job.successfully_enqueued = true
+            rescue EnqueueError => e
+              job.enqueue_error = e
+            end
+            adapter_jobs.count(&:successfully_enqueued?)
+          end
+        end
+      end
+      nil
+    end
- -
-
# File activejob/lib/active_job/enqueuing.rb, line 16
-def perform_all_later(*jobs)
-  jobs.flatten!
-  jobs.group_by(&:queue_adapter).each do |queue_adapter, adapter_jobs|
-    instrument_enqueue_all(queue_adapter, adapter_jobs) do
-      if queue_adapter.respond_to?(:enqueue_all)
-        queue_adapter.enqueue_all(adapter_jobs)
-      else
-        adapter_jobs.each do |job|
-          job.successfully_enqueued = false
-          if job.scheduled_at
-            queue_adapter.enqueue_at(job, job._scheduled_at_time.to_f)
-          else
-            queue_adapter.enqueue(job)
-          end
-          job.successfully_enqueued = true
-        rescue EnqueueError => e
-          job.enqueue_error = e
-        end
-        adapter_jobs.count(&:successfully_enqueued?)
-      end
-    end
-  end
-  nil
-end
-
-
- -

+ See on GitHub + + + +

@@ -430,21 +430,21 @@

- -
- - -
-
# File activejob/lib/active_job.rb, line 53
-singleton_class.attr_accessor :use_big_decimal_serializer
+          
+            
+ + Source code + + +
# File activejob/lib/active_job.rb, line 53
+  singleton_class.attr_accessor :use_big_decimal_serializer
 
-
-
- -

+ + See on GitHub + + + +

@@ -464,22 +464,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/version.rb, line 7
+  def self.version
+    gem_version
+  end
- -
-
# File activejob/lib/active_job/version.rb, line 7
-def self.version
-  gem_version
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveJob/Arguments.html b/src/classes/ActiveJob/Arguments.html index 35bcb33876..b1592b8df4 100644 --- a/src/classes/ActiveJob/Arguments.html +++ b/src/classes/ActiveJob/Arguments.html @@ -83,24 +83,24 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/arguments.rb, line 42
+    def deserialize(arguments)
+      arguments.map { |argument| deserialize_argument(argument) }
+    rescue
+      raise DeserializationError
+    end
- -
-
# File activejob/lib/active_job/arguments.rb, line 42
-def deserialize(arguments)
-  arguments.map { |argument| deserialize_argument(argument) }
-rescue
-  raise DeserializationError
-end
-
-
- - + See on GitHub + + + +

@@ -120,22 +120,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/arguments.rb, line 34
+    def serialize(arguments)
+      arguments.map { |argument| serialize_argument(argument) }
+    end
- -
-
# File activejob/lib/active_job/arguments.rb, line 34
-def serialize(arguments)
-  arguments.map { |argument| serialize_argument(argument) }
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveJob/Arguments/Hash.html b/src/classes/ActiveJob/Arguments/Hash.html deleted file mode 100644 index e9b6f1f8cd..0000000000 --- a/src/classes/ActiveJob/Arguments/Hash.html +++ /dev/null @@ -1,140 +0,0 @@ ---- -title: ActiveJob::Arguments::Hash -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - ruby2_keywords_hash(hash) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activejob/lib/active_job/arguments.rb, line 81
-def ruby2_keywords_hash(hash)
-  _ruby2_keywords_hash(**hash)
-end
-
-
- -
- -
-

- - ruby2_keywords_hash?(hash) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activejob/lib/active_job/arguments.rb, line 77
-def ruby2_keywords_hash?(hash)
-  !new(*[hash]).default.equal?(hash)
-end
-
-
- -
- - - - - -
- -
-
diff --git a/src/classes/ActiveJob/Callbacks/ClassMethods.html b/src/classes/ActiveJob/Callbacks/ClassMethods.html index 04e862ee45..adb0069ad9 100644 --- a/src/classes/ActiveJob/Callbacks/ClassMethods.html +++ b/src/classes/ActiveJob/Callbacks/ClassMethods.html @@ -114,22 +114,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/callbacks.rb, line 143
+      def after_enqueue(*filters, &blk)
+        set_callback(:enqueue, :after, *filters, &blk)
+      end
- -
-
# File activejob/lib/active_job/callbacks.rb, line 143
-def after_enqueue(*filters, &blk)
-  set_callback(:enqueue, :after, *filters, &blk)
-end
-
-
- - + See on GitHub + + + +

@@ -162,22 +162,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/callbacks.rb, line 72
+      def after_perform(*filters, &blk)
+        set_callback(:perform, :after, *filters, &blk)
+      end
- -
-
# File activejob/lib/active_job/callbacks.rb, line 72
-def after_perform(*filters, &blk)
-  set_callback(:perform, :after, *filters, &blk)
-end
-
-
- -

+ See on GitHub + + + +

@@ -212,22 +212,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/callbacks.rb, line 164
+      def around_enqueue(*filters, &blk)
+        set_callback(:enqueue, :around, *filters, &blk)
+      end
- -
-
# File activejob/lib/active_job/callbacks.rb, line 164
-def around_enqueue(*filters, &blk)
-  set_callback(:enqueue, :around, *filters, &blk)
-end
-
-
- -

+ See on GitHub + + + +

@@ -276,22 +276,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/callbacks.rb, line 105
+      def around_perform(*filters, &blk)
+        set_callback(:perform, :around, *filters, &blk)
+      end
- -
-
# File activejob/lib/active_job/callbacks.rb, line 105
-def around_perform(*filters, &blk)
-  set_callback(:perform, :around, *filters, &blk)
-end
-
-
- -

+ See on GitHub + + + +

@@ -324,22 +324,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/callbacks.rb, line 124
+      def before_enqueue(*filters, &blk)
+        set_callback(:enqueue, :before, *filters, &blk)
+      end
- -
-
# File activejob/lib/active_job/callbacks.rb, line 124
-def before_enqueue(*filters, &blk)
-  set_callback(:enqueue, :before, *filters, &blk)
-end
-
-
- -

+ See on GitHub + + + +

@@ -372,22 +372,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/callbacks.rb, line 53
+      def before_perform(*filters, &blk)
+        set_callback(:perform, :before, *filters, &blk)
+      end
- -
-
# File activejob/lib/active_job/callbacks.rb, line 53
-def before_perform(*filters, &blk)
-  set_callback(:perform, :before, *filters, &blk)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveJob/Core.html b/src/classes/ActiveJob/Core.html index 1e35a5b526..a35f953272 100644 --- a/src/classes/ActiveJob/Core.html +++ b/src/classes/ActiveJob/Core.html @@ -221,30 +221,30 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/core.rb, line 95
+    def initialize(*arguments)
+      @arguments  = arguments
+      @job_id     = SecureRandom.uuid
+      @queue_name = self.class.queue_name
+      @scheduled_at = nil
+      @_scheduled_at_time = nil
+      @priority   = self.class.priority
+      @executions = 0
+      @exception_executions = {}
+      @timezone   = Time.zone&.name
+    end
- -
-
# File activejob/lib/active_job/core.rb, line 95
-def initialize(*arguments)
-  @arguments  = arguments
-  @job_id     = SecureRandom.uuid
-  @queue_name = self.class.queue_name
-  @scheduled_at = nil
-  @_scheduled_at_time = nil
-  @priority   = self.class.priority
-  @executions = 0
-  @exception_executions = {}
-  @timezone   = Time.zone&.name
-end
-
-
- - + See on GitHub + + + + @@ -293,32 +293,32 @@

Examples

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/core.rb, line 153
+    def deserialize(job_data)
+      self.job_id               = job_data["job_id"]
+      self.provider_job_id      = job_data["provider_job_id"]
+      self.queue_name           = job_data["queue_name"]
+      self.priority             = job_data["priority"]
+      self.serialized_arguments = job_data["arguments"]
+      self.executions           = job_data["executions"]
+      self.exception_executions = job_data["exception_executions"]
+      self.locale               = job_data["locale"] || I18n.locale.to_s
+      self.timezone             = job_data["timezone"] || Time.zone&.name
+      self.enqueued_at          = Time.iso8601(job_data["enqueued_at"]) if job_data["enqueued_at"]
+      self.scheduled_at         = Time.iso8601(job_data["scheduled_at"]) if job_data["scheduled_at"]
+    end
- -
-
# File activejob/lib/active_job/core.rb, line 153
-def deserialize(job_data)
-  self.job_id               = job_data["job_id"]
-  self.provider_job_id      = job_data["provider_job_id"]
-  self.queue_name           = job_data["queue_name"]
-  self.priority             = job_data["priority"]
-  self.serialized_arguments = job_data["arguments"]
-  self.executions           = job_data["executions"]
-  self.exception_executions = job_data["exception_executions"]
-  self.locale               = job_data["locale"] || I18n.locale.to_s
-  self.timezone             = job_data["timezone"] || Time.zone&.name
-  self.enqueued_at          = Time.iso8601(job_data["enqueued_at"]) if job_data["enqueued_at"]
-  self.scheduled_at         = Time.iso8601(job_data["scheduled_at"]) if job_data["scheduled_at"]
-end
-
-
- - + See on GitHub + + + +

@@ -338,30 +338,30 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/core.rb, line 177
+    def scheduled_at=(value)
+      @_scheduled_at_time = if value&.is_a?(Numeric)
+        ActiveJob.deprecator.warn(<<~MSG.squish)
+          Assigning a numeric/epoch value to scheduled_at is deprecated. Use a Time object instead.
+        MSG
+        Time.at(value)
+      else
+        value
+      end
+      @scheduled_at = value
+    end
- -
-
# File activejob/lib/active_job/core.rb, line 177
-    def scheduled_at=(value)
-      @_scheduled_at_time = if value&.is_a?(Numeric)
-        ActiveJob.deprecator.warn(<<~MSG.squish)
-          Assigning a numeric/epoch value to scheduled_at is deprecated. Use a Time object instead.
-        MSG
-        Time.at(value)
-      else
-        value
-      end
-      @scheduled_at = value
-    end
-
-
- -

+ See on GitHub + + + +

@@ -381,35 +381,35 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/core.rb, line 110
+    def serialize
+      {
+        "job_class"  => self.class.name,
+        "job_id"     => job_id,
+        "provider_job_id" => provider_job_id,
+        "queue_name" => queue_name,
+        "priority"   => priority,
+        "arguments"  => serialize_arguments_if_needed(arguments),
+        "executions" => executions,
+        "exception_executions" => exception_executions,
+        "locale"     => I18n.locale.to_s,
+        "timezone"   => timezone,
+        "enqueued_at" => Time.now.utc.iso8601(9),
+        "scheduled_at" => _scheduled_at_time ? _scheduled_at_time.utc.iso8601(9) : nil,
+      }
+    end
- -
-
# File activejob/lib/active_job/core.rb, line 110
-def serialize
-  {
-    "job_class"  => self.class.name,
-    "job_id"     => job_id,
-    "provider_job_id" => provider_job_id,
-    "queue_name" => queue_name,
-    "priority"   => priority,
-    "arguments"  => serialize_arguments_if_needed(arguments),
-    "executions" => executions,
-    "exception_executions" => exception_executions,
-    "locale"     => I18n.locale.to_s,
-    "timezone"   => timezone,
-    "enqueued_at" => Time.now.utc.iso8601(9),
-    "scheduled_at" => _scheduled_at_time ? _scheduled_at_time.utc.iso8601(9) : nil,
-  }
-end
-
-
- -

+ See on GitHub + + + +

@@ -429,22 +429,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/core.rb, line 53
+    def successfully_enqueued?
+      @successfully_enqueued
+    end
- -
-
# File activejob/lib/active_job/core.rb, line 53
-def successfully_enqueued?
-  @successfully_enqueued
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveJob/Core/ClassMethods.html b/src/classes/ActiveJob/Core/ClassMethods.html index a2746dafb3..2a809a4841 100644 --- a/src/classes/ActiveJob/Core/ClassMethods.html +++ b/src/classes/ActiveJob/Core/ClassMethods.html @@ -85,24 +85,24 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/core.rb, line 64
+      def deserialize(job_data)
+        job = job_data["job_class"].constantize.new
+        job.deserialize(job_data)
+        job
+      end
- -
-
# File activejob/lib/active_job/core.rb, line 64
-def deserialize(job_data)
-  job = job_data["job_class"].constantize.new
-  job.deserialize(job_data)
-  job
-end
-
-
- - + See on GitHub + + + +

@@ -143,22 +143,22 @@

Examples

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/core.rb, line 88
+      def set(options = {})
+        ConfiguredJob.new(self, options)
+      end
- -
-
# File activejob/lib/active_job/core.rb, line 88
-def set(options = {})
-  ConfiguredJob.new(self, options)
-end
-
-
- -
+ See on GitHub + + + + diff --git a/src/classes/ActiveJob/Enqueuing.html b/src/classes/ActiveJob/Enqueuing.html index 1e7748848c..07d101fcda 100644 --- a/src/classes/ActiveJob/Enqueuing.html +++ b/src/classes/ActiveJob/Enqueuing.html @@ -108,41 +108,41 @@

Examples

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/enqueuing.rb, line 89
+    def enqueue(options = {})
+      set(options)
+      self.successfully_enqueued = false
+
+      run_callbacks :enqueue do
+        if scheduled_at
+          queue_adapter.enqueue_at self, _scheduled_at_time.to_f
+        else
+          queue_adapter.enqueue self
+        end
+
+        self.successfully_enqueued = true
+      rescue EnqueueError => e
+        self.enqueue_error = e
+      end
+
+      if successfully_enqueued?
+        self
+      else
+        false
+      end
+    end
- -
-
# File activejob/lib/active_job/enqueuing.rb, line 89
-def enqueue(options = {})
-  set(options)
-  self.successfully_enqueued = false
-
-  run_callbacks :enqueue do
-    if scheduled_at
-      queue_adapter.enqueue_at self, _scheduled_at_time.to_f
-    else
-      queue_adapter.enqueue self
-    end
-
-    self.successfully_enqueued = true
-  rescue EnqueueError => e
-    self.enqueue_error = e
-  end
-
-  if successfully_enqueued?
-    self
-  else
-    false
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveJob/Enqueuing/ClassMethods.html b/src/classes/ActiveJob/Enqueuing/ClassMethods.html index ea9a0641f2..640c89c681 100644 --- a/src/classes/ActiveJob/Enqueuing/ClassMethods.html +++ b/src/classes/ActiveJob/Enqueuing/ClassMethods.html @@ -89,27 +89,27 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/enqueuing.rb, line 58
+      def perform_later(...)
+        job = job_or_instantiate(...)
+        enqueue_result = job.enqueue
+
+        yield job if block_given?
+
+        enqueue_result
+      end
- -
-
# File activejob/lib/active_job/enqueuing.rb, line 58
-def perform_later(...)
-  job = job_or_instantiate(...)
-  enqueue_result = job.enqueue
-
-  yield job if block_given?
-
-  enqueue_result
-end
-
-
- - + See on GitHub + + + +

Instance Private methods

@@ -132,22 +132,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/enqueuing.rb, line 68
+        def job_or_instantiate(*args) # :doc:
+          args.first.is_a?(self) ? args.first : new(*args)
+        end
- -
-
# File activejob/lib/active_job/enqueuing.rb, line 68
-def job_or_instantiate(*args) # :doc:
-  args.first.is_a?(self) ? args.first : new(*args)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveJob/Exceptions.html b/src/classes/ActiveJob/Exceptions.html index dad70e0280..b2b367991d 100644 --- a/src/classes/ActiveJob/Exceptions.html +++ b/src/classes/ActiveJob/Exceptions.html @@ -118,24 +118,24 @@

Examples

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/exceptions.rb, line 157
+    def retry_job(options = {})
+      instrument :enqueue_retry, options.slice(:error, :wait) do
+        enqueue options
+      end
+    end
- -
-
# File activejob/lib/active_job/exceptions.rb, line 157
-def retry_job(options = {})
-  instrument :enqueue_retry, options.slice(:error, :wait) do
-    enqueue options
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveJob/Exceptions/ClassMethods.html b/src/classes/ActiveJob/Exceptions/ClassMethods.html index fe55445336..df86c21f5f 100644 --- a/src/classes/ActiveJob/Exceptions/ClassMethods.html +++ b/src/classes/ActiveJob/Exceptions/ClassMethods.html @@ -95,22 +95,22 @@

Example

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/exceptions.rb, line 130
+      def after_discard(&blk)
+        self.after_discard_procs += [blk]
+      end
- -
-
# File activejob/lib/active_job/exceptions.rb, line 130
-def after_discard(&blk)
-  self.after_discard_procs += [blk]
-end
-
-
- - + See on GitHub + + + +

@@ -149,27 +149,27 @@

Example

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/exceptions.rb, line 109
+      def discard_on(*exceptions)
+        rescue_from(*exceptions) do |error|
+          instrument :discard, error: error do
+            yield self, error if block_given?
+            run_after_discard_procs(error)
+          end
+        end
+      end
- -
-
# File activejob/lib/active_job/exceptions.rb, line 109
-def discard_on(*exceptions)
-  rescue_from(*exceptions) do |error|
-    instrument :discard, error: error do
-      yield self, error if block_given?
-      run_after_discard_procs(error)
-    end
-  end
-end
-
-
- -
+ See on GitHub + + + +

@@ -232,44 +232,44 @@

Examples

- -
- - -
-
# File activejob/lib/active_job/exceptions.rb, line 62
-      def retry_on(*exceptions, wait: 3.seconds, attempts: 5, queue: nil, priority: nil, jitter: JITTER_DEFAULT)
-        if wait == :exponentially_longer
-          ActiveJob.deprecator.warn(<<~MSG.squish)
-            `wait: :exponentially_longer` will actually wait polynomially longer and is therefore deprecated.
+          
+            
+ + Source code + + +
# File activejob/lib/active_job/exceptions.rb, line 62
+      def retry_on(*exceptions, wait: 3.seconds, attempts: 5, queue: nil, priority: nil, jitter: JITTER_DEFAULT)
+        if wait == :exponentially_longer
+          ActiveJob.deprecator.warn(<<~MSG.squish)
+            `wait: :exponentially_longer` will actually wait polynomially longer and is therefore deprecated.
             Prefer `wait: :polynomially_longer` to avoid confusion and keep the same behavior.
-          MSG
-        end
-        rescue_from(*exceptions) do |error|
-          executions = executions_for(exceptions)
-          if attempts == :unlimited || executions < attempts
-            retry_job wait: determine_delay(seconds_or_duration_or_algorithm: wait, executions: executions, jitter: jitter), queue: queue, priority: priority, error: error
-          else
-            if block_given?
-              instrument :retry_stopped, error: error do
-                yield self, error
-              end
-              run_after_discard_procs(error)
-            else
-              instrument :retry_stopped, error: error
-              run_after_discard_procs(error)
-              raise error
-            end
-          end
-        end
-      end
-
-
- -
+ MSG + end + rescue_from(*exceptions) do |error| + executions = executions_for(exceptions) + if attempts == :unlimited || executions < attempts + retry_job wait: determine_delay(seconds_or_duration_or_algorithm: wait, executions: executions, jitter: jitter), queue: queue, priority: priority, error: error + else + if block_given? + instrument :retry_stopped, error: error do + yield self, error + end + run_after_discard_procs(error) + else + instrument :retry_stopped, error: error + run_after_discard_procs(error) + raise error + end + end + end + end + + See on GitHub + + + + diff --git a/src/classes/ActiveJob/Execution.html b/src/classes/ActiveJob/Execution.html index 55da1d2d47..53e0bf8ecc 100644 --- a/src/classes/ActiveJob/Execution.html +++ b/src/classes/ActiveJob/Execution.html @@ -114,22 +114,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/execution.rb, line 61
+    def perform(*)
+      fail NotImplementedError
+    end
- -
-
# File activejob/lib/active_job/execution.rb, line 61
-def perform(*)
-  fail NotImplementedError
-end
-
-
- - + See on GitHub + + + +

@@ -158,33 +158,33 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/execution.rb, line 46
+    def perform_now
+      # Guard against jobs that were persisted before we started counting executions by zeroing out nil counters
+      self.executions = (executions || 0) + 1
+
+      deserialize_arguments_if_needed
+
+      _perform_job
+    rescue Exception => exception
+      handled = rescue_with_handler(exception)
+      return handled if handled
+
+      run_after_discard_procs(exception)
+      raise
+    end
- -
-
# File activejob/lib/active_job/execution.rb, line 46
-def perform_now
-  # Guard against jobs that were persisted before we started counting executions by zeroing out nil counters
-  self.executions = (executions || 0) + 1
-
-  deserialize_arguments_if_needed
-
-  _perform_job
-rescue Exception => exception
-  handled = rescue_with_handler(exception)
-  return handled if handled
-
-  run_after_discard_procs(exception)
-  raise
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveJob/Execution/ClassMethods.html b/src/classes/ActiveJob/Execution/ClassMethods.html index 138e004358..6943e4c5b2 100644 --- a/src/classes/ActiveJob/Execution/ClassMethods.html +++ b/src/classes/ActiveJob/Execution/ClassMethods.html @@ -84,22 +84,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/execution.rb, line 23
+      def perform_now(...)
+        job_or_instantiate(...).perform_now
+      end
- -
-
# File activejob/lib/active_job/execution.rb, line 23
-def perform_now(...)
-  job_or_instantiate(...).perform_now
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveJob/QueueAdapter/ClassMethods.html b/src/classes/ActiveJob/QueueAdapter/ClassMethods.html index ec2b25ed77..631106f793 100644 --- a/src/classes/ActiveJob/QueueAdapter/ClassMethods.html +++ b/src/classes/ActiveJob/QueueAdapter/ClassMethods.html @@ -107,22 +107,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/queue_adapter.rb, line 35
+      def queue_adapter
+        _queue_adapter
+      end
- -
-
# File activejob/lib/active_job/queue_adapter.rb, line 35
-def queue_adapter
-  _queue_adapter
-end
-
-
- - + See on GitHub + + + +

@@ -142,33 +142,33 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/queue_adapter.rb, line 48
+      def queue_adapter=(name_or_adapter)
+        case name_or_adapter
+        when Symbol, String
+          queue_adapter = ActiveJob::QueueAdapters.lookup(name_or_adapter).new
+          assign_adapter(name_or_adapter.to_s, queue_adapter)
+        else
+          if queue_adapter?(name_or_adapter)
+            adapter_name = ActiveJob.adapter_name(name_or_adapter).underscore
+            assign_adapter(adapter_name, name_or_adapter)
+          else
+            raise ArgumentError
+          end
+        end
+      end
- -
-
# File activejob/lib/active_job/queue_adapter.rb, line 48
-def queue_adapter=(name_or_adapter)
-  case name_or_adapter
-  when Symbol, String
-    queue_adapter = ActiveJob::QueueAdapters.lookup(name_or_adapter).new
-    assign_adapter(name_or_adapter.to_s, queue_adapter)
-  else
-    if queue_adapter?(name_or_adapter)
-      adapter_name = ActiveJob.adapter_name(name_or_adapter).underscore
-      assign_adapter(adapter_name, name_or_adapter)
-    else
-      raise ArgumentError
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -188,22 +188,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/queue_adapter.rb, line 41
+      def queue_adapter_name
+        _queue_adapter_name
+      end
- -
-
# File activejob/lib/active_job/queue_adapter.rb, line 41
-def queue_adapter_name
-  _queue_adapter_name
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveJob/QueueAdapters.html b/src/classes/ActiveJob/QueueAdapters.html index ad7acba703..0b885772ee 100644 --- a/src/classes/ActiveJob/QueueAdapters.html +++ b/src/classes/ActiveJob/QueueAdapters.html @@ -246,22 +246,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/queue_adapters.rb, line 137
+      def lookup(name)
+        const_get(name.to_s.camelize << ADAPTER)
+      end
- -
-
# File activejob/lib/active_job/queue_adapters.rb, line 137
-def lookup(name)
-  const_get(name.to_s.camelize << ADAPTER)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveJob/QueueAdapters/AsyncAdapter.html b/src/classes/ActiveJob/QueueAdapters/AsyncAdapter.html index 1abfd3fb47..951977bdf0 100644 --- a/src/classes/ActiveJob/QueueAdapters/AsyncAdapter.html +++ b/src/classes/ActiveJob/QueueAdapters/AsyncAdapter.html @@ -105,22 +105,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/queue_adapters/async_adapter.rb, line 35
+      def initialize(**executor_options)
+        @scheduler = Scheduler.new(**executor_options)
+      end
- -
-
# File activejob/lib/active_job/queue_adapters/async_adapter.rb, line 35
-def initialize(**executor_options)
-  @scheduler = Scheduler.new(**executor_options)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveJob/QueueAdapters/QuAdapter.html b/src/classes/ActiveJob/QueueAdapters/QuAdapter.html deleted file mode 100644 index 736132d61e..0000000000 --- a/src/classes/ActiveJob/QueueAdapters/QuAdapter.html +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: ActiveJob::QueueAdapters::QuAdapter -layout: default ---- -
- -
-
- -
- -

Qu adapter for Active Job

- -

Qu is a Ruby library for queuing and processing background jobs. It is heavily inspired by delayed_job and Resque. Qu was created to overcome some shortcomings in the existing queuing libraries. The advantages of Qu are: Multiple backends (redis, mongo), jobs are requeued when worker is killed, resque-like API.

- -

Read more about Qu here.

- -

To use Qu set the queue_adapter config to :qu.

- -
Rails.application.config.active_job.queue_adapter = :qu
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveJob/QueueAdapters/QueAdapter.html b/src/classes/ActiveJob/QueueAdapters/QueAdapter.html deleted file mode 100644 index 4d50782cd9..0000000000 --- a/src/classes/ActiveJob/QueueAdapters/QueAdapter.html +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: ActiveJob::QueueAdapters::QueAdapter -layout: default ---- -
- -
-
- -
- -

Que adapter for Active Job

- -

Que is a high-performance alternative to DelayedJob or QueueClassic that improves the reliability of your application by protecting your jobs with the same ACID guarantees as the rest of your data. Que is a queue for Ruby and PostgreSQL that manages jobs using advisory locks.

- -

Read more about Que here.

- -

To use Que set the queue_adapter config to :que.

- -
Rails.application.config.active_job.queue_adapter = :que
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveJob/QueueAdapters/QueueClassicAdapter.html b/src/classes/ActiveJob/QueueAdapters/QueueClassicAdapter.html index d8115d6da6..5572e8dc70 100644 --- a/src/classes/ActiveJob/QueueAdapters/QueueClassicAdapter.html +++ b/src/classes/ActiveJob/QueueAdapters/QueueClassicAdapter.html @@ -98,22 +98,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/queue_adapters/queue_classic_adapter.rb, line 45
+      def build_queue(queue_name)
+        QC::Queue.new(queue_name)
+      end
- -
-
# File activejob/lib/active_job/queue_adapters/queue_classic_adapter.rb, line 45
-def build_queue(queue_name)
-  QC::Queue.new(queue_name)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveJob/QueueAdapters/SneakersAdapter.html b/src/classes/ActiveJob/QueueAdapters/SneakersAdapter.html index f844a74c73..c6e19d7d52 100644 --- a/src/classes/ActiveJob/QueueAdapters/SneakersAdapter.html +++ b/src/classes/ActiveJob/QueueAdapters/SneakersAdapter.html @@ -95,22 +95,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/queue_adapters/sneakers_adapter.rb, line 21
+      def initialize
+        @monitor = Monitor.new
+      end
- -
-
# File activejob/lib/active_job/queue_adapters/sneakers_adapter.rb, line 21
-def initialize
-  @monitor = Monitor.new
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveJob/QueueAdapters/TestAdapter.html b/src/classes/ActiveJob/QueueAdapters/TestAdapter.html index c24b36adb2..965faa1a75 100644 --- a/src/classes/ActiveJob/QueueAdapters/TestAdapter.html +++ b/src/classes/ActiveJob/QueueAdapters/TestAdapter.html @@ -168,22 +168,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/queue_adapters/test_adapter.rb, line 19
+      def enqueued_jobs
+        @enqueued_jobs ||= []
+      end
- -
-
# File activejob/lib/active_job/queue_adapters/test_adapter.rb, line 19
-def enqueued_jobs
-  @enqueued_jobs ||= []
-end
-
-
- - + See on GitHub + + + +

@@ -203,22 +203,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/queue_adapters/test_adapter.rb, line 24
+      def performed_jobs
+        @performed_jobs ||= []
+      end
- -
-
# File activejob/lib/active_job/queue_adapters/test_adapter.rb, line 24
-def performed_jobs
-  @performed_jobs ||= []
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveJob/QueueName.html b/src/classes/ActiveJob/QueueName.html index ff18a82a5d..9e7516a166 100644 --- a/src/classes/ActiveJob/QueueName.html +++ b/src/classes/ActiveJob/QueueName.html @@ -88,25 +88,25 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/queue_name.rb, line 61
+    def queue_name
+      if @queue_name.is_a?(Proc)
+        @queue_name = self.class.queue_name_from_part(instance_exec(&@queue_name))
+      end
+      @queue_name
+    end
- -
-
# File activejob/lib/active_job/queue_name.rb, line 61
-def queue_name
-  if @queue_name.is_a?(Proc)
-    @queue_name = self.class.queue_name_from_part(instance_exec(&@queue_name))
-  end
-  @queue_name
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveJob/QueueName/ClassMethods.html b/src/classes/ActiveJob/QueueName/ClassMethods.html index 50b8666fda..fd863b02d6 100644 --- a/src/classes/ActiveJob/QueueName/ClassMethods.html +++ b/src/classes/ActiveJob/QueueName/ClassMethods.html @@ -109,26 +109,26 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/queue_name.rb, line 39
+      def queue_as(part_name = nil, &block)
+        if block_given?
+          self.queue_name = block
+        else
+          self.queue_name = queue_name_from_part(part_name)
+        end
+      end
- -
-
# File activejob/lib/active_job/queue_name.rb, line 39
-def queue_as(part_name = nil, &block)
-  if block_given?
-    self.queue_name = block
-  else
-    self.queue_name = queue_name_from_part(part_name)
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveJob/QueuePriority.html b/src/classes/ActiveJob/QueuePriority.html index dd55c6ee86..d3d2c5d0c6 100644 --- a/src/classes/ActiveJob/QueuePriority.html +++ b/src/classes/ActiveJob/QueuePriority.html @@ -88,25 +88,25 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/queue_priority.rb, line 53
+    def priority
+      if @priority.is_a?(Proc)
+        @priority = instance_exec(&@priority)
+      end
+      @priority
+    end
- -
-
# File activejob/lib/active_job/queue_priority.rb, line 53
-def priority
-  if @priority.is_a?(Proc)
-    @priority = instance_exec(&@priority)
-  end
-  @priority
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveJob/QueuePriority/ClassMethods.html b/src/classes/ActiveJob/QueuePriority/ClassMethods.html index dc2f169fc9..6985ef49e4 100644 --- a/src/classes/ActiveJob/QueuePriority/ClassMethods.html +++ b/src/classes/ActiveJob/QueuePriority/ClassMethods.html @@ -109,26 +109,26 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/queue_priority.rb, line 39
+      def queue_with_priority(priority = nil, &block)
+        if block_given?
+          self.priority = block
+        else
+          self.priority = priority
+        end
+      end
- -
-
# File activejob/lib/active_job/queue_priority.rb, line 39
-def queue_with_priority(priority = nil, &block)
-  if block_given?
-    self.priority = block
-  else
-    self.priority = priority
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveJob/Serializers/ObjectSerializer.html b/src/classes/ActiveJob/Serializers/ObjectSerializer.html index 14647349df..d9db01180d 100644 --- a/src/classes/ActiveJob/Serializers/ObjectSerializer.html +++ b/src/classes/ActiveJob/Serializers/ObjectSerializer.html @@ -132,22 +132,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/serializers/object_serializer.rb, line 42
+      def deserialize(json)
+        raise NotImplementedError
+      end
- -
-
# File activejob/lib/active_job/serializers/object_serializer.rb, line 42
-def deserialize(json)
-  raise NotImplementedError
-end
-
-
- - + See on GitHub + + + +

@@ -167,22 +167,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/serializers/object_serializer.rb, line 37
+      def serialize(hash)
+        { Arguments::OBJECT_SERIALIZER_KEY => self.class.name }.merge!(hash)
+      end
- -
-
# File activejob/lib/active_job/serializers/object_serializer.rb, line 37
-def serialize(hash)
-  { Arguments::OBJECT_SERIALIZER_KEY => self.class.name }.merge!(hash)
-end
-
-
- -

+ See on GitHub + + + +

@@ -202,22 +202,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/serializers/object_serializer.rb, line 32
+      def serialize?(argument)
+        argument.is_a?(klass)
+      end
- -
-
# File activejob/lib/active_job/serializers/object_serializer.rb, line 32
-def serialize?(argument)
-  argument.is_a?(klass)
-end
-
-
- -

+ See on GitHub + + + +

Instance Private methods

@@ -240,22 +240,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/serializers/object_serializer.rb, line 48
+        def klass # :doc:
+          raise NotImplementedError
+        end
- -
-
# File activejob/lib/active_job/serializers/object_serializer.rb, line 48
-def klass # :doc:
-  raise NotImplementedError
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveJob/Serializers/RangeSerializer.html b/src/classes/ActiveJob/Serializers/RangeSerializer.html index 4dc6b6c5e6..e14263bc0f 100644 --- a/src/classes/ActiveJob/Serializers/RangeSerializer.html +++ b/src/classes/ActiveJob/Serializers/RangeSerializer.html @@ -103,22 +103,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/serializers/range_serializer.rb, line 13
+      def deserialize(hash)
+        klass.new(*Arguments.deserialize(hash.values_at(*KEYS)))
+      end
- -
-
# File activejob/lib/active_job/serializers/range_serializer.rb, line 13
-def deserialize(hash)
-  klass.new(*Arguments.deserialize(hash.values_at(*KEYS)))
-end
-
-
- - + See on GitHub + + + +

@@ -138,23 +138,23 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/serializers/range_serializer.rb, line 8
+      def serialize(range)
+        args = Arguments.serialize([range.begin, range.end, range.exclude_end?])
+        super(KEYS.zip(args).to_h)
+      end
- -
-
# File activejob/lib/active_job/serializers/range_serializer.rb, line 8
-def serialize(range)
-  args = Arguments.serialize([range.begin, range.end, range.exclude_end?])
-  super(KEYS.zip(args).to_h)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveJob/TestHelper.html b/src/classes/ActiveJob/TestHelper.html index d638797872..699c1f9d4d 100644 --- a/src/classes/ActiveJob/TestHelper.html +++ b/src/classes/ActiveJob/TestHelper.html @@ -195,34 +195,34 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/test_helper.rb, line 123
+    def assert_enqueued_jobs(number, only: nil, except: nil, queue: nil, &block)
+      if block_given?
+        original_jobs = enqueued_jobs_with(only: only, except: except, queue: queue)
+
+        _assert_nothing_raised_or_warn("assert_enqueued_jobs", &block)
+
+        new_jobs = enqueued_jobs_with(only: only, except: except, queue: queue)
+
+        actual_count = (new_jobs - original_jobs).count
+      else
+        actual_count = enqueued_jobs_with(only: only, except: except, queue: queue).count
+      end
+
+      assert_equal number, actual_count, "#{number} jobs expected, but #{actual_count} were enqueued"
+    end
- -
-
# File activejob/lib/active_job/test_helper.rb, line 123
-def assert_enqueued_jobs(number, only: nil, except: nil, queue: nil, &block)
-  if block_given?
-    original_jobs = enqueued_jobs_with(only: only, except: except, queue: queue)
-
-    _assert_nothing_raised_or_warn("assert_enqueued_jobs", &block)
-
-    new_jobs = enqueued_jobs_with(only: only, except: except, queue: queue)
-
-    actual_count = (new_jobs - original_jobs).count
-  else
-    actual_count = enqueued_jobs_with(only: only, except: except, queue: queue).count
-  end
-
-  assert_equal number, actual_count, "#{number} jobs expected, but #{actual_count} were enqueued"
-end
-
-
- - + See on GitHub + + + +

@@ -296,64 +296,64 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/test_helper.rb, line 399
+    def assert_enqueued_with(job: nil, args: nil, at: nil, queue: nil, priority: nil, &block)
+      expected = { job: job, args: args, at: at, queue: queue, priority: priority }.compact
+      expected_args = prepare_args_for_assertion(expected)
+      potential_matches = []
+
+      if block_given?
+        original_enqueued_jobs = enqueued_jobs.dup
+
+        _assert_nothing_raised_or_warn("assert_enqueued_with", &block)
+
+        jobs = enqueued_jobs - original_enqueued_jobs
+      else
+        jobs = enqueued_jobs
+      end
+
+      matching_job = jobs.find do |enqueued_job|
+        deserialized_job = deserialize_args_for_assertion(enqueued_job)
+        potential_matches << deserialized_job
+
+        expected_args.all? do |key, value|
+          if value.respond_to?(:call)
+            value.call(deserialized_job[key])
+          else
+            value == deserialized_job[key]
+          end
+        end
+      end
+
+      matching_class = potential_matches.select do |enqueued_job|
+        enqueued_job["job_class"] == job.to_s
+      end
+
+      message = +"No enqueued job found with #{expected}"
+      if potential_matches.empty?
+        message << "\n\nNo jobs were enqueued"
+      elsif matching_class.empty?
+        message << "\n\nNo jobs of class #{expected[:job]} were enqueued, job classes enqueued: "
+        message << potential_matches.map { |job| job["job_class"] }.join(", ")
+      else
+        message << "\n\nPotential matches: #{matching_class.join("\n")}"
+      end
+
+      assert matching_job, message
+      instantiate_job(matching_job)
+    end
- -
-
# File activejob/lib/active_job/test_helper.rb, line 399
-def assert_enqueued_with(job: nil, args: nil, at: nil, queue: nil, priority: nil, &block)
-  expected = { job: job, args: args, at: at, queue: queue, priority: priority }.compact
-  expected_args = prepare_args_for_assertion(expected)
-  potential_matches = []
-
-  if block_given?
-    original_enqueued_jobs = enqueued_jobs.dup
-
-    _assert_nothing_raised_or_warn("assert_enqueued_with", &block)
-
-    jobs = enqueued_jobs - original_enqueued_jobs
-  else
-    jobs = enqueued_jobs
-  end
-
-  matching_job = jobs.find do |enqueued_job|
-    deserialized_job = deserialize_args_for_assertion(enqueued_job)
-    potential_matches << deserialized_job
-
-    expected_args.all? do |key, value|
-      if value.respond_to?(:call)
-        value.call(deserialized_job[key])
-      else
-        value == deserialized_job[key]
-      end
-    end
-  end
-
-  matching_class = potential_matches.select do |enqueued_job|
-    enqueued_job["job_class"] == job.to_s
-  end
-
-  message = +"No enqueued job found with #{expected}"
-  if potential_matches.empty?
-    message << "\n\nNo jobs were enqueued"
-  elsif matching_class.empty?
-    message << "\n\nNo jobs of class #{expected[:job]} were enqueued, job classes enqueued: "
-    message << potential_matches.map { |job| job["job_class"] }.join(", ")
-  else
-    message << "\n\nPotential matches: #{matching_class.join("\n")}"
-  end
-
-  assert matching_job, message
-  instantiate_job(matching_job)
-end
-
-
- -

+ See on GitHub + + + +

@@ -423,22 +423,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/test_helper.rb, line 185
+    def assert_no_enqueued_jobs(only: nil, except: nil, queue: nil, &block)
+      assert_enqueued_jobs 0, only: only, except: except, queue: queue, &block
+    end
- -
-
# File activejob/lib/active_job/test_helper.rb, line 185
-def assert_no_enqueued_jobs(only: nil, except: nil, queue: nil, &block)
-  assert_enqueued_jobs 0, only: only, except: except, queue: queue, &block
-end
-
-
- -

+ See on GitHub + + + +

@@ -511,22 +511,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/test_helper.rb, line 343
+    def assert_no_performed_jobs(only: nil, except: nil, queue: nil, &block)
+      assert_performed_jobs 0, only: only, except: except, queue: queue, &block
+    end
- -
-
# File activejob/lib/active_job/test_helper.rb, line 343
-def assert_no_performed_jobs(only: nil, except: nil, queue: nil, &block)
-  assert_performed_jobs 0, only: only, except: except, queue: queue, &block
-end
-
-
- -

+ See on GitHub + + + +

@@ -632,34 +632,34 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/test_helper.rb, line 275
+    def assert_performed_jobs(number, only: nil, except: nil, queue: nil, &block)
+      if block_given?
+        original_count = performed_jobs.size
+
+        perform_enqueued_jobs(only: only, except: except, queue: queue, &block)
+
+        new_count = performed_jobs.size
+
+        performed_jobs_size = new_count - original_count
+      else
+        performed_jobs_size = performed_jobs_with(only: only, except: except, queue: queue).count
+      end
+
+      assert_equal number, performed_jobs_size, "#{number} jobs expected, but #{performed_jobs_size} were performed"
+    end
- -
-
# File activejob/lib/active_job/test_helper.rb, line 275
-def assert_performed_jobs(number, only: nil, except: nil, queue: nil, &block)
-  if block_given?
-    original_count = performed_jobs.size
-
-    perform_enqueued_jobs(only: only, except: except, queue: queue, &block)
-
-    new_count = performed_jobs.size
-
-    performed_jobs_size = new_count - original_count
-  else
-    performed_jobs_size = performed_jobs_with(only: only, except: except, queue: queue).count
-  end
-
-  assert_equal number, performed_jobs_size, "#{number} jobs expected, but #{performed_jobs_size} were performed"
-end
-
-
- -

+ See on GitHub + + + +

@@ -735,65 +735,65 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/test_helper.rb, line 501
+    def assert_performed_with(job: nil, args: nil, at: nil, queue: nil, priority: nil, &block)
+      expected = { job: job, args: args, at: at, queue: queue, priority: priority }.compact
+      expected_args = prepare_args_for_assertion(expected)
+      potential_matches = []
+
+      if block_given?
+        original_performed_jobs_count = performed_jobs.count
+
+        perform_enqueued_jobs(&block)
+
+        jobs = performed_jobs.drop(original_performed_jobs_count)
+      else
+        jobs = performed_jobs
+      end
+
+      matching_job = jobs.find do |enqueued_job|
+        deserialized_job = deserialize_args_for_assertion(enqueued_job)
+        potential_matches << deserialized_job
+
+        expected_args.all? do |key, value|
+          if value.respond_to?(:call)
+            value.call(deserialized_job[key])
+          else
+            value == deserialized_job[key]
+          end
+        end
+      end
+
+      matching_class = potential_matches.select do |enqueued_job|
+        enqueued_job["job_class"] == job.to_s
+      end
+
+      message = +"No performed job found with #{expected}"
+      if potential_matches.empty?
+        message << "\n\nNo jobs were performed"
+      elsif matching_class.empty?
+        message << "\n\nNo jobs of class #{expected[:job]} were performed, job classes performed: "
+        message << potential_matches.map { |job| job["job_class"] }.join(", ")
+      else
+        message << "\n\nPotential matches: #{matching_class.join("\n")}"
+      end
+
+      assert matching_job, message
+
+      instantiate_job(matching_job)
+    end
- -
-
# File activejob/lib/active_job/test_helper.rb, line 501
-def assert_performed_with(job: nil, args: nil, at: nil, queue: nil, priority: nil, &block)
-  expected = { job: job, args: args, at: at, queue: queue, priority: priority }.compact
-  expected_args = prepare_args_for_assertion(expected)
-  potential_matches = []
-
-  if block_given?
-    original_performed_jobs_count = performed_jobs.count
-
-    perform_enqueued_jobs(&block)
-
-    jobs = performed_jobs.drop(original_performed_jobs_count)
-  else
-    jobs = performed_jobs
-  end
-
-  matching_job = jobs.find do |enqueued_job|
-    deserialized_job = deserialize_args_for_assertion(enqueued_job)
-    potential_matches << deserialized_job
-
-    expected_args.all? do |key, value|
-      if value.respond_to?(:call)
-        value.call(deserialized_job[key])
-      else
-        value == deserialized_job[key]
-      end
-    end
-  end
-
-  matching_class = potential_matches.select do |enqueued_job|
-    enqueued_job["job_class"] == job.to_s
-  end
-
-  message = +"No performed job found with #{expected}"
-  if potential_matches.empty?
-    message << "\n\nNo jobs were performed"
-  elsif matching_class.empty?
-    message << "\n\nNo jobs of class #{expected[:job]} were performed, job classes performed: "
-    message << potential_matches.map { |job| job["job_class"] }.join(", ")
-  else
-    message << "\n\nPotential matches: #{matching_class.join("\n")}"
-  end
-
-  assert matching_job, message
-
-  instantiate_job(matching_job)
-end
-
-
- -

+ See on GitHub + + + +

@@ -868,51 +868,51 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/test_helper.rb, line 608
+    def perform_enqueued_jobs(only: nil, except: nil, queue: nil, at: nil, &block)
+      return flush_enqueued_jobs(only: only, except: except, queue: queue, at: at) unless block_given?
+
+      return _assert_nothing_raised_or_warn("perform_enqueued_jobs", &block) unless using_test_adapter?
+
+      validate_option(only: only, except: except)
+
+      old_perform_enqueued_jobs = queue_adapter.perform_enqueued_jobs
+      old_perform_enqueued_at_jobs = queue_adapter.perform_enqueued_at_jobs
+      old_filter = queue_adapter.filter
+      old_reject = queue_adapter.reject
+      old_queue = queue_adapter.queue
+      old_at = queue_adapter.at
+
+      begin
+        queue_adapter.perform_enqueued_jobs = true
+        queue_adapter.perform_enqueued_at_jobs = true
+        queue_adapter.filter = only
+        queue_adapter.reject = except
+        queue_adapter.queue = queue
+        queue_adapter.at = at
+
+        _assert_nothing_raised_or_warn("perform_enqueued_jobs", &block)
+      ensure
+        queue_adapter.perform_enqueued_jobs = old_perform_enqueued_jobs
+        queue_adapter.perform_enqueued_at_jobs = old_perform_enqueued_at_jobs
+        queue_adapter.filter = old_filter
+        queue_adapter.reject = old_reject
+        queue_adapter.queue = old_queue
+        queue_adapter.at = old_at
+      end
+    end
- -
-
# File activejob/lib/active_job/test_helper.rb, line 608
-def perform_enqueued_jobs(only: nil, except: nil, queue: nil, at: nil, &block)
-  return flush_enqueued_jobs(only: only, except: except, queue: queue, at: at) unless block_given?
-
-  return _assert_nothing_raised_or_warn("perform_enqueued_jobs", &block) unless using_test_adapter?
-
-  validate_option(only: only, except: except)
-
-  old_perform_enqueued_jobs = queue_adapter.perform_enqueued_jobs
-  old_perform_enqueued_at_jobs = queue_adapter.perform_enqueued_at_jobs
-  old_filter = queue_adapter.filter
-  old_reject = queue_adapter.reject
-  old_queue = queue_adapter.queue
-  old_at = queue_adapter.at
-
-  begin
-    queue_adapter.perform_enqueued_jobs = true
-    queue_adapter.perform_enqueued_at_jobs = true
-    queue_adapter.filter = only
-    queue_adapter.reject = except
-    queue_adapter.queue = queue
-    queue_adapter.at = at
-
-    _assert_nothing_raised_or_warn("perform_enqueued_jobs", &block)
-  ensure
-    queue_adapter.perform_enqueued_jobs = old_perform_enqueued_jobs
-    queue_adapter.perform_enqueued_at_jobs = old_perform_enqueued_at_jobs
-    queue_adapter.filter = old_filter
-    queue_adapter.reject = old_reject
-    queue_adapter.queue = old_queue
-    queue_adapter.at = old_at
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -937,22 +937,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/test_helper.rb, line 646
+    def queue_adapter
+      ActiveJob::Base.queue_adapter
+    end
- -
-
# File activejob/lib/active_job/test_helper.rb, line 646
-def queue_adapter
-  ActiveJob::Base.queue_adapter
-end
-
-
- -

+ See on GitHub + + + +

@@ -976,22 +976,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/test_helper.rb, line 66
+    def queue_adapter_for_test
+      ActiveJob::QueueAdapters::TestAdapter.new
+    end
- -
-
# File activejob/lib/active_job/test_helper.rb, line 66
-def queue_adapter_for_test
-  ActiveJob::QueueAdapters::TestAdapter.new
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveJob/TestHelper/TestQueueAdapter/ClassMethods.html b/src/classes/ActiveJob/TestHelper/TestQueueAdapter/ClassMethods.html index cb4200947a..3922b5a143 100644 --- a/src/classes/ActiveJob/TestHelper/TestQueueAdapter/ClassMethods.html +++ b/src/classes/ActiveJob/TestHelper/TestQueueAdapter/ClassMethods.html @@ -83,22 +83,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/test_helper.rb, line 27
+        def disable_test_adapter
+          self._test_adapter = nil
+        end
- -
-
# File activejob/lib/active_job/test_helper.rb, line 27
-def disable_test_adapter
-  self._test_adapter = nil
-end
-
-
- - + See on GitHub + + + +

@@ -118,22 +118,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/test_helper.rb, line 31
+        def enable_test_adapter(test_adapter)
+          self._test_adapter = test_adapter
+        end
- -
-
# File activejob/lib/active_job/test_helper.rb, line 31
-def enable_test_adapter(test_adapter)
-  self._test_adapter = test_adapter
-end
-
-
- -

+ See on GitHub + + + +

@@ -153,22 +153,22 @@

- -
+ +
+ + Source code + + +
# File activejob/lib/active_job/test_helper.rb, line 23
+        def queue_adapter
+          self._test_adapter.nil? ? super : self._test_adapter
+        end
- -
-
# File activejob/lib/active_job/test_helper.rb, line 23
-def queue_adapter
-  self._test_adapter.nil? ? super : self._test_adapter
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveModel.html b/src/classes/ActiveModel.html index 30eb2ec11b..bd722c9c3c 100644 --- a/src/classes/ActiveModel.html +++ b/src/classes/ActiveModel.html @@ -593,23 +593,23 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model.rb, line 76
+  def self.eager_load!
+    super
+    ActiveModel::Serializers.eager_load!
+  end
- -
-
# File activemodel/lib/active_model.rb, line 76
-def self.eager_load!
-  super
-  ActiveModel::Serializers.eager_load!
-end
-
-
- - + See on GitHub + + + +

@@ -629,22 +629,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/gem_version.rb, line 5
+  def self.gem_version
+    Gem::Version.new VERSION::STRING
+  end
- -
-
# File activemodel/lib/active_model/gem_version.rb, line 5
-def self.gem_version
-  Gem::Version.new VERSION::STRING
-end
-
-
- -

+ See on GitHub + + + +

@@ -664,22 +664,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/version.rb, line 7
+  def self.version
+    gem_version
+  end
- -
-
# File activemodel/lib/active_model/version.rb, line 7
-def self.version
-  gem_version
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveModel/API.html b/src/classes/ActiveModel/API.html index 01abf99bb5..10c01ba4c1 100644 --- a/src/classes/ActiveModel/API.html +++ b/src/classes/ActiveModel/API.html @@ -171,24 +171,24 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/api.rb, line 80
+    def initialize(attributes = {})
+      assign_attributes(attributes) if attributes
+
+      super()
+    end
- -
-
# File activemodel/lib/active_model/api.rb, line 80
-def initialize(attributes = {})
-  assign_attributes(attributes) if attributes
-
-  super()
-end
-
-
- - + See on GitHub + + + + @@ -221,22 +221,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/api.rb, line 95
+    def persisted?
+      false
+    end
- -
-
# File activemodel/lib/active_model/api.rb, line 95
-def persisted?
-  false
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveModel/AttributeAssignment.html b/src/classes/ActiveModel/AttributeAssignment.html index 115d87b5f8..643b76ee11 100644 --- a/src/classes/ActiveModel/AttributeAssignment.html +++ b/src/classes/ActiveModel/AttributeAssignment.html @@ -99,27 +99,27 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/attribute_assignment.rb, line 28
+    def assign_attributes(new_attributes)
+      unless new_attributes.respond_to?(:each_pair)
+        raise ArgumentError, "When assigning attributes, you must pass a hash as an argument, #{new_attributes.class} passed."
+      end
+      return if new_attributes.empty?
+
+      _assign_attributes(sanitize_for_mass_assignment(new_attributes))
+    end
- -
-
# File activemodel/lib/active_model/attribute_assignment.rb, line 28
-def assign_attributes(new_attributes)
-  unless new_attributes.respond_to?(:each_pair)
-    raise ArgumentError, "When assigning attributes, you must pass a hash as an argument, #{new_attributes.class} passed."
-  end
-  return if new_attributes.empty?
-
-  _assign_attributes(sanitize_for_mass_assignment(new_attributes))
-end
-
-
- - + See on GitHub + + + +

@@ -143,7 +143,8 @@

-

+ + diff --git a/src/classes/ActiveModel/AttributeMethods.html b/src/classes/ActiveModel/AttributeMethods.html index 565be8dc1c..6011bf6aa2 100644 --- a/src/classes/ActiveModel/AttributeMethods.html +++ b/src/classes/ActiveModel/AttributeMethods.html @@ -200,22 +200,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/attribute_methods.rb, line 498
+    def attribute_missing(match, *args, &block)
+      __send__(match.proxy_target, match.attr_name, *args, &block)
+    end
- -
-
# File activemodel/lib/active_model/attribute_methods.rb, line 498
-def attribute_missing(match, *args, &block)
-  __send__(match.proxy_target, match.attr_name, *args, &block)
-end
-
-
- - + See on GitHub + + + +

@@ -237,27 +237,27 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/attribute_methods.rb, line 484
+    def method_missing(method, *args, &block)
+      if respond_to_without_attributes?(method, true)
+        super
+      else
+        match = matched_attribute_method(method.to_s)
+        match ? attribute_missing(match, *args, &block) : super
+      end
+    end
- -
-
# File activemodel/lib/active_model/attribute_methods.rb, line 484
-def method_missing(method, *args, &block)
-  if respond_to_without_attributes?(method, true)
-    super
-  else
-    match = matched_attribute_method(method.to_s)
-    match ? attribute_missing(match, *args, &block) : super
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -281,30 +281,30 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/attribute_methods.rb, line 507
+    def respond_to?(method, include_private_methods = false)
+      if super
+        true
+      elsif !include_private_methods && super(method, true)
+        # If we're here then we haven't found among non-private methods
+        # but found among all methods. Which means that the given method is private.
+        false
+      else
+        !matched_attribute_method(method.to_s).nil?
+      end
+    end
- -
-
# File activemodel/lib/active_model/attribute_methods.rb, line 507
-def respond_to?(method, include_private_methods = false)
-  if super
-    true
-  elsif !include_private_methods && super(method, true)
-    # If we're here then we haven't found among non-private methods
-    # but found among all methods. Which means that the given method is private.
-    false
-  else
-    !matched_attribute_method(method.to_s).nil?
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -328,7 +328,8 @@

-

+ + diff --git a/src/classes/ActiveModel/AttributeMethods/ClassMethods.html b/src/classes/ActiveModel/AttributeMethods/ClassMethods.html index e9daca16bb..1a0c5a4a76 100644 --- a/src/classes/ActiveModel/AttributeMethods/ClassMethods.html +++ b/src/classes/ActiveModel/AttributeMethods/ClassMethods.html @@ -134,26 +134,26 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/attribute_methods.rb, line 204
+      def alias_attribute(new_name, old_name)
+        old_name = old_name.to_s
+        new_name = new_name.to_s
+        self.attribute_aliases = attribute_aliases.merge(new_name => old_name)
+        aliases_by_attribute_name[old_name] << new_name
+        eagerly_generate_alias_attribute_methods(new_name, old_name)
+      end
- -
-
# File activemodel/lib/active_model/attribute_methods.rb, line 204
-def alias_attribute(new_name, old_name)
-  old_name = old_name.to_s
-  new_name = new_name.to_s
-  self.attribute_aliases = attribute_aliases.merge(new_name => old_name)
-  aliases_by_attribute_name[old_name] << new_name
-  eagerly_generate_alias_attribute_methods(new_name, old_name)
-end
-
-
- - + See on GitHub + + + +

@@ -173,22 +173,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/attribute_methods.rb, line 258
+      def attribute_alias(name)
+        attribute_aliases[name.to_s]
+      end
- -
-
# File activemodel/lib/active_model/attribute_methods.rb, line 258
-def attribute_alias(name)
-  attribute_aliases[name.to_s]
-end
-
-
- -

+ See on GitHub + + + +

@@ -208,22 +208,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/attribute_methods.rb, line 253
+      def attribute_alias?(new_name)
+        attribute_aliases.key? new_name.to_s
+      end
- -
-
# File activemodel/lib/active_model/attribute_methods.rb, line 253
-def attribute_alias?(new_name)
-  attribute_aliases.key? new_name.to_s
-end
-
-
- -

+ See on GitHub + + + +

@@ -272,23 +272,23 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/attribute_methods.rb, line 176
+      def attribute_method_affix(*affixes)
+        self.attribute_method_patterns += affixes.map! { |affix| AttributeMethodPattern.new(**affix) }
+        undefine_attribute_methods
+      end
- -
-
# File activemodel/lib/active_model/attribute_methods.rb, line 176
-def attribute_method_affix(*affixes)
-  self.attribute_method_patterns += affixes.map! { |affix| AttributeMethodPattern.new(**affix) }
-  undefine_attribute_methods
-end
-
-
- -

+ See on GitHub + + + +

@@ -338,23 +338,23 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/attribute_methods.rb, line 107
+      def attribute_method_prefix(*prefixes, parameters: nil)
+        self.attribute_method_patterns += prefixes.map! { |prefix| AttributeMethodPattern.new(prefix: prefix, parameters: parameters) }
+        undefine_attribute_methods
+      end
- -
-
# File activemodel/lib/active_model/attribute_methods.rb, line 107
-def attribute_method_prefix(*prefixes, parameters: nil)
-  self.attribute_method_patterns += prefixes.map! { |prefix| AttributeMethodPattern.new(prefix: prefix, parameters: parameters) }
-  undefine_attribute_methods
-end
-
-
- -

+ See on GitHub + + + +

@@ -403,23 +403,23 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/attribute_methods.rb, line 141
+      def attribute_method_suffix(*suffixes, parameters: nil)
+        self.attribute_method_patterns += suffixes.map! { |suffix| AttributeMethodPattern.new(suffix: suffix, parameters: parameters) }
+        undefine_attribute_methods
+      end
- -
-
# File activemodel/lib/active_model/attribute_methods.rb, line 141
-def attribute_method_suffix(*suffixes, parameters: nil)
-  self.attribute_method_patterns += suffixes.map! { |suffix| AttributeMethodPattern.new(suffix: suffix, parameters: parameters) }
-  undefine_attribute_methods
-end
-
-
- -

+ See on GitHub + + + +

@@ -464,37 +464,37 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/attribute_methods.rb, line 324
+      def define_attribute_method(attr_name, _owner: generated_attribute_methods)
+        ActiveSupport::CodeGenerator.batch(_owner, __FILE__, __LINE__) do |owner|
+          attribute_method_patterns.each do |pattern|
+            method_name = pattern.method_name(attr_name)
+
+            unless instance_method_already_implemented?(method_name)
+              generate_method = "define_method_#{pattern.proxy_target}"
+
+              if respond_to?(generate_method, true)
+                send(generate_method, attr_name.to_s, owner: owner)
+              else
+                define_proxy_call(owner, method_name, pattern.proxy_target, pattern.parameters, attr_name.to_s, namespace: :active_model_proxy)
+              end
+            end
+          end
+          attribute_method_patterns_cache.clear
+        end
+      end
- -
-
# File activemodel/lib/active_model/attribute_methods.rb, line 324
-def define_attribute_method(attr_name, _owner: generated_attribute_methods)
-  ActiveSupport::CodeGenerator.batch(_owner, __FILE__, __LINE__) do |owner|
-    attribute_method_patterns.each do |pattern|
-      method_name = pattern.method_name(attr_name)
-
-      unless instance_method_already_implemented?(method_name)
-        generate_method = "define_method_#{pattern.proxy_target}"
-
-        if respond_to?(generate_method, true)
-          send(generate_method, attr_name.to_s, owner: owner)
-        else
-          define_proxy_call(owner, method_name, pattern.proxy_target, pattern.parameters, attr_name.to_s, namespace: :active_model_proxy)
-        end
-      end
-    end
-    attribute_method_patterns_cache.clear
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -534,29 +534,29 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/attribute_methods.rb, line 285
+      def define_attribute_methods(*attr_names)
+        ActiveSupport::CodeGenerator.batch(generated_attribute_methods, __FILE__, __LINE__) do |owner|
+          attr_names.flatten.each do |attr_name|
+            define_attribute_method(attr_name, _owner: owner)
+            aliases_by_attribute_name[attr_name.to_s].each do |aliased_name|
+              generate_alias_attribute_methods owner, aliased_name, attr_name
+            end
+          end
+        end
+      end
- -
-
# File activemodel/lib/active_model/attribute_methods.rb, line 285
-def define_attribute_methods(*attr_names)
-  ActiveSupport::CodeGenerator.batch(generated_attribute_methods, __FILE__, __LINE__) do |owner|
-    attr_names.flatten.each do |attr_name|
-      define_attribute_method(attr_name, _owner: owner)
-      aliases_by_attribute_name[attr_name.to_s].each do |aliased_name|
-        generate_alias_attribute_methods owner, aliased_name, attr_name
-      end
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -576,24 +576,24 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/attribute_methods.rb, line 218
+      def generate_alias_attribute_methods(code_generator, new_name, old_name)
+        attribute_method_patterns.each do |pattern|
+          alias_attribute_method_definition(code_generator, pattern, new_name, old_name)
+        end
+      end
- -
-
# File activemodel/lib/active_model/attribute_methods.rb, line 218
-def generate_alias_attribute_methods(code_generator, new_name, old_name)
-  attribute_method_patterns.each do |pattern|
-    alias_attribute_method_definition(code_generator, pattern, new_name, old_name)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -638,25 +638,25 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/attribute_methods.rb, line 368
+      def undefine_attribute_methods
+        generated_attribute_methods.module_eval do
+          undef_method(*instance_methods)
+        end
+        attribute_method_patterns_cache.clear
+      end
- -
-
# File activemodel/lib/active_model/attribute_methods.rb, line 368
-def undefine_attribute_methods
-  generated_attribute_methods.module_eval do
-    undef_method(*instance_methods)
-  end
-  attribute_method_patterns_cache.clear
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveModel/AttributeMethods/ClassMethods/CodeGenerator.html b/src/classes/ActiveModel/AttributeMethods/ClassMethods/CodeGenerator.html deleted file mode 100644 index 8fb0874347..0000000000 --- a/src/classes/ActiveModel/AttributeMethods/ClassMethods/CodeGenerator.html +++ /dev/null @@ -1,281 +0,0 @@ ---- -title: ActiveModel::AttributeMethods::ClassMethods::CodeGenerator -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - batch(owner, path, line) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activemodel/lib/active_model/attribute_methods.rb, line 340
-def batch(owner, path, line)
-  if owner.is_a?(CodeGenerator)
-    yield owner
-  else
-    instance = new(owner, path, line)
-    result = yield instance
-    instance.execute
-    result
-  end
-end
-
-
- -
- -
-

- - new(owner, path, line) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activemodel/lib/active_model/attribute_methods.rb, line 352
-def initialize(owner, path, line)
-  @owner = owner
-  @path = path
-  @line = line
-  @sources = ["# frozen_string_literal: true\n"]
-  @renames = {}
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - <<(source_line) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activemodel/lib/active_model/attribute_methods.rb, line 360
-def <<(source_line)
-  @sources << source_line
-end
-
-
- -
- -
-

- - execute() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activemodel/lib/active_model/attribute_methods.rb, line 368
-def execute
-  @owner.module_eval(@sources.join(";"), @path, @line - 1)
-  @renames.each do |old_name, new_name|
-    @owner.alias_method new_name, old_name
-    @owner.undef_method old_name
-  end
-end
-
-
- -
- -
-

- - rename_method(old_name, new_name) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activemodel/lib/active_model/attribute_methods.rb, line 364
-def rename_method(old_name, new_name)
-  @renames[old_name] = new_name
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveModel/AttributeMethods/ClassMethods/CodeGenerator/MethodSet.html b/src/classes/ActiveModel/AttributeMethods/ClassMethods/CodeGenerator/MethodSet.html deleted file mode 100644 index 4cb1098946..0000000000 --- a/src/classes/ActiveModel/AttributeMethods/ClassMethods/CodeGenerator/MethodSet.html +++ /dev/null @@ -1,220 +0,0 @@ ---- -title: ActiveModel::AttributeMethods::ClassMethods::CodeGenerator::MethodSet -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - -

Constants

- - - - - - - - - - - - - - -
METHOD_CACHES=Hash.new { |h, k| h[k] = Module.new }
 
- - - - - - -

Class Public methods

- -
-

- - new(namespace) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activemodel/lib/active_model/attribute_methods.rb, line 365
-def initialize(namespace)
-  @cache = METHOD_CACHES[namespace]
-  @sources = []
-  @methods = {}
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - apply(owner, path, line) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activemodel/lib/active_model/attribute_methods.rb, line 382
-def apply(owner, path, line)
-  unless @sources.empty?
-    @cache.module_eval("# frozen_string_literal: true\n" + @sources.join(";"), path, line)
-  end
-  @methods.each do |name, as|
-    owner.define_method(name, @cache.instance_method(as))
-  end
-end
-
-
- -
- -
-

- - define_cached_method(name, as: name) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activemodel/lib/active_model/attribute_methods.rb, line 371
-def define_cached_method(name, as: name)
-  name = name.to_sym
-  as = as.to_sym
-  @methods.fetch(name) do
-    unless @cache.method_defined?(as)
-      yield @sources
-    end
-    @methods[name] = as
-  end
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveModel/Attributes.html b/src/classes/ActiveModel/Attributes.html index 81b24fa164..09f65bef45 100644 --- a/src/classes/ActiveModel/Attributes.html +++ b/src/classes/ActiveModel/Attributes.html @@ -143,22 +143,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/attributes.rb, line 133
+    def attribute_names
+      @attributes.keys
+    end
- -
-
# File activemodel/lib/active_model/attributes.rb, line 133
-def attribute_names
-  @attributes.keys
-end
-
-
- - + See on GitHub + + + +

@@ -192,22 +192,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/attributes.rb, line 118
+    def attributes
+      @attributes.to_hash
+    end
- -
-
# File activemodel/lib/active_model/attributes.rb, line 118
-def attributes
-  @attributes.to_hash
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveModel/Attributes/ClassMethods.html b/src/classes/ActiveModel/Attributes/ClassMethods.html index 044385521e..91bc1f783a 100644 --- a/src/classes/ActiveModel/Attributes/ClassMethods.html +++ b/src/classes/ActiveModel/Attributes/ClassMethods.html @@ -94,23 +94,23 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/attributes.rb, line 59
+      def attribute(name, ...)
+        super
+        define_attribute_method(name)
+      end
- -
-
# File activemodel/lib/active_model/attributes.rb, line 59
-def attribute(name, ...)
-  super
-  define_attribute_method(name)
-end
-
-
- - + See on GitHub + + + +

@@ -140,22 +140,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/attributes.rb, line 74
+      def attribute_names
+        attribute_types.keys
+      end
- -
-
# File activemodel/lib/active_model/attributes.rb, line 74
-def attribute_names
-  attribute_types.keys
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveModel/Callbacks.html b/src/classes/ActiveModel/Callbacks.html index 67c0786f50..3d2c0f30b7 100644 --- a/src/classes/ActiveModel/Callbacks.html +++ b/src/classes/ActiveModel/Callbacks.html @@ -179,37 +179,37 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/callbacks.rb, line 109
+    def define_model_callbacks(*callbacks)
+      options = callbacks.extract_options!
+      options = {
+        skip_after_callbacks_if_terminated: true,
+        scope: [:kind, :name],
+        only: [:before, :around, :after]
+      }.merge!(options)
+
+      types = Array(options.delete(:only))
+
+      callbacks.each do |callback|
+        define_callbacks(callback, options)
+
+        types.each do |type|
+          send("_define_#{type}_model_callback", self, callback)
+        end
+      end
+    end
- -
-
# File activemodel/lib/active_model/callbacks.rb, line 109
-def define_model_callbacks(*callbacks)
-  options = callbacks.extract_options!
-  options = {
-    skip_after_callbacks_if_terminated: true,
-    scope: [:kind, :name],
-    only: [:before, :around, :after]
-  }.merge!(options)
-
-  types = Array(options.delete(:only))
-
-  callbacks.each do |callback|
-    define_callbacks(callback, options)
-
-    types.each do |type|
-      send("_define_#{type}_model_callback", self, callback)
-    end
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveModel/Conversion.html b/src/classes/ActiveModel/Conversion.html index c47993c568..a1a4582586 100644 --- a/src/classes/ActiveModel/Conversion.html +++ b/src/classes/ActiveModel/Conversion.html @@ -116,21 +116,21 @@

- -
- - -
-
# File activemodel/lib/active_model/conversion.rb, line 32
-class_attribute :param_delimiter, instance_reader: false, default: "-"
+          
+            
+ + Source code + + +
# File activemodel/lib/active_model/conversion.rb, line 32
+      class_attribute :param_delimiter, instance_reader: false, default: "-"
 
-
-
- - + + See on GitHub + + + + @@ -167,23 +167,23 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/conversion.rb, line 67
+    def to_key
+      key = respond_to?(:id) && id
+      key ? Array(key) : nil
+    end
- -
-
# File activemodel/lib/active_model/conversion.rb, line 67
-def to_key
-  key = respond_to?(:id) && id
-  key ? Array(key) : nil
-end
-
-
- - + See on GitHub + + + +

@@ -213,22 +213,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/conversion.rb, line 49
+    def to_model
+      self
+    end
- -
-
# File activemodel/lib/active_model/conversion.rb, line 49
-def to_model
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -265,22 +265,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/conversion.rb, line 90
+    def to_param
+      (persisted? && (key = to_key) && key.all?) ? key.join(self.class.param_delimiter) : nil
+    end
- -
-
# File activemodel/lib/active_model/conversion.rb, line 90
-def to_param
-  (persisted? && (key = to_key) && key.all?) ? key.join(self.class.param_delimiter) : nil
-end
-
-
- -

+ See on GitHub + + + +

@@ -308,22 +308,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/conversion.rb, line 103
+    def to_partial_path
+      self.class._to_partial_path
+    end
- -
-
# File activemodel/lib/active_model/conversion.rb, line 103
-def to_partial_path
-  self.class._to_partial_path
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveModel/DeprecationHandlingDetailsHash.html b/src/classes/ActiveModel/DeprecationHandlingDetailsHash.html deleted file mode 100644 index 2890dc5de8..0000000000 --- a/src/classes/ActiveModel/DeprecationHandlingDetailsHash.html +++ /dev/null @@ -1,109 +0,0 @@ ---- -title: ActiveModel::DeprecationHandlingDetailsHash -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

-
    - -
  • - new -
  • - -
- - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - new(details) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activemodel/lib/active_model/errors.rb, line 661
-def initialize(details)
-  details.default = []
-  details.freeze
-  super(details)
-end
-
-
- -
- - - - - -
- -
-
diff --git a/src/classes/ActiveModel/DeprecationHandlingMessageArray.html b/src/classes/ActiveModel/DeprecationHandlingMessageArray.html deleted file mode 100644 index 14b8da3375..0000000000 --- a/src/classes/ActiveModel/DeprecationHandlingMessageArray.html +++ /dev/null @@ -1,196 +0,0 @@ ---- -title: ActiveModel::DeprecationHandlingMessageArray -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - new(content, errors, attribute) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activemodel/lib/active_model/errors.rb, line 639
-def initialize(content, errors, attribute)
-  @errors = errors
-  @attribute = attribute
-  super(content.freeze)
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - <<(message) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activemodel/lib/active_model/errors.rb, line 645
-def <<(message)
-  ActiveSupport::Deprecation.warn("Calling `<<` to an ActiveModel::Errors message array in order to add an error is deprecated. Please call `ActiveModel::Errors#add` instead.")
-
-  @errors.add(@attribute, message)
-  __setobj__ @errors.messages_for(@attribute)
-  self
-end
-
-
- -
- -
-

- - clear() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activemodel/lib/active_model/errors.rb, line 653
-def clear
-  ActiveSupport::Deprecation.warn("Calling `clear` to an ActiveModel::Errors message array in order to delete all errors is deprecated. Please call `ActiveModel::Errors#delete` instead.")
-
-  @errors.delete(@attribute)
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveModel/DeprecationHandlingMessageHash.html b/src/classes/ActiveModel/DeprecationHandlingMessageHash.html deleted file mode 100644 index 2e5a3c9d15..0000000000 --- a/src/classes/ActiveModel/DeprecationHandlingMessageHash.html +++ /dev/null @@ -1,198 +0,0 @@ ---- -title: ActiveModel::DeprecationHandlingMessageHash -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - new(errors) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activemodel/lib/active_model/errors.rb, line 600
-def initialize(errors)
-  @errors = errors
-  super(prepare_content)
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - []=(attribute, value) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activemodel/lib/active_model/errors.rb, line 605
-def []=(attribute, value)
-  ActiveSupport::Deprecation.warn("Calling `[]=` to an ActiveModel::Errors is deprecated. Please call `ActiveModel::Errors#add` instead.")
-
-  @errors.delete(attribute)
-  Array(value).each do |message|
-    @errors.add(attribute, message)
-  end
-
-  __setobj__ prepare_content
-end
-
-
- -
- -
-

- - delete(attribute) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activemodel/lib/active_model/errors.rb, line 616
-def delete(attribute)
-  ActiveSupport::Deprecation.warn("Calling `delete` to an ActiveModel::Errors messages hash is deprecated. Please call `ActiveModel::Errors#delete` instead.")
-
-  @errors.delete(attribute)
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveModel/Dirty.html b/src/classes/ActiveModel/Dirty.html index 22e1af846e..e0dc80fb61 100644 --- a/src/classes/ActiveModel/Dirty.html +++ b/src/classes/ActiveModel/Dirty.html @@ -309,20 +309,10 @@

- -
- - -
-
# File activemodel/lib/active_model/dirty.rb, line 155
-      
-
-
- - + + See on GitHub + +

@@ -349,20 +339,10 @@

- -
- - -
-
# File activemodel/lib/active_model/dirty.rb, line 144
-      
-
-
- -

+ + See on GitHub + +

@@ -390,20 +370,10 @@

- -
- - -
-
# File activemodel/lib/active_model/dirty.rb, line 193
-      
-
-
- -

+ + See on GitHub + +

@@ -433,20 +403,10 @@

- -
- - -
-
# File activemodel/lib/active_model/dirty.rb, line 129
-      
-
-
- -

+ + See on GitHub + +

@@ -474,20 +434,10 @@

- -
- - -
-
# File activemodel/lib/active_model/dirty.rb, line 205
-      
-
-
- -

+ + See on GitHub + +

@@ -514,20 +464,10 @@

- -
- - -
-
# File activemodel/lib/active_model/dirty.rb, line 182
-      
-
-
- -

+ + See on GitHub + +

@@ -554,20 +494,10 @@

- -
- - -
-
# File activemodel/lib/active_model/dirty.rb, line 166
-      
-
-
- -

+ + See on GitHub + +

@@ -587,22 +517,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/dirty.rb, line 293
+    def attribute_changed?(attr_name, **options)
+      mutations_from_database.changed?(attr_name.to_s, **options)
+    end
- -
-
# File activemodel/lib/active_model/dirty.rb, line 293
-def attribute_changed?(attr_name, **options)
-  mutations_from_database.changed?(attr_name.to_s, **options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -622,22 +552,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/dirty.rb, line 303
+    def attribute_previously_changed?(attr_name, **options)
+      mutations_before_last_save.changed?(attr_name.to_s, **options)
+    end
- -
-
# File activemodel/lib/active_model/dirty.rb, line 303
-def attribute_previously_changed?(attr_name, **options)
-  mutations_before_last_save.changed?(attr_name.to_s, **options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -657,22 +587,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/dirty.rb, line 308
+    def attribute_previously_was(attr_name)
+      mutations_before_last_save.original_value(attr_name.to_s)
+    end
- -
-
# File activemodel/lib/active_model/dirty.rb, line 308
-def attribute_previously_was(attr_name)
-  mutations_before_last_save.original_value(attr_name.to_s)
-end
-
-
- -

+ See on GitHub + + + +

@@ -692,22 +622,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/dirty.rb, line 298
+    def attribute_was(attr_name)
+      mutations_from_database.original_value(attr_name.to_s)
+    end
- -
-
# File activemodel/lib/active_model/dirty.rb, line 298
-def attribute_was(attr_name)
-  mutations_from_database.original_value(attr_name.to_s)
-end
-
-
- -

+ See on GitHub + + + +

@@ -732,22 +662,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/dirty.rb, line 288
+    def changed
+      mutations_from_database.changed_attribute_names
+    end
- -
-
# File activemodel/lib/active_model/dirty.rb, line 288
-def changed
-  mutations_from_database.changed_attribute_names
-end
-
-
- -

+ See on GitHub + + + +

@@ -772,22 +702,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/dirty.rb, line 279
+    def changed?
+      mutations_from_database.any_changes?
+    end
- -
-
# File activemodel/lib/active_model/dirty.rb, line 279
-def changed?
-  mutations_from_database.any_changes?
-end
-
-
- -

+ See on GitHub + + + +

@@ -812,22 +742,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/dirty.rb, line 336
+    def changed_attributes
+      mutations_from_database.changed_values
+    end
- -
-
# File activemodel/lib/active_model/dirty.rb, line 336
-def changed_attributes
-  mutations_from_database.changed_values
-end
-
-
- -

+ See on GitHub + + + +

@@ -852,22 +782,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/dirty.rb, line 346
+    def changes
+      mutations_from_database.changes
+    end
- -
-
# File activemodel/lib/active_model/dirty.rb, line 346
-def changes
-  mutations_from_database.changes
-end
-
-
- -

+ See on GitHub + + + +

@@ -887,27 +817,27 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/dirty.rb, line 265
+    def changes_applied
+      unless defined?(@attributes)
+        mutations_from_database.finalize_changes
+      end
+      @mutations_before_last_save = mutations_from_database
+      forget_attribute_assignments
+      @mutations_from_database = nil
+    end
- -
-
# File activemodel/lib/active_model/dirty.rb, line 265
-def changes_applied
-  unless defined?(@attributes)
-    mutations_from_database.finalize_changes
-  end
-  @mutations_before_last_save = mutations_from_database
-  forget_attribute_assignments
-  @mutations_from_database = nil
-end
-
-
- -

+ See on GitHub + + + +

@@ -936,21 +866,21 @@

- -
- - -
-
# File activemodel/lib/active_model/dirty.rb, line 241
-attribute_method_suffix "_previously_changed?", "_changed?", parameters: "**options"
+          
+            
+ + Source code + + +
# File activemodel/lib/active_model/dirty.rb, line 241
+      attribute_method_suffix "_previously_changed?", "_changed?", parameters: "**options"
 
-
-
- -

+ + See on GitHub + + + +

@@ -970,24 +900,24 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/dirty.rb, line 324
+    def clear_attribute_changes(attr_names)
+      attr_names.each do |attr_name|
+        clear_attribute_change(attr_name)
+      end
+    end
- -
-
# File activemodel/lib/active_model/dirty.rb, line 324
-def clear_attribute_changes(attr_names)
-  attr_names.each do |attr_name|
-    clear_attribute_change(attr_name)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1007,24 +937,24 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/dirty.rb, line 318
+    def clear_changes_information
+      @mutations_before_last_save = nil
+      forget_attribute_assignments
+      @mutations_from_database = nil
+    end
- -
-
# File activemodel/lib/active_model/dirty.rb, line 318
-def clear_changes_information
-  @mutations_before_last_save = nil
-  forget_attribute_assignments
-  @mutations_from_database = nil
-end
-
-
- -

+ See on GitHub + + + +

@@ -1050,22 +980,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/dirty.rb, line 356
+    def previous_changes
+      mutations_before_last_save.changes
+    end
- -
-
# File activemodel/lib/active_model/dirty.rb, line 356
-def previous_changes
-  mutations_before_last_save.changes
-end
-
-
- -

+ See on GitHub + + + +

@@ -1093,20 +1023,10 @@

- -
- - -
-
# File activemodel/lib/active_model/dirty.rb, line 217
-      
-
-
- -

+ + See on GitHub + +

@@ -1126,22 +1046,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/dirty.rb, line 313
+    def restore_attributes(attr_names = changed)
+      attr_names.each { |attr_name| restore_attribute!(attr_name) }
+    end
- -
-
# File activemodel/lib/active_model/dirty.rb, line 313
-def restore_attributes(attr_names = changed)
-  attr_names.each { |attr_name| restore_attribute!(attr_name) }
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveModel/EachValidator.html b/src/classes/ActiveModel/EachValidator.html index 6df4d442f6..a46f66da1e 100644 --- a/src/classes/ActiveModel/EachValidator.html +++ b/src/classes/ActiveModel/EachValidator.html @@ -116,25 +116,25 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validator.rb, line 140
+    def initialize(options)
+      @attributes = Array(options.delete(:attributes))
+      raise ArgumentError, ":attributes cannot be blank" if @attributes.empty?
+      super
+      check_validity!
+    end
- -
-
# File activemodel/lib/active_model/validator.rb, line 140
-def initialize(options)
-  @attributes = Array(options.delete(:attributes))
-  raise ArgumentError, ":attributes cannot be blank" if @attributes.empty?
-  super
-  check_validity!
-end
-
-
- - + See on GitHub + + + + @@ -158,21 +158,21 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validator.rb, line 168
+    def check_validity!
+    end
- -
-
# File activemodel/lib/active_model/validator.rb, line 168
-def check_validity!
-end
-
-
- - + See on GitHub + + + +

@@ -192,27 +192,27 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validator.rb, line 150
+    def validate(record)
+      attributes.each do |attribute|
+        value = record.read_attribute_for_validation(attribute)
+        next if (value.nil? && options[:allow_nil]) || (value.blank? && options[:allow_blank])
+        value = prepare_value_for_validation(value, record, attribute)
+        validate_each(record, attribute, value)
+      end
+    end
- -
-
# File activemodel/lib/active_model/validator.rb, line 150
-def validate(record)
-  attributes.each do |attribute|
-    value = record.read_attribute_for_validation(attribute)
-    next if (value.nil? && options[:allow_nil]) || (value.blank? && options[:allow_blank])
-    value = prepare_value_for_validation(value, record, attribute)
-    validate_each(record, attribute, value)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -232,22 +232,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validator.rb, line 161
+    def validate_each(record, attribute, value)
+      raise NotImplementedError, "Subclasses must implement a validate_each(record, attribute, value) method"
+    end
- -
-
# File activemodel/lib/active_model/validator.rb, line 161
-def validate_each(record, attribute, value)
-  raise NotImplementedError, "Subclasses must implement a validate_each(record, attribute, value) method"
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveModel/Error.html b/src/classes/ActiveModel/Error.html index f4113bb5bb..d07d2e543b 100644 --- a/src/classes/ActiveModel/Error.html +++ b/src/classes/ActiveModel/Error.html @@ -192,26 +192,26 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/error.rb, line 103
+    def initialize(base, attribute, type = :invalid, **options)
+      @base = base
+      @attribute = attribute
+      @raw_type = type
+      @type = type || :invalid
+      @options = options
+    end
- -
-
# File activemodel/lib/active_model/error.rb, line 103
-def initialize(base, attribute, type = :invalid, **options)
-  @base = base
-  @attribute = attribute
-  @raw_type = type
-  @type = type || :invalid
-  @options = options
-end
-
-
- - + See on GitHub + + + + @@ -239,7 +239,8 @@

- + +

@@ -268,22 +269,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/error.rb, line 149
+    def details
+      { error: raw_type }.merge(options.except(*CALLBACKS_OPTIONS + MESSAGE_OPTIONS))
+    end
- -
-
# File activemodel/lib/active_model/error.rb, line 149
-def details
-  { error: raw_type }.merge(options.except(*CALLBACKS_OPTIONS + MESSAGE_OPTIONS))
-end
-
-
- -

+ See on GitHub + + + +

@@ -308,22 +309,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/error.rb, line 159
+    def full_message
+      self.class.full_message(attribute, message, @base)
+    end
- -
-
# File activemodel/lib/active_model/error.rb, line 159
-def full_message
-  self.class.full_message(attribute, message, @base)
-end
-
-
- -

+ See on GitHub + + + +

@@ -345,32 +346,32 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/error.rb, line 166
+    def match?(attribute, type = nil, **options)
+      if @attribute != attribute || (type && @type != type)
+        return false
+      end
+
+      options.each do |key, value|
+        if @options[key] != value
+          return false
+        end
+      end
+
+      true
+    end
- -
-
# File activemodel/lib/active_model/error.rb, line 166
-def match?(attribute, type = nil, **options)
-  if @attribute != attribute || (type && @type != type)
-    return false
-  end
-
-  options.each do |key, value|
-    if @options[key] != value
-      return false
-    end
-  end
-
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -395,27 +396,27 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/error.rb, line 135
+    def message
+      case raw_type
+      when Symbol
+        self.class.generate_message(attribute, raw_type, @base, options.except(*CALLBACKS_OPTIONS))
+      else
+        raw_type
+      end
+    end
- -
-
# File activemodel/lib/active_model/error.rb, line 135
-def message
-  case raw_type
-  when Symbol
-    self.class.generate_message(attribute, raw_type, @base, options.except(*CALLBACKS_OPTIONS))
-  else
-    raw_type
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -437,24 +438,24 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/error.rb, line 184
+    def strict_match?(attribute, type, **options)
+      return false unless match?(attribute, type)
+
+      options == @options.except(*CALLBACKS_OPTIONS + MESSAGE_OPTIONS)
+    end
- -
-
# File activemodel/lib/active_model/error.rb, line 184
-def strict_match?(attribute, type, **options)
-  return false unless match?(attribute, type)
-
-  options == @options.except(*CALLBACKS_OPTIONS + MESSAGE_OPTIONS)
-end
-
-
- -

+ See on GitHub + + + +

Instance Protected methods

@@ -477,22 +478,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/error.rb, line 204
+      def attributes_for_hash
+        [@base, @attribute, @raw_type, @options.except(*CALLBACKS_OPTIONS)]
+      end
- -
-
# File activemodel/lib/active_model/error.rb, line 204
-def attributes_for_hash
-  [@base, @attribute, @raw_type, @options.except(*CALLBACKS_OPTIONS)]
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveModel/Errors.html b/src/classes/ActiveModel/Errors.html index 08f96f8364..face9d3aad 100644 --- a/src/classes/ActiveModel/Errors.html +++ b/src/classes/ActiveModel/Errors.html @@ -266,23 +266,23 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/errors.rb, line 91
+    def initialize(base)
+      @base = base
+      @errors = []
+    end
- -
-
# File activemodel/lib/active_model/errors.rb, line 91
-def initialize(base)
-  @base = base
-  @errors = []
-end
-
-
- - + See on GitHub + + + + @@ -310,22 +310,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/errors.rb, line 203
+    def [](attribute)
+      messages_for(attribute)
+    end
- -
-
# File activemodel/lib/active_model/errors.rb, line 203
-def [](attribute)
-  messages_for(attribute)
-end
-
-
- - + See on GitHub + + + +

@@ -390,32 +390,32 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/errors.rb, line 316
+    def add(attribute, type = :invalid, **options)
+      attribute, type, options = normalize_arguments(attribute, type, **options)
+      error = Error.new(@base, attribute, type, **options)
+
+      if exception = options[:strict]
+        exception = ActiveModel::StrictValidationFailed if exception == true
+        raise exception, error.full_message
+      end
+
+      @errors.append(error)
+
+      error
+    end
- -
-
# File activemodel/lib/active_model/errors.rb, line 316
-def add(attribute, type = :invalid, **options)
-  attribute, type, options = normalize_arguments(attribute, type, **options)
-  error = Error.new(@base, attribute, type, **options)
-
-  if exception = options[:strict]
-    exception = ActiveModel::StrictValidationFailed if exception == true
-    raise exception, error.full_message
-  end
-
-  @errors.append(error)
-
-  error
-end
-
-
- -

+ See on GitHub + + + +

@@ -450,30 +450,30 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/errors.rb, line 346
+    def added?(attribute, type = :invalid, options = {})
+      attribute, type, options = normalize_arguments(attribute, type, **options)
+
+      if type.is_a? Symbol
+        @errors.any? { |error|
+          error.strict_match?(attribute, type, **options)
+        }
+      else
+        messages_for(attribute).include?(type)
+      end
+    end
- -
-
# File activemodel/lib/active_model/errors.rb, line 346
-def added?(attribute, type = :invalid, options = {})
-  attribute, type, options = normalize_arguments(attribute, type, **options)
-
-  if type.is_a? Symbol
-    @errors.any? { |error|
-      error.strict_match?(attribute, type, **options)
-    }
-  else
-    messages_for(attribute).include?(type)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -497,22 +497,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/errors.rb, line 221
+    def as_json(options = nil)
+      to_hash(options && options[:full_messages])
+    end
- -
-
# File activemodel/lib/active_model/errors.rb, line 221
-def as_json(options = nil)
-  to_hash(options && options[:full_messages])
-end
-
-
- -

+ See on GitHub + + + +

@@ -536,22 +536,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/errors.rb, line 211
+    def attribute_names
+      @errors.map(&:attribute).uniq.freeze
+    end
- -
-
# File activemodel/lib/active_model/errors.rb, line 211
-def attribute_names
-  @errors.map(&:attribute).uniq.freeze
-end
-
-
- -

+ See on GitHub + + + +

@@ -576,27 +576,27 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/errors.rb, line 189
+    def delete(attribute, type = nil, **options)
+      attribute, type, options = normalize_arguments(attribute, type, **options)
+      matches = where(attribute, type, **options)
+      matches.each do |error|
+        @errors.delete(error)
+      end
+      matches.map(&:message).presence
+    end
- -
-
# File activemodel/lib/active_model/errors.rb, line 189
-def delete(attribute, type = nil, **options)
-  attribute, type, options = normalize_arguments(attribute, type, **options)
-  matches = where(attribute, type, **options)
-  matches.each do |error|
-    @errors.delete(error)
-  end
-  matches.map(&:message).presence
-end
-
-
- -

+ See on GitHub + + + +

@@ -616,27 +616,27 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/errors.rb, line 250
+    def details
+      hash = group_by_attribute.transform_values do |errors|
+        errors.map(&:details)
+      end
+      hash.default = EMPTY_ARRAY
+      hash.freeze
+      hash
+    end
- -
-
# File activemodel/lib/active_model/errors.rb, line 250
-def details
-  hash = group_by_attribute.transform_values do |errors|
-    errors.map(&:details)
-  end
-  hash.default = EMPTY_ARRAY
-  hash.freeze
-  hash
-end
-
-
- -

+ See on GitHub + + + +

@@ -659,22 +659,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/errors.rb, line 425
+    def full_message(attribute, message)
+      Error.full_message(attribute, message, @base)
+    end
- -
-
# File activemodel/lib/active_model/errors.rb, line 425
-def full_message(attribute, message)
-  Error.full_message(attribute, message, @base)
-end
-
-
- -

+ See on GitHub + + + +

@@ -708,22 +708,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/errors.rb, line 389
+    def full_messages
+      @errors.map(&:full_message)
+    end
- -
-
# File activemodel/lib/active_model/errors.rb, line 389
-def full_messages
-  @errors.map(&:full_message)
-end
-
-
- -

+ See on GitHub + + + +

@@ -753,22 +753,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/errors.rb, line 404
+    def full_messages_for(attribute)
+      where(attribute).map(&:full_message).freeze
+    end
- -
-
# File activemodel/lib/active_model/errors.rb, line 404
-def full_messages_for(attribute)
-  where(attribute).map(&:full_message).freeze
-end
-
-
- -

+ See on GitHub + + + +

@@ -809,22 +809,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/errors.rb, line 453
+    def generate_message(attribute, type = :invalid, options = {})
+      Error.generate_message(attribute, type, @base, options)
+    end
- -
-
# File activemodel/lib/active_model/errors.rb, line 453
-def generate_message(attribute, type = :invalid, options = {})
-  Error.generate_message(attribute, type, @base, options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -848,22 +848,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/errors.rb, line 263
+    def group_by_attribute
+      @errors.group_by(&:attribute)
+    end
- -
-
# File activemodel/lib/active_model/errors.rb, line 263
-def group_by_attribute
-  @errors.group_by(&:attribute)
-end
-
-
- -

+ See on GitHub + + + +

@@ -887,7 +887,8 @@

-

+ +

@@ -914,27 +915,27 @@

Options

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/errors.rb, line 128
+    def import(error, override_options = {})
+      [:attribute, :type].each do |key|
+        if override_options.key?(key)
+          override_options[key] = override_options[key].to_sym
+        end
+      end
+      @errors.append(NestedError.new(@base, error, override_options))
+    end
- -
-
# File activemodel/lib/active_model/errors.rb, line 128
-def import(error, override_options = {})
-  [:attribute, :type].each do |key|
-    if override_options.key?(key)
-      override_options[key] = override_options[key].to_sym
-    end
-  end
-  @errors.append(NestedError.new(@base, error, override_options))
-end
-
-
- -
+ See on GitHub + + + +

@@ -963,24 +964,24 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/errors.rb, line 176
+    def include?(attribute)
+      @errors.any? { |error|
+        error.match?(attribute.to_sym)
+      }
+    end
- -
-
# File activemodel/lib/active_model/errors.rb, line 176
-def include?(attribute)
-  @errors.any? { |error|
-    error.match?(attribute.to_sym)
-  }
-end
-
-
- -

+ See on GitHub + + + +

@@ -1004,7 +1005,8 @@

-

+ +

@@ -1034,26 +1036,26 @@

Examples

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/errors.rb, line 148
+    def merge!(other)
+      return errors if equal?(other)
+
+      other.errors.each { |error|
+        import(error)
+      }
+    end
- -
-
# File activemodel/lib/active_model/errors.rb, line 148
-def merge!(other)
-  return errors if equal?(other)
-
-  other.errors.each { |error|
-    import(error)
-  }
-end
-
-
- -
+ See on GitHub + + + +

@@ -1073,25 +1075,25 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/errors.rb, line 242
+    def messages
+      hash = to_hash
+      hash.default = EMPTY_ARRAY
+      hash.freeze
+      hash
+    end
- -
-
# File activemodel/lib/active_model/errors.rb, line 242
-def messages
-  hash = to_hash
-  hash.default = EMPTY_ARRAY
-  hash.freeze
-  hash
-end
-
-
- -

+ See on GitHub + + + +

@@ -1121,22 +1123,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/errors.rb, line 418
+    def messages_for(attribute)
+      where(attribute).map(&:message)
+    end
- -
-
# File activemodel/lib/active_model/errors.rb, line 418
-def messages_for(attribute)
-  where(attribute).map(&:message)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1166,28 +1168,28 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/errors.rb, line 369
+    def of_kind?(attribute, type = :invalid)
+      attribute, type = normalize_arguments(attribute, type)
+
+      if type.is_a? Symbol
+        !where(attribute, type).empty?
+      else
+        messages_for(attribute).include?(type)
+      end
+    end
- -
-
# File activemodel/lib/active_model/errors.rb, line 369
-def of_kind?(attribute, type = :invalid)
-  attribute, type = normalize_arguments(attribute, type)
-
-  if type.is_a? Symbol
-    !where(attribute, type).empty?
-  else
-    messages_for(attribute).include?(type)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1211,7 +1213,8 @@

-

+ +

@@ -1235,25 +1238,25 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/errors.rb, line 230
+    def to_hash(full_messages = false)
+      message_method = full_messages ? :full_message : :message
+      group_by_attribute.transform_values do |errors|
+        errors.map(&message_method)
+      end
+    end
- -
-
# File activemodel/lib/active_model/errors.rb, line 230
-def to_hash(full_messages = false)
-  message_method = full_messages ? :full_message : :message
-  group_by_attribute.transform_values do |errors|
-    errors.map(&message_method)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1280,25 +1283,25 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/errors.rb, line 163
+    def where(attribute, type = nil, **options)
+      attribute, type, options = normalize_arguments(attribute, type, **options)
+      @errors.select { |error|
+        error.match?(attribute, type, **options)
+      }
+    end
- -
-
# File activemodel/lib/active_model/errors.rb, line 163
-def where(attribute, type = nil, **options)
-  attribute, type, options = normalize_arguments(attribute, type, **options)
-  @errors.select { |error|
-    error.match?(attribute, type, **options)
-  }
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveModel/Lint/Tests.html b/src/classes/ActiveModel/Lint/Tests.html index 65f389b521..80124bbada 100644 --- a/src/classes/ActiveModel/Lint/Tests.html +++ b/src/classes/ActiveModel/Lint/Tests.html @@ -111,23 +111,23 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/lint.rb, line 102
+      def test_errors_aref
+        assert_respond_to model, :errors
+        assert_equal [], model.errors[:hello], "errors#[] should return an empty Array"
+      end
- -
-
# File activemodel/lib/active_model/lint.rb, line 102
-def test_errors_aref
-  assert_respond_to model, :errors
-  assert_equal [], model.errors[:hello], "errors#[] should return an empty Array"
-end
-
-
- - + See on GitHub + + + +

@@ -149,30 +149,30 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/lint.rb, line 81
+      def test_model_naming
+        assert_respond_to model.class, :model_name
+        model_name = model.class.model_name
+        assert_respond_to model_name, :to_str
+        assert_respond_to model_name.human, :to_str
+        assert_respond_to model_name.singular, :to_str
+        assert_respond_to model_name.plural, :to_str
+
+        assert_respond_to model, :model_name
+        assert_equal model.model_name, model.class.model_name
+      end
- -
-
# File activemodel/lib/active_model/lint.rb, line 81
-def test_model_naming
-  assert_respond_to model.class, :model_name
-  model_name = model.class.model_name
-  assert_respond_to model_name, :to_str
-  assert_respond_to model_name.human, :to_str
-  assert_respond_to model_name.singular, :to_str
-  assert_respond_to model_name.plural, :to_str
-
-  assert_respond_to model, :model_name
-  assert_equal model.model_name, model.class.model_name
-end
-
-
- -

+ See on GitHub + + + +

@@ -194,23 +194,23 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/lint.rb, line 70
+      def test_persisted?
+        assert_respond_to model, :persisted?
+        assert_boolean model.persisted?, "persisted?"
+      end
- -
-
# File activemodel/lib/active_model/lint.rb, line 70
-def test_persisted?
-  assert_respond_to model, :persisted?
-  assert_boolean model.persisted?, "persisted?"
-end
-
-
- -

+ See on GitHub + + + +

@@ -232,24 +232,24 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/lint.rb, line 31
+      def test_to_key
+        assert_respond_to model, :to_key
+        def model.persisted?() false end
+        assert model.to_key.nil?, "to_key should return nil when `persisted?` returns false"
+      end
- -
-
# File activemodel/lib/active_model/lint.rb, line 31
-def test_to_key
-  assert_respond_to model, :to_key
-  def model.persisted?() false end
-  assert model.to_key.nil?, "to_key should return nil when `persisted?` returns false"
-end
-
-
- -

+ See on GitHub + + + +

@@ -271,25 +271,25 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/lint.rb, line 46
+      def test_to_param
+        assert_respond_to model, :to_param
+        def model.to_key() [1] end
+        def model.persisted?() false end
+        assert model.to_param.nil?, "to_param should return nil when `persisted?` returns false"
+      end
- -
-
# File activemodel/lib/active_model/lint.rb, line 46
-def test_to_param
-  assert_respond_to model, :to_param
-  def model.to_key() [1] end
-  def model.persisted?() false end
-  assert model.to_param.nil?, "to_param should return nil when `persisted?` returns false"
-end
-
-
- -

+ See on GitHub + + + +

@@ -311,23 +311,23 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/lint.rb, line 58
+      def test_to_partial_path
+        assert_respond_to model, :to_partial_path
+        assert_kind_of String, model.to_partial_path
+      end
- -
-
# File activemodel/lib/active_model/lint.rb, line 58
-def test_to_partial_path
-  assert_respond_to model, :to_partial_path
-  assert_kind_of String, model.to_partial_path
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveModel/Model.html b/src/classes/ActiveModel/Model.html index c2311c31d2..4e2b55b671 100644 --- a/src/classes/ActiveModel/Model.html +++ b/src/classes/ActiveModel/Model.html @@ -132,20 +132,10 @@

- -
- - -
-
# File activemodel/lib/active_model/model.rb, line 48
-    
-
-
- - + + See on GitHub + +

@@ -166,20 +156,10 @@

- -
- - -
-
# File activemodel/lib/active_model/model.rb, line 59
-  
-
-
- -

+ + See on GitHub + + diff --git a/src/classes/ActiveModel/Name.html b/src/classes/ActiveModel/Name.html index f0528532a1..0e6dfec145 100644 --- a/src/classes/ActiveModel/Name.html +++ b/src/classes/ActiveModel/Name.html @@ -231,39 +231,39 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/naming.rb, line 166
+    def initialize(klass, namespace = nil, name = nil, locale = :en)
+      @name = name || klass.name
+
+      raise ArgumentError, "Class name cannot be blank. You need to supply a name argument when anonymous class given" if @name.blank?
+
+      @unnamespaced = @name.delete_prefix("#{namespace.name}::") if namespace
+      @klass        = klass
+      @singular     = _singularize(@name)
+      @plural       = ActiveSupport::Inflector.pluralize(@singular, locale)
+      @uncountable  = @plural == @singular
+      @element      = ActiveSupport::Inflector.underscore(ActiveSupport::Inflector.demodulize(@name))
+      @human        = ActiveSupport::Inflector.humanize(@element)
+      @collection   = ActiveSupport::Inflector.tableize(@name)
+      @param_key    = (namespace ? _singularize(@unnamespaced) : @singular)
+      @i18n_key     = @name.underscore.to_sym
+
+      @route_key          = (namespace ? ActiveSupport::Inflector.pluralize(@param_key, locale) : @plural.dup)
+      @singular_route_key = ActiveSupport::Inflector.singularize(@route_key, locale)
+      @route_key << "_index" if @uncountable
+    end
- -
-
# File activemodel/lib/active_model/naming.rb, line 166
-def initialize(klass, namespace = nil, name = nil, locale = :en)
-  @name = name || klass.name
-
-  raise ArgumentError, "Class name cannot be blank. You need to supply a name argument when anonymous class given" if @name.blank?
-
-  @unnamespaced = @name.delete_prefix("#{namespace.name}::") if namespace
-  @klass        = klass
-  @singular     = _singularize(@name)
-  @plural       = ActiveSupport::Inflector.pluralize(@singular, locale)
-  @uncountable  = @plural == @singular
-  @element      = ActiveSupport::Inflector.underscore(ActiveSupport::Inflector.demodulize(@name))
-  @human        = ActiveSupport::Inflector.humanize(@element)
-  @collection   = ActiveSupport::Inflector.tableize(@name)
-  @param_key    = (namespace ? _singularize(@unnamespaced) : @singular)
-  @i18n_key     = @name.underscore.to_sym
-
-  @route_key          = (namespace ? ActiveSupport::Inflector.pluralize(@param_key, locale) : @plural.dup)
-  @singular_route_key = ActiveSupport::Inflector.singularize(@route_key, locale)
-  @route_key << "_index" if @uncountable
-end
-
-
- - + See on GitHub + + + + @@ -296,20 +296,10 @@

- -
- - -
-
# File activemodel/lib/active_model/naming.rb, line 83
-    
-
-
- - + + See on GitHub + +

@@ -339,20 +329,10 @@

- -
- - -
-
# File activemodel/lib/active_model/naming.rb, line 50
-    
-
-
- -

+ + See on GitHub + +

@@ -381,20 +361,10 @@

- -
- - -
-
# File activemodel/lib/active_model/naming.rb, line 19
-    
-
-
- -

+ + See on GitHub + +

@@ -423,20 +393,10 @@

- -
- - -
-
# File activemodel/lib/active_model/naming.rb, line 35
-    
-
-
- -

+ + See on GitHub + +

@@ -465,20 +425,10 @@

- -
- - -
-
# File activemodel/lib/active_model/naming.rb, line 66
-    
-
-
- -

+ + See on GitHub + +

@@ -507,20 +457,10 @@

- -
- - -
-
# File activemodel/lib/active_model/naming.rb, line 99
-    
-
-
- -

+ + See on GitHub + +

@@ -549,30 +489,30 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/naming.rb, line 197
+    def human(options = {})
+      return @human if i18n_keys.empty? || i18n_scope.empty?
+
+      key, *defaults = i18n_keys
+      defaults << options[:default] if options[:default]
+      defaults << MISSING_TRANSLATION
+
+      translation = I18n.translate(key, scope: i18n_scope, count: 1, **options, default: defaults)
+      translation = @human if translation == MISSING_TRANSLATION
+      translation
+    end
- -
-
# File activemodel/lib/active_model/naming.rb, line 197
-def human(options = {})
-  return @human if i18n_keys.empty? || i18n_scope.empty?
-
-  key, *defaults = i18n_keys
-  defaults << options[:default] if options[:default]
-  defaults << MISSING_TRANSLATION
-
-  translation = I18n.translate(key, scope: i18n_scope, count: 1, **options, default: defaults)
-  translation = @human if translation == MISSING_TRANSLATION
-  translation
-end
-
-
- -

+ See on GitHub + + + +

@@ -601,20 +541,10 @@

- -
- - -
-
# File activemodel/lib/active_model/naming.rb, line 115
-    
-
-
- -

+ + See on GitHub + +

@@ -642,20 +572,10 @@

- -
- - -
-
# File activemodel/lib/active_model/naming.rb, line 131
-    
-
-
- -

+ + See on GitHub + +

@@ -676,22 +596,22 @@

- -
- - -
-
# File activemodel/lib/active_model/naming.rb, line 151
-delegate :==, :===, :<=>, :=~, :"!~", :eql?, :match?, :to_s,
-         :to_str, :as_json, to: :name
+          
+            
+ + Source code + + +
# File activemodel/lib/active_model/naming.rb, line 151
+    delegate :==, :===, :<=>, :=~, :"!~", :eql?, :match?, :to_s,
+             :to_str, :as_json, to: :name
 
-
-
- -

+ + See on GitHub + + + +

@@ -711,22 +631,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/naming.rb, line 209
+    def uncountable?
+      @uncountable
+    end
- -
-
# File activemodel/lib/active_model/naming.rb, line 209
-def uncountable?
-  @uncountable
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveModel/Naming.html b/src/classes/ActiveModel/Naming.html index 0d71ad329d..7ee45f7894 100644 --- a/src/classes/ActiveModel/Naming.html +++ b/src/classes/ActiveModel/Naming.html @@ -128,22 +128,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/naming.rb, line 338
+    def self.param_key(record_or_class)
+      model_name_from_record_or_class(record_or_class).param_key
+    end
- -
-
# File activemodel/lib/active_model/naming.rb, line 338
-def self.param_key(record_or_class)
-  model_name_from_record_or_class(record_or_class).param_key
-end
-
-
- - + See on GitHub + + + +

@@ -167,22 +167,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/naming.rb, line 283
+    def self.plural(record_or_class)
+      model_name_from_record_or_class(record_or_class).plural
+    end
- -
-
# File activemodel/lib/active_model/naming.rb, line 283
-def self.plural(record_or_class)
-  model_name_from_record_or_class(record_or_class).plural
-end
-
-
- -

+ See on GitHub + + + +

@@ -211,22 +211,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/naming.rb, line 326
+    def self.route_key(record_or_class)
+      model_name_from_record_or_class(record_or_class).route_key
+    end
- -
-
# File activemodel/lib/active_model/naming.rb, line 326
-def self.route_key(record_or_class)
-  model_name_from_record_or_class(record_or_class).route_key
-end
-
-
- -

+ See on GitHub + + + +

@@ -250,22 +250,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/naming.rb, line 291
+    def self.singular(record_or_class)
+      model_name_from_record_or_class(record_or_class).singular
+    end
- -
-
# File activemodel/lib/active_model/naming.rb, line 291
-def self.singular(record_or_class)
-  model_name_from_record_or_class(record_or_class).singular
-end
-
-
- -

+ See on GitHub + + + +

@@ -292,22 +292,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/naming.rb, line 311
+    def self.singular_route_key(record_or_class)
+      model_name_from_record_or_class(record_or_class).singular_route_key
+    end
- -
-
# File activemodel/lib/active_model/naming.rb, line 311
-def self.singular_route_key(record_or_class)
-  model_name_from_record_or_class(record_or_class).singular_route_key
-end
-
-
- -

+ See on GitHub + + + +

@@ -331,22 +331,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/naming.rb, line 299
+    def self.uncountable?(record_or_class)
+      model_name_from_record_or_class(record_or_class).uncountable?
+    end
- -
-
# File activemodel/lib/active_model/naming.rb, line 299
-def self.uncountable?(record_or_class)
-  model_name_from_record_or_class(record_or_class).uncountable?
-end
-
-
- -

+ See on GitHub + + + + @@ -380,27 +380,27 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/naming.rb, line 270
+    def model_name
+      @_model_name ||= begin
+        namespace = module_parents.detect do |n|
+          n.respond_to?(:use_relative_model_naming?) && n.use_relative_model_naming?
+        end
+        ActiveModel::Name.new(self, namespace)
+      end
+    end
- -
-
# File activemodel/lib/active_model/naming.rb, line 270
-def model_name
-  @_model_name ||= begin
-    namespace = module_parents.detect do |n|
-      n.respond_to?(:use_relative_model_naming?) && n.use_relative_model_naming?
-    end
-    ActiveModel::Name.new(self, namespace)
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveModel/NestedError.html b/src/classes/ActiveModel/NestedError.html index b661446755..49d29a49fb 100644 --- a/src/classes/ActiveModel/NestedError.html +++ b/src/classes/ActiveModel/NestedError.html @@ -94,27 +94,27 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/nested_error.rb, line 8
+    def initialize(base, inner_error, override_options = {})
+      @base = base
+      @inner_error = inner_error
+      @attribute = override_options.fetch(:attribute) { inner_error.attribute }
+      @type = override_options.fetch(:type) { inner_error.type }
+      @raw_type = inner_error.raw_type
+      @options = inner_error.options
+    end
- -
-
# File activemodel/lib/active_model/nested_error.rb, line 8
-def initialize(base, inner_error, override_options = {})
-  @base = base
-  @inner_error = inner_error
-  @attribute = override_options.fetch(:attribute) { inner_error.attribute }
-  @type = override_options.fetch(:type) { inner_error.type }
-  @raw_type = inner_error.raw_type
-  @options = inner_error.options
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveModel/SecurePassword/ClassMethods.html b/src/classes/ActiveModel/SecurePassword/ClassMethods.html index e2fd753eae..93e9cc49de 100644 --- a/src/classes/ActiveModel/SecurePassword/ClassMethods.html +++ b/src/classes/ActiveModel/SecurePassword/ClassMethods.html @@ -166,64 +166,64 @@

C - -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/secure_password.rb, line 101
+      def has_secure_password(attribute = :password, validations: true)
+        # Load bcrypt gem only when has_secure_password is used.
+        # This is to avoid ActiveModel (and by extension the entire framework)
+        # being dependent on a binary library.
+        begin
+          require "bcrypt"
+        rescue LoadError
+          warn "You don't have bcrypt installed in your application. Please add it to your Gemfile and run bundle install."
+          raise
+        end
+
+        include InstanceMethodsOnActivation.new(attribute)
+
+        if validations
+          include ActiveModel::Validations
+
+          # This ensures the model has a password by checking whether the password_digest
+          # is present, so that this works with both new and existing records. However,
+          # when there is an error, the message is added to the password attribute instead
+          # so that the error message will make sense to the end-user.
+          validate do |record|
+            record.errors.add(attribute, :blank) unless record.public_send("#{attribute}_digest").present?
+          end
+
+          validate do |record|
+            if challenge = record.public_send(:"#{attribute}_challenge")
+              digest_was = record.public_send(:"#{attribute}_digest_was") if record.respond_to?(:"#{attribute}_digest_was")
+
+              unless digest_was.present? && BCrypt::Password.new(digest_was).is_password?(challenge)
+                record.errors.add(:"#{attribute}_challenge")
+              end
+            end
+          end
+
+          # Validates that the password does not exceed the maximum allowed bytes for BCrypt (72 bytes).
+          validate do |record|
+            password_value = record.public_send(attribute)
+            if password_value.present? && password_value.bytesize > ActiveModel::SecurePassword::MAX_PASSWORD_LENGTH_ALLOWED
+              record.errors.add(attribute, :password_too_long)
+            end
+          end
+
+          validates_confirmation_of attribute, allow_blank: true
+        end
+      end
- -
-
# File activemodel/lib/active_model/secure_password.rb, line 101
-def has_secure_password(attribute = :password, validations: true)
-  # Load bcrypt gem only when has_secure_password is used.
-  # This is to avoid ActiveModel (and by extension the entire framework)
-  # being dependent on a binary library.
-  begin
-    require "bcrypt"
-  rescue LoadError
-    warn "You don't have bcrypt installed in your application. Please add it to your Gemfile and run bundle install."
-    raise
-  end
-
-  include InstanceMethodsOnActivation.new(attribute)
-
-  if validations
-    include ActiveModel::Validations
-
-    # This ensures the model has a password by checking whether the password_digest
-    # is present, so that this works with both new and existing records. However,
-    # when there is an error, the message is added to the password attribute instead
-    # so that the error message will make sense to the end-user.
-    validate do |record|
-      record.errors.add(attribute, :blank) unless record.public_send("#{attribute}_digest").present?
-    end
-
-    validate do |record|
-      if challenge = record.public_send(:"#{attribute}_challenge")
-        digest_was = record.public_send(:"#{attribute}_digest_was") if record.respond_to?(:"#{attribute}_digest_was")
-
-        unless digest_was.present? && BCrypt::Password.new(digest_was).is_password?(challenge)
-          record.errors.add(:"#{attribute}_challenge")
-        end
-      end
-    end
-
-    # Validates that the password does not exceed the maximum allowed bytes for BCrypt (72 bytes).
-    validate do |record|
-      password_value = record.public_send(attribute)
-      if password_value.present? && password_value.bytesize > ActiveModel::SecurePassword::MAX_PASSWORD_LENGTH_ALLOWED
-        record.errors.add(attribute, :password_too_long)
-      end
-    end
-
-    validates_confirmation_of attribute, allow_blank: true
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveModel/SecurePassword/InstanceMethodsOnActivation.html b/src/classes/ActiveModel/SecurePassword/InstanceMethodsOnActivation.html index 1f74b05121..8f37c813bf 100644 --- a/src/classes/ActiveModel/SecurePassword/InstanceMethodsOnActivation.html +++ b/src/classes/ActiveModel/SecurePassword/InstanceMethodsOnActivation.html @@ -80,58 +80,58 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/secure_password.rb, line 149
+      def initialize(attribute)
+        attr_reader attribute
+
+        define_method("#{attribute}=") do |unencrypted_password|
+          if unencrypted_password.nil?
+            instance_variable_set("@#{attribute}", nil)
+            self.public_send("#{attribute}_digest=", nil)
+          elsif !unencrypted_password.empty?
+            instance_variable_set("@#{attribute}", unencrypted_password)
+            cost = ActiveModel::SecurePassword.min_cost ? BCrypt::Engine::MIN_COST : BCrypt::Engine.cost
+            self.public_send("#{attribute}_digest=", BCrypt::Password.create(unencrypted_password, cost: cost))
+          end
+        end
+
+        attr_accessor :"#{attribute}_confirmation", :"#{attribute}_challenge"
+
+        # Returns +self+ if the password is correct, otherwise +false+.
+        #
+        #   class User < ActiveRecord::Base
+        #     has_secure_password validations: false
+        #   end
+        #
+        #   user = User.new(name: 'david', password: 'mUc3m00RsqyRe')
+        #   user.save
+        #   user.authenticate_password('notright')      # => false
+        #   user.authenticate_password('mUc3m00RsqyRe') # => user
+        define_method("authenticate_#{attribute}") do |unencrypted_password|
+          attribute_digest = public_send("#{attribute}_digest")
+          attribute_digest.present? && BCrypt::Password.new(attribute_digest).is_password?(unencrypted_password) && self
+        end
+
+        # Returns the salt, a small chunk of random data added to the password before it's hashed.
+        define_method("#{attribute}_salt") do
+          attribute_digest = public_send("#{attribute}_digest")
+          attribute_digest.present? ? BCrypt::Password.new(attribute_digest).salt : nil
+        end
+
+        alias_method :authenticate, :authenticate_password if attribute == :password
+      end
- -
-
# File activemodel/lib/active_model/secure_password.rb, line 149
-def initialize(attribute)
-  attr_reader attribute
-
-  define_method("#{attribute}=") do |unencrypted_password|
-    if unencrypted_password.nil?
-      instance_variable_set("@#{attribute}", nil)
-      self.public_send("#{attribute}_digest=", nil)
-    elsif !unencrypted_password.empty?
-      instance_variable_set("@#{attribute}", unencrypted_password)
-      cost = ActiveModel::SecurePassword.min_cost ? BCrypt::Engine::MIN_COST : BCrypt::Engine.cost
-      self.public_send("#{attribute}_digest=", BCrypt::Password.create(unencrypted_password, cost: cost))
-    end
-  end
-
-  attr_accessor :"#{attribute}_confirmation", :"#{attribute}_challenge"
-
-  # Returns +self+ if the password is correct, otherwise +false+.
-  #
-  #   class User < ActiveRecord::Base
-  #     has_secure_password validations: false
-  #   end
-  #
-  #   user = User.new(name: 'david', password: 'mUc3m00RsqyRe')
-  #   user.save
-  #   user.authenticate_password('notright')      # => false
-  #   user.authenticate_password('mUc3m00RsqyRe') # => user
-  define_method("authenticate_#{attribute}") do |unencrypted_password|
-    attribute_digest = public_send("#{attribute}_digest")
-    attribute_digest.present? && BCrypt::Password.new(attribute_digest).is_password?(unencrypted_password) && self
-  end
-
-  # Returns the salt, a small chunk of random data added to the password before it's hashed.
-  define_method("#{attribute}_salt") do
-    attribute_digest = public_send("#{attribute}_digest")
-    attribute_digest.present? ? BCrypt::Password.new(attribute_digest).salt : nil
-  end
-
-  alias_method :authenticate, :authenticate_password if attribute == :password
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveModel/Serialization.html b/src/classes/ActiveModel/Serialization.html index 187d73a7c1..add4516b19 100644 --- a/src/classes/ActiveModel/Serialization.html +++ b/src/classes/ActiveModel/Serialization.html @@ -197,44 +197,44 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/serialization.rb, line 125
+    def serializable_hash(options = nil)
+      attribute_names = attribute_names_for_serialization
+
+      return serializable_attributes(attribute_names) if options.blank?
+
+      if only = options[:only]
+        attribute_names &= Array(only).map(&:to_s)
+      elsif except = options[:except]
+        attribute_names -= Array(except).map(&:to_s)
+      end
+
+      hash = serializable_attributes(attribute_names)
+
+      Array(options[:methods]).each { |m| hash[m.to_s] = send(m) }
+
+      serializable_add_includes(options) do |association, records, opts|
+        hash[association.to_s] = if records.respond_to?(:to_ary)
+          records.to_ary.map { |a| a.serializable_hash(opts) }
+        else
+          records.serializable_hash(opts)
+        end
+      end
+
+      hash
+    end
- -
-
# File activemodel/lib/active_model/serialization.rb, line 125
-def serializable_hash(options = nil)
-  attribute_names = attribute_names_for_serialization
-
-  return serializable_attributes(attribute_names) if options.blank?
-
-  if only = options[:only]
-    attribute_names &= Array(only).map(&:to_s)
-  elsif except = options[:except]
-    attribute_names -= Array(except).map(&:to_s)
-  end
-
-  hash = serializable_attributes(attribute_names)
-
-  Array(options[:methods]).each { |m| hash[m.to_s] = send(m) }
-
-  serializable_add_includes(options) do |association, records, opts|
-    hash[association.to_s] = if records.respond_to?(:to_ary)
-      records.to_ary.map { |a| a.serializable_hash(opts) }
-    else
-      records.serializable_hash(opts)
-    end
-  end
-
-  hash
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveModel/Serializers/JSON.html b/src/classes/ActiveModel/Serializers/JSON.html index f0d665a57b..78167955d1 100644 --- a/src/classes/ActiveModel/Serializers/JSON.html +++ b/src/classes/ActiveModel/Serializers/JSON.html @@ -177,34 +177,34 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/serializers/json.rb, line 96
+      def as_json(options = nil)
+        root = if options && options.key?(:root)
+          options[:root]
+        else
+          include_root_in_json
+        end
+
+        hash = serializable_hash(options).as_json
+        if root
+          root = model_name.element if root == true
+          { root => hash }
+        else
+          hash
+        end
+      end
- -
-
# File activemodel/lib/active_model/serializers/json.rb, line 96
-def as_json(options = nil)
-  root = if options && options.key?(:root)
-    options[:root]
-  else
-    include_root_in_json
-  end
-
-  hash = serializable_hash(options).as_json
-  if root
-    root = model_name.element if root == true
-    { root => hash }
-  else
-    hash
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -258,25 +258,25 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/serializers/json.rb, line 146
+      def from_json(json, include_root = include_root_in_json)
+        hash = ActiveSupport::JSON.decode(json)
+        hash = hash.values.first if include_root
+        self.attributes = hash
+        self
+      end
- -
-
# File activemodel/lib/active_model/serializers/json.rb, line 146
-def from_json(json, include_root = include_root_in_json)
-  hash = ActiveSupport::JSON.decode(json)
-  hash = hash.values.first if include_root
-  self.attributes = hash
-  self
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveModel/Translation.html b/src/classes/ActiveModel/Translation.html index 5f506ed2b0..14885c70e6 100644 --- a/src/classes/ActiveModel/Translation.html +++ b/src/classes/ActiveModel/Translation.html @@ -122,44 +122,44 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/translation.rb, line 46
+    def human_attribute_name(attribute, options = {})
+      attribute = attribute.to_s
+
+      if attribute.include?(".")
+        namespace, _, attribute = attribute.rpartition(".")
+        namespace.tr!(".", "/")
+
+        defaults = lookup_ancestors.map do |klass|
+          :"#{i18n_scope}.attributes.#{klass.model_name.i18n_key}/#{namespace}.#{attribute}"
+        end
+        defaults << :"#{i18n_scope}.attributes.#{namespace}.#{attribute}"
+      else
+        defaults = lookup_ancestors.map do |klass|
+          :"#{i18n_scope}.attributes.#{klass.model_name.i18n_key}.#{attribute}"
+        end
+      end
+
+      defaults << :"attributes.#{attribute}"
+      defaults << options[:default] if options[:default]
+      defaults << MISSING_TRANSLATION
+
+      translation = I18n.translate(defaults.shift, count: 1, **options, default: defaults)
+      translation = attribute.humanize if translation == MISSING_TRANSLATION
+      translation
+    end
- -
-
# File activemodel/lib/active_model/translation.rb, line 46
-def human_attribute_name(attribute, options = {})
-  attribute = attribute.to_s
-
-  if attribute.include?(".")
-    namespace, _, attribute = attribute.rpartition(".")
-    namespace.tr!(".", "/")
-
-    defaults = lookup_ancestors.map do |klass|
-      :"#{i18n_scope}.attributes.#{klass.model_name.i18n_key}/#{namespace}.#{attribute}"
-    end
-    defaults << :"#{i18n_scope}.attributes.#{namespace}.#{attribute}"
-  else
-    defaults = lookup_ancestors.map do |klass|
-      :"#{i18n_scope}.attributes.#{klass.model_name.i18n_key}.#{attribute}"
-    end
-  end
-
-  defaults << :"attributes.#{attribute}"
-  defaults << options[:default] if options[:default]
-  defaults << MISSING_TRANSLATION
-
-  translation = I18n.translate(defaults.shift, count: 1, **options, default: defaults)
-  translation = attribute.humanize if translation == MISSING_TRANSLATION
-  translation
-end
-
-
- - + See on GitHub + + + +

@@ -179,22 +179,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/translation.rb, line 26
+    def i18n_scope
+      :activemodel
+    end
- -
-
# File activemodel/lib/active_model/translation.rb, line 26
-def i18n_scope
-  :activemodel
-end
-
-
- -

+ See on GitHub + + + +

@@ -214,22 +214,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/translation.rb, line 34
+    def lookup_ancestors
+      ancestors.select { |x| x.respond_to?(:model_name) }
+    end
- -
-
# File activemodel/lib/active_model/translation.rb, line 34
-def lookup_ancestors
-  ancestors.select { |x| x.respond_to?(:model_name) }
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveModel/Type.html b/src/classes/ActiveModel/Type.html index 19619e3218..164732606a 100644 --- a/src/classes/ActiveModel/Type.html +++ b/src/classes/ActiveModel/Type.html @@ -164,22 +164,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type.rb, line 30
+      def register(type_name, klass = nil, &block)
+        registry.register(type_name, klass, &block)
+      end
- -
-
# File activemodel/lib/active_model/type.rb, line 30
-def register(type_name, klass = nil, &block)
-  registry.register(type_name, klass, &block)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveModel/Type/Binary.html b/src/classes/ActiveModel/Type/Binary.html index 23d32441e9..ae8d6bd4d4 100644 --- a/src/classes/ActiveModel/Type/Binary.html +++ b/src/classes/ActiveModel/Type/Binary.html @@ -111,22 +111,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/binary.rb, line 16
+      def binary?
+        true
+      end
- -
-
# File activemodel/lib/active_model/type/binary.rb, line 16
-def binary?
-  true
-end
-
-
- - + See on GitHub + + + +

@@ -146,28 +146,28 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/binary.rb, line 20
+      def cast(value)
+        if value.is_a?(Data)
+          value.to_s
+        else
+          value = super
+          value = value.b if ::String === value && value.encoding != Encoding::BINARY
+          value
+        end
+      end
- -
-
# File activemodel/lib/active_model/type/binary.rb, line 20
-def cast(value)
-  if value.is_a?(Data)
-    value.to_s
-  else
-    value = super
-    value = value.b if ::String === value && value.encoding != Encoding::BINARY
-    value
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -187,23 +187,23 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/binary.rb, line 35
+      def changed_in_place?(raw_old_value, value)
+        old_value = deserialize(raw_old_value)
+        old_value != value
+      end
- -
-
# File activemodel/lib/active_model/type/binary.rb, line 35
-def changed_in_place?(raw_old_value, value)
-  old_value = deserialize(raw_old_value)
-  old_value != value
-end
-
-
- -

+ See on GitHub + + + +

@@ -223,23 +223,23 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/binary.rb, line 30
+      def serialize(value)
+        return if value.nil?
+        Data.new(super)
+      end
- -
-
# File activemodel/lib/active_model/type/binary.rb, line 30
-def serialize(value)
-  return if value.nil?
-  Data.new(super)
-end
-
-
- -

+ See on GitHub + + + +

@@ -259,22 +259,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/binary.rb, line 12
+      def type
+        :binary
+      end
- -
-
# File activemodel/lib/active_model/type/binary.rb, line 12
-def type
-  :binary
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveModel/Type/Date.html b/src/classes/ActiveModel/Type/Date.html index 14810f9f40..c74af4fa56 100644 --- a/src/classes/ActiveModel/Type/Date.html +++ b/src/classes/ActiveModel/Type/Date.html @@ -142,22 +142,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/date.rb, line 30
+      def type
+        :date
+      end
- -
-
# File activemodel/lib/active_model/type/date.rb, line 30
-def type
-  :date
-end
-
-
- - + See on GitHub + + + +

@@ -177,22 +177,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/date.rb, line 34
+      def type_cast_for_schema(value)
+        value.to_fs(:db).inspect
+      end
- -
-
# File activemodel/lib/active_model/type/date.rb, line 34
-def type_cast_for_schema(value)
-  value.to_fs(:db).inspect
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveModel/Type/DateTime.html b/src/classes/ActiveModel/Type/DateTime.html index f7ef937f6e..6a8cdfc014 100644 --- a/src/classes/ActiveModel/Type/DateTime.html +++ b/src/classes/ActiveModel/Type/DateTime.html @@ -145,22 +145,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/date_time.rb, line 49
+      def type
+        :datetime
+      end
- -
-
# File activemodel/lib/active_model/type/date_time.rb, line 49
-def type
-  :datetime
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveModel/Type/Decimal.html b/src/classes/ActiveModel/Type/Decimal.html index 940d681211..4eba130dab 100644 --- a/src/classes/ActiveModel/Type/Decimal.html +++ b/src/classes/ActiveModel/Type/Decimal.html @@ -158,22 +158,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/decimal.rb, line 49
+      def type
+        :decimal
+      end
- -
-
# File activemodel/lib/active_model/type/decimal.rb, line 49
-def type
-  :decimal
-end
-
-
- - + See on GitHub + + + +

@@ -193,22 +193,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/decimal.rb, line 53
+      def type_cast_for_schema(value)
+        value.to_s.inspect
+      end
- -
-
# File activemodel/lib/active_model/type/decimal.rb, line 53
-def type_cast_for_schema(value)
-  value.to_s.inspect
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveModel/Type/Float.html b/src/classes/ActiveModel/Type/Float.html index 7f91caf8b5..221027e5e4 100644 --- a/src/classes/ActiveModel/Type/Float.html +++ b/src/classes/ActiveModel/Type/Float.html @@ -133,22 +133,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/float.rb, line 39
+      def type
+        :float
+      end
- -
-
# File activemodel/lib/active_model/type/float.rb, line 39
-def type
-  :float
-end
-
-
- - + See on GitHub + + + +

@@ -168,27 +168,27 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/float.rb, line 43
+      def type_cast_for_schema(value)
+        return "::Float::NAN" if value.try(:nan?)
+        case value
+        when ::Float::INFINITY then "::Float::INFINITY"
+        when -::Float::INFINITY then "-::Float::INFINITY"
+        else super
+        end
+      end
- -
-
# File activemodel/lib/active_model/type/float.rb, line 43
-def type_cast_for_schema(value)
-  return "::Float::NAN" if value.try(:nan?)
-  case value
-  when ::Float::INFINITY then "::Float::INFINITY"
-  when -::Float::INFINITY then "-::Float::INFINITY"
-  else super
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveModel/Type/ImmutableString.html b/src/classes/ActiveModel/Type/ImmutableString.html index b2b6d60a84..9978b1b44d 100644 --- a/src/classes/ActiveModel/Type/ImmutableString.html +++ b/src/classes/ActiveModel/Type/ImmutableString.html @@ -123,24 +123,24 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/immutable_string.rb, line 38
+      def initialize(**args)
+        @true  = -(args.delete(:true)&.to_s  || "t")
+        @false = -(args.delete(:false)&.to_s || "f")
+        super
+      end
- -
-
# File activemodel/lib/active_model/type/immutable_string.rb, line 38
-def initialize(**args)
-  @true  = -(args.delete(:true)&.to_s  || "t")
-  @false = -(args.delete(:false)&.to_s || "f")
-  super
-end
-
-
- - + See on GitHub + + + + @@ -164,27 +164,27 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/immutable_string.rb, line 48
+      def serialize(value)
+        case value
+        when ::Numeric, ::Symbol, ActiveSupport::Duration then value.to_s
+        when true then @true
+        when false then @false
+        else super
+        end
+      end
- -
-
# File activemodel/lib/active_model/type/immutable_string.rb, line 48
-def serialize(value)
-  case value
-  when ::Numeric, ::Symbol, ActiveSupport::Duration then value.to_s
-  when true then @true
-  when false then @false
-  else super
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -204,22 +204,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/immutable_string.rb, line 44
+      def type
+        :string
+      end
- -
-
# File activemodel/lib/active_model/type/immutable_string.rb, line 44
-def type
-  :string
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveModel/Type/Integer.html b/src/classes/ActiveModel/Type/Integer.html index 6597524cac..d463299e73 100644 --- a/src/classes/ActiveModel/Type/Integer.html +++ b/src/classes/ActiveModel/Type/Integer.html @@ -168,23 +168,23 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/integer.rb, line 51
+      def initialize(**)
+        super
+        @range = min_value...max_value
+      end
- -
-
# File activemodel/lib/active_model/type/integer.rb, line 51
-def initialize(**)
-  super
-  @range = min_value...max_value
-end
-
-
- - + See on GitHub + + + + @@ -208,23 +208,23 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/integer.rb, line 60
+      def deserialize(value)
+        return if value.blank?
+        value.to_i
+      end
- -
-
# File activemodel/lib/active_model/type/integer.rb, line 60
-def deserialize(value)
-  return if value.blank?
-  value.to_i
-end
-
-
- - + See on GitHub + + + +

@@ -244,26 +244,26 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/integer.rb, line 74
+      def serializable?(value)
+        cast_value = cast(value)
+        in_range?(cast_value) || begin
+          yield cast_value if block_given?
+          false
+        end
+      end
- -
-
# File activemodel/lib/active_model/type/integer.rb, line 74
-def serializable?(value)
-  cast_value = cast(value)
-  in_range?(cast_value) || begin
-    yield cast_value if block_given?
-    false
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -283,23 +283,23 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/integer.rb, line 65
+      def serialize(value)
+        return if value.is_a?(::String) && non_numeric_string?(value)
+        ensure_in_range(super)
+      end
- -
-
# File activemodel/lib/active_model/type/integer.rb, line 65
-def serialize(value)
-  return if value.is_a?(::String) && non_numeric_string?(value)
-  ensure_in_range(super)
-end
-
-
- -

+ See on GitHub + + + +

@@ -319,22 +319,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/integer.rb, line 56
+      def type
+        :integer
+      end
- -
-
# File activemodel/lib/active_model/type/integer.rb, line 56
-def type
-  :integer
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveModel/Type/Registration.html b/src/classes/ActiveModel/Type/Registration.html deleted file mode 100644 index b5e4268866..0000000000 --- a/src/classes/ActiveModel/Type/Registration.html +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: ActiveModel::Type::Registration -layout: default ---- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveModel/Type/Registry.html b/src/classes/ActiveModel/Type/Registry.html deleted file mode 100644 index 498b916718..0000000000 --- a/src/classes/ActiveModel/Type/Registry.html +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: ActiveModel::Type::Registry -layout: default ---- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveModel/Type/SerializeCastValue/ClassMethods.html b/src/classes/ActiveModel/Type/SerializeCastValue/ClassMethods.html index 022413872e..6491942c18 100644 --- a/src/classes/ActiveModel/Type/SerializeCastValue/ClassMethods.html +++ b/src/classes/ActiveModel/Type/SerializeCastValue/ClassMethods.html @@ -75,23 +75,23 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/serialize_cast_value.rb, line 9
+        def serialize_cast_value_compatible?
+          return @serialize_cast_value_compatible if defined?(@serialize_cast_value_compatible)
+          @serialize_cast_value_compatible = ancestors.index(instance_method(:serialize_cast_value).owner) <= ancestors.index(instance_method(:serialize).owner)
+        end
- -
-
# File activemodel/lib/active_model/type/serialize_cast_value.rb, line 9
-def serialize_cast_value_compatible?
-  return @serialize_cast_value_compatible if defined?(@serialize_cast_value_compatible)
-  @serialize_cast_value_compatible = ancestors.index(instance_method(:serialize_cast_value).owner) <= ancestors.index(instance_method(:serialize).owner)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveModel/Type/SerializeCastValue/DefaultImplementation.html b/src/classes/ActiveModel/Type/SerializeCastValue/DefaultImplementation.html index c21bba4c30..4cc27d249c 100644 --- a/src/classes/ActiveModel/Type/SerializeCastValue/DefaultImplementation.html +++ b/src/classes/ActiveModel/Type/SerializeCastValue/DefaultImplementation.html @@ -75,22 +75,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/serialize_cast_value.rb, line 16
+        def serialize_cast_value(value)
+          value
+        end
- -
-
# File activemodel/lib/active_model/type/serialize_cast_value.rb, line 16
-def serialize_cast_value(value)
-  value
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveModel/Type/String.html b/src/classes/ActiveModel/Type/String.html index 9f94b1d12b..f4af58bcf6 100644 --- a/src/classes/ActiveModel/Type/String.html +++ b/src/classes/ActiveModel/Type/String.html @@ -95,24 +95,24 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/string.rb, line 16
+      def changed_in_place?(raw_old_value, new_value)
+        if new_value.is_a?(::String)
+          raw_old_value != new_value
+        end
+      end
- -
-
# File activemodel/lib/active_model/type/string.rb, line 16
-def changed_in_place?(raw_old_value, new_value)
-  if new_value.is_a?(::String)
-    raw_old_value != new_value
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -132,28 +132,28 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/string.rb, line 22
+      def to_immutable_string
+        ImmutableString.new(
+          true: @true,
+          false: @false,
+          limit: limit,
+          precision: precision,
+          scale: scale,
+        )
+      end
- -
-
# File activemodel/lib/active_model/type/string.rb, line 22
-def to_immutable_string
-  ImmutableString.new(
-    true: @true,
-    false: @false,
-    limit: limit,
-    precision: precision,
-    scale: scale,
-  )
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveModel/Type/Time.html b/src/classes/ActiveModel/Type/Time.html index 1583b50f1a..ebd22df5ea 100644 --- a/src/classes/ActiveModel/Type/Time.html +++ b/src/classes/ActiveModel/Type/Time.html @@ -146,22 +146,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/time.rb, line 45
+      def type
+        :time
+      end
- -
-
# File activemodel/lib/active_model/type/time.rb, line 45
-def type
-  :time
-end
-
-
- - + See on GitHub + + + +

@@ -181,37 +181,37 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/time.rb, line 49
+      def user_input_in_time_zone(value)
+        return unless value.present?
+
+        case value
+        when ::String
+          value = "2000-01-01 #{value}"
+          time_hash = begin
+            ::Date._parse(value)
+          rescue ArgumentError
+          end
+
+          return if time_hash.nil? || time_hash[:hour].nil?
+        when ::Time
+          value = value.change(year: 2000, day: 1, month: 1)
+        end
+
+        super(value)
+      end
- -
-
# File activemodel/lib/active_model/type/time.rb, line 49
-def user_input_in_time_zone(value)
-  return unless value.present?
-
-  case value
-  when ::String
-    value = "2000-01-01 #{value}"
-    time_hash = begin
-      ::Date._parse(value)
-    rescue ArgumentError
-    end
-
-    return if time_hash.nil? || time_hash[:hour].nil?
-  when ::Time
-    value = value.change(year: 2000, day: 1, month: 1)
-  end
-
-  super(value)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveModel/Type/Value.html b/src/classes/ActiveModel/Type/Value.html index 3d9a40fa69..96dd148cec 100644 --- a/src/classes/ActiveModel/Type/Value.html +++ b/src/classes/ActiveModel/Type/Value.html @@ -184,25 +184,25 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/value.rb, line 17
+      def initialize(precision: nil, limit: nil, scale: nil)
+        super()
+        @precision = precision
+        @scale = scale
+        @limit = limit
+      end
- -
-
# File activemodel/lib/active_model/type/value.rb, line 17
-def initialize(precision: nil, limit: nil, scale: nil)
-  super()
-  @precision = precision
-  @scale = scale
-  @limit = limit
-end
-
-
- - + See on GitHub + + + + @@ -230,25 +230,25 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/value.rb, line 121
+      def ==(other)
+        self.class == other.class &&
+          precision == other.precision &&
+          scale == other.scale &&
+          limit == other.limit
+      end
- -
-
# File activemodel/lib/active_model/type/value.rb, line 121
-def ==(other)
-  self.class == other.class &&
-    precision == other.precision &&
-    scale == other.scale &&
-    limit == other.limit
-end
-
-
- - + See on GitHub + + + +

@@ -268,22 +268,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/value.rb, line 144
+      def as_json(*)
+        raise NoMethodError
+      end
- -
-
# File activemodel/lib/active_model/type/value.rb, line 144
-def as_json(*)
-  raise NoMethodError
-end
-
-
- -

+ See on GitHub + + + +

@@ -303,21 +303,21 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/value.rb, line 133
+      def assert_valid_value(_)
+      end
- -
-
# File activemodel/lib/active_model/type/value.rb, line 133
-def assert_valid_value(_)
-end
-
-
- -

+ See on GitHub + + + +

@@ -341,22 +341,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/value.rb, line 57
+      def cast(value)
+        cast_value(value) unless value.nil?
+      end
- -
-
# File activemodel/lib/active_model/type/value.rb, line 57
-def cast(value)
-  cast_value(value) unless value.nil?
-end
-
-
- -

+ See on GitHub + + + +

@@ -376,22 +376,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/value.rb, line 84
+      def changed?(old_value, new_value, _new_value_before_type_cast)
+        old_value != new_value
+      end
- -
-
# File activemodel/lib/active_model/type/value.rb, line 84
-def changed?(old_value, new_value, _new_value_before_type_cast)
-  old_value != new_value
-end
-
-
- -

+ See on GitHub + + + +

@@ -423,22 +423,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/value.rb, line 105
+      def changed_in_place?(raw_old_value, new_value)
+        false
+      end
- -
-
# File activemodel/lib/active_model/type/value.rb, line 105
-def changed_in_place?(raw_old_value, new_value)
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -460,22 +460,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/value.rb, line 43
+      def deserialize(value)
+        cast(value)
+      end
- -
-
# File activemodel/lib/active_model/type/value.rb, line 43
-def deserialize(value)
-  cast(value)
-end
-
-
- -

+ See on GitHub + + + +

@@ -499,7 +499,8 @@

-

+ +

@@ -519,22 +520,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/value.rb, line 129
+      def hash
+        [self.class, precision, scale, limit].hash
+      end
- -
-
# File activemodel/lib/active_model/type/value.rb, line 129
-def hash
-  [self.class, precision, scale, limit].hash
-end
-
-
- -

+ See on GitHub + + + +

@@ -554,22 +555,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/value.rb, line 28
+      def serializable?(value)
+        true
+      end
- -
-
# File activemodel/lib/active_model/type/value.rb, line 28
-def serializable?(value)
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -589,22 +590,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/value.rb, line 65
+      def serialize(value)
+        value
+      end
- -
-
# File activemodel/lib/active_model/type/value.rb, line 65
-def serialize(value)
-  value
-end
-
-
- -

+ See on GitHub + + + +

@@ -624,21 +625,21 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/value.rb, line 34
+      def type
+      end
- -
-
# File activemodel/lib/active_model/type/value.rb, line 34
-def type
-end
-
-
- -

+ See on GitHub + + + +

Instance Private methods

@@ -661,22 +662,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/type/value.rb, line 152
+        def cast_value(value) # :doc:
+          value
+        end
- -
-
# File activemodel/lib/active_model/type/value.rb, line 152
-def cast_value(value) # :doc:
-  value
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveModel/UnknownAttributeError.html b/src/classes/ActiveModel/UnknownAttributeError.html index 4b9f790b7e..6dbaaa450e 100644 --- a/src/classes/ActiveModel/UnknownAttributeError.html +++ b/src/classes/ActiveModel/UnknownAttributeError.html @@ -120,24 +120,24 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/errors.rb, line 515
+    def initialize(record, attribute)
+      @record = record
+      @attribute = attribute
+      super("unknown attribute '#{attribute}' for #{@record.class}.")
+    end
- -
-
# File activemodel/lib/active_model/errors.rb, line 515
-def initialize(record, attribute)
-  @record = record
-  @attribute = attribute
-  super("unknown attribute '#{attribute}' for #{@record.class}.")
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveModel/ValidationError.html b/src/classes/ActiveModel/ValidationError.html index de22ba32a2..92ddf2ac66 100644 --- a/src/classes/ActiveModel/ValidationError.html +++ b/src/classes/ActiveModel/ValidationError.html @@ -109,24 +109,24 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations.rb, line 463
+    def initialize(model)
+      @model = model
+      errors = @model.errors.full_messages.join(", ")
+      super(I18n.t(:"#{@model.class.i18n_scope}.errors.messages.model_invalid", errors: errors, default: :"errors.messages.model_invalid"))
+    end
- -
-
# File activemodel/lib/active_model/validations.rb, line 463
-def initialize(model)
-  @model = model
-  errors = @model.errors.full_messages.join(", ")
-  super(I18n.t(:"#{@model.class.i18n_scope}.errors.messages.model_invalid", errors: errors, default: :"errors.messages.model_invalid"))
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveModel/Validations.html b/src/classes/ActiveModel/Validations.html index fc2c070057..55aaa1998c 100644 --- a/src/classes/ActiveModel/Validations.html +++ b/src/classes/ActiveModel/Validations.html @@ -236,22 +236,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations.rb, line 330
+    def errors
+      @errors ||= Errors.new(self)
+    end
- -
-
# File activemodel/lib/active_model/validations.rb, line 330
-def errors
-  @errors ||= Errors.new(self)
-end
-
-
- - + See on GitHub + + + +

@@ -299,22 +299,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations.rb, line 402
+    def invalid?(context = nil)
+      !valid?(context)
+    end
- -
-
# File activemodel/lib/active_model/validations.rb, line 402
-def invalid?(context = nil)
-  !valid?(context)
-end
-
-
- -

+ See on GitHub + + + +

@@ -366,26 +366,26 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations.rb, line 363
+    def valid?(context = nil)
+      current_context, self.validation_context = validation_context, context
+      errors.clear
+      run_validations!
+    ensure
+      self.validation_context = current_context
+    end
- -
-
# File activemodel/lib/active_model/validations.rb, line 363
-def valid?(context = nil)
-  current_context, self.validation_context = validation_context, context
-  errors.clear
-  run_validations!
-ensure
-  self.validation_context = current_context
-end
-
-
- -

+ See on GitHub + + + +

@@ -409,7 +409,8 @@

-

+ +

@@ -431,22 +432,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations.rb, line 411
+    def validate!(context = nil)
+      valid?(context) || raise_validation_error
+    end
- -
-
# File activemodel/lib/active_model/validations.rb, line 411
-def validate!(context = nil)
-  valid?(context) || raise_validation_error
-end
-
-
- -

+ See on GitHub + + + +

@@ -496,28 +497,28 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations/with.rb, line 144
+    def validates_with(*args, &block)
+      options = args.extract_options!
+      options[:class] = self.class
+
+      args.each do |klass|
+        validator = klass.new(options.dup, &block)
+        validator.validate(self)
+      end
+    end
- -
-
# File activemodel/lib/active_model/validations/with.rb, line 144
-def validates_with(*args, &block)
-  options = args.extract_options!
-  options[:class] = self.class
-
-  args.each do |klass|
-    validator = klass.new(options.dup, &block)
-    validator.validate(self)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -552,20 +553,10 @@

- -
- - -
-
# File activemodel/lib/active_model/validations.rb, line 49
-      
-
-
- -

+ + See on GitHub + +

Instance Private methods

@@ -588,22 +579,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations.rb, line 445
+    def raise_validation_error # :doc:
+      raise(ValidationError.new(self))
+    end
- -
-
# File activemodel/lib/active_model/validations.rb, line 445
-def raise_validation_error # :doc:
-  raise(ValidationError.new(self))
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveModel/Validations/AcceptanceValidator/AttributeDefinition.html b/src/classes/ActiveModel/Validations/AcceptanceValidator/AttributeDefinition.html deleted file mode 100644 index f7692e2ea9..0000000000 --- a/src/classes/ActiveModel/Validations/AcceptanceValidator/AttributeDefinition.html +++ /dev/null @@ -1,206 +0,0 @@ ---- -title: ActiveModel::Validations::AcceptanceValidator::AttributeDefinition -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - -

Attributes

- - - - - - - - -
- [R] - attributes

TODO Change this to private once we've dropped Ruby 2.2 support. Workaround for Ruby 2.2 “private attribute?” warning.

- - - - -

Class Public methods

- -
-

- - new(attributes) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activemodel/lib/active_model/validations/acceptance.rb, line 45
-def initialize(attributes)
-  @attributes = attributes.map(&:to_s)
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - define_on(klass) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activemodel/lib/active_model/validations/acceptance.rb, line 54
-def define_on(klass)
-  attr_readers = attributes.reject { |name| klass.attribute_method?(name) }
-  attr_writers = attributes.reject { |name| klass.attribute_method?("#{name}=") }
-  klass.send(:attr_reader, *attr_readers)
-  klass.send(:attr_writer, *attr_writers)
-end
-
-
- -
- -
-

- - matches?(method_name) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activemodel/lib/active_model/validations/acceptance.rb, line 49
-def matches?(method_name)
-  attr_name = convert_to_reader_name(method_name)
-  attributes.include?(attr_name)
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveModel/Validations/AcceptanceValidator/LazilyDefineAttributes.html b/src/classes/ActiveModel/Validations/AcceptanceValidator/LazilyDefineAttributes.html index 72ba28752d..02c4bd62d7 100644 --- a/src/classes/ActiveModel/Validations/AcceptanceValidator/LazilyDefineAttributes.html +++ b/src/classes/ActiveModel/Validations/AcceptanceValidator/LazilyDefineAttributes.html @@ -110,22 +110,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations/acceptance.rb, line 28
+          def initialize(attributes)
+            @attributes = attributes.map(&:to_s)
+          end
- -
-
# File activemodel/lib/active_model/validations/acceptance.rb, line 28
-def initialize(attributes)
-  @attributes = attributes.map(&:to_s)
-end
-
-
- - + See on GitHub + + + + @@ -149,22 +149,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations/acceptance.rb, line 73
+          def ==(other)
+            self.class == other.class && attributes == other.attributes
+          end
- -
-
# File activemodel/lib/active_model/validations/acceptance.rb, line 73
-def ==(other)
-  self.class == other.class && attributes == other.attributes
-end
-
-
- - + See on GitHub + + + +

@@ -184,35 +184,35 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations/acceptance.rb, line 56
+          def define_on(klass)
+            @lock&.synchronize do
+              return unless @lock
+
+              attr_readers = attributes.reject { |name| klass.attribute_method?(name) }
+              attr_writers = attributes.reject { |name| klass.attribute_method?("#{name}=") }
+
+              attr_reader(*attr_readers)
+              attr_writer(*attr_writers)
+
+              remove_method :respond_to_missing?
+              remove_method :method_missing
+
+              @lock = nil
+            end
+          end
- -
-
# File activemodel/lib/active_model/validations/acceptance.rb, line 56
-def define_on(klass)
-  @lock&.synchronize do
-    return unless @lock
-
-    attr_readers = attributes.reject { |name| klass.attribute_method?(name) }
-    attr_writers = attributes.reject { |name| klass.attribute_method?("#{name}=") }
-
-    attr_reader(*attr_readers)
-    attr_writer(*attr_writers)
-
-    remove_method :respond_to_missing?
-    remove_method :method_missing
-
-    @lock = nil
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -232,37 +232,37 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations/acceptance.rb, line 32
+          def included(klass)
+            @lock = Mutex.new
+            mod = self
+
+            define_method(:respond_to_missing?) do |method_name, include_private = false|
+              mod.define_on(klass)
+              super(method_name, include_private) || mod.matches?(method_name)
+            end
+
+            define_method(:method_missing) do |method_name, *args, &block|
+              mod.define_on(klass)
+              if mod.matches?(method_name)
+                send(method_name, *args, &block)
+              else
+                super(method_name, *args, &block)
+              end
+            end
+          end
- -
-
# File activemodel/lib/active_model/validations/acceptance.rb, line 32
-def included(klass)
-  @lock = Mutex.new
-  mod = self
-
-  define_method(:respond_to_missing?) do |method_name, include_private = false|
-    mod.define_on(klass)
-    super(method_name, include_private) || mod.matches?(method_name)
-  end
-
-  define_method(:method_missing) do |method_name, *args, &block|
-    mod.define_on(klass)
-    if mod.matches?(method_name)
-      send(method_name, *args, &block)
-    else
-      super(method_name, *args, &block)
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -282,23 +282,23 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations/acceptance.rb, line 51
+          def matches?(method_name)
+            attr_name = method_name.to_s.chomp("=")
+            attributes.any? { |name| name == attr_name }
+          end
- -
-
# File activemodel/lib/active_model/validations/acceptance.rb, line 51
-def matches?(method_name)
-  attr_name = method_name.to_s.chomp("=")
-  attributes.any? { |name| name == attr_name }
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveModel/Validations/Callbacks/ClassMethods.html b/src/classes/ActiveModel/Validations/Callbacks/ClassMethods.html index 23726fced9..c7690d11df 100644 --- a/src/classes/ActiveModel/Validations/Callbacks/ClassMethods.html +++ b/src/classes/ActiveModel/Validations/Callbacks/ClassMethods.html @@ -104,28 +104,28 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations/callbacks.rb, line 88
+        def after_validation(*args, &block)
+          options = args.extract_options!
+          options = options.dup
+          options[:prepend] = true
+
+          set_options_for_callback(options)
+
+          set_callback(:validation, :after, *args, options, &block)
+        end
- -
-
# File activemodel/lib/active_model/validations/callbacks.rb, line 88
-def after_validation(*args, &block)
-  options = args.extract_options!
-  options = options.dup
-  options[:prepend] = true
-
-  set_options_for_callback(options)
-
-  set_callback(:validation, :after, *args, options, &block)
-end
-
-
- - + See on GitHub + + + +

@@ -167,26 +167,26 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations/callbacks.rb, line 55
+        def before_validation(*args, &block)
+          options = args.extract_options!
+
+          set_options_for_callback(options)
+
+          set_callback(:validation, :before, *args, options, &block)
+        end
- -
-
# File activemodel/lib/active_model/validations/callbacks.rb, line 55
-def before_validation(*args, &block)
-  options = args.extract_options!
-
-  set_options_for_callback(options)
-
-  set_callback(:validation, :before, *args, options, &block)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveModel/Validations/ClassMethods.html b/src/classes/ActiveModel/Validations/ClassMethods.html index c4d51b5bfb..db83f1adaa 100644 --- a/src/classes/ActiveModel/Validations/ClassMethods.html +++ b/src/classes/ActiveModel/Validations/ClassMethods.html @@ -121,22 +121,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations.rb, line 284
+      def attribute_method?(attribute)
+        method_defined?(attribute)
+      end
- -
-
# File activemodel/lib/active_model/validations.rb, line 284
-def attribute_method?(attribute)
-  method_defined?(attribute)
-end
-
-
- - + See on GitHub + + + +

@@ -189,23 +189,23 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations.rb, line 248
+      def clear_validators!
+        reset_callbacks(:validate)
+        _validators.clear
+      end
- -
-
# File activemodel/lib/active_model/validations.rb, line 248
-def clear_validators!
-  reset_callbacks(:validate)
-  _validators.clear
-end
-
-
- -

+ See on GitHub + + + +

@@ -277,36 +277,36 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations.rb, line 171
+      def validate(*args, &block)
+        options = args.extract_options!
+
+        if args.all?(Symbol)
+          options.each_key do |k|
+            unless VALID_OPTIONS_FOR_VALIDATE.include?(k)
+              raise ArgumentError.new("Unknown key: #{k.inspect}. Valid keys are: #{VALID_OPTIONS_FOR_VALIDATE.map(&:inspect).join(', ')}. Perhaps you meant to call `validates` instead of `validate`?")
+            end
+          end
+        end
+
+        if options.key?(:on)
+          options = options.merge(if: [predicate_for_validation_context(options[:on]), *options[:if]])
+        end
+
+        set_callback(:validate, *args, options, &block)
+      end
- -
-
# File activemodel/lib/active_model/validations.rb, line 171
-def validate(*args, &block)
-  options = args.extract_options!
-
-  if args.all?(Symbol)
-    options.each_key do |k|
-      unless VALID_OPTIONS_FOR_VALIDATE.include?(k)
-        raise ArgumentError.new("Unknown key: #{k.inspect}. Valid keys are: #{VALID_OPTIONS_FOR_VALIDATE.map(&:inspect).join(', ')}. Perhaps you meant to call `validates` instead of `validate`?")
-      end
-    end
-  end
-
-  if options.key?(:on)
-    options = options.merge(if: [predicate_for_validation_context(options[:on]), *options[:if]])
-  end
-
-  set_callback(:validate, *args, options, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -412,42 +412,42 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations/validates.rb, line 106
+      def validates(*attributes)
+        defaults = attributes.extract_options!.dup
+        validations = defaults.slice!(*_validates_default_keys)
+
+        raise ArgumentError, "You need to supply at least one attribute" if attributes.empty?
+        raise ArgumentError, "You need to supply at least one validation" if validations.empty?
+
+        defaults[:attributes] = attributes
+
+        validations.each do |key, options|
+          key = "#{key.to_s.camelize}Validator"
+
+          begin
+            validator = const_get(key)
+          rescue NameError
+            raise ArgumentError, "Unknown validator: '#{key}'"
+          end
+
+          next unless options
+
+          validates_with(validator, defaults.merge(_parse_validates_options(options)))
+        end
+      end
- -
-
# File activemodel/lib/active_model/validations/validates.rb, line 106
-def validates(*attributes)
-  defaults = attributes.extract_options!.dup
-  validations = defaults.slice!(*_validates_default_keys)
-
-  raise ArgumentError, "You need to supply at least one attribute" if attributes.empty?
-  raise ArgumentError, "You need to supply at least one validation" if validations.empty?
-
-  defaults[:attributes] = attributes
-
-  validations.each do |key, options|
-    key = "#{key.to_s.camelize}Validator"
-
-    begin
-      validator = const_get(key)
-    rescue NameError
-      raise ArgumentError, "Unknown validator: '#{key}'"
-    end
-
-    next unless options
-
-    validates_with(validator, defaults.merge(_parse_validates_options(options)))
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -480,24 +480,24 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations/validates.rb, line 148
+      def validates!(*attributes)
+        options = attributes.extract_options!
+        options[:strict] = true
+        validates(*(attributes << options))
+      end
- -
-
# File activemodel/lib/active_model/validations/validates.rb, line 148
-def validates!(*attributes)
-  options = attributes.extract_options!
-  options[:strict] = true
-  validates(*(attributes << options))
-end
-
-
- -

+ See on GitHub + + + +

@@ -541,22 +541,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations.rb, line 104
+      def validates_each(*attr_names, &block)
+        validates_with BlockValidator, _merge_attributes(attr_names), &block
+      end
- -
-
# File activemodel/lib/active_model/validations.rb, line 104
-def validates_each(*attr_names, &block)
-  validates_with BlockValidator, _merge_attributes(attr_names), &block
-end
-
-
- -

+ See on GitHub + + + +

@@ -632,37 +632,37 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations/with.rb, line 88
+      def validates_with(*args, &block)
+        options = args.extract_options!
+        options[:class] = self
+
+        args.each do |klass|
+          validator = klass.new(options.dup, &block)
+
+          if validator.respond_to?(:attributes) && !validator.attributes.empty?
+            validator.attributes.each do |attribute|
+              _validators[attribute.to_sym] << validator
+            end
+          else
+            _validators[nil] << validator
+          end
+
+          validate(validator, options)
+        end
+      end
- -
-
# File activemodel/lib/active_model/validations/with.rb, line 88
-def validates_with(*args, &block)
-  options = args.extract_options!
-  options[:class] = self
-
-  args.each do |klass|
-    validator = klass.new(options.dup, &block)
-
-    if validator.respond_to?(:attributes) && !validator.attributes.empty?
-      validator.attributes.each do |attribute|
-        _validators[attribute.to_sym] << validator
-      end
-    else
-      _validators[nil] << validator
-    end
-
-    validate(validator, options)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -698,22 +698,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations.rb, line 206
+      def validators
+        _validators.values.flatten.uniq
+      end
- -
-
# File activemodel/lib/active_model/validations.rb, line 206
-def validators
-  _validators.values.flatten.uniq
-end
-
-
- -

+ See on GitHub + + + +

@@ -748,24 +748,24 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations.rb, line 268
+      def validators_on(*attributes)
+        attributes.flat_map do |attribute|
+          _validators[attribute.to_sym]
+        end
+      end
- -
-
# File activemodel/lib/active_model/validations.rb, line 268
-def validators_on(*attributes)
-  attributes.flat_map do |attribute|
-    _validators[attribute.to_sym]
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveModel/Validations/HelperMethods.html b/src/classes/ActiveModel/Validations/HelperMethods.html index cb5d664e0b..49df19ee8d 100644 --- a/src/classes/ActiveModel/Validations/HelperMethods.html +++ b/src/classes/ActiveModel/Validations/HelperMethods.html @@ -149,22 +149,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations/absence.rb, line 28
+      def validates_absence_of(*attr_names)
+        validates_with AbsenceValidator, _merge_attributes(attr_names)
+      end
- -
-
# File activemodel/lib/active_model/validations/absence.rb, line 28
-def validates_absence_of(*attr_names)
-  validates_with AbsenceValidator, _merge_attributes(attr_names)
-end
-
-
- - + See on GitHub + + + +

@@ -201,22 +201,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations/acceptance.rb, line 108
+      def validates_acceptance_of(*attr_names)
+        validates_with AcceptanceValidator, _merge_attributes(attr_names)
+      end
- -
-
# File activemodel/lib/active_model/validations/acceptance.rb, line 108
-def validates_acceptance_of(*attr_names)
-  validates_with AcceptanceValidator, _merge_attributes(attr_names)
-end
-
-
- -

+ See on GitHub + + + +

@@ -283,22 +283,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations/comparison.rb, line 85
+      def validates_comparison_of(*attr_names)
+        validates_with ComparisonValidator, _merge_attributes(attr_names)
+      end
- -
-
# File activemodel/lib/active_model/validations/comparison.rb, line 85
-def validates_comparison_of(*attr_names)
-  validates_with ComparisonValidator, _merge_attributes(attr_names)
-end
-
-
- -

+ See on GitHub + + + +

@@ -346,22 +346,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations/confirmation.rb, line 75
+      def validates_confirmation_of(*attr_names)
+        validates_with ConfirmationValidator, _merge_attributes(attr_names)
+      end
- -
-
# File activemodel/lib/active_model/validations/confirmation.rb, line 75
-def validates_confirmation_of(*attr_names)
-  validates_with ConfirmationValidator, _merge_attributes(attr_names)
-end
-
-
- -

+ See on GitHub + + + +

@@ -402,22 +402,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations/exclusion.rb, line 44
+      def validates_exclusion_of(*attr_names)
+        validates_with ExclusionValidator, _merge_attributes(attr_names)
+      end
- -
-
# File activemodel/lib/active_model/validations/exclusion.rb, line 44
-def validates_exclusion_of(*attr_names)
-  validates_with ExclusionValidator, _merge_attributes(attr_names)
-end
-
-
- -

+ See on GitHub + + + +

@@ -477,22 +477,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations/format.rb, line 107
+      def validates_format_of(*attr_names)
+        validates_with FormatValidator, _merge_attributes(attr_names)
+      end
- -
-
# File activemodel/lib/active_model/validations/format.rb, line 107
-def validates_format_of(*attr_names)
-  validates_with FormatValidator, _merge_attributes(attr_names)
-end
-
-
- -

+ See on GitHub + + + +

@@ -532,22 +532,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations/inclusion.rb, line 42
+      def validates_inclusion_of(*attr_names)
+        validates_with InclusionValidator, _merge_attributes(attr_names)
+      end
- -
-
# File activemodel/lib/active_model/validations/inclusion.rb, line 42
-def validates_inclusion_of(*attr_names)
-  validates_with InclusionValidator, _merge_attributes(attr_names)
-end
-
-
- -

+ See on GitHub + + + +

@@ -618,22 +618,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations/length.rb, line 123
+      def validates_length_of(*attr_names)
+        validates_with LengthValidator, _merge_attributes(attr_names)
+      end
- -
-
# File activemodel/lib/active_model/validations/length.rb, line 123
-def validates_length_of(*attr_names)
-  validates_with LengthValidator, _merge_attributes(attr_names)
-end
-
-
- -

+ See on GitHub + + + +

@@ -714,22 +714,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations/numericality.rb, line 217
+      def validates_numericality_of(*attr_names)
+        validates_with NumericalityValidator, _merge_attributes(attr_names)
+      end
- -
-
# File activemodel/lib/active_model/validations/numericality.rb, line 217
-def validates_numericality_of(*attr_names)
-  validates_with NumericalityValidator, _merge_attributes(attr_names)
-end
-
-
- -

+ See on GitHub + + + +

@@ -767,22 +767,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validations/presence.rb, line 34
+      def validates_presence_of(*attr_names)
+        validates_with PresenceValidator, _merge_attributes(attr_names)
+      end
- -
-
# File activemodel/lib/active_model/validations/presence.rb, line 34
-def validates_presence_of(*attr_names)
-  validates_with PresenceValidator, _merge_attributes(attr_names)
-end
-
-
- -

+ See on GitHub + + + +

@@ -806,7 +806,8 @@

-

+ + diff --git a/src/classes/ActiveModel/Validator.html b/src/classes/ActiveModel/Validator.html index cc47ab248b..d0bd354c49 100644 --- a/src/classes/ActiveModel/Validator.html +++ b/src/classes/ActiveModel/Validator.html @@ -204,22 +204,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validator.rb, line 103
+    def self.kind
+      @kind ||= name.split("::").last.underscore.chomp("_validator").to_sym unless anonymous?
+    end
- -
-
# File activemodel/lib/active_model/validator.rb, line 103
-def self.kind
-  @kind ||= name.split("::").last.underscore.chomp("_validator").to_sym unless anonymous?
-end
-
-
- - + See on GitHub + + + +

@@ -239,22 +239,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validator.rb, line 108
+    def initialize(options = {})
+      @options = options.except(:class).freeze
+    end
- -
-
# File activemodel/lib/active_model/validator.rb, line 108
-def initialize(options = {})
-  @options = options.except(:class).freeze
-end
-
-
- -

+ See on GitHub + + + + @@ -282,22 +282,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validator.rb, line 116
+    def kind
+      self.class.kind
+    end
- -
-
# File activemodel/lib/active_model/validator.rb, line 116
-def kind
-  self.class.kind
-end
-
-
- - + See on GitHub + + + +

@@ -317,22 +317,22 @@

- -
+ +
+ + Source code + + +
# File activemodel/lib/active_model/validator.rb, line 122
+    def validate(record)
+      raise NotImplementedError, "Subclasses must implement a validate(record) method."
+    end
- -
-
# File activemodel/lib/active_model/validator.rb, line 122
-def validate(record)
-  raise NotImplementedError, "Subclasses must implement a validate(record) method."
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord.html b/src/classes/ActiveRecord.html index 525e708285..453484244d 100644 --- a/src/classes/ActiveRecord.html +++ b/src/classes/ActiveRecord.html @@ -1482,40 +1482,40 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record.rb, line 211
+  def self.db_warnings_action=(action)
+    @db_warnings_action =
+      case action
+      when :ignore
+        nil
+      when :log
+        ->(warning) do
+          warning_message = "[#{warning.class}] #{warning.message}"
+          warning_message += " (#{warning.code})" if warning.code
+          ActiveRecord::Base.logger.warn(warning_message)
+        end
+      when :raise
+        ->(warning) { raise warning }
+      when :report
+        ->(warning) { Rails.error.report(warning, handled: true) }
+      when Proc
+        action
+      else
+        raise ArgumentError, "db_warnings_action must be one of :ignore, :log, :raise, :report, or a custom proc."
+      end
+  end
- -
-
# File activerecord/lib/active_record.rb, line 211
-def self.db_warnings_action=(action)
-  @db_warnings_action =
-    case action
-    when :ignore
-      nil
-    when :log
-      ->(warning) do
-        warning_message = "[#{warning.class}] #{warning.message}"
-        warning_message += " (#{warning.code})" if warning.code
-        ActiveRecord::Base.logger.warn(warning_message)
-      end
-    when :raise
-      ->(warning) { raise warning }
-    when :report
-      ->(warning) { Rails.error.report(warning, handled: true) }
-    when Proc
-      action
-    else
-      raise ArgumentError, "db_warnings_action must be one of :ignore, :log, :raise, :report, or a custom proc."
-    end
-end
-
-
- - + See on GitHub + + + +

@@ -1535,26 +1535,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record.rb, line 196
+  def self.default_timezone=(default_timezone)
+    unless %i(local utc).include?(default_timezone)
+      raise ArgumentError, "default_timezone must be either :utc (default) or :local."
+    end
+
+    @default_timezone = default_timezone
+  end
- -
-
# File activerecord/lib/active_record.rb, line 196
-def self.default_timezone=(default_timezone)
-  unless %i(local utc).include?(default_timezone)
-    raise ArgumentError, "default_timezone must be either :utc (default) or :local."
-  end
-
-  @default_timezone = default_timezone
-end
-
-
- -

+ See on GitHub + + + +

@@ -1574,22 +1574,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record.rb, line 476
+  def self.disconnect_all!
+    ConnectionAdapters::PoolConfig.disconnect_all!
+  end
- -
-
# File activerecord/lib/active_record.rb, line 476
-def self.disconnect_all!
-  ConnectionAdapters::PoolConfig.disconnect_all!
-end
-
-
- -

+ See on GitHub + + + +

@@ -1609,28 +1609,28 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record.rb, line 465
+  def self.eager_load!
+    super
+    ActiveRecord::Locking.eager_load!
+    ActiveRecord::Scoping.eager_load!
+    ActiveRecord::Associations.eager_load!
+    ActiveRecord::AttributeMethods.eager_load!
+    ActiveRecord::ConnectionAdapters.eager_load!
+    ActiveRecord::Encryption.eager_load!
+  end
- -
-
# File activerecord/lib/active_record.rb, line 465
-def self.eager_load!
-  super
-  ActiveRecord::Locking.eager_load!
-  ActiveRecord::Scoping.eager_load!
-  ActiveRecord::Associations.eager_load!
-  ActiveRecord::AttributeMethods.eager_load!
-  ActiveRecord::ConnectionAdapters.eager_load!
-  ActiveRecord::Encryption.eager_load!
-end
-
-
- -

+ See on GitHub + + + +

@@ -1650,22 +1650,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/gem_version.rb, line 5
+  def self.gem_version
+    Gem::Version.new VERSION::STRING
+  end
- -
-
# File activerecord/lib/active_record/gem_version.rb, line 5
-def self.gem_version
-  Gem::Version.new VERSION::STRING
-end
-
-
- -

+ See on GitHub + + + +

@@ -1685,26 +1685,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record.rb, line 278
+  def self.global_executor_concurrency=(global_executor_concurrency)
+    if self.async_query_executor.nil? || self.async_query_executor == :multi_thread_pool
+      raise ArgumentError, "`global_executor_concurrency` cannot be set when using the executor is nil or set to multi_thead_pool. For multiple thread pools, please set the concurrency in your database configuration."
+    end
+
+    @global_executor_concurrency = global_executor_concurrency
+  end
- -
-
# File activerecord/lib/active_record.rb, line 278
-def self.global_executor_concurrency=(global_executor_concurrency)
-  if self.async_query_executor.nil? || self.async_query_executor == :multi_thread_pool
-    raise ArgumentError, "`global_executor_concurrency` cannot be set when using the executor is nil or set to multi_thead_pool. For multiple thread pools, please set the concurrency in your database configuration."
-  end
-
-  @global_executor_concurrency = global_executor_concurrency
-end
-
-
- -

+ See on GitHub + + + +

@@ -1724,26 +1724,26 @@

- -
- - -
-
# File activerecord/lib/active_record.rb, line 245
-  def self.legacy_connection_handling=(_)
-    raise ArgumentError, <<~MSG.squish
-      The `legacy_connection_handling` setter was deprecated in 7.0 and removed in 7.1,
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record.rb, line 245
+  def self.legacy_connection_handling=(_)
+    raise ArgumentError, <<~MSG.squish
+      The `legacy_connection_handling` setter was deprecated in 7.0 and removed in 7.1,
       but is still defined in your configuration. Please remove this call as it no longer
-      has any effect."
-    MSG
-  end
-
-
- -

+ has any effect." + MSG + end + + See on GitHub + + + +

@@ -1763,22 +1763,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record.rb, line 457
+  def self.marshalling_format_version
+    Marshalling.format_version
+  end
- -
-
# File activerecord/lib/active_record.rb, line 457
-def self.marshalling_format_version
-  Marshalling.format_version
-end
-
-
- -

+ See on GitHub + + + +

@@ -1798,22 +1798,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record.rb, line 461
+  def self.marshalling_format_version=(value)
+    Marshalling.format_version = value
+  end
- -
-
# File activerecord/lib/active_record.rb, line 461
-def self.marshalling_format_version=(value)
-  Marshalling.format_version = value
-end
-
-
- -

+ See on GitHub + + + +

@@ -1833,25 +1833,25 @@

- -
- - -
-
# File activerecord/lib/active_record.rb, line 395
-  def self.suppress_multiple_database_warning
-    ActiveRecord.deprecator.warn(<<-MSG.squish)
-      config.active_record.suppress_multiple_database_warning is deprecated and will be removed in Rails 7.2.
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record.rb, line 395
+  def self.suppress_multiple_database_warning
+    ActiveRecord.deprecator.warn(<<-MSG.squish)
+      config.active_record.suppress_multiple_database_warning is deprecated and will be removed in Rails 7.2.
       It no longer has any effect and should be removed from the configuration file.
-    MSG
-  end
-
-
- -

+ MSG + end + + See on GitHub + + + +

@@ -1871,25 +1871,25 @@

- -
- - -
-
# File activerecord/lib/active_record.rb, line 402
-  def self.suppress_multiple_database_warning=(value)
-    ActiveRecord.deprecator.warn(<<-MSG.squish)
-      config.active_record.suppress_multiple_database_warning= is deprecated and will be removed in Rails 7.2.
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record.rb, line 402
+  def self.suppress_multiple_database_warning=(value)
+    ActiveRecord.deprecator.warn(<<-MSG.squish)
+      config.active_record.suppress_multiple_database_warning= is deprecated and will be removed in Rails 7.2.
       It no longer has any effect and should be removed from the configuration file.
-    MSG
-  end
-
-
- -

+ MSG + end + + See on GitHub + + + +

@@ -1909,21 +1909,21 @@

- -
- - -
-
# File activerecord/lib/active_record.rb, line 298
-singleton_class.attr_accessor :verbose_query_logs
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record.rb, line 298
+  singleton_class.attr_accessor :verbose_query_logs
 
-
-
- -

+ + See on GitHub + + + +

@@ -1943,22 +1943,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/version.rb, line 7
+  def self.version
+    gem_version
+  end
- -
-
# File activerecord/lib/active_record/version.rb, line 7
-def self.version
-  gem_version
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ActiveJobRequiredError.html b/src/classes/ActiveRecord/ActiveJobRequiredError.html deleted file mode 100644 index 13290bca27..0000000000 --- a/src/classes/ActiveRecord/ActiveJobRequiredError.html +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: ActiveRecord::ActiveJobRequiredError -layout: default ---- -
- -
-
- -
- -

Raised when trying to use a feature in Active Record which requires Active Job but the gem is not present.

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveRecord/AdapterError.html b/src/classes/ActiveRecord/AdapterError.html index 137c98ba22..03225ee9c6 100644 --- a/src/classes/ActiveRecord/AdapterError.html +++ b/src/classes/ActiveRecord/AdapterError.html @@ -100,23 +100,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/errors.rb, line 60
+    def initialize(message = nil, connection_pool: nil)
+      @connection_pool = connection_pool
+      super(message)
+    end
- -
-
# File activerecord/lib/active_record/errors.rb, line 60
-def initialize(message = nil, connection_pool: nil)
-  @connection_pool = connection_pool
-  super(message)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Aggregations/ClassMethods.html b/src/classes/ActiveRecord/Aggregations/ClassMethods.html index 91ae256793..554f8ddae0 100644 --- a/src/classes/ActiveRecord/Aggregations/ClassMethods.html +++ b/src/classes/ActiveRecord/Aggregations/ClassMethods.html @@ -253,40 +253,40 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/aggregations.rb, line 225
+        def composed_of(part_id, options = {})
+          options.assert_valid_keys(:class_name, :mapping, :allow_nil, :constructor, :converter)
+
+          unless self < Aggregations
+            include Aggregations
+          end
+
+          name        = part_id.id2name
+          class_name  = options[:class_name]  || name.camelize
+          mapping     = options[:mapping]     || [ name, name ]
+          mapping     = [ mapping ] unless mapping.first.is_a?(Array)
+          allow_nil   = options[:allow_nil]   || false
+          constructor = options[:constructor] || :new
+          converter   = options[:converter]
+
+          reader_method(name, class_name, mapping, allow_nil, constructor)
+          writer_method(name, class_name, mapping, allow_nil, converter)
+
+          reflection = ActiveRecord::Reflection.create(:composed_of, part_id, nil, options, self)
+          Reflection.add_aggregate_reflection self, part_id, reflection
+        end
- -
-
# File activerecord/lib/active_record/aggregations.rb, line 225
-def composed_of(part_id, options = {})
-  options.assert_valid_keys(:class_name, :mapping, :allow_nil, :constructor, :converter)
-
-  unless self < Aggregations
-    include Aggregations
-  end
-
-  name        = part_id.id2name
-  class_name  = options[:class_name]  || name.camelize
-  mapping     = options[:mapping]     || [ name, name ]
-  mapping     = [ mapping ] unless mapping.first.is_a?(Array)
-  allow_nil   = options[:allow_nil]   || false
-  constructor = options[:constructor] || :new
-  converter   = options[:converter]
-
-  reader_method(name, class_name, mapping, allow_nil, constructor)
-  writer_method(name, class_name, mapping, allow_nil, converter)
-
-  reflection = ActiveRecord::Reflection.create(:composed_of, part_id, nil, options, self)
-  Reflection.add_aggregate_reflection self, part_id, reflection
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/AssociationNotFoundError.html b/src/classes/ActiveRecord/AssociationNotFoundError.html deleted file mode 100644 index efb5c9944e..0000000000 --- a/src/classes/ActiveRecord/AssociationNotFoundError.html +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: ActiveRecord::AssociationNotFoundError -layout: default ---- -
- -
-
- - - - - - - - - -

Namespace

- - - - -

Class

- - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveRecord/AssociationNotFoundError/Correction.html b/src/classes/ActiveRecord/AssociationNotFoundError/Correction.html deleted file mode 100644 index d99d507475..0000000000 --- a/src/classes/ActiveRecord/AssociationNotFoundError/Correction.html +++ /dev/null @@ -1,157 +0,0 @@ ---- -title: ActiveRecord::AssociationNotFoundError::Correction -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - new(error) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/associations.rb, line 20
-def initialize(error)
-  @error = error
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - corrections() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/associations.rb, line 24
-def corrections
-  if @error.association_name
-    maybe_these = @error.record.class.reflections.keys
-
-    maybe_these.sort_by { |n|
-      DidYouMean::Jaro.distance(@error.association_name.to_s, n)
-    }.reverse.first(4)
-  else
-    []
-  end
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveRecord/AssociationRelation.html b/src/classes/ActiveRecord/AssociationRelation.html deleted file mode 100644 index 4bc89883cc..0000000000 --- a/src/classes/ActiveRecord/AssociationRelation.html +++ /dev/null @@ -1,341 +0,0 @@ ---- -title: ActiveRecord::AssociationRelation -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - new(klass, association, **) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/association_relation.rb, line 5
-def initialize(klass, association, **)
-  super(klass)
-  @association = association
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - ==(other) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/association_relation.rb, line 14
-def ==(other)
-  other == records
-end
-
-
- -
- -
-

- - build(attributes = nil, &block) - -

- - -
- -
- - - -
- Also aliased as: new -
- - - - - - -
- - -
-
# File activerecord/lib/active_record/association_relation.rb, line 18
-def build(attributes = nil, &block)
-  block = _deprecated_scope_block("new", &block)
-  scoping { @association.build(attributes, &block) }
-end
-
-
- -
- -
-

- - create(attributes = nil, &block) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/association_relation.rb, line 24
-def create(attributes = nil, &block)
-  block = _deprecated_scope_block("create", &block)
-  scoping { @association.create(attributes, &block) }
-end
-
-
- -
- -
-

- - create!(attributes = nil, &block) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/association_relation.rb, line 29
-def create!(attributes = nil, &block)
-  block = _deprecated_scope_block("create!", &block)
-  scoping { @association.create!(attributes, &block) }
-end
-
-
- -
- -
-

- - new(attributes = nil, &block) - -

- - -
- -
- - - - - -
- Alias for: build -
- - - -
- -
-

- - proxy_association() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/association_relation.rb, line 10
-def proxy_association
-  @association
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveRecord/Associations/ClassMethods.html b/src/classes/ActiveRecord/Associations/ClassMethods.html index 6608aa1675..164cee4fda 100644 --- a/src/classes/ActiveRecord/Associations/ClassMethods.html +++ b/src/classes/ActiveRecord/Associations/ClassMethods.html @@ -1047,23 +1047,23 @@

Options

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/associations.rb, line 1886
+        def belongs_to(name, scope = nil, **options)
+          reflection = Builder::BelongsTo.build(self, name, scope, options)
+          Reflection.add_reflection self, name, reflection
+        end
- -
-
# File activerecord/lib/active_record/associations.rb, line 1886
-def belongs_to(name, scope = nil, **options)
-  reflection = Builder::BelongsTo.build(self, name, scope, options)
-  Reflection.add_reflection self, name, reflection
-end
-
-
- - + See on GitHub + + + +

@@ -1239,56 +1239,56 @@

Options

- -
- - -
-
# File activerecord/lib/active_record/associations.rb, line 2067
-        def has_and_belongs_to_many(name, scope = nil, **options, &extension)
-          habtm_reflection = ActiveRecord::Reflection::HasAndBelongsToManyReflection.new(name, scope, options, self)
+          
+            
+ + Source code + - builder = Builder::HasAndBelongsToMany.new name, self, options +
# File activerecord/lib/active_record/associations.rb, line 2067
+        def has_and_belongs_to_many(name, scope = nil, **options, &extension)
+          habtm_reflection = ActiveRecord::Reflection::HasAndBelongsToManyReflection.new(name, scope, options, self)
 
-          join_model = builder.through_model
+          builder = Builder::HasAndBelongsToMany.new name, self, options
 
-          const_set join_model.name, join_model
-          private_constant join_model.name
+          join_model = builder.through_model
 
-          middle_reflection = builder.middle_reflection join_model
+          const_set join_model.name, join_model
+          private_constant join_model.name
 
-          Builder::HasMany.define_callbacks self, middle_reflection
-          Reflection.add_reflection self, middle_reflection.name, middle_reflection
-          middle_reflection.parent_reflection = habtm_reflection
+          middle_reflection = builder.middle_reflection join_model
 
-          include Module.new {
-            class_eval <<-RUBY, __FILE__, __LINE__ + 1
-              def destroy_associations
+          Builder::HasMany.define_callbacks self, middle_reflection
+          Reflection.add_reflection self, middle_reflection.name, middle_reflection
+          middle_reflection.parent_reflection = habtm_reflection
+
+          include Module.new {
+            class_eval <<-RUBY, __FILE__, __LINE__ + 1
+              def destroy_associations
                 association(:#{middle_reflection.name}).delete_all(:delete_all)
                 association(:#{name}).reset
                 super
               end
-            RUBY
+            RUBY
           }
 
-          hm_options = {}
-          hm_options[:through] = middle_reflection.name
-          hm_options[:source] = join_model.right_reflection.name
+          hm_options = {}
+          hm_options[:through] = middle_reflection.name
+          hm_options[:source] = join_model.right_reflection.name
 
-          [:before_add, :after_add, :before_remove, :after_remove, :autosave, :validate, :join_table, :class_name, :extend, :strict_loading].each do |k|
-            hm_options[k] = options[k] if options.key? k
-          end
+          [:before_add, :after_add, :before_remove, :after_remove, :autosave, :validate, :join_table, :class_name, :extend, :strict_loading].each do |k|
+            hm_options[k] = options[k] if options.key? k
+          end
 
-          has_many name, scope, **hm_options, &extension
-          _reflections[name.to_s].parent_reflection = habtm_reflection
-        end
-
-
- -
+ has_many name, scope, **hm_options, &extension + _reflections[name.to_s].parent_reflection = habtm_reflection + end + + See on GitHub + + + +

@@ -1519,23 +1519,23 @@

Options

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/associations.rb, line 1522
+        def has_many(name, scope = nil, **options, &extension)
+          reflection = Builder::HasMany.build(self, name, scope, options, &extension)
+          Reflection.add_reflection self, name, reflection
+        end
- -
-
# File activerecord/lib/active_record/associations.rb, line 1522
-def has_many(name, scope = nil, **options, &extension)
-  reflection = Builder::HasMany.build(self, name, scope, options, &extension)
-  Reflection.add_reflection self, name, reflection
-end
-
-
- -
+ See on GitHub + + + +

@@ -1716,23 +1716,23 @@

Options

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/associations.rb, line 1708
+        def has_one(name, scope = nil, **options)
+          reflection = Builder::HasOne.build(self, name, scope, options)
+          Reflection.add_reflection self, name, reflection
+        end
- -
-
# File activerecord/lib/active_record/associations.rb, line 1708
-def has_one(name, scope = nil, **options)
-  reflection = Builder::HasOne.build(self, name, scope, options)
-  Reflection.add_reflection self, name, reflection
-end
-
-
- -
+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Associations/CollectionProxy.html b/src/classes/ActiveRecord/Associations/CollectionProxy.html index ed8d9baa36..4bc7e6d658 100644 --- a/src/classes/ActiveRecord/Associations/CollectionProxy.html +++ b/src/classes/ActiveRecord/Associations/CollectionProxy.html @@ -303,22 +303,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 1036
+      def <<(*records)
+        proxy_association.concat(records) && self
+      end
- -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 1036
-def <<(*records)
-  proxy_association.concat(records) && self
-end
-
-
- - + See on GitHub + + + +

@@ -362,22 +362,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 967
+      def ==(other)
+        load_target == other
+      end
- -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 967
-def ==(other)
-  load_target == other
-end
-
-
- -

+ See on GitHub + + + +

@@ -428,20 +428,10 @@

- -
- - -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 836
-      
-
-
- -

+ + See on GitHub + +

@@ -465,7 +455,8 @@

-

+ +

@@ -510,22 +501,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 318
+      def build(attributes = {}, &block)
+        @association.build(attributes, &block)
+      end
- -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 318
-def build(attributes = {}, &block)
-  @association.build(attributes, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -545,22 +536,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 724
+      def calculate(operation, column_name)
+        null_scope? ? scope.calculate(operation, column_name) : super
+      end
- -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 724
-def calculate(operation, column_name)
-  null_scope? ? scope.calculate(operation, column_name) : super
-end
-
-
- -

+ See on GitHub + + + +

@@ -580,23 +571,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 1053
+      def clear
+        delete_all
+        self
+      end
- -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 1053
-def clear
-  delete_all
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -620,7 +611,8 @@

-

+ +

@@ -660,20 +652,10 @@

- -
- - -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 733
-      
-
-
- -

+ + See on GitHub + +

@@ -717,22 +699,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 349
+      def create(attributes = {}, &block)
+        @association.create(attributes, &block)
+      end
- -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 349
-def create(attributes = {}, &block)
-  @association.create(attributes, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -764,22 +746,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 365
+      def create!(attributes = {}, &block)
+        @association.create!(attributes, &block)
+      end
- -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 365
-def create!(attributes = {}, &block)
-  @association.create!(attributes, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -909,22 +891,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 620
+      def delete(*records)
+        @association.delete(*records).tap { reset_scope }
+      end
- -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 620
-def delete(*records)
-  @association.delete(*records).tap { reset_scope }
-end
-
-
- -

+ See on GitHub + + + +

@@ -1018,22 +1000,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 474
+      def delete_all(dependent = nil)
+        @association.delete_all(dependent).tap { reset_scope }
+      end
- -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 474
-def delete_all(dependent = nil)
-  @association.delete_all(dependent).tap { reset_scope }
-end
-
-
- -

+ See on GitHub + + + +

@@ -1119,22 +1101,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 692
+      def destroy(*records)
+        @association.destroy(*records).tap { reset_scope }
+      end
- -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 692
-def destroy(*records)
-  @association.destroy(*records).tap { reset_scope }
-end
-
-
- -

+ See on GitHub + + + +

@@ -1174,22 +1156,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 501
+      def destroy_all
+        @association.destroy_all.tap { reset_scope }
+      end
- -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 501
-def destroy_all
-  @association.destroy_all.tap { reset_scope }
-end
-
-
- -

+ See on GitHub + + + +

@@ -1230,20 +1212,10 @@

- -
- - -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 697
-      
-
-
- -

+ + See on GitHub + +

@@ -1276,22 +1248,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 831
+      def empty?
+        @association.empty?
+      end
- -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 831
-def empty?
-  @association.empty?
-end
-
-
- -

+ See on GitHub + + + +

@@ -1312,20 +1284,10 @@

- -
- - -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 201
-      
-
-
- -

+ + See on GitHub + +

@@ -1369,23 +1331,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 138
+      def find(*args)
+        return super if block_given?
+        @association.find(*args)
+      end
- -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 138
-def find(*args)
-  return super if block_given?
-  @association.find(*args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1430,20 +1392,10 @@

- -
- - -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 144
-      
-
-
- -

+ + See on GitHub + +

@@ -1464,20 +1416,10 @@

- -
- - -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 209
-      
-
-
- -

+ + See on GitHub + +

@@ -1498,20 +1440,10 @@

- -
- - -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 193
-      
-
-
- -

+ + See on GitHub + +

@@ -1541,22 +1473,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 927
+      def include?(record)
+        !!@association.include?(record)
+      end
- -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 927
-def include?(record)
-  !!@association.include?(record)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1600,23 +1532,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 259
+      def last(limit = nil)
+        load_target if find_from_target?
+        super
+      end
- -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 259
-def last(limit = nil)
-  load_target if find_from_target?
-  super
-end
-
-
- -

+ See on GitHub + + + +

@@ -1654,20 +1586,10 @@

- -
- - -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 787
-      
-
-
- -

+ + See on GitHub + +

@@ -1687,22 +1609,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 44
+      def load_target
+        @association.load_target
+      end
- -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 44
-def load_target
-  @association.load_target
-end
-
-
- -

+ See on GitHub + + + +

@@ -1726,7 +1648,8 @@

-

+ +

@@ -1755,22 +1678,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 53
+      def loaded?
+        @association.loaded?
+      end
- -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 53
-def loaded?
-  @association.loaded?
-end
-
-
- -

+ See on GitHub + + + +

@@ -1823,20 +1746,10 @@

- -
- - -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 877
-      
-
-
- -

+ + See on GitHub + +

@@ -1860,7 +1773,8 @@

-

+ +

@@ -1880,22 +1794,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 728
+      def pluck(*column_names)
+        null_scope? ? scope.pluck(*column_names) : super
+      end
- -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 728
-def pluck(*column_names)
-  null_scope? ? scope.pluck(*column_names) : super
-end
-
-
- -

+ See on GitHub + + + +

@@ -1919,7 +1833,8 @@

-

+ +

@@ -1953,23 +1868,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 1072
+      def reload
+        proxy_association.reload(true)
+        reset_scope
+      end
- -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 1072
-def reload
-  proxy_association.reload(true)
-  reset_scope
-end
-
-
- -

+ See on GitHub + + + +

@@ -2010,22 +1925,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 391
+      def replace(other_array)
+        @association.replace(other_array)
+      end
- -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 391
-def replace(other_array)
-  @association.replace(other_array)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2061,24 +1976,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 1093
+      def reset
+        proxy_association.reset
+        proxy_association.reset_scope
+        reset_scope
+      end
- -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 1093
-def reset
-  proxy_association.reset
-  proxy_association.reset_scope
-  reset_scope
-end
-
-
- -

+ See on GitHub + + + +

@@ -2098,22 +2013,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 936
+      def scope
+        @scope ||= @association.scope
+      end
- -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 936
-def scope
-  @scope ||= @association.scope
-end
-
-
- -

+ See on GitHub + + + +

@@ -2134,20 +2049,10 @@

- -
- - -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 177
-      
-
-
- -

+ + See on GitHub + +

@@ -2168,20 +2073,10 @@

- -
- - -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 226
-      
-
-
- -

+ + See on GitHub + +

@@ -2245,20 +2140,10 @@

- -
- - -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 59
-      
-
-
- -

+ + See on GitHub + +

@@ -2299,22 +2184,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 782
+      def size
+        @association.size
+      end
- -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 782
-def size
-  @association.size
-end
-
-
- -

+ See on GitHub + + + +

@@ -2358,23 +2243,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 289
+      def take(limit = nil)
+        load_target if find_from_target?
+        super
+      end
- -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 289
-def take(limit = nil)
-  load_target if find_from_target?
-  super
-end
-
-
- -

+ See on GitHub + + + +

@@ -2394,22 +2279,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 40
+      def target
+        @association.target
+      end
- -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 40
-def target
-  @association.target
-end
-
-
- -

+ See on GitHub + + + +

@@ -2430,20 +2315,10 @@

- -
- - -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 185
-      
-
-
- -

+ + See on GitHub + +

@@ -2464,20 +2339,10 @@

- -
- - -
-
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 218
-      
-
-
- -

+ + See on GitHub + + diff --git a/src/classes/ActiveRecord/Associations/Preloader.html b/src/classes/ActiveRecord/Associations/Preloader.html deleted file mode 100644 index 31aee4d4d0..0000000000 --- a/src/classes/ActiveRecord/Associations/Preloader.html +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: ActiveRecord::Associations::Preloader -layout: default ---- - diff --git a/src/classes/ActiveRecord/Associations/Preloader/Association.html b/src/classes/ActiveRecord/Associations/Preloader/Association.html deleted file mode 100644 index dd756f742d..0000000000 --- a/src/classes/ActiveRecord/Associations/Preloader/Association.html +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: ActiveRecord::Associations::Preloader::Association -layout: default ---- -
- -
-
- - - - - - - - - -

Namespace

- - - - -

Class

- - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveRecord/Associations/Preloader/Association/LoaderQuery.html b/src/classes/ActiveRecord/Associations/Preloader/Association/LoaderQuery.html deleted file mode 100644 index 9d5dff8682..0000000000 --- a/src/classes/ActiveRecord/Associations/Preloader/Association/LoaderQuery.html +++ /dev/null @@ -1,335 +0,0 @@ ---- -title: ActiveRecord::Associations::Preloader::Association::LoaderQuery -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - -

Attributes

- - - - - - - - - - - - - - -
- [R] - association_key_name
- [R] - scope
- - - - -

Class Public methods

- -
-

- - new(scope, association_key_name) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/associations/preloader/association.rb, line 10
-def initialize(scope, association_key_name)
-  @scope = scope
-  @association_key_name = association_key_name
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - eql?(other) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/associations/preloader/association.rb, line 15
-def eql?(other)
-  association_key_name == other.association_key_name &&
-    scope.table_name == other.scope.table_name &&
-    scope.values_for_queries == other.scope.values_for_queries
-end
-
-
- -
- -
-

- - hash() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/associations/preloader/association.rb, line 21
-def hash
-  [association_key_name, scope.table_name, scope.values_for_queries].hash
-end
-
-
- -
- -
-

- - load_records_for_keys(keys, &block) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/associations/preloader/association.rb, line 38
-def load_records_for_keys(keys, &block)
-  scope.where(association_key_name => keys).load(&block)
-end
-
-
- -
- -
-

- - load_records_in_batch(loaders) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/associations/preloader/association.rb, line 29
-def load_records_in_batch(loaders)
-  raw_records = records_for(loaders)
-
-  loaders.each do |loader|
-    loader.load_records(raw_records)
-    loader.run
-  end
-end
-
-
- -
- -
-

- - records_for(loaders) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/associations/preloader/association.rb, line 25
-def records_for(loaders)
-  LoaderRecords.new(loaders, self).records
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveRecord/Associations/Preloader/Association/LoaderRecords.html b/src/classes/ActiveRecord/Associations/Preloader/Association/LoaderRecords.html deleted file mode 100644 index e017cc7c7c..0000000000 --- a/src/classes/ActiveRecord/Associations/Preloader/Association/LoaderRecords.html +++ /dev/null @@ -1,154 +0,0 @@ ---- -title: ActiveRecord::Associations::Preloader::Association::LoaderRecords -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - new(loaders, loader_query) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/associations/preloader/association.rb, line 44
-def initialize(loaders, loader_query)
-  @loader_query = loader_query
-  @loaders = loaders
-  @keys_to_load = Set.new
-  @already_loaded_records_by_key = {}
-
-  populate_keys_to_load_and_already_loaded_records
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - records() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/associations/preloader/association.rb, line 53
-def records
-  load_records + already_loaded_records
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveRecord/AttributeAssignmentError.html b/src/classes/ActiveRecord/AttributeAssignmentError.html index 9dda8b04da..d14fa5cad3 100644 --- a/src/classes/ActiveRecord/AttributeAssignmentError.html +++ b/src/classes/ActiveRecord/AttributeAssignmentError.html @@ -108,24 +108,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/errors.rb, line 424
+    def initialize(message = nil, exception = nil, attribute = nil)
+      super(message)
+      @exception = exception
+      @attribute = attribute
+    end
- -
-
# File activerecord/lib/active_record/errors.rb, line 424
-def initialize(message = nil, exception = nil, attribute = nil)
-  super(message)
-  @exception = exception
-  @attribute = attribute
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/AttributeMethods.html b/src/classes/ActiveRecord/AttributeMethods.html index de0d53109c..9e27f73181 100644 --- a/src/classes/ActiveRecord/AttributeMethods.html +++ b/src/classes/ActiveRecord/AttributeMethods.html @@ -275,22 +275,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods.rb, line 412
+    def [](attr_name)
+      read_attribute(attr_name) { |n| missing_attribute(n, caller) }
+    end
- -
-
# File activerecord/lib/active_record/attribute_methods.rb, line 412
-def [](attr_name)
-  read_attribute(attr_name) { |n| missing_attribute(n, caller) }
-end
-
-
- - + See on GitHub + + + +

@@ -318,22 +318,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods.rb, line 425
+    def []=(attr_name, value)
+      write_attribute(attr_name, value)
+    end
- -
-
# File activerecord/lib/active_record/attribute_methods.rb, line 425
-def []=(attr_name, value)
-  write_attribute(attr_name, value)
-end
-
-
- -

+ See on GitHub + + + +

@@ -378,22 +378,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods.rb, line 457
+    def accessed_fields
+      @attributes.accessed
+    end
- -
-
# File activerecord/lib/active_record/attribute_methods.rb, line 457
-def accessed_fields
-  @attributes.accessed
-end
-
-
- -

+ See on GitHub + + + +

@@ -425,25 +425,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods.rb, line 362
+    def attribute_for_inspect(attr_name)
+      attr_name = attr_name.to_s
+      attr_name = self.class.attribute_aliases[attr_name] || attr_name
+      value = _read_attribute(attr_name)
+      format_for_inspect(attr_name, value)
+    end
- -
-
# File activerecord/lib/active_record/attribute_methods.rb, line 362
-def attribute_for_inspect(attr_name)
-  attr_name = attr_name.to_s
-  attr_name = self.class.attribute_aliases[attr_name] || attr_name
-  value = _read_attribute(attr_name)
-  format_for_inspect(attr_name, value)
-end
-
-
- -

+ See on GitHub + + + +

@@ -471,22 +471,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods.rb, line 331
+    def attribute_names
+      @attributes.keys
+    end
- -
-
# File activerecord/lib/active_record/attribute_methods.rb, line 331
-def attribute_names
-  @attributes.keys
-end
-
-
- -

+ See on GitHub + + + +

@@ -518,25 +518,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods.rb, line 384
+    def attribute_present?(attr_name)
+      attr_name = attr_name.to_s
+      attr_name = self.class.attribute_aliases[attr_name] || attr_name
+      value = _read_attribute(attr_name)
+      !value.nil? && !(value.respond_to?(:empty?) && value.empty?)
+    end
- -
-
# File activerecord/lib/active_record/attribute_methods.rb, line 384
-def attribute_present?(attr_name)
-  attr_name = attr_name.to_s
-  attr_name = self.class.attribute_aliases[attr_name] || attr_name
-  value = _read_attribute(attr_name)
-  !value.nil? && !(value.respond_to?(:empty?) && value.empty?)
-end
-
-
- -

+ See on GitHub + + + +

@@ -564,22 +564,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods.rb, line 343
+    def attributes
+      @attributes.to_hash
+    end
- -
-
# File activerecord/lib/active_record/attribute_methods.rb, line 343
-def attributes
-  @attributes.to_hash
-end
-
-
- -

+ See on GitHub + + + +

@@ -610,24 +610,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods.rb, line 313
+    def has_attribute?(attr_name)
+      attr_name = attr_name.to_s
+      attr_name = self.class.attribute_aliases[attr_name] || attr_name
+      @attributes.key?(attr_name)
+    end
- -
-
# File activerecord/lib/active_record/attribute_methods.rb, line 313
-def has_attribute?(attr_name)
-  attr_name = attr_name.to_s
-  attr_name = self.class.attribute_aliases[attr_name] || attr_name
-  @attributes.key?(attr_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -660,34 +660,34 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods.rb, line 286
+    def respond_to?(name, include_private = false)
+      return false unless super
+
+      # If the result is true then check for the select case.
+      # For queries selecting a subset of columns, return false for unselected columns.
+      # We check defined?(@attributes) not to issue warnings if called on objects that
+      # have been allocated but not yet initialized.
+      if defined?(@attributes)
+        if name = self.class.symbol_column_to_string(name.to_sym)
+          return _has_attribute?(name)
+        end
+      end
+
+      true
+    end
- -
-
# File activerecord/lib/active_record/attribute_methods.rb, line 286
-def respond_to?(name, include_private = false)
-  return false unless super
-
-  # If the result is true then check for the select case.
-  # For queries selecting a subset of columns, return false for unselected columns.
-  # We check defined?(@attributes) not to issue warnings if called on objects that
-  # have been allocated but not yet initialized.
-  if defined?(@attributes)
-    if name = self.class.symbol_column_to_string(name.to_sym)
-      return _has_attribute?(name)
-    end
-  end
-
-  true
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/AttributeMethods/BeforeTypeCast.html b/src/classes/ActiveRecord/AttributeMethods/BeforeTypeCast.html index cd59af5234..b4c4f22093 100644 --- a/src/classes/ActiveRecord/AttributeMethods/BeforeTypeCast.html +++ b/src/classes/ActiveRecord/AttributeMethods/BeforeTypeCast.html @@ -124,22 +124,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/before_type_cast.rb, line 82
+      def attributes_before_type_cast
+        @attributes.values_before_type_cast
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods/before_type_cast.rb, line 82
-def attributes_before_type_cast
-  @attributes.values_before_type_cast
-end
-
-
- - + See on GitHub + + + +

@@ -159,22 +159,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/before_type_cast.rb, line 87
+      def attributes_for_database
+        @attributes.values_for_database
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods/before_type_cast.rb, line 87
-def attributes_for_database
-  @attributes.values_for_database
-end
-
-
- -

+ See on GitHub + + + +

@@ -205,25 +205,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/before_type_cast.rb, line 48
+      def read_attribute_before_type_cast(attr_name)
+        name = attr_name.to_s
+        name = self.class.attribute_aliases[name] || name
+
+        attribute_before_type_cast(name)
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods/before_type_cast.rb, line 48
-def read_attribute_before_type_cast(attr_name)
-  name = attr_name.to_s
-  name = self.class.attribute_aliases[name] || name
-
-  attribute_before_type_cast(name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -252,25 +252,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/before_type_cast.rb, line 65
+      def read_attribute_for_database(attr_name)
+        name = attr_name.to_s
+        name = self.class.attribute_aliases[name] || name
+
+        attribute_for_database(name)
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods/before_type_cast.rb, line 65
-def read_attribute_for_database(attr_name)
-  name = attr_name.to_s
-  name = self.class.attribute_aliases[name] || name
-
-  attribute_for_database(name)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/AttributeMethods/ClassMethods.html b/src/classes/ActiveRecord/AttributeMethods/ClassMethods.html index 5e339a2d11..3d422ed125 100644 --- a/src/classes/ActiveRecord/AttributeMethods/ClassMethods.html +++ b/src/classes/ActiveRecord/AttributeMethods/ClassMethods.html @@ -99,28 +99,28 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods.rb, line 53
+      def alias_attribute(new_name, old_name)
+        super
+
+        if @alias_attributes_mass_generated
+          ActiveSupport::CodeGenerator.batch(generated_attribute_methods, __FILE__, __LINE__) do |code_generator|
+            generate_alias_attribute_methods(code_generator, new_name, old_name)
+          end
+        end
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods.rb, line 53
-def alias_attribute(new_name, old_name)
-  super
-
-  if @alias_attributes_mass_generated
-    ActiveSupport::CodeGenerator.batch(generated_attribute_methods, __FILE__, __LINE__) do |code_generator|
-      generate_alias_attribute_methods(code_generator, new_name, old_name)
-    end
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -140,57 +140,57 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods.rb, line 85
+      def alias_attribute_method_definition(code_generator, pattern, new_name, old_name)
+        method_name = pattern.method_name(new_name).to_s
+        target_name = pattern.method_name(old_name).to_s
+        parameters = pattern.parameters
+        old_name = old_name.to_s
+
+        method_defined = method_defined?(target_name) || private_method_defined?(target_name)
+        manually_defined = method_defined &&
+          !self.instance_method(target_name).owner.is_a?(GeneratedAttributeMethods)
+        reserved_method_name = ::ActiveRecord::AttributeMethods.dangerous_attribute_methods.include?(target_name)
+
+        if !abstract_class? && !has_attribute?(old_name)
+          # We only need to issue this deprecation warning once, so we issue it when defining the original reader method.
+          should_warn = target_name == old_name
+          if should_warn
+            ActiveRecord.deprecator.warn(
+              "#{self} model aliases `#{old_name}`, but `#{old_name}` is not an attribute. " \
+              "Starting in Rails 7.2, alias_attribute with non-attribute targets will raise. " \
+              "Use `alias_method :#{new_name}, :#{old_name}` or define the method manually."
+            )
+          end
+          super
+        elsif manually_defined && !reserved_method_name
+          aliased_method_redefined_as_well = method_defined_within?(method_name, self)
+          return if aliased_method_redefined_as_well
+
+          ActiveRecord.deprecator.warn(
+            "#{self} model aliases `#{old_name}` and has a method called `#{target_name}` defined. " \
+            "Starting in Rails 7.2 `#{method_name}` will not be calling `#{target_name}` anymore. " \
+            "You may want to additionally define `#{method_name}` to preserve the current behavior."
+          )
+          super
+        else
+          define_proxy_call(code_generator, method_name, pattern.proxy_target, parameters, old_name,
+            namespace: :proxy_alias_attribute
+          )
+        end
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods.rb, line 85
-def alias_attribute_method_definition(code_generator, pattern, new_name, old_name)
-  method_name = pattern.method_name(new_name).to_s
-  target_name = pattern.method_name(old_name).to_s
-  parameters = pattern.parameters
-  old_name = old_name.to_s
-
-  method_defined = method_defined?(target_name) || private_method_defined?(target_name)
-  manually_defined = method_defined &&
-    !self.instance_method(target_name).owner.is_a?(GeneratedAttributeMethods)
-  reserved_method_name = ::ActiveRecord::AttributeMethods.dangerous_attribute_methods.include?(target_name)
-
-  if !abstract_class? && !has_attribute?(old_name)
-    # We only need to issue this deprecation warning once, so we issue it when defining the original reader method.
-    should_warn = target_name == old_name
-    if should_warn
-      ActiveRecord.deprecator.warn(
-        "#{self} model aliases `#{old_name}`, but `#{old_name}` is not an attribute. " \
-        "Starting in Rails 7.2, alias_attribute with non-attribute targets will raise. " \
-        "Use `alias_method :#{new_name}, :#{old_name}` or define the method manually."
-      )
-    end
-    super
-  elsif manually_defined && !reserved_method_name
-    aliased_method_redefined_as_well = method_defined_within?(method_name, self)
-    return if aliased_method_redefined_as_well
-
-    ActiveRecord.deprecator.warn(
-      "#{self} model aliases `#{old_name}` and has a method called `#{target_name}` defined. " \
-      "Starting in Rails 7.2 `#{method_name}` will not be calling `#{target_name}` anymore. " \
-      "You may want to additionally define `#{method_name}` to preserve the current behavior."
-    )
-    super
-  else
-    define_proxy_call(code_generator, method_name, pattern.proxy_target, parameters, old_name,
-      namespace: :proxy_alias_attribute
-    )
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -218,22 +218,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods.rb, line 219
+      def attribute_method?(attribute)
+        super || (table_exists? && column_names.include?(attribute.to_s.delete_suffix("=")))
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods.rb, line 219
-def attribute_method?(attribute)
-  super || (table_exists? && column_names.include?(attribute.to_s.delete_suffix("=")))
-end
-
-
- -

+ See on GitHub + + + +

@@ -260,26 +260,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods.rb, line 231
+      def attribute_names
+        @attribute_names ||= if !abstract_class? && table_exists?
+          attribute_types.keys
+        else
+          []
+        end.freeze
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods.rb, line 231
-def attribute_names
-  @attribute_names ||= if !abstract_class? && table_exists?
-    attribute_types.keys
-  else
-    []
-  end.freeze
-end
-
-
- -

+ See on GitHub + + + +

@@ -299,32 +299,32 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods.rb, line 196
+      def dangerous_class_method?(method_name)
+        return true if RESTRICTED_CLASS_METHODS.include?(method_name.to_s)
+
+        if Base.respond_to?(method_name, true)
+          if Object.respond_to?(method_name, true)
+            Base.method(method_name).owner != Object.method(method_name).owner
+          else
+            true
+          end
+        else
+          false
+        end
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods.rb, line 196
-def dangerous_class_method?(method_name)
-  return true if RESTRICTED_CLASS_METHODS.include?(method_name.to_s)
-
-  if Base.respond_to?(method_name, true)
-    if Object.respond_to?(method_name, true)
-      Base.method(method_name).owner != Object.method(method_name).owner
-    else
-      true
-    end
-  else
-    false
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -354,24 +354,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods.rb, line 249
+      def has_attribute?(attr_name)
+        attr_name = attr_name.to_s
+        attr_name = attribute_aliases[attr_name] || attr_name
+        attribute_types.key?(attr_name)
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods.rb, line 249
-def has_attribute?(attr_name)
-  attr_name = attr_name.to_s
-  attr_name = attribute_aliases[attr_name] || attr_name
-  attribute_types.key?(attr_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -404,34 +404,34 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods.rb, line 160
+      def instance_method_already_implemented?(method_name)
+        if dangerous_attribute_method?(method_name)
+          raise DangerousAttributeError, "#{method_name} is defined by Active Record. Check to make sure that you don't have an attribute or method with the same name."
+        end
+
+        if superclass == Base
+          super
+        else
+          # If ThisClass < ... < SomeSuperClass < ... < Base and SomeSuperClass
+          # defines its own attribute method, then we don't want to override that.
+          defined = method_defined_within?(method_name, superclass, Base) &&
+            ! superclass.instance_method(method_name).owner.is_a?(GeneratedAttributeMethods)
+          defined || super
+        end
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods.rb, line 160
-def instance_method_already_implemented?(method_name)
-  if dangerous_attribute_method?(method_name)
-    raise DangerousAttributeError, "#{method_name} is defined by Active Record. Check to make sure that you don't have an attribute or method with the same name."
-  end
-
-  if superclass == Base
-    super
-  else
-    # If ThisClass < ... < SomeSuperClass < ... < Base and SomeSuperClass
-    # defines its own attribute method, then we don't want to override that.
-    defined = method_defined_within?(method_name, superclass, Base) &&
-      ! superclass.instance_method(method_name).owner.is_a?(GeneratedAttributeMethods)
-    defined || super
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/AttributeMethods/Dirty.html b/src/classes/ActiveRecord/AttributeMethods/Dirty.html index 49c0f6e143..0c25860366 100644 --- a/src/classes/ActiveRecord/AttributeMethods/Dirty.html +++ b/src/classes/ActiveRecord/AttributeMethods/Dirty.html @@ -176,22 +176,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 106
+      def attribute_before_last_save(attr_name)
+        mutations_before_last_save.original_value(attr_name.to_s)
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 106
-def attribute_before_last_save(attr_name)
-  mutations_before_last_save.original_value(attr_name.to_s)
-end
-
-
- - + See on GitHub + + + +

@@ -215,22 +215,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 148
+      def attribute_change_to_be_saved(attr_name)
+        mutations_from_database.change_to_attribute(attr_name.to_s)
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 148
-def attribute_change_to_be_saved(attr_name)
-  mutations_from_database.change_to_attribute(attr_name.to_s)
-end
-
-
- -

+ See on GitHub + + + +

@@ -252,22 +252,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 160
+      def attribute_in_database(attr_name)
+        mutations_from_database.original_value(attr_name.to_s)
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 160
-def attribute_in_database(attr_name)
-  mutations_from_database.original_value(attr_name.to_s)
-end
-
-
- -

+ See on GitHub + + + +

@@ -289,22 +289,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 187
+      def attributes_in_database
+        mutations_from_database.changed_values
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 187
-def attributes_in_database
-  mutations_from_database.changed_values
-end
-
-
- -

+ See on GitHub + + + +

@@ -324,22 +324,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 177
+      def changed_attribute_names_to_save
+        mutations_from_database.changed_attribute_names
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 177
-def changed_attribute_names_to_save
-  mutations_from_database.changed_attribute_names
-end
-
-
- -

+ See on GitHub + + + +

@@ -359,22 +359,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 171
+      def changes_to_save
+        mutations_from_database.changes
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 171
-def changes_to_save
-  mutations_from_database.changes
-end
-
-
- -

+ See on GitHub + + + +

@@ -394,22 +394,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 165
+      def has_changes_to_save?
+        mutations_from_database.any_changes?
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 165
-def has_changes_to_save?
-  mutations_from_database.any_changes?
-end
-
-
- -

+ See on GitHub + + + +

@@ -429,25 +429,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 63
+      def reload(*)
+        super.tap do
+          @mutations_before_last_save = nil
+          @mutations_from_database = nil
+        end
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 63
-def reload(*)
-  super.tap do
-    @mutations_before_last_save = nil
-    @mutations_from_database = nil
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -469,22 +469,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 96
+      def saved_change_to_attribute(attr_name)
+        mutations_before_last_save.change_to_attribute(attr_name.to_s)
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 96
-def saved_change_to_attribute(attr_name)
-  mutations_before_last_save.change_to_attribute(attr_name.to_s)
-end
-
-
- -

+ See on GitHub + + + +

@@ -512,22 +512,22 @@

Options

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 84
+      def saved_change_to_attribute?(attr_name, **options)
+        mutations_before_last_save.changed?(attr_name.to_s, **options)
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 84
-def saved_change_to_attribute?(attr_name, **options)
-  mutations_before_last_save.changed?(attr_name.to_s, **options)
-end
-
-
- -
+ See on GitHub + + + +

@@ -547,22 +547,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 116
+      def saved_changes
+        mutations_before_last_save.changes
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 116
-def saved_changes
-  mutations_before_last_save.changes
-end
-
-
- -

+ See on GitHub + + + +

@@ -582,22 +582,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 111
+      def saved_changes?
+        mutations_before_last_save.any_changes?
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 111
-def saved_changes?
-  mutations_before_last_save.any_changes?
-end
-
-
- -

+ See on GitHub + + + +

@@ -625,22 +625,22 @@

Options

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 134
+      def will_save_change_to_attribute?(attr_name, **options)
+        mutations_from_database.changed?(attr_name.to_s, **options)
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 134
-def will_save_change_to_attribute?(attr_name, **options)
-  mutations_from_database.changed?(attr_name.to_s, **options)
-end
-
-
- -
+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/AttributeMethods/Dirty/ClassMethods.html b/src/classes/ActiveRecord/AttributeMethods/Dirty/ClassMethods.html deleted file mode 100644 index 2073df31cb..0000000000 --- a/src/classes/ActiveRecord/AttributeMethods/Dirty/ClassMethods.html +++ /dev/null @@ -1,191 +0,0 @@ ---- -title: ActiveRecord::AttributeMethods::Dirty::ClassMethods -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - - -

Instance Public methods

- -
-

- - partial_writes() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 31
-        def partial_writes
-          ActiveSupport::Deprecation.warn(<<-MSG.squish)
-            ActiveRecord::Base.partial_writes is deprecated and will be removed in Rails 7.1.
-            Use `partial_updates` and `partial_inserts` instead.
-          MSG
-          partial_updates && partial_inserts
-        end
-
-
- -
- -
-

- - partial_writes=(value) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 47
-        def partial_writes=(value)
-          ActiveSupport::Deprecation.warn(<<-MSG.squish)
-            `ActiveRecord::Base.partial_writes=` is deprecated and will be removed in Rails 7.1.
-            Use `partial_updates=` and `partial_inserts=` instead.
-          MSG
-          self.partial_updates = self.partial_inserts = value
-        end
-
-
- -
- -
-

- - partial_writes?() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 39
-        def partial_writes?
-          ActiveSupport::Deprecation.warn(<<-MSG.squish)
-            `ActiveRecord::Base.partial_writes?` is deprecated and will be removed in Rails 7.1.
-            Use `partial_updates?` and `partial_inserts?` instead.
-          MSG
-          partial_updates? && partial_inserts?
-        end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveRecord/AttributeMethods/PrimaryKey.html b/src/classes/ActiveRecord/AttributeMethods/PrimaryKey.html index 42f39a1573..41a819412a 100644 --- a/src/classes/ActiveRecord/AttributeMethods/PrimaryKey.html +++ b/src/classes/ActiveRecord/AttributeMethods/PrimaryKey.html @@ -118,24 +118,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/primary_key.rb, line 20
+      def id
+        return _read_attribute(@primary_key) unless @primary_key.is_a?(Array)
+
+        @primary_key.map { |pk| _read_attribute(pk) }
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods/primary_key.rb, line 20
-def id
-  return _read_attribute(@primary_key) unless @primary_key.is_a?(Array)
-
-  @primary_key.map { |pk| _read_attribute(pk) }
-end
-
-
- - + See on GitHub + + + +

@@ -155,27 +155,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/primary_key.rb, line 34
+      def id=(value)
+        if self.class.composite_primary_key?
+          raise TypeError, "Expected value matching #{self.class.primary_key.inspect}, got #{value.inspect}." unless value.is_a?(Enumerable)
+          @primary_key.zip(value) { |attr, value| _write_attribute(attr, value) }
+        else
+          _write_attribute(@primary_key, value)
+        end
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods/primary_key.rb, line 34
-def id=(value)
-  if self.class.composite_primary_key?
-    raise TypeError, "Expected value matching #{self.class.primary_key.inspect}, got #{value.inspect}." unless value.is_a?(Enumerable)
-    @primary_key.zip(value) { |attr, value| _write_attribute(attr, value) }
-  else
-    _write_attribute(@primary_key, value)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -195,26 +195,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/primary_key.rb, line 45
+      def id?
+        if self.class.composite_primary_key?
+          @primary_key.all? { |col| _query_attribute(col) }
+        else
+          _query_attribute(@primary_key)
+        end
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods/primary_key.rb, line 45
-def id?
-  if self.class.composite_primary_key?
-    @primary_key.all? { |col| _query_attribute(col) }
-  else
-    _query_attribute(@primary_key)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -234,26 +234,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/primary_key.rb, line 55
+      def id_before_type_cast
+        if self.class.composite_primary_key?
+          @primary_key.map { |col| attribute_before_type_cast(col) }
+        else
+          attribute_before_type_cast(@primary_key)
+        end
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods/primary_key.rb, line 55
-def id_before_type_cast
-  if self.class.composite_primary_key?
-    @primary_key.map { |col| attribute_before_type_cast(col) }
-  else
-    attribute_before_type_cast(@primary_key)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -273,26 +273,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/primary_key.rb, line 75
+      def id_in_database
+        if self.class.composite_primary_key?
+          @primary_key.map { |col| attribute_in_database(col) }
+        else
+          attribute_in_database(@primary_key)
+        end
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods/primary_key.rb, line 75
-def id_in_database
-  if self.class.composite_primary_key?
-    @primary_key.map { |col| attribute_in_database(col) }
-  else
-    attribute_in_database(@primary_key)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -312,26 +312,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/primary_key.rb, line 65
+      def id_was
+        if self.class.composite_primary_key?
+          @primary_key.map { |col| attribute_was(col) }
+        else
+          attribute_was(@primary_key)
+        end
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods/primary_key.rb, line 65
-def id_was
-  if self.class.composite_primary_key?
-    @primary_key.map { |col| attribute_was(col) }
-  else
-    attribute_was(@primary_key)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -351,23 +351,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/primary_key.rb, line 13
+      def to_key
+        key = id
+        Array(key) if key
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods/primary_key.rb, line 13
-def to_key
-  key = id
-  Array(key) if key
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/AttributeMethods/PrimaryKey/ClassMethods.html b/src/classes/ActiveRecord/AttributeMethods/PrimaryKey/ClassMethods.html index 043177dde8..051f55c12f 100644 --- a/src/classes/ActiveRecord/AttributeMethods/PrimaryKey/ClassMethods.html +++ b/src/classes/ActiveRecord/AttributeMethods/PrimaryKey/ClassMethods.html @@ -121,22 +121,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/primary_key.rb, line 104
+          def dangerous_attribute_method?(method_name)
+            super && !ID_ATTRIBUTE_METHODS.include?(method_name)
+          end
- -
-
# File activerecord/lib/active_record/attribute_methods/primary_key.rb, line 104
-def dangerous_attribute_method?(method_name)
-  super && !ID_ATTRIBUTE_METHODS.include?(method_name)
-end
-
-
- - + See on GitHub + + + +

@@ -156,22 +156,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/primary_key.rb, line 100
+          def instance_method_already_implemented?(method_name)
+            super || primary_key && ID_ATTRIBUTE_METHODS.include?(method_name)
+          end
- -
-
# File activerecord/lib/active_record/attribute_methods/primary_key.rb, line 100
-def instance_method_already_implemented?(method_name)
-  super || primary_key && ID_ATTRIBUTE_METHODS.include?(method_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -191,25 +191,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/primary_key.rb, line 111
+          def primary_key
+            if PRIMARY_KEY_NOT_SET.equal?(@primary_key)
+              @primary_key = reset_primary_key
+            end
+            @primary_key
+          end
- -
-
# File activerecord/lib/active_record/attribute_methods/primary_key.rb, line 111
-def primary_key
-  if PRIMARY_KEY_NOT_SET.equal?(@primary_key)
-    @primary_key = reset_primary_key
-  end
-  @primary_key
-end
-
-
- -

+ See on GitHub + + + +

@@ -245,24 +245,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/primary_key.rb, line 165
+          def primary_key=(value)
+            @primary_key        = derive_primary_key(value)
+            @quoted_primary_key = nil
+            @attributes_builder = nil
+          end
- -
-
# File activerecord/lib/active_record/attribute_methods/primary_key.rb, line 165
-def primary_key=(value)
-  @primary_key        = derive_primary_key(value)
-  @quoted_primary_key = nil
-  @attributes_builder = nil
-end
-
-
- -

+ See on GitHub + + + +

@@ -282,22 +282,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/primary_key.rb, line 124
+          def quoted_primary_key
+            @quoted_primary_key ||= connection.quote_column_name(primary_key)
+          end
- -
-
# File activerecord/lib/active_record/attribute_methods/primary_key.rb, line 124
-def quoted_primary_key
-  @quoted_primary_key ||= connection.quote_column_name(primary_key)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/AttributeMethods/Query.html b/src/classes/ActiveRecord/AttributeMethods/Query.html index 7976fb88c0..588fa1f309 100644 --- a/src/classes/ActiveRecord/AttributeMethods/Query.html +++ b/src/classes/ActiveRecord/AttributeMethods/Query.html @@ -85,24 +85,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/query.rb, line 13
+      def query_attribute(attr_name)
+        value = self.public_send(attr_name)
+
+        query_cast_attribute(attr_name, value)
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods/query.rb, line 13
-def query_attribute(attr_name)
-  value = self.public_send(attr_name)
-
-  query_cast_attribute(attr_name, value)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/AttributeMethods/Read.html b/src/classes/ActiveRecord/AttributeMethods/Read.html index 3e01c9b17f..80e1a341cc 100644 --- a/src/classes/ActiveRecord/AttributeMethods/Read.html +++ b/src/classes/ActiveRecord/AttributeMethods/Read.html @@ -81,37 +81,37 @@

- -
- - -
-
# File activerecord/lib/active_record/attribute_methods/read.rb, line 29
-      def read_attribute(attr_name, &block)
-        name = attr_name.to_s
-        name = self.class.attribute_aliases[name] || name
-
-        return @attributes.fetch_value(name, &block) unless name == "id" && @primary_key
-
-        if self.class.composite_primary_key?
-          @attributes.fetch_value("id", &block)
-        else
-          if @primary_key != "id"
-            ActiveRecord.deprecator.warn(<<-MSG.squish)
-              Using read_attribute(:id) to read the primary key value is deprecated.
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/read.rb, line 29
+      def read_attribute(attr_name, &block)
+        name = attr_name.to_s
+        name = self.class.attribute_aliases[name] || name
+
+        return @attributes.fetch_value(name, &block) unless name == "id" && @primary_key
+
+        if self.class.composite_primary_key?
+          @attributes.fetch_value("id", &block)
+        else
+          if @primary_key != "id"
+            ActiveRecord.deprecator.warn(<<-MSG.squish)
+              Using read_attribute(:id) to read the primary key value is deprecated.
               Use #id instead.
-            MSG
-          end
-          @attributes.fetch_value(@primary_key, &block)
-        end
-      end
-
-
- - + MSG + end + @attributes.fetch_value(@primary_key, &block) + end + end + + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/AttributeMethods/Serialization/ClassMethods.html b/src/classes/ActiveRecord/AttributeMethods/Serialization/ClassMethods.html index b0b801b3de..2a3cf84a71 100644 --- a/src/classes/ActiveRecord/AttributeMethods/Serialization/ClassMethods.html +++ b/src/classes/ActiveRecord/AttributeMethods/Serialization/ClassMethods.html @@ -222,62 +222,62 @@

- - -
-
# File activerecord/lib/active_record/attribute_methods/serialization.rb, line 183
-        def serialize(attr_name, class_name_or_coder = nil, coder: nil, type: Object, yaml: {}, **options)
-          unless class_name_or_coder.nil?
-            if class_name_or_coder == ::JSON || [:load, :dump].all? { |x| class_name_or_coder.respond_to?(x) }
-              ActiveRecord.deprecator.warn(<<~MSG)
-                Passing the coder as positional argument is deprecated and will be removed in Rails 7.2.
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/serialization.rb, line 183
+        def serialize(attr_name, class_name_or_coder = nil, coder: nil, type: Object, yaml: {}, **options)
+          unless class_name_or_coder.nil?
+            if class_name_or_coder == ::JSON || [:load, :dump].all? { |x| class_name_or_coder.respond_to?(x) }
+              ActiveRecord.deprecator.warn(<<~MSG)
+                Passing the coder as positional argument is deprecated and will be removed in Rails 7.2.
 
                 Please pass the coder as a keyword argument:
 
                   serialize #{attr_name.inspect}, coder: #{class_name_or_coder}
-              MSG
-              coder = class_name_or_coder
-            else
-              ActiveRecord.deprecator.warn(<<~MSG)
-                Passing the class as positional argument is deprecated and will be removed in Rails 7.2.
+              MSG
+              coder = class_name_or_coder
+            else
+              ActiveRecord.deprecator.warn(<<~MSG)
+                Passing the class as positional argument is deprecated and will be removed in Rails 7.2.
 
                 Please pass the class as a keyword argument:
 
                   serialize #{attr_name.inspect}, type: #{class_name_or_coder.name}
-              MSG
-              type = class_name_or_coder
-            end
-          end
+              MSG
+              type = class_name_or_coder
+            end
+          end
 
-          coder ||= default_column_serializer
-          unless coder
-            raise ArgumentError, <<~MSG.squish
-              missing keyword: :coder
+          coder ||= default_column_serializer
+          unless coder
+            raise ArgumentError, <<~MSG.squish
+              missing keyword: :coder
 
               If no default coder is configured, a coder must be provided to `serialize`.
-            MSG
-          end
+            MSG
+          end
 
-          column_serializer = build_column_serializer(attr_name, coder, type, yaml)
+          column_serializer = build_column_serializer(attr_name, coder, type, yaml)
 
-          attribute(attr_name, **options) do |cast_type|
-            if type_incompatible_with_serialize?(cast_type, coder, type)
-              raise ColumnNotSerializableError.new(attr_name, cast_type)
-            end
+          attribute(attr_name, **options) do |cast_type|
+            if type_incompatible_with_serialize?(cast_type, coder, type)
+              raise ColumnNotSerializableError.new(attr_name, cast_type)
+            end
 
-            cast_type = cast_type.subtype if Type::Serialized === cast_type
-            Type::Serialized.new(cast_type, column_serializer)
-          end
-        end
-
- - - + cast_type = cast_type.subtype if Type::Serialized === cast_type + Type::Serialized.new(cast_type, column_serializer) + end + end + + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/AttributeMethods/Serialization/ColumnNotSerializableError.html b/src/classes/ActiveRecord/AttributeMethods/Serialization/ColumnNotSerializableError.html index a209b1033f..8dd037ccb8 100644 --- a/src/classes/ActiveRecord/AttributeMethods/Serialization/ColumnNotSerializableError.html +++ b/src/classes/ActiveRecord/AttributeMethods/Serialization/ColumnNotSerializableError.html @@ -80,26 +80,26 @@

- -
- - -
-
# File activerecord/lib/active_record/attribute_methods/serialization.rb, line 10
-        def initialize(name, type)
-          super <<~EOS
-            Column `#{name}` of type #{type.class} does not support `serialize` feature.
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/serialization.rb, line 10
+        def initialize(name, type)
+          super <<~EOS
+            Column `#{name}` of type #{type.class} does not support `serialize` feature.
             Usually it means that you are trying to use `serialize`
             on a column that already implements serialization natively.
-          EOS
-        end
-
-
- - + EOS + end + + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/AttributeMethods/Write.html b/src/classes/ActiveRecord/AttributeMethods/Write.html index 04aa2ba9b7..7a39d4cb73 100644 --- a/src/classes/ActiveRecord/AttributeMethods/Write.html +++ b/src/classes/ActiveRecord/AttributeMethods/Write.html @@ -81,26 +81,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attribute_methods/write.rb, line 31
+      def write_attribute(attr_name, value)
+        name = attr_name.to_s
+        name = self.class.attribute_aliases[name] || name
+
+        name = @primary_key if name == "id" && @primary_key
+        @attributes.write_from_user(name, value)
+      end
- -
-
# File activerecord/lib/active_record/attribute_methods/write.rb, line 31
-def write_attribute(attr_name, value)
-  name = attr_name.to_s
-  name = self.class.attribute_aliases[name] || name
-
-  name = @primary_key if name == "id" && @primary_key
-  @attributes.write_from_user(name, value)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Attributes/ClassMethods.html b/src/classes/ActiveRecord/Attributes/ClassMethods.html index b7eb2f3f62..002dcb1f89 100644 --- a/src/classes/ActiveRecord/Attributes/ClassMethods.html +++ b/src/classes/ActiveRecord/Attributes/ClassMethods.html @@ -256,45 +256,45 @@

Dirty Tracking

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attributes.rb, line 208
+      def attribute(name, cast_type = nil, default: NO_DEFAULT_PROVIDED, **options)
+        name = name.to_s
+        name = attribute_aliases[name] || name
+
+        reload_schema_from_cache
+
+        case cast_type
+        when Symbol
+          cast_type = Type.lookup(cast_type, **options, adapter: Type.adapter_name_from(self))
+        when nil
+          if (prev_cast_type, prev_default = attributes_to_define_after_schema_loads[name])
+            default = prev_default if default == NO_DEFAULT_PROVIDED
+          else
+            prev_cast_type = -> subtype { subtype }
+          end
+
+          cast_type = if block_given?
+            -> subtype { yield Proc === prev_cast_type ? prev_cast_type[subtype] : prev_cast_type }
+          else
+            prev_cast_type
+          end
+        end
+
+        self.attributes_to_define_after_schema_loads =
+          attributes_to_define_after_schema_loads.merge(name => [cast_type, default])
+      end
- -
-
# File activerecord/lib/active_record/attributes.rb, line 208
-def attribute(name, cast_type = nil, default: NO_DEFAULT_PROVIDED, **options)
-  name = name.to_s
-  name = attribute_aliases[name] || name
-
-  reload_schema_from_cache
-
-  case cast_type
-  when Symbol
-    cast_type = Type.lookup(cast_type, **options, adapter: Type.adapter_name_from(self))
-  when nil
-    if (prev_cast_type, prev_default = attributes_to_define_after_schema_loads[name])
-      default = prev_default if default == NO_DEFAULT_PROVIDED
-    else
-      prev_cast_type = -> subtype { subtype }
-    end
-
-    cast_type = if block_given?
-      -> subtype { yield Proc === prev_cast_type ? prev_cast_type[subtype] : prev_cast_type }
-    else
-      prev_cast_type
-    end
-  end
-
-  self.attributes_to_define_after_schema_loads =
-    attributes_to_define_after_schema_loads.merge(name => [cast_type, default])
-end
-
-
- - + See on GitHub + + + +

@@ -322,28 +322,28 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/attributes.rb, line 253
+      def define_attribute(
+        name,
+        cast_type,
+        default: NO_DEFAULT_PROVIDED,
+        user_provided_default: true
+      )
+        attribute_types[name] = cast_type
+        define_default_attribute(name, default, cast_type, from_user: user_provided_default)
+      end
- -
-
# File activerecord/lib/active_record/attributes.rb, line 253
-def define_attribute(
-  name,
-  cast_type,
-  default: NO_DEFAULT_PROVIDED,
-  user_provided_default: true
-)
-  attribute_types[name] = cast_type
-  define_default_attribute(name, default, cast_type, from_user: user_provided_default)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/AutosaveAssociation.html b/src/classes/ActiveRecord/AutosaveAssociation.html index 6dab80b265..c9dac02813 100644 --- a/src/classes/ActiveRecord/AutosaveAssociation.html +++ b/src/classes/ActiveRecord/AutosaveAssociation.html @@ -222,22 +222,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/autosave_association.rb, line 271
+    def changed_for_autosave?
+      new_record? || has_changes_to_save? || marked_for_destruction? || nested_records_changed_for_autosave?
+    end
- -
-
# File activerecord/lib/active_record/autosave_association.rb, line 271
-def changed_for_autosave?
-  new_record? || has_changes_to_save? || marked_for_destruction? || nested_records_changed_for_autosave?
-end
-
-
- - + See on GitHub + + + +

@@ -259,22 +259,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/autosave_association.rb, line 265
+    def destroyed_by_association
+      @destroyed_by_association
+    end
- -
-
# File activerecord/lib/active_record/autosave_association.rb, line 265
-def destroyed_by_association
-  @destroyed_by_association
-end
-
-
- -

+ See on GitHub + + + +

@@ -294,22 +294,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/autosave_association.rb, line 258
+    def destroyed_by_association=(reflection)
+      @destroyed_by_association = reflection
+    end
- -
-
# File activerecord/lib/active_record/autosave_association.rb, line 258
-def destroyed_by_association=(reflection)
-  @destroyed_by_association = reflection
-end
-
-
- -

+ See on GitHub + + + +

@@ -331,22 +331,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/autosave_association.rb, line 245
+    def mark_for_destruction
+      @marked_for_destruction = true
+    end
- -
-
# File activerecord/lib/active_record/autosave_association.rb, line 245
-def mark_for_destruction
-  @marked_for_destruction = true
-end
-
-
- -

+ See on GitHub + + + +

@@ -368,22 +368,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/autosave_association.rb, line 252
+    def marked_for_destruction?
+      @marked_for_destruction
+    end
- -
-
# File activerecord/lib/active_record/autosave_association.rb, line 252
-def marked_for_destruction?
-  @marked_for_destruction
-end
-
-
- -

+ See on GitHub + + + +

@@ -403,24 +403,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/autosave_association.rb, line 234
+    def reload(options = nil)
+      @marked_for_destruction = false
+      @destroyed_by_association = nil
+      super
+    end
- -
-
# File activerecord/lib/active_record/autosave_association.rb, line 234
-def reload(options = nil)
-  @marked_for_destruction = false
-  @destroyed_by_association = nil
-  super
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Batches.html b/src/classes/ActiveRecord/Batches.html index 2eec52ddcf..8f1f5cada6 100644 --- a/src/classes/ActiveRecord/Batches.html +++ b/src/classes/ActiveRecord/Batches.html @@ -195,31 +195,31 @@

Options

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/batches.rb, line 79
+    def find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: DEFAULT_ORDER, &block)
+      if block_given?
+        find_in_batches(start: start, finish: finish, batch_size: batch_size, error_on_ignore: error_on_ignore, order: order) do |records|
+          records.each(&block)
+        end
+      else
+        enum_for(:find_each, start: start, finish: finish, batch_size: batch_size, error_on_ignore: error_on_ignore, order: order) do
+          relation = self
+          apply_limits(relation, start, finish, build_batch_orders(order)).size
+        end
+      end
+    end
- -
-
# File activerecord/lib/active_record/relation/batches.rb, line 79
-def find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: DEFAULT_ORDER, &block)
-  if block_given?
-    find_in_batches(start: start, finish: finish, batch_size: batch_size, error_on_ignore: error_on_ignore, order: order) do |records|
-      records.each(&block)
-    end
-  else
-    enum_for(:find_each, start: start, finish: finish, batch_size: batch_size, error_on_ignore: error_on_ignore, order: order) do
-      relation = self
-      apply_limits(relation, start, finish, build_batch_orders(order)).size
-    end
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -291,32 +291,32 @@

Options

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/batches.rb, line 148
+    def find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: DEFAULT_ORDER)
+      relation = self
+      unless block_given?
+        return to_enum(:find_in_batches, start: start, finish: finish, batch_size: batch_size, error_on_ignore: error_on_ignore, order: order) do
+          total = apply_limits(relation, start, finish, build_batch_orders(order)).size
+          (total - 1).div(batch_size) + 1
+        end
+      end
+
+      in_batches(of: batch_size, start: start, finish: finish, load: true, error_on_ignore: error_on_ignore, order: order) do |batch|
+        yield batch.to_a
+      end
+    end
- -
-
# File activerecord/lib/active_record/relation/batches.rb, line 148
-def find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, order: DEFAULT_ORDER)
-  relation = self
-  unless block_given?
-    return to_enum(:find_in_batches, start: start, finish: finish, batch_size: batch_size, error_on_ignore: error_on_ignore, order: order) do
-      total = apply_limits(relation, start, finish, build_batch_orders(order)).size
-      (total - 1).div(batch_size) + 1
-    end
-  end
-
-  in_batches(of: batch_size, start: start, finish: finish, load: true, error_on_ignore: error_on_ignore, order: order) do |batch|
-    yield batch.to_a
-  end
-end
-
-
- -
+ See on GitHub + + + +

@@ -409,62 +409,62 @@

Options

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/batches.rb, line 239
+    def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, order: DEFAULT_ORDER, use_ranges: nil, &block)
+      unless Array(order).all? { |ord| [:asc, :desc].include?(ord) }
+        raise ArgumentError, ":order must be :asc or :desc or an array consisting of :asc or :desc, got #{order.inspect}"
+      end
+
+      unless block
+        return BatchEnumerator.new(of: of, start: start, finish: finish, relation: self, order: order, use_ranges: use_ranges)
+      end
+
+      if arel.orders.present?
+        act_on_ignored_order(error_on_ignore)
+      end
+
+      batch_limit = of
+
+      if limit_value
+        remaining   = limit_value
+        batch_limit = remaining if remaining < batch_limit
+      end
+
+      if self.loaded?
+        batch_on_loaded_relation(
+          relation: self,
+          start: start,
+          finish: finish,
+          order: order,
+          batch_limit: batch_limit,
+          &block
+        )
+      else
+        batch_on_unloaded_relation(
+          relation: self,
+          start: start,
+          finish: finish,
+          load: load,
+          order: order,
+          use_ranges: use_ranges,
+          remaining: remaining,
+          batch_limit: batch_limit,
+          &block
+        )
+      end
+    end
- -
-
# File activerecord/lib/active_record/relation/batches.rb, line 239
-def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, order: DEFAULT_ORDER, use_ranges: nil, &block)
-  unless Array(order).all? { |ord| [:asc, :desc].include?(ord) }
-    raise ArgumentError, ":order must be :asc or :desc or an array consisting of :asc or :desc, got #{order.inspect}"
-  end
-
-  unless block
-    return BatchEnumerator.new(of: of, start: start, finish: finish, relation: self, order: order, use_ranges: use_ranges)
-  end
-
-  if arel.orders.present?
-    act_on_ignored_order(error_on_ignore)
-  end
-
-  batch_limit = of
-
-  if limit_value
-    remaining   = limit_value
-    batch_limit = remaining if remaining < batch_limit
-  end
-
-  if self.loaded?
-    batch_on_loaded_relation(
-      relation: self,
-      start: start,
-      finish: finish,
-      order: order,
-      batch_limit: batch_limit,
-      &block
-    )
-  else
-    batch_on_unloaded_relation(
-      relation: self,
-      start: start,
-      finish: finish,
-      load: load,
-      order: order,
-      use_ranges: use_ranges,
-      remaining: remaining,
-      batch_limit: batch_limit,
-      &block
-    )
-  end
-end
-
-
- -
+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Batches/BatchEnumerator.html b/src/classes/ActiveRecord/Batches/BatchEnumerator.html index 95d46ff38f..47d6815aa5 100644 --- a/src/classes/ActiveRecord/Batches/BatchEnumerator.html +++ b/src/classes/ActiveRecord/Batches/BatchEnumerator.html @@ -145,22 +145,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/batches/batch_enumerator.rb, line 27
+      def batch_size
+        @of
+      end
- -
-
# File activerecord/lib/active_record/relation/batches/batch_enumerator.rb, line 27
-def batch_size
-  @of
-end
-
-
- - + See on GitHub + + + +

@@ -185,22 +185,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/batches/batch_enumerator.rb, line 65
+      def delete_all
+        sum(&:delete_all)
+      end
- -
-
# File activerecord/lib/active_record/relation/batches/batch_enumerator.rb, line 65
-def delete_all
-  sum(&:delete_all)
-end
-
-
- -

+ See on GitHub + + + +

@@ -225,22 +225,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/batches/batch_enumerator.rb, line 85
+      def destroy_all
+        each(&:destroy_all)
+      end
- -
-
# File activerecord/lib/active_record/relation/batches/batch_enumerator.rb, line 85
-def destroy_all
-  each(&:destroy_all)
-end
-
-
- -

+ See on GitHub + + + +

@@ -265,24 +265,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/batches/batch_enumerator.rb, line 94
+      def each(&block)
+        enum = @relation.to_enum(:in_batches, of: @of, start: @start, finish: @finish, load: false, order: @order, use_ranges: @use_ranges)
+        return enum.each(&block) if block_given?
+        enum
+      end
- -
-
# File activerecord/lib/active_record/relation/batches/batch_enumerator.rb, line 94
-def each(&block)
-  enum = @relation.to_enum(:in_batches, of: @of, start: @start, finish: @finish, load: false, order: @order, use_ranges: @use_ranges)
-  return enum.each(&block) if block_given?
-  enum
-end
-
-
- -

+ See on GitHub + + + +

@@ -320,26 +320,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/batches/batch_enumerator.rb, line 52
+      def each_record(&block)
+        return to_enum(:each_record) unless block_given?
+
+        @relation.to_enum(:in_batches, of: @of, start: @start, finish: @finish, load: true, order: @order).each do |relation|
+          relation.records.each(&block)
+        end
+      end
- -
-
# File activerecord/lib/active_record/relation/batches/batch_enumerator.rb, line 52
-def each_record(&block)
-  return to_enum(:each_record) unless block_given?
-
-  @relation.to_enum(:in_batches, of: @of, start: @start, finish: @finish, load: true, order: @order).each do |relation|
-    relation.records.each(&block)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -364,24 +364,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/batches/batch_enumerator.rb, line 74
+      def update_all(updates)
+        sum do |relation|
+          relation.update_all(updates)
+        end
+      end
- -
-
# File activerecord/lib/active_record/relation/batches/batch_enumerator.rb, line 74
-def update_all(updates)
-  sum do |relation|
-    relation.update_all(updates)
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Calculations.html b/src/classes/ActiveRecord/Calculations.html index cde48de90a..ac95a1e300 100644 --- a/src/classes/ActiveRecord/Calculations.html +++ b/src/classes/ActiveRecord/Calculations.html @@ -145,22 +145,22 @@

- -
- - -
-
# File activerecord/lib/active_record/relation/calculations.rb, line 110
-def async_average(column_name)
-  async.average(column_name)
-end
-
-
- - + +
+ + Source code + + +
# File activerecord/lib/active_record/relation/calculations.rb, line 110
+    def async_average(column_name)
+      async.average(column_name)
+    end
+ + See on GitHub + +
+ +

@@ -180,22 +180,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/calculations.rb, line 97
+    def async_count(column_name = nil)
+      async.count(column_name)
+    end
- -
-
# File activerecord/lib/active_record/relation/calculations.rb, line 97
-def async_count(column_name = nil)
-  async.count(column_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -215,22 +215,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/calculations.rb, line 362
+    def async_ids
+      async.ids
+    end
- -
-
# File activerecord/lib/active_record/relation/calculations.rb, line 362
-def async_ids
-  async.ids
-end
-
-
- -

+ See on GitHub + + + +

@@ -250,22 +250,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/calculations.rb, line 138
+    def async_maximum(column_name)
+      async.maximum(column_name)
+    end
- -
-
# File activerecord/lib/active_record/relation/calculations.rb, line 138
-def async_maximum(column_name)
-  async.maximum(column_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -285,22 +285,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/calculations.rb, line 124
+    def async_minimum(column_name)
+      async.minimum(column_name)
+    end
- -
-
# File activerecord/lib/active_record/relation/calculations.rb, line 124
-def async_minimum(column_name)
-  async.minimum(column_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -320,22 +320,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/calculations.rb, line 319
+    def async_pick(*column_names)
+      async.pick(*column_names)
+    end
- -
-
# File activerecord/lib/active_record/relation/calculations.rb, line 319
-def async_pick(*column_names)
-  async.pick(*column_names)
-end
-
-
- -

+ See on GitHub + + + +

@@ -355,22 +355,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/calculations.rb, line 291
+    def async_pluck(*column_names)
+      async.pluck(*column_names)
+    end
- -
-
# File activerecord/lib/active_record/relation/calculations.rb, line 291
-def async_pluck(*column_names)
-  async.pluck(*column_names)
-end
-
-
- -

+ See on GitHub + + + +

@@ -390,22 +390,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/calculations.rb, line 156
+    def async_sum(identity_or_column = nil)
+      async.sum(identity_or_column)
+    end
- -
-
# File activerecord/lib/active_record/relation/calculations.rb, line 156
-def async_sum(identity_or_column = nil)
-  async.sum(identity_or_column)
-end
-
-
- -

+ See on GitHub + + + +

@@ -428,22 +428,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/calculations.rb, line 105
+    def average(column_name)
+      calculate(:average, column_name)
+    end
- -
-
# File activerecord/lib/active_record/relation/calculations.rb, line 105
-def average(column_name)
-  calculate(:average, column_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -493,50 +493,50 @@

- -
- - -
-
# File activerecord/lib/active_record/relation/calculations.rb, line 191
-def calculate(operation, column_name)
-  operation = operation.to_s.downcase
+          
+            
+ + Source code + - if @none - case operation - when "count", "sum" - result = group_values.any? ? Hash.new : 0 - return @async ? Promise::Complete.new(result) : result - when "average", "minimum", "maximum" - result = group_values.any? ? Hash.new : nil - return @async ? Promise::Complete.new(result) : result - end - end +
# File activerecord/lib/active_record/relation/calculations.rb, line 191
+    def calculate(operation, column_name)
+      operation = operation.to_s.downcase
 
-  if has_include?(column_name)
-    relation = apply_join_dependency
+      if @none
+        case operation
+        when "count", "sum"
+          result = group_values.any? ? Hash.new : 0
+          return @async ? Promise::Complete.new(result) : result
+        when "average", "minimum", "maximum"
+          result = group_values.any? ? Hash.new : nil
+          return @async ? Promise::Complete.new(result) : result
+        end
+      end
 
-    if operation == "count"
-      unless distinct_value || distinct_select?(column_name || select_for_count)
-        relation.distinct!
-        relation.select_values = [ klass.primary_key || table[Arel.star] ]
-      end
-      # PostgreSQL: ORDER BY expressions must appear in SELECT list when using DISTINCT
-      relation.order_values = [] if group_values.empty?
-    end
+      if has_include?(column_name)
+        relation = apply_join_dependency
 
-    relation.calculate(operation, column_name)
-  else
-    perform_calculation(operation, column_name)
-  end
-end
-
-
- -

+ if operation == "count" + unless distinct_value || distinct_select?(column_name || select_for_count) + relation.distinct! + relation.select_values = [ klass.primary_key || table[Arel.star] ] + end + # PostgreSQL: ORDER BY expressions must appear in SELECT list when using DISTINCT + relation.order_values = [] if group_values.empty? + end + + relation.calculate(operation, column_name) + else + perform_calculation(operation, column_name) + end + end + + See on GitHub + + + +

@@ -589,30 +589,30 @@

- -
- - -
-
# File activerecord/lib/active_record/relation/calculations.rb, line 84
-def count(column_name = nil)
-  if block_given?
-    unless column_name.nil?
-      raise ArgumentError, "Column name argument is not supported when a block is passed."
-    end
+          
+            
+ + Source code + - super() - else - calculate(:count, column_name) - end -end
-
-
- -

+
# File activerecord/lib/active_record/relation/calculations.rb, line 84
+    def count(column_name = nil)
+      if block_given?
+        unless column_name.nil?
+          raise ArgumentError, "Column name argument is not supported when a block is passed."
+        end
+
+        super()
+      else
+        calculate(:count, column_name)
+      end
+    end
+ + See on GitHub + + + +

@@ -636,52 +636,52 @@

- -
- - -
-
# File activerecord/lib/active_record/relation/calculations.rb, line 327
-def ids
-  primary_key_array = Array(primary_key)
+          
+            
+ + Source code + - if loaded? - result = records.map do |record| - if primary_key_array.one? - record._read_attribute(primary_key_array.first) - else - primary_key_array.map { |column| record._read_attribute(column) } - end - end - return @async ? Promise::Complete.new(result) : result - end +
# File activerecord/lib/active_record/relation/calculations.rb, line 327
+    def ids
+      primary_key_array = Array(primary_key)
 
-  if has_include?(primary_key)
-    relation = apply_join_dependency.group(*primary_key_array)
-    return relation.ids
-  end
+      if loaded?
+        result = records.map do |record|
+          if primary_key_array.one?
+            record._read_attribute(primary_key_array.first)
+          else
+            primary_key_array.map { |column| record._read_attribute(column) }
+          end
+        end
+        return @async ? Promise::Complete.new(result) : result
+      end
 
-  columns = arel_columns(primary_key_array)
-  relation = spawn
-  relation.select_values = columns
+      if has_include?(primary_key)
+        relation = apply_join_dependency.group(*primary_key_array)
+        return relation.ids
+      end
 
-  result = if relation.where_clause.contradiction?
-    ActiveRecord::Result.empty
-  else
-    skip_query_cache_if_necessary do
-      klass.connection.select_all(relation, "#{klass.name} Ids", async: @async)
-    end
-  end
+      columns = arel_columns(primary_key_array)
+      relation = spawn
+      relation.select_values = columns
 
-  result.then { |result| type_cast_pluck_values(result, columns) }
-end
-
-
- -

+ result = if relation.where_clause.contradiction? + ActiveRecord::Result.empty + else + skip_query_cache_if_necessary do + klass.connection.select_all(relation, "#{klass.name} Ids", async: @async) + end + end + + result.then { |result| type_cast_pluck_values(result, columns) } + end + + See on GitHub + + + +

@@ -704,22 +704,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/calculations.rb, line 133
+    def maximum(column_name)
+      calculate(:maximum, column_name)
+    end
- -
-
# File activerecord/lib/active_record/relation/calculations.rb, line 133
-def maximum(column_name)
-  calculate(:maximum, column_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -742,22 +742,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/calculations.rb, line 119
+    def minimum(column_name)
+      calculate(:minimum, column_name)
+    end
- -
-
# File activerecord/lib/active_record/relation/calculations.rb, line 119
-def minimum(column_name)
-  calculate(:minimum, column_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -788,27 +788,27 @@

- -
- - -
-
# File activerecord/lib/active_record/relation/calculations.rb, line 309
-def pick(*column_names)
-  if loaded? && all_attributes?(column_names)
-    result = records.pick(*column_names)
-    return @async ? Promise::Complete.new(result) : result
-  end
+          
+            
+ + Source code + - limit(1).pluck(*column_names).then(&:first) -end
-
-
- -

+
# File activerecord/lib/active_record/relation/calculations.rb, line 309
+    def pick(*column_names)
+      if loaded? && all_attributes?(column_names)
+        result = records.pick(*column_names)
+        return @async ? Promise::Complete.new(result) : result
+      end
+
+      limit(1).pluck(*column_names).then(&:first)
+    end
+ + See on GitHub + + + +

@@ -861,51 +861,51 @@

- -
- - -
-
# File activerecord/lib/active_record/relation/calculations.rb, line 257
-def pluck(*column_names)
-  return [] if @none
-
-  if loaded? && all_attributes?(column_names)
-    result = records.pluck(*column_names)
-    if @async
-      return Promise::Complete.new(result)
-    else
-      return result
-    end
-  end
-
-  if has_include?(column_names.first)
-    relation = apply_join_dependency
-    relation.pluck(*column_names)
-  else
-    klass.disallow_raw_sql!(column_names.flatten)
-    columns = arel_columns(column_names)
-    relation = spawn
-    relation.select_values = columns
-    result = skip_query_cache_if_necessary do
-      if where_clause.contradiction?
-        ActiveRecord::Result.empty(async: @async)
-      else
-        klass.connection.select_all(relation.arel, "#{klass.name} Pluck", async: @async)
-      end
-    end
-    result.then do |result|
-      type_cast_pluck_values(result, columns)
-    end
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/calculations.rb, line 257
+    def pluck(*column_names)
+      return [] if @none
+
+      if loaded? && all_attributes?(column_names)
+        result = records.pluck(*column_names)
+        if @async
+          return Promise::Complete.new(result)
+        else
+          return result
+        end
+      end
+
+      if has_include?(column_names.first)
+        relation = apply_join_dependency
+        relation.pluck(*column_names)
+      else
+        klass.disallow_raw_sql!(column_names.flatten)
+        columns = arel_columns(column_names)
+        relation = spawn
+        relation.select_values = columns
+        result = skip_query_cache_if_necessary do
+          if where_clause.contradiction?
+            ActiveRecord::Result.empty(async: @async)
+          else
+            klass.connection.select_all(relation.arel, "#{klass.name} Pluck", async: @async)
+          end
+        end
+        result.then do |result|
+          type_cast_pluck_values(result, columns)
+        end
+      end
+    end
+ + See on GitHub + +
+ +

@@ -928,26 +928,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/calculations.rb, line 147
+    def sum(initial_value_or_column = 0, &block)
+      if block_given?
+        map(&block).sum(initial_value_or_column)
+      else
+        calculate(:sum, initial_value_or_column)
+      end
+    end
- -
-
# File activerecord/lib/active_record/relation/calculations.rb, line 147
-def sum(initial_value_or_column = 0, &block)
-  if block_given?
-    map(&block).sum(initial_value_or_column)
-  else
-    calculate(:sum, initial_value_or_column)
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Callbacks/ClassMethods.html b/src/classes/ActiveRecord/Callbacks/ClassMethods.html index 365423c0a1..8161e27475 100644 --- a/src/classes/ActiveRecord/Callbacks/ClassMethods.html +++ b/src/classes/ActiveRecord/Callbacks/ClassMethods.html @@ -146,20 +146,10 @@

- -
- - -
-
# File activerecord/lib/active_record/callbacks.rb, line 356
-      
-
-
- - + + See on GitHub + +

@@ -180,20 +170,10 @@

- -
- - -
-
# File activerecord/lib/active_record/callbacks.rb, line 404
-    
-
-
- -

+ + See on GitHub + +

@@ -214,20 +194,10 @@

- -
- - -
-
# File activerecord/lib/active_record/callbacks.rb, line 300
-      
-
-
- -

+ + See on GitHub + +

@@ -248,20 +218,10 @@

- -
- - -
-
# File activerecord/lib/active_record/callbacks.rb, line 292
-      
-
-
- -

+ + See on GitHub + +

@@ -282,20 +242,10 @@

- -
- - -
-
# File activerecord/lib/active_record/callbacks.rb, line 332
-      
-
-
- -

+ + See on GitHub + +

@@ -316,20 +266,10 @@

- -
- - -
-
# File activerecord/lib/active_record/callbacks.rb, line 308
-      
-
-
- -

+ + See on GitHub + +

@@ -350,20 +290,10 @@

- -
- - -
-
# File activerecord/lib/active_record/callbacks.rb, line 380
-      
-
-
- -

+ + See on GitHub + +

@@ -384,20 +314,10 @@

- -
- - -
-
# File activerecord/lib/active_record/callbacks.rb, line 348
-      
-
-
- -

+ + See on GitHub + +

@@ -418,20 +338,10 @@

- -
- - -
-
# File activerecord/lib/active_record/callbacks.rb, line 396
-      
-
-
- -

+ + See on GitHub + +

@@ -452,20 +362,10 @@

- -
- - -
-
# File activerecord/lib/active_record/callbacks.rb, line 324
-      
-
-
- -

+ + See on GitHub + +

@@ -486,20 +386,10 @@

- -
- - -
-
# File activerecord/lib/active_record/callbacks.rb, line 372
-      
-
-
- -

+ + See on GitHub + +

@@ -520,20 +410,10 @@

- -
- - -
-
# File activerecord/lib/active_record/callbacks.rb, line 340
-      
-
-
- -

+ + See on GitHub + +

@@ -554,20 +434,10 @@

- -
- - -
-
# File activerecord/lib/active_record/callbacks.rb, line 388
-      
-
-
- -

+ + See on GitHub + +

@@ -588,20 +458,10 @@

- -
- - -
-
# File activerecord/lib/active_record/callbacks.rb, line 316
-      
-
-
- -

+ + See on GitHub + +

@@ -622,20 +482,10 @@

- -
- - -
-
# File activerecord/lib/active_record/callbacks.rb, line 364
-      
-
-
- -

+ + See on GitHub + + diff --git a/src/classes/ActiveRecord/Coders/YAMLColumn/SafeCoder.html b/src/classes/ActiveRecord/Coders/YAMLColumn/SafeCoder.html index c9cf66abcd..8fe999bc75 100644 --- a/src/classes/ActiveRecord/Coders/YAMLColumn/SafeCoder.html +++ b/src/classes/ActiveRecord/Coders/YAMLColumn/SafeCoder.html @@ -88,23 +88,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/coders/yaml_column.rb, line 9
+        def initialize(permitted_classes: [], unsafe_load: nil)
+          @permitted_classes = permitted_classes
+          @unsafe_load = unsafe_load
+        end
- -
-
# File activerecord/lib/active_record/coders/yaml_column.rb, line 9
-def initialize(permitted_classes: [], unsafe_load: nil)
-  @permitted_classes = permitted_classes
-  @unsafe_load = unsafe_load
-end
-
-
- - + See on GitHub + + + + @@ -128,30 +128,30 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/coders/yaml_column.rb, line 15
+          def dump(object)
+            if @unsafe_load.nil? ? ActiveRecord.use_yaml_unsafe_load : @unsafe_load
+              ::YAML.dump(object)
+            else
+              ::YAML.safe_dump(
+                object,
+                permitted_classes: @permitted_classes + ActiveRecord.yaml_column_permitted_classes,
+                aliases: true,
+              )
+            end
+          end
- -
-
# File activerecord/lib/active_record/coders/yaml_column.rb, line 15
-def dump(object)
-  if @unsafe_load.nil? ? ActiveRecord.use_yaml_unsafe_load : @unsafe_load
-    ::YAML.dump(object)
-  else
-    ::YAML.safe_dump(
-      object,
-      permitted_classes: @permitted_classes + ActiveRecord.yaml_column_permitted_classes,
-      aliases: true,
-    )
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -171,30 +171,30 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/coders/yaml_column.rb, line 33
+          def load(payload)
+            if @unsafe_load.nil? ? ActiveRecord.use_yaml_unsafe_load : @unsafe_load
+              YAML.unsafe_load(payload)
+            else
+              YAML.safe_load(
+                payload,
+                permitted_classes: @permitted_classes + ActiveRecord.yaml_column_permitted_classes,
+                aliases: true,
+              )
+            end
+          end
- -
-
# File activerecord/lib/active_record/coders/yaml_column.rb, line 33
-def load(payload)
-  if @unsafe_load.nil? ? ActiveRecord.use_yaml_unsafe_load : @unsafe_load
-    YAML.unsafe_load(payload)
-  else
-    YAML.safe_load(
-      payload,
-      permitted_classes: @permitted_classes + ActiveRecord.yaml_column_permitted_classes,
-      aliases: true,
-    )
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/CollectionCacheKey.html b/src/classes/ActiveRecord/CollectionCacheKey.html deleted file mode 100644 index 2d4d0dffd7..0000000000 --- a/src/classes/ActiveRecord/CollectionCacheKey.html +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: ActiveRecord::CollectionCacheKey -layout: default ---- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html b/src/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html index 952f743af3..4a1351de38 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html @@ -591,22 +591,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 382
+      def self.database_exists?(config)
+        new(config).database_exists?
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 382
-def self.database_exists?(config)
-  new(config).database_exists?
-end
-
-
- - + See on GitHub + + + +

@@ -626,22 +626,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 124
+      def self.dbconsole(config, options = {})
+        raise NotImplementedError
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 124
-def self.dbconsole(config, options = {})
-  raise NotImplementedError
-end
-
-
- -

+ See on GitHub + + + +

@@ -661,46 +661,46 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 95
-def self.find_cmd_and_exec(commands, *args) # :doc:
-  commands = Array(commands)
+          
+            
+ + Source code + - dirs_on_path = ENV["PATH"].to_s.split(File::PATH_SEPARATOR) - unless (ext = RbConfig::CONFIG["EXEEXT"]).empty? - commands = commands.map { |cmd| "#{cmd}#{ext}" } - end +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 95
+      def self.find_cmd_and_exec(commands, *args) # :doc:
+        commands = Array(commands)
 
-  full_path_command = nil
-  found = commands.detect do |cmd|
-    dirs_on_path.detect do |path|
-      full_path_command = File.join(path, cmd)
-      begin
-        stat = File.stat(full_path_command)
-      rescue SystemCallError
-      else
-        stat.file? && stat.executable?
-      end
-    end
-  end
+        dirs_on_path = ENV["PATH"].to_s.split(File::PATH_SEPARATOR)
+        unless (ext = RbConfig::CONFIG["EXEEXT"]).empty?
+          commands = commands.map { |cmd| "#{cmd}#{ext}" }
+        end
 
-  if found
-    exec full_path_command, *args
-  else
-    abort("Couldn't find database client: #{commands.join(', ')}. Check your $PATH and try again.")
-  end
-end
-
-
- -

+ full_path_command = nil + found = commands.detect do |cmd| + dirs_on_path.detect do |path| + full_path_command = File.join(path, cmd) + begin + stat = File.stat(full_path_command) + rescue SystemCallError + else + stat.file? && stat.executable? + end + end + end + + if found + exec full_path_command, *args + else + abort("Couldn't find database client: #{commands.join(', ')}. Check your $PATH and try again.") + end + end + + See on GitHub + + + +

@@ -720,26 +720,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 68
+      def self.type_cast_config_to_boolean(config)
+        if config == "false"
+          false
+        else
+          config
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 68
-def self.type_cast_config_to_boolean(config)
-  if config == "false"
-    false
-  else
-    config
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -759,28 +759,28 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 58
+      def self.type_cast_config_to_integer(config)
+        if config.is_a?(Integer)
+          config
+        elsif SIMPLE_INT.match?(config)
+          config.to_i
+        else
+          config
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 58
-def self.type_cast_config_to_integer(config)
-  if config.is_a?(Integer)
-    config
-  elsif SIMPLE_INT.match?(config)
-    config.to_i
-  else
-    config
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -800,28 +800,28 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 76
+      def self.validate_default_timezone(config)
+        case config
+        when nil
+        when "utc", "local"
+          config.to_sym
+        else
+          raise ArgumentError, "default_timezone must be either 'utc' or 'local'"
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 76
-def self.validate_default_timezone(config)
-  case config
-  when nil
-  when "utc", "local"
-    config.to_sym
-  else
-    raise ArgumentError, "default_timezone must be either 'utc' or 'local'"
-  end
-end
-
-
- -

+ See on GitHub + + + + @@ -845,21 +845,21 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 674
+      def active?
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 674
-def active?
-end
-
-
- - + See on GitHub + + + +

@@ -879,22 +879,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 377
+      def adapter_name
+        self.class::ADAPTER_NAME
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 377
-def adapter_name
-  self.class::ADAPTER_NAME
-end
-
-
- -

+ See on GitHub + + + +

@@ -914,25 +914,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 655
+      def all_foreign_keys_valid?
+        check_all_foreign_keys_valid!
+        true
+      rescue ActiveRecord::StatementInvalid
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 655
-def all_foreign_keys_valid?
-  check_all_foreign_keys_valid!
-  true
-rescue ActiveRecord::StatementInvalid
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -952,21 +952,21 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 666
+      def check_all_foreign_keys_valid!
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 666
-def check_all_foreign_keys_valid!
-end
-
-
- -

+ See on GitHub + + + +

@@ -986,30 +986,30 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 754
+      def clear_cache!(new_connection: false)
+        if @statements
+          @lock.synchronize do
+            if new_connection
+              @statements.reset
+            else
+              @statements.clear
+            end
+          end
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 754
-def clear_cache!(new_connection: false)
-  if @statements
-    @lock.synchronize do
-      if new_connection
-        @statements.reset
-      else
-        @statements.clear
-      end
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1029,22 +1029,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 846
+      def close
+        pool.checkin self
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 846
-def close
-  pool.checkin self
-end
-
-
- -

+ See on GitHub + + + +

@@ -1064,23 +1064,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 794
+      def connect!
+        verify!
+        self
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 794
-def connect!
-  verify!
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -1100,22 +1100,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 222
+      def connection_retries
+        (@config[:connection_retries] || 1).to_i
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 222
-def connection_retries
-  (@config[:connection_retries] || 1).to_i
-end
-
-
- -

+ See on GitHub + + + +

@@ -1135,25 +1135,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 386
+      def database_exists?
+        connect!
+        true
+      rescue ActiveRecord::NoDatabaseError
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 386
-def database_exists?
-  connect!
-  true
-rescue ActiveRecord::NoDatabaseError
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -1173,22 +1173,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 234
+      def default_timezone
+        @default_timezone || ActiveRecord.default_timezone
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 234
-def default_timezone
-  @default_timezone || ActiveRecord.default_timezone
-end
-
-
- -

+ See on GitHub + + + +

@@ -1208,21 +1208,21 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 592
+      def disable_extension(name, **)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 592
-def disable_extension(name, **)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1242,22 +1242,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 650
+      def disable_referential_integrity
+        yield
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 650
-def disable_referential_integrity
-  yield
-end
-
-
- -

+ See on GitHub + + + +

@@ -1279,22 +1279,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 729
+      def discard!
+        # This should be overridden by concrete adapters.
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 729
-def discard!
-  # This should be overridden by concrete adapters.
-end
-
-
- -

+ See on GitHub + + + +

@@ -1314,24 +1314,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 717
+      def disconnect!
+        clear_cache!(new_connection: true)
+        reset_transaction
+        @raw_connection_dirty = false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 717
-def disconnect!
-  clear_cache!(new_connection: true)
-  reset_transaction
-  @raw_connection_dirty = false
-end
-
-
- -

+ See on GitHub + + + +

@@ -1351,21 +1351,21 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 596
+      def enable_extension(name, **)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 596
-def enable_extension(name, **)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1385,33 +1385,33 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 334
-def expire
-  if in_use?
-    if @owner != ActiveSupport::IsolatedExecutionState.context
-      raise ActiveRecordError, "Cannot expire connection, " \
-        "it is owned by a different thread: #{@owner}. " \
-        "Current thread: #{ActiveSupport::IsolatedExecutionState.context}."
-    end
+          
+            
+ + Source code + - @idle_since = Process.clock_gettime(Process::CLOCK_MONOTONIC) - @owner = nil - else - raise ActiveRecordError, "Cannot expire connection, it is not currently leased." - end -end
-
-
- -

+
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 334
+      def expire
+        if in_use?
+          if @owner != ActiveSupport::IsolatedExecutionState.context
+            raise ActiveRecordError, "Cannot expire connection, " \
+              "it is owned by a different thread: #{@owner}. " \
+              "Current thread: #{ActiveSupport::IsolatedExecutionState.context}."
+          end
+
+          @idle_since = Process.clock_gettime(Process::CLOCK_MONOTONIC)
+          @owner = nil
+        else
+          raise ActiveRecordError, "Cannot expire connection, it is not currently leased."
+        end
+      end
+ + See on GitHub + + + +

@@ -1431,22 +1431,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 638
+      def extensions
+        []
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 638
-def extensions
-  []
-end
-
-
- -

+ See on GitHub + + + +

@@ -1466,22 +1466,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 643
+      def index_algorithms
+        {}
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 643
-def index_algorithms
-  {}
-end
-
-
- -

+ See on GitHub + + + +

@@ -1501,33 +1501,33 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 298
-def lease
-  if in_use?
-    msg = +"Cannot lease connection, "
-    if @owner == ActiveSupport::IsolatedExecutionState.context
-      msg << "it is already leased by the current thread."
-    else
-      msg << "it is already in use by a different thread: #{@owner}. " \
-             "Current thread: #{ActiveSupport::IsolatedExecutionState.context}."
-    end
-    raise ActiveRecordError, msg
-  end
+          
+            
+ + Source code + - @owner = ActiveSupport::IsolatedExecutionState.context -end
-
-
- -

+
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 298
+      def lease
+        if in_use?
+          msg = +"Cannot lease connection, "
+          if @owner == ActiveSupport::IsolatedExecutionState.context
+            msg << "it is already leased by the current thread."
+          else
+            msg << "it is already in use by a different thread: #{@owner}. " \
+                   "Current thread: #{ActiveSupport::IsolatedExecutionState.context}."
+          end
+          raise ActiveRecordError, msg
+        end
+
+        @owner = ActiveSupport::IsolatedExecutionState.context
+      end
+ + See on GitHub + + + +

@@ -1547,26 +1547,26 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 48
-def pool=(value)
-  return if value.eql?(@pool)
-  @schema_cache = nil
-  @pool = value
+          
+            
+ + Source code + - @pool.schema_reflection.load!(self) if ActiveRecord.lazily_load_schema_cache -end
-
-
- -

+
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 48
+      def pool=(value)
+        return if value.eql?(@pool)
+        @schema_cache = nil
+        @pool = value
+
+        @pool.schema_reflection.load!(self) if ActiveRecord.lazily_load_schema_cache
+      end
+ + See on GitHub + + + +

@@ -1586,22 +1586,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 426
+      def prefetch_primary_key?(table_name = nil)
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 426
-def prefetch_primary_key?(table_name = nil)
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -1625,7 +1625,8 @@

-

+ +

@@ -1649,22 +1650,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 265
+      def prepared_statements?
+        @prepared_statements && !prepared_statements_disabled_cache.include?(object_id)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 265
-def prepared_statements?
-  @prepared_statements && !prepared_statements_disabled_cache.include?(object_id)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1686,25 +1687,25 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 242
-def preventing_writes?
-  return true if replica?
-  return false if connection_class.nil?
+          
+            
+ + Source code + - connection_class.current_preventing_writes -end
-
-
- -

+
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 242
+      def preventing_writes?
+        return true if replica?
+        return false if connection_class.nil?
+
+        connection_class.current_preventing_writes
+      end
+ + See on GitHub + + + +

@@ -1728,26 +1729,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 814
+      def raw_connection
+        with_raw_connection do |conn|
+          disable_lazy_transactions!
+          @raw_connection_dirty = true
+          conn
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 814
-def raw_connection
-  with_raw_connection do |conn|
-    disable_lazy_transactions!
-    @raw_connection_dirty = true
-    conn
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1767,52 +1768,52 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 680
-def reconnect!(restore_transactions: false)
-  retries_available = connection_retries
-  deadline = retry_deadline && Process.clock_gettime(Process::CLOCK_MONOTONIC) + retry_deadline
+          
+            
+ + Source code + - @lock.synchronize do - reconnect +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 680
+      def reconnect!(restore_transactions: false)
+        retries_available = connection_retries
+        deadline = retry_deadline && Process.clock_gettime(Process::CLOCK_MONOTONIC) + retry_deadline
 
-    enable_lazy_transactions!
-    @raw_connection_dirty = false
-    @verified = true
+        @lock.synchronize do
+          reconnect
 
-    reset_transaction(restore: restore_transactions) do
-      clear_cache!(new_connection: true)
-      configure_connection
-    end
-  rescue => original_exception
-    translated_exception = translate_exception_class(original_exception, nil, nil)
-    retry_deadline_exceeded = deadline && deadline < Process.clock_gettime(Process::CLOCK_MONOTONIC)
+          enable_lazy_transactions!
+          @raw_connection_dirty = false
+          @verified = true
 
-    if !retry_deadline_exceeded && retries_available > 0
-      retries_available -= 1
+          reset_transaction(restore: restore_transactions) do
+            clear_cache!(new_connection: true)
+            configure_connection
+          end
+        rescue => original_exception
+          translated_exception = translate_exception_class(original_exception, nil, nil)
+          retry_deadline_exceeded = deadline && deadline < Process.clock_gettime(Process::CLOCK_MONOTONIC)
 
-      if retryable_connection_error?(translated_exception)
-        backoff(connection_retries - retries_available)
-        retry
-      end
-    end
+          if !retry_deadline_exceeded && retries_available > 0
+            retries_available -= 1
 
-    @verified = false
+            if retryable_connection_error?(translated_exception)
+              backoff(connection_retries - retries_available)
+              retry
+            end
+          end
 
-    raise translated_exception
-  end
-end
-
-
- -

+ @verified = false + + raise translated_exception + end + end + + See on GitHub + + + +

@@ -1832,22 +1833,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 214
+      def replica?
+        @config[:replica] || false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 214
-def replica?
-  @config[:replica] || false
-end
-
-
- -

+ See on GitHub + + + +

@@ -1867,22 +1868,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 767
+      def requires_reloading?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 767
-def requires_reloading?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -1904,24 +1905,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 741
+      def reset!
+        clear_cache!(new_connection: true)
+        reset_transaction
+        configure_connection
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 741
-def reset!
-  clear_cache!(new_connection: true)
-  reset_transaction
-  configure_connection
-end
-
-
- -

+ See on GitHub + + + +

@@ -1941,26 +1942,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 226
+      def retry_deadline
+        if @config[:retry_deadline]
+          @config[:retry_deadline].to_f
+        else
+          nil
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 226
-def retry_deadline
-  if @config[:retry_deadline]
-    @config[:retry_deadline].to_f
-  else
-    nil
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1980,22 +1981,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 319
+      def role
+        @pool.role
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 319
-def role
-  @pool.role
-end
-
-
- -

+ See on GitHub + + + +

@@ -2015,22 +2016,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 410
+      def savepoint_errors_invalidate_transactions?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 410
-def savepoint_errors_invalidate_transactions?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -2050,22 +2051,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 329
+      def schema_cache
+        @schema_cache ||= BoundSchemaReflection.new(@pool.schema_reflection, self)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 329
-def schema_cache
-  @schema_cache ||= BoundSchemaReflection.new(@pool.schema_reflection, self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2085,22 +2086,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 881
+      def schema_version
+        migration_context.current_version
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 881
-def schema_version
-  migration_context.current_version
-end
-
-
- -

+ See on GitHub + + + +

@@ -2120,22 +2121,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 325
+      def shard
+        @pool.shard
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 325
-def shard
-  @pool.shard
-end
-
-
- -

+ See on GitHub + + + +

@@ -2155,22 +2156,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 419
+      def supports_advisory_locks?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 419
-def supports_advisory_locks?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -2190,22 +2191,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 399
+      def supports_bulk_alter?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 399
-def supports_bulk_alter?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -2225,22 +2226,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 491
+      def supports_check_constraints?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 491
-def supports_check_constraints?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -2260,22 +2261,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 526
+      def supports_comments?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 526
-def supports_comments?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -2295,22 +2296,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 531
+      def supports_comments_in_create?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 531
-def supports_comments_in_create?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -2330,22 +2331,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 550
+      def supports_common_table_expressions?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 550
-def supports_common_table_expressions?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -2365,22 +2366,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 574
+      def supports_concurrent_connections?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 574
-def supports_concurrent_connections?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -2400,22 +2401,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 516
+      def supports_datetime_with_precision?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 516
-def supports_datetime_with_precision?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -2435,22 +2436,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 395
+      def supports_ddl_transactions?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 395
-def supports_ddl_transactions?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -2470,22 +2471,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 486
+      def supports_deferrable_constraints?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 486
-def supports_deferrable_constraints?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -2505,22 +2506,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 496
+      def supports_exclusion_constraints?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 496
-def supports_exclusion_constraints?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -2540,22 +2541,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 455
+      def supports_explain?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 455
-def supports_explain?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -2575,22 +2576,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 450
+      def supports_expression_index?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 450
-def supports_expression_index?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -2610,22 +2611,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 465
+      def supports_extensions?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 465
-def supports_extensions?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -2645,22 +2646,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 476
+      def supports_foreign_keys?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 476
-def supports_foreign_keys?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -2680,22 +2681,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 541
+      def supports_foreign_tables?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 541
-def supports_foreign_tables?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -2715,22 +2716,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 445
+      def supports_index_include?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 445
-def supports_index_include?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -2750,22 +2751,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 435
+      def supports_index_sort_order?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 435
-def supports_index_sort_order?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -2785,22 +2786,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 471
+      def supports_indexes_in_create?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 471
-def supports_indexes_in_create?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -2820,22 +2821,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 570
+      def supports_insert_conflict_target?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 570
-def supports_insert_conflict_target?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -2855,22 +2856,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 562
+      def supports_insert_on_duplicate_skip?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 562
-def supports_insert_on_duplicate_skip?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -2890,22 +2891,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 566
+      def supports_insert_on_duplicate_update?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 566
-def supports_insert_on_duplicate_update?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -2925,22 +2926,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 558
+      def supports_insert_returning?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 558
-def supports_insert_returning?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -2960,22 +2961,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 521
+      def supports_json?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 521
-def supports_json?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -2995,22 +2996,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 554
+      def supports_lazy_transactions?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 554
-def supports_lazy_transactions?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -3030,22 +3031,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 511
+      def supports_materialized_views?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 511
-def supports_materialized_views?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -3065,22 +3066,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 578
+      def supports_nulls_not_distinct?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 578
-def supports_nulls_not_distinct?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -3100,22 +3101,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 546
+      def supports_optimizer_hints?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 546
-def supports_optimizer_hints?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -3135,22 +3136,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 440
+      def supports_partial_index?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 440
-def supports_partial_index?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -3170,22 +3171,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 430
+      def supports_partitioned_indexes?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 430
-def supports_partitioned_indexes?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -3205,22 +3206,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 414
+      def supports_restart_db_transaction?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 414
-def supports_restart_db_transaction?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -3240,22 +3241,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 404
+      def supports_savepoints?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 404
-def supports_savepoints?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -3275,22 +3276,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 460
+      def supports_transaction_isolation?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 460
-def supports_transaction_isolation?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -3310,22 +3311,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 501
+      def supports_unique_constraints?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 501
-def supports_unique_constraints?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -3345,22 +3346,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 481
+      def supports_validate_constraints?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 481
-def supports_validate_constraints?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -3380,22 +3381,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 506
+      def supports_views?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 506
-def supports_views?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -3415,22 +3416,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 536
+      def supports_virtual_columns?
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 536
-def supports_virtual_columns?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -3450,23 +3451,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 748
+      def throw_away!
+        pool.remove self
+        disconnect!
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 748
-def throw_away!
-  pool.remove self
-  disconnect!
-end
-
-
- -

+ See on GitHub + + + +

@@ -3486,25 +3487,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 368
+      def unprepared_statement
+        cache = prepared_statements_disabled_cache.add?(object_id) if @prepared_statements
+        yield
+      ensure
+        cache&.delete(object_id)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 368
-def unprepared_statement
-  cache = prepared_statements_disabled_cache.add?(object_id) if @prepared_statements
-  yield
-ensure
-  cache&.delete(object_id)
-end
-
-
- -

+ See on GitHub + + + +

@@ -3524,22 +3525,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 218
+      def use_metadata_table?
+        @config.fetch(:use_metadata_table, true)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 218
-def use_metadata_table?
-  @config.fetch(:use_metadata_table, true)
-end
-
-
- -

+ See on GitHub + + + +

@@ -3559,38 +3560,38 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 774
-def verify!
-  unless active?
-    if @unconfigured_connection
-      @lock.synchronize do
-        if @unconfigured_connection
-          @raw_connection = @unconfigured_connection
-          @unconfigured_connection = nil
-          configure_connection
-          @verified = true
-          return
-        end
-      end
-    end
+          
+            
+ + Source code + - reconnect!(restore_transactions: true) - end +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 774
+      def verify!
+        unless active?
+          if @unconfigured_connection
+            @lock.synchronize do
+              if @unconfigured_connection
+                @raw_connection = @unconfigured_connection
+                @unconfigured_connection = nil
+                configure_connection
+                @verified = true
+                return
+              end
+            end
+          end
 
-  @verified = true
-end
-
-
- -

+ reconnect!(restore_transactions: true) + end + + @verified = true + end + + See on GitHub + + + +

Instance Private methods

@@ -3613,34 +3614,34 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 1133
+        def log(sql, name = "SQL", binds = [], type_casted_binds = [], statement_name = nil, async: false, &block) # :doc:
+          @instrumenter.instrument(
+            "sql.active_record",
+            sql:               sql,
+            name:              name,
+            binds:             binds,
+            type_casted_binds: type_casted_binds,
+            statement_name:    statement_name,
+            async:             async,
+            connection:        self,
+            &block
+          )
+        rescue ActiveRecord::StatementInvalid => ex
+          raise ex.set_query(sql, binds)
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 1133
-def log(sql, name = "SQL", binds = [], type_casted_binds = [], statement_name = nil, async: false, &block) # :doc:
-  @instrumenter.instrument(
-    "sql.active_record",
-    sql:               sql,
-    name:              name,
-    binds:             binds,
-    type_casted_binds: type_casted_binds,
-    statement_name:    statement_name,
-    async:             async,
-    connection:        self,
-    &block
-  )
-rescue ActiveRecord::StatementInvalid => ex
-  raise ex.set_query(sql, binds)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter/Version.html b/src/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter/Version.html index 9209a56973..ae0504142e 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter/Version.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter/Version.html @@ -114,23 +114,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 279
+        def initialize(version_string, full_version_string = nil)
+          @version = version_string.split(".").map(&:to_i)
+          @full_version_string = full_version_string
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 279
-def initialize(version_string, full_version_string = nil)
-  @version = version_string.split(".").map(&:to_i)
-  @full_version_string = full_version_string
-end
-
-
- - + See on GitHub + + + + @@ -154,22 +154,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 284
+        def <=>(version_string)
+          @version <=> version_string.split(".").map(&:to_i)
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 284
-def <=>(version_string)
-  @version <=> version_string.split(".").map(&:to_i)
-end
-
-
- - + See on GitHub + + + +

@@ -189,22 +189,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 288
+        def to_s
+          @version.join(".")
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 288
-def to_s
-  @version.join(".")
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/AbstractMysqlAdapter.html b/src/classes/ActiveRecord/ConnectionAdapters/AbstractMysqlAdapter.html index d9d3c3363d..0802ca2ec9 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/AbstractMysqlAdapter.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/AbstractMysqlAdapter.html @@ -544,46 +544,46 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 57
-def dbconsole(config, options = {})
-  mysql_config = config.configuration_hash
-
-  args = {
-    host: "--host",
-    port: "--port",
-    socket: "--socket",
-    username: "--user",
-    encoding: "--default-character-set",
-    sslca: "--ssl-ca",
-    sslcert: "--ssl-cert",
-    sslcapath: "--ssl-capath",
-    sslcipher: "--ssl-cipher",
-    sslkey: "--ssl-key",
-    ssl_mode: "--ssl-mode"
-  }.filter_map { |opt, arg| "#{arg}=#{mysql_config[opt]}" if mysql_config[opt] }
-
-  if mysql_config[:password] && options[:include_password]
-    args << "--password=#{mysql_config[:password]}"
-  elsif mysql_config[:password] && !mysql_config[:password].to_s.empty?
-    args << "-p"
-  end
-
-  args << config.database
-
-  find_cmd_and_exec(["mysql", "mysql5"], *args)
-end
-
-
- - + +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 57
+        def dbconsole(config, options = {})
+          mysql_config = config.configuration_hash
+
+          args = {
+            host: "--host",
+            port: "--port",
+            socket: "--socket",
+            username: "--user",
+            encoding: "--default-character-set",
+            sslca: "--ssl-ca",
+            sslcert: "--ssl-cert",
+            sslcapath: "--ssl-capath",
+            sslcipher: "--ssl-cipher",
+            sslkey: "--ssl-key",
+            ssl_mode: "--ssl-mode"
+          }.filter_map { |opt, arg| "#{arg}=#{mysql_config[opt]}" if mysql_config[opt] }
+
+          if mysql_config[:password] && options[:include_password]
+            args << "--password=#{mysql_config[:password]}"
+          elsif mysql_config[:password] && !mysql_config[:password].to_s.empty?
+            args << "-p"
+          end
+
+          args << config.database
+
+          find_cmd_and_exec(["mysql", "mysql5"], *args)
+        end
+ + See on GitHub + +
+ +

@@ -606,21 +606,21 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 29
-class_attribute :emulate_booleans, default: true
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 29
+      class_attribute :emulate_booleans, default: true
 
-
-
- -

+ + See on GitHub + + + + @@ -644,22 +644,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 304
+      def charset
+        show_variable "character_set_database"
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 304
-def charset
-  show_variable "character_set_database"
-end
-
-
- - + See on GitHub + + + +

@@ -679,57 +679,57 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 509
-      def check_constraints(table_name)
-        if supports_check_constraints?
-          scope = quoted_scope(table_name)
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 509
+      def check_constraints(table_name)
+        if supports_check_constraints?
+          scope = quoted_scope(table_name)
 
-          sql = <<~SQL
-            SELECT cc.constraint_name AS 'name',
-                  cc.check_clause AS 'expression'
+          sql = <<~SQL
+            SELECT cc.constraint_name AS 'name',
+                  cc.check_clause AS 'expression'
             FROM information_schema.check_constraints cc
             JOIN information_schema.table_constraints tc
             USING (constraint_schema, constraint_name)
             WHERE tc.table_schema = #{scope[:schema]}
               AND tc.table_name = #{scope[:name]}
               AND cc.constraint_schema = #{scope[:schema]}
-          SQL
-          sql += " AND cc.table_name = #{scope[:name]}" if mariadb?
+          SQL
+          sql += " AND cc.table_name = #{scope[:name]}" if mariadb?
 
-          chk_info = internal_exec_query(sql, "SCHEMA")
+          chk_info = internal_exec_query(sql, "SCHEMA")
 
-          chk_info.map do |row|
-            options = {
-              name: row["name"]
+          chk_info.map do |row|
+            options = {
+              name: row["name"]
             }
-            expression = row["expression"]
-            expression = expression[1..-2] if expression.start_with?("(") && expression.end_with?(")")
-            expression = strip_whitespace_characters(expression)
-
-            unless mariadb?
-              # MySQL returns check constraints expression in an already escaped form.
-              # This leads to duplicate escaping later (e.g. when the expression is used in the SchemaDumper).
-              expression = expression.gsub("\\'", "'")
-            end
-
-            CheckConstraintDefinition.new(table_name, expression, options)
-          end
-        else
-          raise NotImplementedError
-        end
-      end
-
-
- -

+ expression = row["expression"] + expression = expression[1..-2] if expression.start_with?("(") && expression.end_with?(")") + expression = strip_whitespace_characters(expression) + + unless mariadb? + # MySQL returns check constraints expression in an already escaped form. + # This leads to duplicate escaping later (e.g. when the expression is used in the SchemaDumper). + expression = expression.gsub("\\'", "'") + end + + CheckConstraintDefinition.new(table_name, expression, options) + end + else + raise NotImplementedError + end + end + + See on GitHub + + + +

@@ -749,22 +749,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 309
+      def collation
+        show_variable "collation_database"
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 309
-def collation
-  show_variable "collation_database"
-end
-
-
- -

+ See on GitHub + + + +

@@ -791,30 +791,30 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 279
+      def create_database(name, options = {})
+        if options[:collation]
+          execute "CREATE DATABASE #{quote_table_name(name)} DEFAULT COLLATE #{quote_table_name(options[:collation])}"
+        elsif options[:charset]
+          execute "CREATE DATABASE #{quote_table_name(name)} DEFAULT CHARACTER SET #{quote_table_name(options[:charset])}"
+        elsif row_format_dynamic_by_default?
+          execute "CREATE DATABASE #{quote_table_name(name)} DEFAULT CHARACTER SET `utf8mb4`"
+        else
+          raise "Configure a supported :charset and ensure innodb_large_prefix is enabled to support indexes on varchar(255) string columns."
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 279
-def create_database(name, options = {})
-  if options[:collation]
-    execute "CREATE DATABASE #{quote_table_name(name)} DEFAULT COLLATE #{quote_table_name(options[:collation])}"
-  elsif options[:charset]
-    execute "CREATE DATABASE #{quote_table_name(name)} DEFAULT CHARACTER SET #{quote_table_name(options[:charset])}"
-  elsif row_format_dynamic_by_default?
-    execute "CREATE DATABASE #{quote_table_name(name)} DEFAULT CHARACTER SET `utf8mb4`"
-  else
-    raise "Configure a supported :charset and ensure innodb_large_prefix is enabled to support indexes on varchar(255) string columns."
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -834,22 +834,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 299
+      def current_database
+        query_value("SELECT database()", "SCHEMA")
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 299
-def current_database
-  query_value("SELECT database()", "SCHEMA")
-end
-
-
- -

+ See on GitHub + + + +

@@ -881,23 +881,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 357
+      def drop_table(table_name, **options)
+        schema_cache.clear_data_source_cache!(table_name.to_s)
+        execute "DROP#{' TEMPORARY' if options[:temporary]} TABLE#{' IF EXISTS' if options[:if_exists]} #{quote_table_name(table_name)}#{' CASCADE' if options[:force] == :cascade}"
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 357
-def drop_table(table_name, **options)
-  schema_cache.clear_data_source_cache!(table_name.to_s)
-  execute "DROP#{' TEMPORARY' if options[:temporary]} TABLE#{' IF EXISTS' if options[:if_exists]} #{quote_table_name(table_name)}#{' CASCADE' if options[:force] == :cascade}"
-end
-
-
- -

+ See on GitHub + + + +

@@ -917,29 +917,27 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 464
-      def foreign_keys(table_name)
-        raise ArgumentError unless table_name.present?
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 464
+      def foreign_keys(table_name)
+        raise ArgumentError unless table_name.present?
 
-        scope = quoted_scope(table_name)
+        scope = quoted_scope(table_name)
 
-        # MySQL returns 1 row for each column of composite foreign keys.
-        fk_info = internal_exec_query(<<~SQL, "SCHEMA")
-          SELECT fk.referenced_table_name AS 'to_table',
-                 fk.referenced_column_name AS 'primary_key',
-                 fk.column_name AS 'column',
-                 fk.constraint_name AS 'name',
-                 fk.ordinal_position AS 'position',
-                 rc.update_rule AS 'on_update',
-                 rc.delete_rule AS 'on_delete'
+        # MySQL returns 1 row for each column of composite foreign keys.
+        fk_info = internal_exec_query(<<~SQL, "SCHEMA")
+          SELECT fk.referenced_table_name AS 'to_table',
+                 fk.referenced_column_name AS 'primary_key',
+                 fk.column_name AS 'column',
+                 fk.constraint_name AS 'name',
+                 fk.ordinal_position AS 'position',
+                 rc.update_rule AS 'on_update',
+                 rc.delete_rule AS 'on_delete'
           FROM information_schema.referential_constraints rc
           JOIN information_schema.key_column_usage fk
           USING (constraint_schema, constraint_name)
@@ -948,32 +946,34 @@ 

AND fk.table_name = #{scope[:name]} AND rc.constraint_schema = #{scope[:schema]} AND rc.table_name = #{scope[:name]} - SQL - - grouped_fk = fk_info.group_by { |row| row["name"] }.values.each { |group| group.sort_by! { |row| row["position"] } } - grouped_fk.map do |group| - row = group.first - options = { - name: row["name"], - on_update: extract_foreign_key_action(row["on_update"]), - on_delete: extract_foreign_key_action(row["on_delete"]) + SQL + + grouped_fk = fk_info.group_by { |row| row["name"] }.values.each { |group| group.sort_by! { |row| row["position"] } } + grouped_fk.map do |group| + row = group.first + options = { + name: row["name"], + on_update: extract_foreign_key_action(row["on_update"]), + on_delete: extract_foreign_key_action(row["on_delete"]) } - if group.one? - options[:column] = unquote_identifier(row["column"]) - options[:primary_key] = row["primary_key"] - else - options[:column] = group.map { |row| unquote_identifier(row["column"]) } - options[:primary_key] = group.map { |row| row["primary_key"] } - end - - ForeignKeyDefinition.new(table_name, unquote_identifier(row["to_table"]), options) - end - end

-
-
- -

+ if group.one? + options[:column] = unquote_identifier(row["column"]) + options[:primary_key] = row["primary_key"] + else + options[:column] = group.map { |row| unquote_identifier(row["column"]) } + options[:primary_key] = group.map { |row| row["primary_key"] } + end + + ForeignKeyDefinition.new(table_name, unquote_identifier(row["to_table"]), options) + end + end + + See on GitHub + + + +

@@ -993,27 +993,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 185
+      def index_algorithms
+        {
+          default: "ALGORITHM = DEFAULT",
+          copy:    "ALGORITHM = COPY",
+          inplace: "ALGORITHM = INPLACE",
+          instant: "ALGORITHM = INSTANT",
+        }
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 185
-def index_algorithms
-  {
-    default: "ALGORITHM = DEFAULT",
-    copy:    "ALGORITHM = COPY",
-    inplace: "ALGORITHM = INPLACE",
-    instant: "ALGORITHM = INSTANT",
-  }
-end
-
-
- -

+ See on GitHub + + + +

@@ -1033,22 +1033,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 181
+      def native_database_types
+        NATIVE_DATABASE_TYPES
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 181
-def native_database_types
-  NATIVE_DATABASE_TYPES
-end
-
-
- -

+ See on GitHub + + + +

@@ -1068,25 +1068,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 265
+      def recreate_database(name, options = {})
+        drop_database(name)
+        sql = create_database(name, options)
+        reconnect!
+        sql
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 265
-def recreate_database(name, options = {})
-  drop_database(name)
-  sql = create_database(name, options)
-  reconnect!
-  sql
-end
-
-
- -

+ See on GitHub + + + +

@@ -1106,28 +1106,28 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 362
-def rename_index(table_name, old_name, new_name)
-  if supports_rename_index?
-    validate_index_length!(table_name, new_name)
+          
+            
+ + Source code + - execute "ALTER TABLE #{quote_table_name(table_name)} RENAME INDEX #{quote_table_name(old_name)} TO #{quote_table_name(new_name)}" - else - super - end -end
-
-
- -

+
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 362
+      def rename_index(table_name, old_name, new_name)
+        if supports_rename_index?
+          validate_index_length!(table_name, new_name)
+
+          execute "ALTER TABLE #{quote_table_name(table_name)} RENAME INDEX #{quote_table_name(old_name)} TO #{quote_table_name(new_name)}"
+        else
+          super
+        end
+      end
+ + See on GitHub + + + +

@@ -1152,26 +1152,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 334
+      def rename_table(table_name, new_name, **options)
+        validate_table_length!(new_name) unless options[:_uses_legacy_table_name]
+        schema_cache.clear_data_source_cache!(table_name.to_s)
+        schema_cache.clear_data_source_cache!(new_name.to_s)
+        execute "RENAME TABLE #{quote_table_name(table_name)} TO #{quote_table_name(new_name)}"
+        rename_table_indexes(table_name, new_name)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 334
-def rename_table(table_name, new_name, **options)
-  validate_table_length!(new_name) unless options[:_uses_legacy_table_name]
-  schema_cache.clear_data_source_cache!(table_name.to_s)
-  schema_cache.clear_data_source_cache!(new_name.to_s)
-  execute "RENAME TABLE #{quote_table_name(table_name)} TO #{quote_table_name(new_name)}"
-  rename_table_indexes(table_name, new_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1191,24 +1191,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 578
+      def show_variable(name)
+        query_value("SELECT @@#{name}", "SCHEMA")
+      rescue ActiveRecord::StatementInvalid
+        nil
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 578
-def show_variable(name)
-  query_value("SELECT @@#{name}", "SCHEMA")
-rescue ActiveRecord::StatementInvalid
-  nil
-end
-
-
- -

+ See on GitHub + + + +

@@ -1228,22 +1228,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 629
+      def strict_mode?
+        self.class.type_cast_config_to_boolean(@config.fetch(:strict, true))
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 629
-def strict_mode?
-  self.class.type_cast_config_to_boolean(@config.fetch(:strict, true))
-end
-
-
- -

+ See on GitHub + + + +

@@ -1263,22 +1263,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 161
+      def supports_advisory_locks?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 161
-def supports_advisory_locks?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1298,22 +1298,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 96
+      def supports_bulk_alter?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 96
-def supports_bulk_alter?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1333,26 +1333,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 128
+      def supports_check_constraints?
+        if mariadb?
+          database_version >= "10.3.10" || (database_version < "10.3" && database_version >= "10.2.22")
+        else
+          database_version >= "8.0.16"
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 128
-def supports_check_constraints?
-  if mariadb?
-    database_version >= "10.3.10" || (database_version < "10.3" && database_version >= "10.2.22")
-  else
-    database_version >= "8.0.16"
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1372,26 +1372,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 153
+      def supports_common_table_expressions?
+        if mariadb?
+          database_version >= "10.2.1"
+        else
+          database_version >= "8.0.1"
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 153
-def supports_common_table_expressions?
-  if mariadb?
-    database_version >= "10.2.1"
-  else
-    database_version >= "8.0.1"
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1411,22 +1411,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 140
+      def supports_datetime_with_precision?
+        mariadb? || database_version >= "5.6.4"
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 140
-def supports_datetime_with_precision?
-  mariadb? || database_version >= "5.6.4"
-end
-
-
- -

+ See on GitHub + + + +

@@ -1446,22 +1446,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 116
+      def supports_explain?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 116
-def supports_explain?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1481,22 +1481,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 104
+      def supports_expression_index?
+        !mariadb? && database_version >= "8.0.13"
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 104
-def supports_expression_index?
-  !mariadb? && database_version >= "8.0.13"
-end
-
-
- -

+ See on GitHub + + + +

@@ -1516,22 +1516,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 124
+      def supports_foreign_keys?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 124
-def supports_foreign_keys?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1551,22 +1551,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 100
+      def supports_index_sort_order?
+        !mariadb? && database_version >= "8.0.1"
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 100
-def supports_index_sort_order?
-  !mariadb? && database_version >= "8.0.1"
-end
-
-
- -

+ See on GitHub + + + +

@@ -1586,22 +1586,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 120
+      def supports_indexes_in_create?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 120
-def supports_indexes_in_create?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1621,22 +1621,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 165
+      def supports_insert_on_duplicate_skip?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 165
-def supports_insert_on_duplicate_skip?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1656,22 +1656,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 169
+      def supports_insert_on_duplicate_update?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 169
-def supports_insert_on_duplicate_update?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1691,22 +1691,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 149
+      def supports_optimizer_hints?
+        !mariadb? && database_version >= "5.7.7"
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 149
-def supports_optimizer_hints?
-  !mariadb? && database_version >= "5.7.7"
-end
-
-
- -

+ See on GitHub + + + +

@@ -1726,22 +1726,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 112
+      def supports_restart_db_transaction?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 112
-def supports_restart_db_transaction?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1761,22 +1761,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 108
+      def supports_transaction_isolation?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 108
-def supports_transaction_isolation?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1796,22 +1796,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 136
+      def supports_views?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 136
-def supports_views?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1831,22 +1831,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 144
+      def supports_virtual_columns?
+        mariadb? || database_version >= "5.7.5"
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 144
-def supports_virtual_columns?
-  mariadb? || database_version >= "5.7.5"
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/BoundSchemaReflection.html b/src/classes/ActiveRecord/ConnectionAdapters/BoundSchemaReflection.html index 7a9345a8c3..55fa29817a 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/BoundSchemaReflection.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/BoundSchemaReflection.html @@ -140,23 +140,23 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 150
-def initialize(abstract_schema_reflection, connection)
-  @schema_reflection = abstract_schema_reflection
-  @connection = connection
-end
-
-
- - + +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 150
+      def initialize(abstract_schema_reflection, connection)
+        @schema_reflection = abstract_schema_reflection
+        @connection = connection
+      end
+ + See on GitHub + +
+ + @@ -180,22 +180,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 175
+      def add(name)
+        @schema_reflection.add(@connection, name)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 175
-def add(name)
-  @schema_reflection.add(@connection, name)
-end
-
-
- - + See on GitHub + + + +

@@ -215,22 +215,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 163
+      def cached?(table_name)
+        @schema_reflection.cached?(table_name)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 163
-def cached?(table_name)
-  @schema_reflection.cached?(table_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -250,22 +250,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 155
+      def clear!
+        @schema_reflection.clear!
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 155
-def clear!
-  @schema_reflection.clear!
-end
-
-
- -

+ See on GitHub + + + +

@@ -285,22 +285,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 211
+      def clear_data_source_cache!(name)
+        @schema_reflection.clear_data_source_cache!(@connection, name)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 211
-def clear_data_source_cache!(name)
-  @schema_reflection.clear_data_source_cache!(@connection, name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -320,22 +320,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 183
+      def columns(table_name)
+        @schema_reflection.columns(@connection, table_name)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 183
-def columns(table_name)
-  @schema_reflection.columns(@connection, table_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -355,22 +355,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 187
+      def columns_hash(table_name)
+        @schema_reflection.columns_hash(@connection, table_name)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 187
-def columns_hash(table_name)
-  @schema_reflection.columns_hash(@connection, table_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -390,22 +390,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 191
+      def columns_hash?(table_name)
+        @schema_reflection.columns_hash?(@connection, table_name)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 191
-def columns_hash?(table_name)
-  @schema_reflection.columns_hash?(@connection, table_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -425,22 +425,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 171
+      def data_source_exists?(name)
+        @schema_reflection.data_source_exists?(@connection, name)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 171
-def data_source_exists?(name)
-  @schema_reflection.data_source_exists?(@connection, name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -460,22 +460,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 179
+      def data_sources(name)
+        @schema_reflection.data_sources(@connection, name)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 179
-def data_sources(name)
-  @schema_reflection.data_sources(@connection, name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -495,22 +495,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 215
+      def dump_to(filename)
+        @schema_reflection.dump_to(@connection, filename)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 215
-def dump_to(filename)
-  @schema_reflection.dump_to(@connection, filename)
-end
-
-
- -

+ See on GitHub + + + +

@@ -530,22 +530,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 195
+      def indexes(table_name)
+        @schema_reflection.indexes(@connection, table_name)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 195
-def indexes(table_name)
-  @schema_reflection.indexes(@connection, table_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -565,22 +565,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 159
+      def load!
+        @schema_reflection.load!(@connection)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 159
-def load!
-  @schema_reflection.load!(@connection)
-end
-
-
- -

+ See on GitHub + + + +

@@ -600,22 +600,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 167
+      def primary_keys(table_name)
+        @schema_reflection.primary_keys(@connection, table_name)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 167
-def primary_keys(table_name)
-  @schema_reflection.primary_keys(@connection, table_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -635,22 +635,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 207
+      def size
+        @schema_reflection.size(@connection)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 207
-def size
-  @schema_reflection.size(@connection)
-end
-
-
- -

+ See on GitHub + + + +

@@ -670,22 +670,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 203
+      def version
+        @schema_reflection.version(@connection)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 203
-def version
-  @schema_reflection.version(@connection)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/ColumnMethods.html b/src/classes/ActiveRecord/ConnectionAdapters/ColumnMethods.html index 4d86cafe9b..89ead669f3 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/ColumnMethods.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/ColumnMethods.html @@ -86,26 +86,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 320
+      included do
+        define_column_methods :bigint, :binary, :boolean, :date, :datetime, :decimal,
+          :float, :integer, :json, :string, :text, :time, :timestamp, :virtual
+
+        alias :blob :binary
+        alias :numeric :decimal
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 320
-included do
-  define_column_methods :bigint, :binary, :boolean, :date, :datetime, :decimal,
-    :float, :integer, :json, :string, :text, :time, :timestamp, :virtual
-
-  alias :blob :binary
-  alias :numeric :decimal
-end
-
-
- - + See on GitHub + + + +

@@ -125,22 +125,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 305
+      def primary_key(name, type = :primary_key, **options)
+        column(name, type, **options.merge(primary_key: true))
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 305
-def primary_key(name, type = :primary_key, **options)
-  column(name, type, **options.merge(primary_key: true))
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/ConnectionHandler.html b/src/classes/ActiveRecord/ConnectionAdapters/ConnectionHandler.html index fb9ed9c8a7..2c85d93d5d 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/ConnectionHandler.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/ConnectionHandler.html @@ -174,26 +174,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb, line 77
+      def initialize
+        # These caches are keyed by pool_config.connection_name (PoolConfig#connection_name).
+        @connection_name_to_pool_manager = Concurrent::Map.new(initial_capacity: 2)
+
+        # Backup finalizer: if the forked child skipped Kernel#fork the early discard has not occurred
+        ObjectSpace.define_finalizer self, FINALIZER
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb, line 77
-def initialize
-  # These caches are keyed by pool_config.connection_name (PoolConfig#connection_name).
-  @connection_name_to_pool_manager = Concurrent::Map.new(initial_capacity: 2)
-
-  # Backup finalizer: if the forked child skipped Kernel#fork the early discard has not occurred
-  ObjectSpace.define_finalizer self, FINALIZER
-end
-
-
- - + See on GitHub + + + + @@ -217,27 +217,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb, line 173
+      def active_connections?(role = nil)
+        if role.nil?
+          deprecation_for_pool_handling(__method__)
+          role = ActiveRecord::Base.current_role
+        end
+
+        each_connection_pool(role).any?(&:active_connection?)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb, line 173
-def active_connections?(role = nil)
-  if role.nil?
-    deprecation_for_pool_handling(__method__)
-    role = ActiveRecord::Base.current_role
-  end
-
-  each_connection_pool(role).any?(&:active_connection?)
-end
-
-
- - + See on GitHub + + + +

@@ -257,26 +257,26 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb, line 97
-      def all_connection_pools
-        ActiveRecord.deprecator.warn(<<-MSG.squish)
-          The `all_connection_pools` method is deprecated in favor of `connection_pool_list`.
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb, line 97
+      def all_connection_pools
+        ActiveRecord.deprecator.warn(<<-MSG.squish)
+          The `all_connection_pools` method is deprecated in favor of `connection_pool_list`.
           Call `connection_pool_list(:all)` to get the same behavior as `all_connection_pools`.
-        MSG
-        connection_name_to_pool_manager.values.flat_map { |m| m.pool_configs.map(&:pool) }
-      end
-
-
- -

+ MSG + connection_name_to_pool_manager.values.flat_map { |m| m.pool_configs.map(&:pool) } + end + + See on GitHub + + + +

@@ -296,27 +296,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb, line 185
+      def clear_active_connections!(role = nil)
+        if role.nil?
+          deprecation_for_pool_handling(__method__)
+          role = ActiveRecord::Base.current_role
+        end
+
+        each_connection_pool(role).each(&:release_connection)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb, line 185
-def clear_active_connections!(role = nil)
-  if role.nil?
-    deprecation_for_pool_handling(__method__)
-    role = ActiveRecord::Base.current_role
-  end
-
-  each_connection_pool(role).each(&:release_connection)
-end
-
-
- -

+ See on GitHub + + + +

@@ -336,27 +336,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb, line 206
+      def clear_all_connections!(role = nil)
+        if role.nil?
+          deprecation_for_pool_handling(__method__)
+          role = ActiveRecord::Base.current_role
+        end
+
+        each_connection_pool(role).each(&:disconnect!)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb, line 206
-def clear_all_connections!(role = nil)
-  if role.nil?
-    deprecation_for_pool_handling(__method__)
-    role = ActiveRecord::Base.current_role
-  end
-
-  each_connection_pool(role).each(&:disconnect!)
-end
-
-
- -

+ See on GitHub + + + +

@@ -378,27 +378,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb, line 197
+      def clear_reloadable_connections!(role = nil)
+        if role.nil?
+          deprecation_for_pool_handling(__method__)
+          role = ActiveRecord::Base.current_role
+        end
+
+        each_connection_pool(role).each(&:clear_reloadable_connections!)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb, line 197
-def clear_reloadable_connections!(role = nil)
-  if role.nil?
-    deprecation_for_pool_handling(__method__)
-    role = ActiveRecord::Base.current_role
-  end
-
-  each_connection_pool(role).each(&:clear_reloadable_connections!)
-end
-
-
- -

+ See on GitHub + + + +

@@ -418,23 +418,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb, line 251
+      def connected?(connection_name, role: ActiveRecord::Base.current_role, shard: ActiveRecord::Base.current_shard)
+        pool = retrieve_connection_pool(connection_name, role: role, shard: shard)
+        pool && pool.connected?
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb, line 251
-def connected?(connection_name, role: ActiveRecord::Base.current_role, shard: ActiveRecord::Base.current_shard)
-  pool = retrieve_connection_pool(connection_name, role: role, shard: shard)
-  pool && pool.connected?
-end
-
-
- -

+ See on GitHub + + + +

@@ -458,30 +458,30 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb, line 107
+      def connection_pool_list(role = nil)
+        if role.nil?
+          deprecation_for_pool_handling(__method__)
+          role = ActiveRecord::Base.current_role
+          connection_name_to_pool_manager.values.flat_map { |m| m.pool_configs(role).map(&:pool) }
+        elsif role == :all
+          connection_name_to_pool_manager.values.flat_map { |m| m.pool_configs.map(&:pool) }
+        else
+          connection_name_to_pool_manager.values.flat_map { |m| m.pool_configs(role).map(&:pool) }
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb, line 107
-def connection_pool_list(role = nil)
-  if role.nil?
-    deprecation_for_pool_handling(__method__)
-    role = ActiveRecord::Base.current_role
-    connection_name_to_pool_manager.values.flat_map { |m| m.pool_configs(role).map(&:pool) }
-  elsif role == :all
-    connection_name_to_pool_manager.values.flat_map { |m| m.pool_configs.map(&:pool) }
-  else
-    connection_name_to_pool_manager.values.flat_map { |m| m.pool_configs(role).map(&:pool) }
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -505,7 +505,8 @@

-

+ +

@@ -525,58 +526,58 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb, line 131
+      def establish_connection(config, owner_name: Base, role: Base.current_role, shard: Base.current_shard, clobber: false)
+        owner_name = determine_owner_name(owner_name, config)
+
+        pool_config = resolve_pool_config(config, owner_name, role, shard)
+        db_config = pool_config.db_config
+
+        pool_manager = set_pool_manager(pool_config.connection_name)
+
+        # If there is an existing pool with the same values as the pool_config
+        # don't remove the connection. Connections should only be removed if we are
+        # establishing a connection on a class that is already connected to a different
+        # configuration.
+        existing_pool_config = pool_manager.get_pool_config(role, shard)
+
+        if !clobber && existing_pool_config && existing_pool_config.db_config == db_config
+          # Update the pool_config's connection class if it differs. This is used
+          # for ensuring that ActiveRecord::Base and the primary_abstract_class use
+          # the same pool. Without this granular swapping will not work correctly.
+          if owner_name.primary_class? && (existing_pool_config.connection_class != owner_name)
+            existing_pool_config.connection_class = owner_name
+          end
+
+          existing_pool_config.pool
+        else
+          disconnect_pool_from_pool_manager(pool_manager, role, shard)
+          pool_manager.set_pool_config(role, shard, pool_config)
+
+          payload = {
+            connection_name: pool_config.connection_name,
+            role: role,
+            shard: shard,
+            config: db_config.configuration_hash
+          }
+
+          ActiveSupport::Notifications.instrumenter.instrument("!connection.active_record", payload) do
+            pool_config.pool
+          end
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb, line 131
-def establish_connection(config, owner_name: Base, role: Base.current_role, shard: Base.current_shard, clobber: false)
-  owner_name = determine_owner_name(owner_name, config)
-
-  pool_config = resolve_pool_config(config, owner_name, role, shard)
-  db_config = pool_config.db_config
-
-  pool_manager = set_pool_manager(pool_config.connection_name)
-
-  # If there is an existing pool with the same values as the pool_config
-  # don't remove the connection. Connections should only be removed if we are
-  # establishing a connection on a class that is already connected to a different
-  # configuration.
-  existing_pool_config = pool_manager.get_pool_config(role, shard)
-
-  if !clobber && existing_pool_config && existing_pool_config.db_config == db_config
-    # Update the pool_config's connection class if it differs. This is used
-    # for ensuring that ActiveRecord::Base and the primary_abstract_class use
-    # the same pool. Without this granular swapping will not work correctly.
-    if owner_name.primary_class? && (existing_pool_config.connection_class != owner_name)
-      existing_pool_config.connection_class = owner_name
-    end
-
-    existing_pool_config.pool
-  else
-    disconnect_pool_from_pool_manager(pool_manager, role, shard)
-    pool_manager.set_pool_config(role, shard, pool_config)
-
-    payload = {
-      connection_name: pool_config.connection_name,
-      role: role,
-      shard: shard,
-      config: db_config.configuration_hash
-    }
-
-    ActiveSupport::Notifications.instrumenter.instrument("!connection.active_record", payload) do
-      pool_config.pool
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -598,27 +599,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb, line 218
+      def flush_idle_connections!(role = nil)
+        if role.nil?
+          deprecation_for_pool_handling(__method__)
+          role = ActiveRecord::Base.current_role
+        end
+
+        each_connection_pool(role).each(&:flush!)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb, line 218
-def flush_idle_connections!(role = nil)
-  if role.nil?
-    deprecation_for_pool_handling(__method__)
-    role = ActiveRecord::Base.current_role
-  end
-
-  each_connection_pool(role).each(&:flush!)
-end
-
-
- -

+ See on GitHub + + + +

@@ -638,24 +639,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb, line 256
+      def remove_connection_pool(connection_name, role: ActiveRecord::Base.current_role, shard: ActiveRecord::Base.current_shard)
+        if pool_manager = get_pool_manager(connection_name)
+          disconnect_pool_from_pool_manager(pool_manager, role, shard)
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb, line 256
-def remove_connection_pool(connection_name, role: ActiveRecord::Base.current_role, shard: ActiveRecord::Base.current_shard)
-  if pool_manager = get_pool_manager(connection_name)
-    disconnect_pool_from_pool_manager(pool_manager, role, shard)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -675,23 +676,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb, line 265
+      def retrieve_connection_pool(connection_name, role: ActiveRecord::Base.current_role, shard: ActiveRecord::Base.current_shard)
+        pool_config = get_pool_manager(connection_name)&.get_pool_config(role, shard)
+        pool_config&.pool
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb, line 265
-def retrieve_connection_pool(connection_name, role: ActiveRecord::Base.current_role, shard: ActiveRecord::Base.current_shard)
-  pool_config = get_pool_manager(connection_name)&.get_pool_config(role, shard)
-  pool_config&.pool
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/ConnectionPool.html b/src/classes/ActiveRecord/ConnectionAdapters/ConnectionPool.html index d147d472b4..8dd9cdd4c6 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/ConnectionPool.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/ConnectionPool.html @@ -309,62 +309,62 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 122
+      def initialize(pool_config)
+        super()
+
+        @pool_config = pool_config
+        @db_config = pool_config.db_config
+        @role = pool_config.role
+        @shard = pool_config.shard
+
+        @checkout_timeout = db_config.checkout_timeout
+        @idle_timeout = db_config.idle_timeout
+        @size = db_config.pool
+
+        # This variable tracks the cache of threads mapped to reserved connections, with the
+        # sole purpose of speeding up the +connection+ method. It is not the authoritative
+        # registry of which thread owns which connection. Connection ownership is tracked by
+        # the +connection.owner+ attr on each +connection+ instance.
+        # The invariant works like this: if there is mapping of thread => conn,
+        # then that +thread+ does indeed own that +conn+. However, an absence of such
+        # mapping does not mean that the +thread+ doesn't own the said connection. In
+        # that case +conn.owner+ attr should be consulted.
+        # Access and modification of @thread_cached_conns does not require
+        # synchronization.
+        @thread_cached_conns = Concurrent::Map.new(initial_capacity: @size)
+
+        @connections         = []
+        @automatic_reconnect = true
+
+        # Connection pool allows for concurrent (outside the main +synchronize+ section)
+        # establishment of new connections. This variable tracks the number of threads
+        # currently in the process of independently establishing connections to the DB.
+        @now_connecting = 0
+
+        @threads_blocking_new_connections = 0
+
+        @available = ConnectionLeasingQueue.new self
+
+        @lock_thread = false
+
+        @async_executor = build_async_executor
+
+        @reaper = Reaper.new(self, db_config.reaping_frequency)
+        @reaper.run
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 122
-def initialize(pool_config)
-  super()
-
-  @pool_config = pool_config
-  @db_config = pool_config.db_config
-  @role = pool_config.role
-  @shard = pool_config.shard
-
-  @checkout_timeout = db_config.checkout_timeout
-  @idle_timeout = db_config.idle_timeout
-  @size = db_config.pool
-
-  # This variable tracks the cache of threads mapped to reserved connections, with the
-  # sole purpose of speeding up the +connection+ method. It is not the authoritative
-  # registry of which thread owns which connection. Connection ownership is tracked by
-  # the +connection.owner+ attr on each +connection+ instance.
-  # The invariant works like this: if there is mapping of <tt>thread => conn</tt>,
-  # then that +thread+ does indeed own that +conn+. However, an absence of such
-  # mapping does not mean that the +thread+ doesn't own the said connection. In
-  # that case +conn.owner+ attr should be consulted.
-  # Access and modification of <tt>@thread_cached_conns</tt> does not require
-  # synchronization.
-  @thread_cached_conns = Concurrent::Map.new(initial_capacity: @size)
-
-  @connections         = []
-  @automatic_reconnect = true
-
-  # Connection pool allows for concurrent (outside the main +synchronize+ section)
-  # establishment of new connections. This variable tracks the number of threads
-  # currently in the process of independently establishing connections to the DB.
-  @now_connecting = 0
-
-  @threads_blocking_new_connections = 0
-
-  @available = ConnectionLeasingQueue.new self
-
-  @lock_thread = false
-
-  @async_executor = build_async_executor
-
-  @reaper = Reaper.new(self, db_config.reaping_frequency)
-  @reaper.run
-end
-
-
- - + See on GitHub + + + + @@ -390,22 +390,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 198
+      def active_connection?
+        @thread_cached_conns[connection_cache_key(current_thread)]
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 198
-def active_connection?
-  @thread_cached_conns[connection_cache_key(current_thread)]
-end
-
-
- - + See on GitHub + + + +

@@ -427,33 +427,33 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 365
+      def checkin(conn)
+        conn.lock.synchronize do
+          synchronize do
+            remove_connection_from_thread_cache conn
+
+            conn._run_checkin_callbacks do
+              conn.expire
+            end
+
+            conn.lock_thread = nil
+            @available.add conn
+          end
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 365
-def checkin(conn)
-  conn.lock.synchronize do
-    synchronize do
-      remove_connection_from_thread_cache conn
-
-      conn._run_checkin_callbacks do
-        conn.expire
-      end
-
-      conn.lock_thread = nil
-      @available.add conn
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -484,24 +484,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 354
+      def checkout(checkout_timeout = @checkout_timeout)
+        connection = checkout_and_verify(acquire_connection(checkout_timeout))
+        connection.lock_thread = @lock_thread
+        connection
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 354
-def checkout(checkout_timeout = @checkout_timeout)
-  connection = checkout_and_verify(acquire_connection(checkout_timeout))
-  connection.lock_thread = @lock_thread
-  connection
-end
-
-
- -

+ See on GitHub + + + +

@@ -526,34 +526,34 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 312
+      def clear_reloadable_connections(raise_on_acquisition_timeout = true)
+        with_exclusively_acquired_all_connections(raise_on_acquisition_timeout) do
+          synchronize do
+            @connections.each do |conn|
+              if conn.in_use?
+                conn.steal!
+                checkin conn
+              end
+              conn.disconnect! if conn.requires_reloading?
+            end
+            @connections.delete_if(&:requires_reloading?)
+            @available.clear
+          end
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 312
-def clear_reloadable_connections(raise_on_acquisition_timeout = true)
-  with_exclusively_acquired_all_connections(raise_on_acquisition_timeout) do
-    synchronize do
-      @connections.each do |conn|
-        if conn.in_use?
-          conn.steal!
-          checkin conn
-        end
-        conn.disconnect! if conn.requires_reloading?
-      end
-      @connections.delete_if(&:requires_reloading?)
-      @available.clear
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -575,22 +575,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 336
+      def clear_reloadable_connections!
+        clear_reloadable_connections(false)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 336
-def clear_reloadable_connections!
-  clear_reloadable_connections(false)
-end
-
-
- -

+ See on GitHub + + + +

@@ -610,22 +610,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 235
+      def connected?
+        synchronize { @connections.any? }
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 235
-def connected?
-  synchronize { @connections.any? }
-end
-
-
- -

+ See on GitHub + + + +

@@ -647,22 +647,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 183
+      def connection
+        @thread_cached_conns[connection_cache_key(current_thread)] ||= checkout
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 183
-def connection
-  @thread_cached_conns[connection_cache_key(current_thread)] ||= checkout
-end
-
-
- -

+ See on GitHub + + + +

@@ -686,22 +686,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 250
+      def connections
+        synchronize { @connections.dup }
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 250
-def connections
-  synchronize { @connections.dup }
-end
-
-
- -

+ See on GitHub + + + +

@@ -726,34 +726,34 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 260
+      def disconnect(raise_on_acquisition_timeout = true)
+        with_exclusively_acquired_all_connections(raise_on_acquisition_timeout) do
+          synchronize do
+            @connections.each do |conn|
+              if conn.in_use?
+                conn.steal!
+                checkin conn
+              end
+              conn.disconnect!
+            end
+            @connections = []
+            @available.clear
+          end
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 260
-def disconnect(raise_on_acquisition_timeout = true)
-  with_exclusively_acquired_all_connections(raise_on_acquisition_timeout) do
-    synchronize do
-      @connections.each do |conn|
-        if conn.in_use?
-          conn.steal!
-          checkin conn
-        end
-        conn.disconnect!
-      end
-      @connections = []
-      @available.clear
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -775,22 +775,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 282
+      def disconnect!
+        disconnect(false)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 282
-def disconnect!
-  disconnect(false)
-end
-
-
- -

+ See on GitHub + + + +

@@ -810,38 +810,38 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 437
+      def flush(minimum_idle = @idle_timeout)
+        return if minimum_idle.nil?
+
+        idle_connections = synchronize do
+          return if self.discarded?
+          @connections.select do |conn|
+            !conn.in_use? && conn.seconds_idle >= minimum_idle
+          end.each do |conn|
+            conn.lease
+
+            @available.delete conn
+            @connections.delete conn
+          end
+        end
+
+        idle_connections.each do |conn|
+          conn.disconnect!
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 437
-def flush(minimum_idle = @idle_timeout)
-  return if minimum_idle.nil?
-
-  idle_connections = synchronize do
-    return if self.discarded?
-    @connections.select do |conn|
-      !conn.in_use? && conn.seconds_idle >= minimum_idle
-    end.each do |conn|
-      conn.lease
-
-      @available.delete conn
-      @connections.delete conn
-    end
-  end
-
-  idle_connections.each do |conn|
-    conn.disconnect!
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -861,23 +861,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 459
+      def flush!
+        reap
+        flush(-1)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 459
-def flush!
-  reap
-  flush(-1)
-end
-
-
- -

+ See on GitHub + + + +

@@ -897,30 +897,30 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 166
+      def lock_thread=(lock_thread)
+        if lock_thread
+          @lock_thread = ActiveSupport::IsolatedExecutionState.context
+        else
+          @lock_thread = nil
+        end
+
+        if (active_connection = @thread_cached_conns[connection_cache_key(current_thread)])
+          active_connection.lock_thread = @lock_thread
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 166
-def lock_thread=(lock_thread)
-  if lock_thread
-    @lock_thread = ActiveSupport::IsolatedExecutionState.context
-  else
-    @lock_thread = nil
-  end
-
-  if (active_connection = @thread_cached_conns[connection_cache_key(current_thread)])
-    active_connection.lock_thread = @lock_thread
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -940,38 +940,38 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 414
+      def reap
+        stale_connections = synchronize do
+          return if self.discarded?
+          @connections.select do |conn|
+            conn.in_use? && !conn.owner.alive?
+          end.each do |conn|
+            conn.steal!
+          end
+        end
+
+        stale_connections.each do |conn|
+          if conn.active?
+            conn.reset!
+            checkin conn
+          else
+            remove conn
+          end
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 414
-def reap
-  stale_connections = synchronize do
-    return if self.discarded?
-    @connections.select do |conn|
-      conn.in_use? && !conn.owner.alive?
-    end.each do |conn|
-      conn.steal!
-    end
-  end
-
-  stale_connections.each do |conn|
-    if conn.active?
-      conn.reset!
-      checkin conn
-    else
-      remove conn
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -993,24 +993,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 209
+      def release_connection(owner_thread = ActiveSupport::IsolatedExecutionState.context)
+        if conn = @thread_cached_conns.delete(connection_cache_key(owner_thread))
+          checkin conn
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 209
-def release_connection(owner_thread = ActiveSupport::IsolatedExecutionState.context)
-  if conn = @thread_cached_conns.delete(connection_cache_key(owner_thread))
-    checkin conn
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1030,47 +1030,47 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 382
+      def remove(conn)
+        needs_new_connection = false
+
+        synchronize do
+          remove_connection_from_thread_cache conn
+
+          @connections.delete conn
+          @available.delete conn
+
+          # @available.any_waiting? => true means that prior to removing this
+          # conn, the pool was at its max size (@connections.size == @size).
+          # This would mean that any threads stuck waiting in the queue wouldn't
+          # know they could checkout_new_connection, so let's do it for them.
+          # Because condition-wait loop is encapsulated in the Queue class
+          # (that in turn is oblivious to ConnectionPool implementation), threads
+          # that are "stuck" there are helpless. They have no way of creating
+          # new connections and are completely reliant on us feeding available
+          # connections into the Queue.
+          needs_new_connection = @available.any_waiting?
+        end
+
+        # This is intentionally done outside of the synchronized section as we
+        # would like not to hold the main mutex while checking out new connections.
+        # Thus there is some chance that needs_new_connection information is now
+        # stale, we can live with that (bulk_make_new_connections will make
+        # sure not to exceed the pool's @size limit).
+        bulk_make_new_connections(1) if needs_new_connection
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 382
-def remove(conn)
-  needs_new_connection = false
-
-  synchronize do
-    remove_connection_from_thread_cache conn
-
-    @connections.delete conn
-    @available.delete conn
-
-    # @available.any_waiting? => true means that prior to removing this
-    # conn, the pool was at its max size (@connections.size == @size).
-    # This would mean that any threads stuck waiting in the queue wouldn't
-    # know they could checkout_new_connection, so let's do it for them.
-    # Because condition-wait loop is encapsulated in the Queue class
-    # (that in turn is oblivious to ConnectionPool implementation), threads
-    # that are "stuck" there are helpless. They have no way of creating
-    # new connections and are completely reliant on us feeding available
-    # connections into the Queue.
-    needs_new_connection = @available.any_waiting?
-  end
-
-  # This is intentionally done outside of the synchronized section as we
-  # would like not to hold the main mutex while checking out new connections.
-  # Thus there is some chance that needs_new_connection information is now
-  # stale, we can live with that (bulk_make_new_connections will make
-  # sure not to exceed the pool's @size limit).
-  bulk_make_new_connections(1) if needs_new_connection
-end
-
-
- -

+ See on GitHub + + + +

@@ -1093,32 +1093,32 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 472
+      def stat
+        synchronize do
+          {
+            size: size,
+            connections: @connections.size,
+            busy: @connections.count { |c| c.in_use? && c.owner.alive? },
+            dead: @connections.count { |c| c.in_use? && !c.owner.alive? },
+            idle: @connections.count { |c| !c.in_use? },
+            waiting: num_waiting_in_queue,
+            checkout_timeout: checkout_timeout
+          }
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 472
-def stat
-  synchronize do
-    {
-      size: size,
-      connections: @connections.size,
-      busy: @connections.count { |c| c.in_use? && c.owner.alive? },
-      dead: @connections.count { |c| c.in_use? && !c.owner.alive? },
-      idle: @connections.count { |c| !c.in_use? },
-      waiting: num_waiting_in_queue,
-      checkout_timeout: checkout_timeout
-    }
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1138,28 +1138,28 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 224
+      def with_connection
+        unless conn = @thread_cached_conns[connection_cache_key(ActiveSupport::IsolatedExecutionState.context)]
+          conn = connection
+          fresh_connection = true
+        end
+        yield conn
+      ensure
+        release_connection if fresh_connection
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 224
-def with_connection
-  unless conn = @thread_cached_conns[connection_cache_key(ActiveSupport::IsolatedExecutionState.context)]
-    conn = connection
-    fresh_connection = true
-  end
-  yield conn
-ensure
-  release_connection if fresh_connection
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/ConnectionPool/Queue.html b/src/classes/ActiveRecord/ConnectionAdapters/ConnectionPool/Queue.html index c0b542f1d0..634409aede 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/ConnectionPool/Queue.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/ConnectionPool/Queue.html @@ -112,25 +112,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb, line 14
+        def initialize(lock = Monitor.new)
+          @lock = lock
+          @cond = @lock.new_cond
+          @num_waiting = 0
+          @queue = []
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb, line 14
-def initialize(lock = Monitor.new)
-  @lock = lock
-  @cond = @lock.new_cond
-  @num_waiting = 0
-  @queue = []
-end
-
-
- - + See on GitHub + + + + @@ -154,25 +154,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb, line 37
+        def add(element)
+          synchronize do
+            @queue.push element
+            @cond.signal
+          end
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb, line 37
-def add(element)
-  synchronize do
-    @queue.push element
-    @cond.signal
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -192,24 +192,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb, line 22
+        def any_waiting?
+          synchronize do
+            @num_waiting > 0
+          end
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb, line 22
-def any_waiting?
-  synchronize do
-    @num_waiting > 0
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -229,24 +229,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb, line 52
+        def clear
+          synchronize do
+            @queue.clear
+          end
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb, line 52
-def clear
-  synchronize do
-    @queue.clear
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -266,24 +266,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb, line 45
+        def delete(element)
+          synchronize do
+            @queue.delete(element)
+          end
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb, line 45
-def delete(element)
-  synchronize do
-    @queue.delete(element)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -303,24 +303,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb, line 30
+        def num_waiting
+          synchronize do
+            @num_waiting
+          end
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb, line 30
-def num_waiting
-  synchronize do
-    @num_waiting
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -351,22 +351,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb, line 72
+        def poll(timeout = nil)
+          synchronize { internal_poll(timeout) }
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb, line 72
-def poll(timeout = nil)
-  synchronize { internal_poll(timeout) }
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/ConnectionPool/Reaper.html b/src/classes/ActiveRecord/ConnectionAdapters/ConnectionPool/Reaper.html index 882c65a258..ebc1e03ba8 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/ConnectionPool/Reaper.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/ConnectionPool/Reaper.html @@ -116,23 +116,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb, line 20
+        def initialize(pool, frequency)
+          @pool      = pool
+          @frequency = frequency
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb, line 20
-def initialize(pool, frequency)
-  @pool      = pool
-  @frequency = frequency
-end
-
-
- - + See on GitHub + + + + @@ -156,23 +156,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb, line 71
+        def run
+          return unless frequency && frequency > 0
+          self.class.register_pool(pool, frequency)
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb, line 71
-def run
-  return unless frequency && frequency > 0
-  self.class.register_pool(pool, frequency)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/DatabaseLimits.html b/src/classes/ActiveRecord/ConnectionAdapters/DatabaseLimits.html index ea68bdcb9c..495e750952 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/DatabaseLimits.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/DatabaseLimits.html @@ -83,22 +83,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb, line 21
+      def index_name_length
+        max_identifier_length
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb, line 21
-def index_name_length
-  max_identifier_length
-end
-
-
- - + See on GitHub + + + +

@@ -118,22 +118,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb, line 16
+      def table_alias_length
+        max_identifier_length
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb, line 16
-def table_alias_length
-  max_identifier_length
-end
-
-
- -

+ See on GitHub + + + +

@@ -153,22 +153,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb, line 11
+      def table_name_length
+        max_identifier_length
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb, line 11
-def table_name_length
-  max_identifier_length
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/DatabaseStatements.html b/src/classes/ActiveRecord/ConnectionAdapters/DatabaseStatements.html index 4ece95dce7..1088a1d528 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/DatabaseStatements.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/DatabaseStatements.html @@ -210,23 +210,23 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 6
-def initialize
-  super
-  reset_transaction
-end
-
-
- - + +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 6
+      def initialize
+        super
+        reset_transaction
+      end
+ + See on GitHub + +
+ + @@ -250,22 +250,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 388
+      def add_transaction_record(record, ensure_finalize = true)
+        current_transaction.add_record(record, ensure_finalize)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 388
-def add_transaction_record(record, ensure_finalize = true)
-  current_transaction.add_record(record, ensure_finalize)
-end
-
-
- - + See on GitHub + + + +

@@ -285,20 +285,20 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 393
+      def begin_db_transaction()    end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 393
-def begin_db_transaction()    end
-
-
- -

+ See on GitHub + + + +

@@ -318,22 +318,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 407
+      def begin_isolated_db_transaction(isolation)
+        raise ActiveRecord::TransactionIsolationError, "adapter does not support setting transaction isolation"
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 407
-def begin_isolated_db_transaction(isolation)
-  raise ActiveRecord::TransactionIsolationError, "adapter does not support setting transaction isolation"
-end
-
-
- -

+ See on GitHub + + + +

@@ -353,20 +353,20 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 412
+      def commit_db_transaction()   end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 412
-def commit_db_transaction()   end
-
-
- -

+ See on GitHub + + + +

@@ -390,7 +390,8 @@

-

+ +

@@ -410,22 +411,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 434
+      def default_sequence_name(table, column)
+        nil
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 434
-def default_sequence_name(table, column)
-  nil
-end
-
-
- -

+ See on GitHub + + + +

@@ -445,23 +446,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 204
+      def delete(arel, name = nil, binds = [])
+        sql, binds = to_sql_and_binds(arel, binds)
+        exec_delete(sql, name, binds)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 204
-def delete(arel, name = nil, binds = [])
-  sql, binds = to_sql_and_binds(arel, binds)
-  exec_delete(sql, name, binds)
-end
-
-
- -

+ See on GitHub + + + +

@@ -481,22 +482,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 466
+      def empty_insert_statement_value(primary_key = nil)
+        "DEFAULT VALUES"
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 466
-def empty_insert_statement_value(primary_key = nil)
-  "DEFAULT VALUES"
-end
-
-
- -

+ See on GitHub + + + +

@@ -516,22 +517,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 159
+      def exec_delete(sql, name = nil, binds = [])
+        internal_exec_query(sql, name, binds)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 159
-def exec_delete(sql, name = nil, binds = [])
-  internal_exec_query(sql, name, binds)
-end
-
-
- -

+ See on GitHub + + + +

@@ -551,23 +552,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 151
+      def exec_insert(sql, name = nil, binds = [], pk = nil, sequence_name = nil, returning: nil)
+        sql, binds = sql_for_insert(sql, pk, binds, returning)
+        internal_exec_query(sql, name, binds)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 151
-def exec_insert(sql, name = nil, binds = [], pk = nil, sequence_name = nil, returning: nil)
-  sql, binds = sql_for_insert(sql, pk, binds, returning)
-  internal_exec_query(sql, name, binds)
-end
-
-
- -

+ See on GitHub + + + +

@@ -589,22 +590,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 141
+      def exec_query(sql, name = "SQL", binds = [], prepare: false)
+        internal_exec_query(sql, name, binds, prepare: prepare)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 141
-def exec_query(sql, name = "SQL", binds = [], prepare: false)
-  internal_exec_query(sql, name, binds, prepare: prepare)
-end
-
-
- -

+ See on GitHub + + + +

@@ -624,22 +625,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 166
+      def exec_update(sql, name = nil, binds = [])
+        internal_exec_query(sql, name, binds)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 166
-def exec_update(sql, name = nil, binds = [])
-  internal_exec_query(sql, name, binds)
-end
-
-
- -

+ See on GitHub + + + +

@@ -665,22 +666,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 130
+      def execute(sql, name = nil, allow_retry: false)
+        internal_execute(sql, name, allow_retry: allow_retry)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 130
-def execute(sql, name = nil, allow_retry: false)
-  internal_execute(sql, name, allow_retry: allow_retry)
-end
-
-
- -

+ See on GitHub + + + +

@@ -702,22 +703,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 504
+      def high_precision_current_timestamp
+        HIGH_PRECISION_CURRENT_TIMESTAMP
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 504
-def high_precision_current_timestamp
-  HIGH_PRECISION_CURRENT_TIMESTAMP
-end
-
-
- -

+ See on GitHub + + + +

@@ -745,25 +746,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 189
+      def insert(arel, name = nil, pk = nil, id_value = nil, sequence_name = nil, binds = [], returning: nil)
+        sql, binds = to_sql_and_binds(arel, binds)
+        value = exec_insert(sql, name, binds, pk, sequence_name, returning: returning)
+        return id_value if id_value
+        returning.nil? ? last_inserted_id(value) : returning_column_values(value)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 189
-def insert(arel, name = nil, pk = nil, id_value = nil, sequence_name = nil, binds = [], returning: nil)
-  sql, binds = to_sql_and_binds(arel, binds)
-  value = exec_insert(sql, name, binds, pk, sequence_name, returning: returning)
-  return id_value if id_value
-  returning.nil? ? last_inserted_id(value) : returning_column_values(value)
-end
-
-
- -

+ See on GitHub + + + +

@@ -783,22 +784,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 448
+      def insert_fixture(fixture, table_name)
+        execute(build_fixture_sql(Array.wrap(fixture), table_name), "Fixture Insert")
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 448
-def insert_fixture(fixture, table_name)
-  execute(build_fixture_sql(Array.wrap(fixture), table_name), "Fixture Insert")
-end
-
-
- -

+ See on GitHub + + + +

@@ -818,32 +819,32 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 452
-def insert_fixtures_set(fixture_set, tables_to_delete = [])
-  fixture_inserts = build_fixture_statements(fixture_set)
-  table_deletes = tables_to_delete.map { |table| "DELETE FROM #{quote_table_name(table)}" }
-  statements = table_deletes + fixture_inserts
+          
+            
+ + Source code + - with_multi_statements do - disable_referential_integrity do - transaction(requires_new: true) do - execute_batch(statements, "Fixtures Load") - end - end - end -end
-
-
- -

+
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 452
+      def insert_fixtures_set(fixture_set, tables_to_delete = [])
+        fixture_inserts = build_fixture_statements(fixture_set)
+        table_deletes = tables_to_delete.map { |table| "DELETE FROM #{quote_table_name(table)}" }
+        statements = table_deletes + fixture_inserts
+
+        with_multi_statements do
+          disable_referential_integrity do
+            transaction(requires_new: true) do
+              execute_batch(statements, "Fixtures Load")
+            end
+          end
+        end
+      end
+ + See on GitHub + + + +

@@ -863,22 +864,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 439
+      def reset_sequence!(table, column, sequence = nil)
+        # Do nothing by default. Implement for PostgreSQL, Oracle, ...
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 439
-def reset_sequence!(table, column, sequence = nil)
-  # Do nothing by default. Implement for PostgreSQL, Oracle, ...
-end
-
-
- -

+ See on GitHub + + + +

@@ -898,22 +899,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 424
+      def restart_db_transaction
+        exec_restart_db_transaction
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 424
-def restart_db_transaction
-  exec_restart_db_transaction
-end
-
-
- -

+ See on GitHub + + + +

@@ -933,24 +934,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 416
+      def rollback_db_transaction
+        exec_rollback_db_transaction
+      rescue ActiveRecord::ConnectionNotEstablished, ActiveRecord::ConnectionFailed
+        # Connection's gone; that counts as a rollback
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 416
-def rollback_db_transaction
-  exec_rollback_db_transaction
-rescue ActiveRecord::ConnectionNotEstablished, ActiveRecord::ConnectionFailed
-  # Connection's gone; that counts as a rollback
-end
-
-
- -

+ See on GitHub + + + +

@@ -970,22 +971,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 430
+      def rollback_to_savepoint(name = nil)
+        exec_rollback_to_savepoint(name)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 430
-def rollback_to_savepoint(name = nil)
-  exec_rollback_to_savepoint(name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1009,26 +1010,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 476
+      def sanitize_limit(limit)
+        if limit.is_a?(Integer) || limit.is_a?(Arel::Nodes::SqlLiteral)
+          limit
+        else
+          Integer(limit)
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 476
-def sanitize_limit(limit)
-  if limit.is_a?(Integer) || limit.is_a?(Arel::Nodes::SqlLiteral)
-    limit
-  else
-    Integer(limit)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1048,27 +1049,27 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 67
-def select_all(arel, name = nil, binds = [], preparable: nil, async: false)
-  arel = arel_from_relation(arel)
-  sql, binds, preparable = to_sql_and_binds(arel, binds, preparable)
+          
+            
+ + Source code + - select(sql, name, binds, prepare: prepared_statements && preparable, async: async && FutureResult::SelectAll) -rescue ::RangeError - ActiveRecord::Result.empty(async: async) -end
-
-
- -

+
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 67
+      def select_all(arel, name = nil, binds = [], preparable: nil, async: false)
+        arel = arel_from_relation(arel)
+        sql, binds, preparable = to_sql_and_binds(arel, binds, preparable)
+
+        select(sql, name, binds, prepare: prepared_statements && preparable, async: async && FutureResult::SelectAll)
+      rescue ::RangeError
+        ActiveRecord::Result.empty(async: async)
+      end
+ + See on GitHub + + + +

@@ -1088,22 +1089,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 78
+      def select_one(arel, name = nil, binds = [], async: false)
+        select_all(arel, name, binds, async: async).then(&:first)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 78
-def select_one(arel, name = nil, binds = [], async: false)
-  select_all(arel, name, binds, async: async).then(&:first)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1123,22 +1124,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 95
+      def select_rows(arel, name = nil, binds = [], async: false)
+        select_all(arel, name, binds, async: async).then(&:rows)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 95
-def select_rows(arel, name = nil, binds = [], async: false)
-  select_all(arel, name, binds, async: async).then(&:rows)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1158,22 +1159,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 83
+      def select_value(arel, name = nil, binds = [], async: false)
+        select_rows(arel, name, binds, async: async).then { |rows| single_value_from_rows(rows) }
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 83
-def select_value(arel, name = nil, binds = [], async: false)
-  select_rows(arel, name, binds, async: async).then { |rows| single_value_from_rows(rows) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -1196,22 +1197,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 89
+      def select_values(arel, name = nil, binds = [])
+        select_rows(arel, name, binds).map(&:first)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 89
-def select_values(arel, name = nil, binds = [])
-  select_rows(arel, name, binds).map(&:first)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1231,23 +1232,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 12
+      def to_sql(arel_or_sql_string, binds = [])
+        sql, _ = to_sql_and_binds(arel_or_sql_string, binds)
+        sql
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 12
-def to_sql(arel_or_sql_string, binds = [])
-  sql, _ = to_sql_and_binds(arel_or_sql_string, binds)
-  sql
-end
-
-
- -

+ See on GitHub + + + +

@@ -1360,31 +1361,31 @@

Transaction isolation< - -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 335
+      def transaction(requires_new: nil, isolation: nil, joinable: true, &block)
+        if !requires_new && current_transaction.joinable?
+          if isolation
+            raise ActiveRecord::TransactionIsolationError, "cannot set isolation when joining a transaction"
+          end
+          yield
+        else
+          transaction_manager.within_new_transaction(isolation: isolation, joinable: joinable, &block)
+        end
+      rescue ActiveRecord::Rollback
+        # rollbacks are silently swallowed
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 335
-def transaction(requires_new: nil, isolation: nil, joinable: true, &block)
-  if !requires_new && current_transaction.joinable?
-    if isolation
-      raise ActiveRecord::TransactionIsolationError, "cannot set isolation when joining a transaction"
-    end
-    yield
-  else
-    transaction_manager.within_new_transaction(isolation: isolation, joinable: joinable, &block)
-  end
-rescue ActiveRecord::Rollback
-  # rollbacks are silently swallowed
-end
-
-
- -

+ See on GitHub + + + +

@@ -1404,27 +1405,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 395
+      def transaction_isolation_levels
+        {
+          read_uncommitted: "READ UNCOMMITTED",
+          read_committed:   "READ COMMITTED",
+          repeatable_read:  "REPEATABLE READ",
+          serializable:     "SERIALIZABLE"
+        }
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 395
-def transaction_isolation_levels
-  {
-    read_uncommitted: "READ UNCOMMITTED",
-    read_committed:   "READ COMMITTED",
-    repeatable_read:  "REPEATABLE READ",
-    serializable:     "SERIALIZABLE"
-  }
-end
-
-
- -

+ See on GitHub + + + +

@@ -1444,22 +1445,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 362
+      def transaction_open?
+        current_transaction.open?
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 362
-def transaction_open?
-  current_transaction.open?
-end
-
-
- -

+ See on GitHub + + + +

@@ -1479,22 +1480,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 210
+      def truncate(table_name, name = nil)
+        execute(build_truncate_statement(table_name), name)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 210
-def truncate(table_name, name = nil)
-  execute(build_truncate_statement(table_name), name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1514,23 +1515,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 198
+      def update(arel, name = nil, binds = [])
+        sql, binds = to_sql_and_binds(arel, binds)
+        exec_update(sql, name, binds)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 198
-def update(arel, name = nil, binds = [])
-  sql, binds = to_sql_and_binds(arel, binds)
-  exec_update(sql, name, binds)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1550,22 +1551,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 112
+      def write_query?(sql)
+        raise NotImplementedError
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 112
-def write_query?(sql)
-  raise NotImplementedError
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/DatabaseStatements/PartialQueryCollector.html b/src/classes/ActiveRecord/ConnectionAdapters/DatabaseStatements/PartialQueryCollector.html deleted file mode 100644 index 870c223b92..0000000000 --- a/src/classes/ActiveRecord/ConnectionAdapters/DatabaseStatements/PartialQueryCollector.html +++ /dev/null @@ -1,231 +0,0 @@ ---- -title: ActiveRecord::ConnectionAdapters::DatabaseStatements::PartialQueryCollector -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - new() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 518
-def initialize
-  @parts = []
-  @binds = []
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - <<(str) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 523
-def <<(str)
-  @parts << str
-  self
-end
-
-
- -
- -
-

- - add_bind(obj) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 528
-def add_bind(obj)
-  @binds << obj
-  @parts << Arel::Nodes::BindParam.new(1)
-  self
-end
-
-
- -
- -
-

- - value() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 534
-def value
-  [@parts, @binds]
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveRecord/ConnectionAdapters/Deduplicable.html b/src/classes/ActiveRecord/ConnectionAdapters/Deduplicable.html index 050d67d90e..7e8e019565 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/Deduplicable.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/Deduplicable.html @@ -96,7 +96,8 @@

- + +

@@ -120,22 +121,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/deduplicable.rb, line 18
+      def deduplicate
+        self.class.registry[self] ||= deduplicated
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/deduplicable.rb, line 18
-def deduplicate
-  self.class.registry[self] ||= deduplicated
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/Deduplicable/ClassMethods.html b/src/classes/ActiveRecord/ConnectionAdapters/Deduplicable/ClassMethods.html index 149fca08ee..d1b7f5ae57 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/Deduplicable/ClassMethods.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/Deduplicable/ClassMethods.html @@ -79,22 +79,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/deduplicable.rb, line 13
+        def new(*, **)
+          super.deduplicate
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/deduplicable.rb, line 13
-def new(*, **)
-  super.deduplicate
-end
-
-
- - + See on GitHub + + + +

@@ -114,22 +114,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/deduplicable.rb, line 9
+        def registry
+          @registry ||= {}
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/deduplicable.rb, line 9
-def registry
-  @registry ||= {}
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/DetermineIfPreparableVisitor.html b/src/classes/ActiveRecord/ConnectionAdapters/DetermineIfPreparableVisitor.html deleted file mode 100644 index d85be9a0b0..0000000000 --- a/src/classes/ActiveRecord/ConnectionAdapters/DetermineIfPreparableVisitor.html +++ /dev/null @@ -1,236 +0,0 @@ ---- -title: ActiveRecord::ConnectionAdapters::DetermineIfPreparableVisitor -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - -

Attributes

- - - - - - - - -
- [RW] - preparable
- - - - - -

Instance Public methods

- -
-

- - accept(object, collector) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/connection_adapters/determine_if_preparable_visitor.rb, line 8
-def accept(object, collector)
-  @preparable = true
-  super
-end
-
-
- -
- -
-

- - visit_Arel_Nodes_In(o, collector) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/connection_adapters/determine_if_preparable_visitor.rb, line 13
-def visit_Arel_Nodes_In(o, collector)
-  @preparable = false
-  super
-end
-
-
- -
- -
-

- - visit_Arel_Nodes_NotIn(o, collector) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/connection_adapters/determine_if_preparable_visitor.rb, line 18
-def visit_Arel_Nodes_NotIn(o, collector)
-  @preparable = false
-  super
-end
-
-
- -
- -
-

- - visit_Arel_Nodes_SqlLiteral(o, collector) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/connection_adapters/determine_if_preparable_visitor.rb, line 23
-def visit_Arel_Nodes_SqlLiteral(o, collector)
-  @preparable = false
-  super
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveRecord/ConnectionAdapters/MySQL/ColumnMethods.html b/src/classes/ActiveRecord/ConnectionAdapters/MySQL/ColumnMethods.html index 1638bae442..3e3946751b 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/MySQL/ColumnMethods.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/MySQL/ColumnMethods.html @@ -115,20 +115,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb, line 10
-        
-
-
- - + + See on GitHub + +

@@ -148,20 +138,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb, line 22
-        
-
-
- -

+ + See on GitHub + +

@@ -181,20 +161,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb, line 34
-        
-
-
- -

+ + See on GitHub + +

@@ -214,20 +184,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb, line 18
-        
-
-
- -

+ + See on GitHub + +

@@ -247,20 +207,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb, line 30
-        
-
-
- -

+ + See on GitHub + +

@@ -280,20 +230,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb, line 14
-        
-
-
- -

+ + See on GitHub + +

@@ -313,20 +253,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb, line 26
-        
-
-
- -

+ + See on GitHub + +

@@ -346,20 +276,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb, line 42
-        
-
-
- -

+ + See on GitHub + +

@@ -379,24 +299,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb, line 53
+        included do
+          define_column_methods :blob, :tinyblob, :mediumblob, :longblob,
+            :tinytext, :mediumtext, :longtext, :unsigned_integer, :unsigned_bigint,
+            :unsigned_float, :unsigned_decimal
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb, line 53
-included do
-  define_column_methods :blob, :tinyblob, :mediumblob, :longblob,
-    :tinytext, :mediumtext, :longtext, :unsigned_integer, :unsigned_bigint,
-    :unsigned_float, :unsigned_decimal
-end
-
-
- -

+ See on GitHub + + + +

@@ -416,20 +336,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb, line 46
-        
-
-
- -

+ + See on GitHub + +

@@ -449,20 +359,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb, line 38
-        
-
-
- -

+ + See on GitHub + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/MySQL/DatabaseStatements.html b/src/classes/ActiveRecord/ConnectionAdapters/MySQL/DatabaseStatements.html index d43cc15221..84b54fea6b 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/MySQL/DatabaseStatements.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/MySQL/DatabaseStatements.html @@ -83,30 +83,30 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/mysql/database_statements.rb, line 36
+        def build_explain_clause(options = [])
+          return "EXPLAIN" if options.empty?
+
+          explain_clause = "EXPLAIN #{options.join(" ").upcase}"
+
+          if analyze_without_explain? && explain_clause.include?("ANALYZE")
+            explain_clause.sub("EXPLAIN ", "")
+          else
+            explain_clause
+          end
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/mysql/database_statements.rb, line 36
-def build_explain_clause(options = [])
-  return "EXPLAIN" if options.empty?
-
-  explain_clause = "EXPLAIN #{options.join(" ").upcase}"
-
-  if analyze_without_explain? && explain_clause.include?("ANALYZE")
-    explain_clause.sub("EXPLAIN ", "")
-  else
-    explain_clause
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -126,27 +126,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/mysql/database_statements.rb, line 27
+        def explain(arel, binds = [], options = [])
+          sql     = build_explain_clause(options) + " " + to_sql(arel, binds)
+          start   = Process.clock_gettime(Process::CLOCK_MONOTONIC)
+          result  = internal_exec_query(sql, "EXPLAIN", binds)
+          elapsed = Process.clock_gettime(Process::CLOCK_MONOTONIC) - start
+
+          MySQL::ExplainPrettyPrinter.new.pp(result, elapsed)
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/mysql/database_statements.rb, line 27
-def explain(arel, binds = [], options = [])
-  sql     = build_explain_clause(options) + " " + to_sql(arel, binds)
-  start   = Process.clock_gettime(Process::CLOCK_MONOTONIC)
-  result  = internal_exec_query(sql, "EXPLAIN", binds)
-  elapsed = Process.clock_gettime(Process::CLOCK_MONOTONIC) - start
-
-  MySQL::ExplainPrettyPrinter.new.pp(result, elapsed)
-end
-
-
- -

+ See on GitHub + + + +

@@ -166,22 +166,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/mysql/database_statements.rb, line 23
+        def high_precision_current_timestamp
+          HIGH_PRECISION_CURRENT_TIMESTAMP
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/mysql/database_statements.rb, line 23
-def high_precision_current_timestamp
-  HIGH_PRECISION_CURRENT_TIMESTAMP
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/MySQL/TableDefinition.html b/src/classes/ActiveRecord/ConnectionAdapters/MySQL/TableDefinition.html index d846a53c32..13b6115895 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/MySQL/TableDefinition.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/MySQL/TableDefinition.html @@ -122,24 +122,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb, line 66
+        def initialize(conn, name, charset: nil, collation: nil, **)
+          super
+          @charset = charset
+          @collation = collation
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb, line 66
-def initialize(conn, name, charset: nil, collation: nil, **)
-  super
-  @charset = charset
-  @collation = collation
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/Mysql2Adapter.html b/src/classes/ActiveRecord/ConnectionAdapters/Mysql2Adapter.html index 00d2f39a6b..945b42f2ad 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/Mysql2Adapter.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/Mysql2Adapter.html @@ -234,32 +234,32 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 66
-def initialize(...)
-  super
-
-  @config[:flags] ||= 0
-
-  if @config[:flags].kind_of? Array
-    @config[:flags].push "FOUND_ROWS"
-  else
-    @config[:flags] |= ::Mysql2::Client::FOUND_ROWS
-  end
-
-  @connection_parameters ||= @config
-end
-
-
- - + +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 66
+      def initialize(...)
+        super
+
+        @config[:flags] ||= 0
+
+        if @config[:flags].kind_of? Array
+          @config[:flags].push "FOUND_ROWS"
+        else
+          @config[:flags] |= ::Mysql2::Client::FOUND_ROWS
+        end
+
+        @connection_parameters ||= @config
+      end
+ + See on GitHub + +
+ +

@@ -279,33 +279,33 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 35
-def new_client(config)
-  ::Mysql2::Client.new(config)
-rescue ::Mysql2::Error => error
-  case error.error_number
-  when ER_BAD_DB_ERROR
-    raise ActiveRecord::NoDatabaseError.db_error(config[:database])
-  when ER_DBACCESS_DENIED_ERROR, ER_ACCESS_DENIED_ERROR
-    raise ActiveRecord::DatabaseConnectionError.username_error(config[:username])
-  when ER_CONN_HOST_ERROR, ER_UNKNOWN_HOST_ERROR
-    raise ActiveRecord::DatabaseConnectionError.hostname_error(config[:host])
-  else
-    raise ActiveRecord::ConnectionNotEstablished, error.message
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 35
+        def new_client(config)
+          ::Mysql2::Client.new(config)
+        rescue ::Mysql2::Error => error
+          case error.error_number
+          when ER_BAD_DB_ERROR
+            raise ActiveRecord::NoDatabaseError.db_error(config[:database])
+          when ER_DBACCESS_DENIED_ERROR, ER_ACCESS_DENIED_ERROR
+            raise ActiveRecord::DatabaseConnectionError.username_error(config[:username])
+          when ER_CONN_HOST_ERROR, ER_UNKNOWN_HOST_ERROR
+            raise ActiveRecord::DatabaseConnectionError.hostname_error(config[:host])
+          else
+            raise ActiveRecord::ConnectionNotEstablished, error.message
+          end
+        end
+ + See on GitHub + +
+ + @@ -329,22 +329,22 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 133
-def active?
-  !!@raw_connection&.ping
-end
-
-
- - + +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 133
+      def active?
+        !!@raw_connection&.ping
+      end
+ + See on GitHub + +
+ +

@@ -364,24 +364,24 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 141
-def disconnect!
-  super
-  @raw_connection&.close
-  @raw_connection = nil
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 141
+      def disconnect!
+        super
+        @raw_connection&.close
+        @raw_connection = nil
+      end
+ + See on GitHub + +
+ +

@@ -401,22 +401,22 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 114
-def error_number(exception)
-  exception.error_number if exception.respond_to?(:error_number)
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 114
+      def error_number(exception)
+        exception.error_number if exception.respond_to?(:error_number)
+      end
+ + See on GitHub + +
+ +

@@ -436,24 +436,24 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 123
-def quote_string(string)
-  with_raw_connection(allow_retry: true, materialize_transactions: false) do |connection|
-    connection.escape(string)
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 123
+      def quote_string(string)
+        with_raw_connection(allow_retry: true, materialize_transactions: false) do |connection|
+          connection.escape(string)
+        end
+      end
+ + See on GitHub + +
+ +

@@ -473,22 +473,22 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 96
-def savepoint_errors_invalidate_transactions?
-  true
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 96
+      def savepoint_errors_invalidate_transactions?
+        true
+      end
+ + See on GitHub + +
+ +

@@ -508,22 +508,22 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 84
-def supports_comments?
-  true
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 84
+      def supports_comments?
+        true
+      end
+ + See on GitHub + +
+ +

@@ -543,22 +543,22 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 88
-def supports_comments_in_create?
-  true
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 88
+      def supports_comments_in_create?
+        true
+      end
+ + See on GitHub + +
+ +

@@ -578,22 +578,22 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 80
-def supports_json?
-  !mariadb? && database_version >= "5.7.8"
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 80
+      def supports_json?
+        !mariadb? && database_version >= "5.7.8"
+      end
+ + See on GitHub + +
+ +

@@ -613,22 +613,22 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 100
-def supports_lazy_transactions?
-  true
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 100
+      def supports_lazy_transactions?
+        true
+      end
+ + See on GitHub + +
+ +

@@ -648,22 +648,22 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 92
-def supports_savepoints?
-  true
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 92
+      def supports_savepoints?
+        true
+      end
+ + See on GitHub + +
+ + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/AlterTable.html b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/AlterTable.html index b8c81ac802..5c4eba710e 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/AlterTable.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/AlterTable.html @@ -152,27 +152,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 341
+        def initialize(td)
+          super
+          @constraint_validations = []
+          @exclusion_constraint_adds = []
+          @exclusion_constraint_drops = []
+          @unique_constraint_adds = []
+          @unique_constraint_drops = []
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 341
-def initialize(td)
-  super
-  @constraint_validations = []
-  @exclusion_constraint_adds = []
-  @exclusion_constraint_drops = []
-  @unique_constraint_adds = []
-  @unique_constraint_drops = []
-end
-
-
- - + See on GitHub + + + + @@ -196,22 +196,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 354
+        def add_exclusion_constraint(expression, options)
+          @exclusion_constraint_adds << @td.new_exclusion_constraint_definition(expression, options)
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 354
-def add_exclusion_constraint(expression, options)
-  @exclusion_constraint_adds << @td.new_exclusion_constraint_definition(expression, options)
-end
-
-
- - + See on GitHub + + + +

@@ -231,22 +231,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 362
+        def add_unique_constraint(column_name, options)
+          @unique_constraint_adds << @td.new_unique_constraint_definition(column_name, options)
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 362
-def add_unique_constraint(column_name, options)
-  @unique_constraint_adds << @td.new_unique_constraint_definition(column_name, options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -266,22 +266,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 358
+        def drop_exclusion_constraint(constraint_name)
+          @exclusion_constraint_drops << constraint_name
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 358
-def drop_exclusion_constraint(constraint_name)
-  @exclusion_constraint_drops << constraint_name
-end
-
-
- -

+ See on GitHub + + + +

@@ -301,22 +301,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 366
+        def drop_unique_constraint(unique_constraint_name)
+          @unique_constraint_drops << unique_constraint_name
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 366
-def drop_unique_constraint(unique_constraint_name)
-  @unique_constraint_drops << unique_constraint_name
-end
-
-
- -

+ See on GitHub + + + +

@@ -336,22 +336,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 350
+        def validate_constraint(name)
+          @constraint_validations << name
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 350
-def validate_constraint(name)
-  @constraint_validations << name
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/ColumnMethods.html b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/ColumnMethods.html index caa64e89ba..0eb2f6c455 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/ColumnMethods.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/ColumnMethods.html @@ -203,20 +203,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 57
-        
-
-
- - + + See on GitHub + +

@@ -236,20 +226,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 61
-        
-
-
- -

+ + See on GitHub + +

@@ -269,20 +249,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 65
-        
-
-
- -

+ + See on GitHub + +

@@ -302,20 +272,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 137
-        
-
-
- -

+ + See on GitHub + +

@@ -335,20 +295,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 69
-        
-
-
- -

+ + See on GitHub + +

@@ -368,20 +318,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 149
-        
-
-
- -

+ + See on GitHub + +

@@ -401,20 +341,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 73
-        
-
-
- -

+ + See on GitHub + +

@@ -434,20 +364,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 77
-        
-
-
- -

+ + See on GitHub + +

@@ -467,25 +387,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 184
+        included do
+          define_column_methods :bigserial, :bit, :bit_varying, :cidr, :citext, :daterange,
+            :hstore, :inet, :interval, :int4range, :int8range, :jsonb, :ltree, :macaddr,
+            :money, :numrange, :oid, :point, :line, :lseg, :box, :path, :polygon, :circle,
+            :serial, :tsrange, :tstzrange, :tsvector, :uuid, :xml, :timestamptz, :enum
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 184
-included do
-  define_column_methods :bigserial, :bit, :bit_varying, :cidr, :citext, :daterange,
-    :hstore, :inet, :interval, :int4range, :int8range, :jsonb, :ltree, :macaddr,
-    :money, :numrange, :oid, :point, :line, :lseg, :box, :path, :polygon, :circle,
-    :serial, :tsrange, :tstzrange, :tsvector, :uuid, :xml, :timestamptz, :enum
-end
-
-
- -

+ See on GitHub + + + +

@@ -505,20 +425,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 81
-        
-
-
- -

+ + See on GitHub + +

@@ -538,20 +448,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 85
-        
-
-
- -

+ + See on GitHub + +

@@ -571,20 +471,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 93
-        
-
-
- -

+ + See on GitHub + +

@@ -604,20 +494,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 97
-        
-
-
- -

+ + See on GitHub + +

@@ -637,20 +517,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 89
-        
-
-
- -

+ + See on GitHub + +

@@ -670,20 +540,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 101
-        
-
-
- -

+ + See on GitHub + +

@@ -703,20 +563,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 129
-        
-
-
- -

+ + See on GitHub + +

@@ -736,20 +586,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 133
-        
-
-
- -

+ + See on GitHub + +

@@ -769,20 +609,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 105
-        
-
-
- -

+ + See on GitHub + +

@@ -802,20 +632,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 109
-        
-
-
- -

+ + See on GitHub + +

@@ -835,20 +655,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 113
-        
-
-
- -

+ + See on GitHub + +

@@ -868,20 +678,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 117
-        
-
-
- -

+ + See on GitHub + +

@@ -901,20 +701,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 121
-        
-
-
- -

+ + See on GitHub + +

@@ -934,20 +724,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 141
-        
-
-
- -

+ + See on GitHub + +

@@ -967,20 +747,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 125
-        
-
-
- -

+ + See on GitHub + +

@@ -1000,20 +770,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 145
-        
-
-
- -

+ + See on GitHub + +

@@ -1063,26 +823,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 48
+        def primary_key(name, type = :primary_key, **options)
+          if type == :uuid
+            options[:default] = options.fetch(:default, "gen_random_uuid()")
+          end
+
+          super
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 48
-def primary_key(name, type = :primary_key, **options)
-  if type == :uuid
-    options[:default] = options.fetch(:default, "gen_random_uuid()")
-  end
-
-  super
-end
-
-
- -

+ See on GitHub + + + +

@@ -1102,20 +862,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 153
-        
-
-
- -

+ + See on GitHub + +

@@ -1135,20 +885,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 177
-        
-
-
- -

+ + See on GitHub + +

@@ -1168,20 +908,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 157
-        
-
-
- -

+ + See on GitHub + +

@@ -1201,20 +931,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 161
-        
-
-
- -

+ + See on GitHub + +

@@ -1234,20 +954,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 165
-        
-
-
- -

+ + See on GitHub + +

@@ -1267,20 +977,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 169
-        
-
-
- -

+ + See on GitHub + +

@@ -1300,20 +1000,10 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 173
-        
-
-
- -

+ + See on GitHub + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/DatabaseStatements.html b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/DatabaseStatements.html index be87177651..03a6a05ff0 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/DatabaseStatements.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/DatabaseStatements.html @@ -87,24 +87,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb, line 129
+        def build_explain_clause(options = [])
+          return "EXPLAIN" if options.empty?
+
+          "EXPLAIN (#{options.join(", ").upcase})"
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb, line 129
-def build_explain_clause(options = [])
-  return "EXPLAIN" if options.empty?
-
-  "EXPLAIN (#{options.join(", ").upcase})"
-end
-
-
- - + See on GitHub + + + +

@@ -124,24 +124,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb, line 7
+        def explain(arel, binds = [], options = [])
+          sql    = build_explain_clause(options) + " " + to_sql(arel, binds)
+          result = internal_exec_query(sql, "EXPLAIN", binds)
+          PostgreSQL::ExplainPrettyPrinter.new.pp(result)
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb, line 7
-def explain(arel, binds = [], options = [])
-  sql    = build_explain_clause(options) + " " + to_sql(arel, binds)
-  result = internal_exec_query(sql, "EXPLAIN", binds)
-  PostgreSQL::ExplainPrettyPrinter.new.pp(result)
-end
-
-
- -

+ See on GitHub + + + +

@@ -161,22 +161,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb, line 125
+        def high_precision_current_timestamp
+          HIGH_PRECISION_CURRENT_TIMESTAMP
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb, line 125
-def high_precision_current_timestamp
-  HIGH_PRECISION_CURRENT_TIMESTAMP
-end
-
-
- -

+ See on GitHub + + + +

@@ -196,28 +196,28 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb, line 50
+        def raw_execute(sql, name, async: false, allow_retry: false, materialize_transactions: true)
+          log(sql, name, async: async) do
+            with_raw_connection(allow_retry: allow_retry, materialize_transactions: materialize_transactions) do |conn|
+              result = conn.async_exec(sql)
+              handle_warnings(result)
+              result
+            end
+          end
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb, line 50
-def raw_execute(sql, name, async: false, allow_retry: false, materialize_transactions: true)
-  log(sql, name, async: async) do
-    with_raw_connection(allow_retry: allow_retry, materialize_transactions: materialize_transactions) do |conn|
-      result = conn.async_exec(sql)
-      handle_warnings(result)
-      result
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/OID/Bit/Data.html b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/OID/Bit/Data.html index fc6b0c4fce..468a20db38 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/OID/Bit/Data.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/OID/Bit/Data.html @@ -92,22 +92,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb, line 30
+            def initialize(value)
+              @value = value
+            end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb, line 30
-def initialize(value)
-  @value = value
-end
-
-
- - + See on GitHub + + + + @@ -131,22 +131,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb, line 38
+            def binary?
+              /\A[01]*\Z/.match?(value)
+            end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb, line 38
-def binary?
-  /\A[01]*\Z/.match?(value)
-end
-
-
- - + See on GitHub + + + +

@@ -166,22 +166,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb, line 42
+            def hex?
+              /\A[0-9A-F]*\Z/i.match?(value)
+            end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb, line 42
-def hex?
-  /\A[0-9A-F]*\Z/i.match?(value)
-end
-
-
- -

+ See on GitHub + + + +

@@ -201,22 +201,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb, line 34
+            def to_s
+              value
+            end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb, line 34
-def to_s
-  value
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/Quoting.html b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/Quoting.html index a7877652e9..ff0f2b2297 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/Quoting.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/Quoting.html @@ -112,19 +112,17 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb, line 28
-        def check_int_in_range(value)
-          if value.to_int > 9223372036854775807 || value.to_int < -9223372036854775808
-            exception = <<~ERROR
-              Provided value outside of the range of a signed 64bit integer.
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb, line 28
+        def check_int_in_range(value)
+          if value.to_int > 9223372036854775807 || value.to_int < -9223372036854775808
+            exception = <<~ERROR
+              Provided value outside of the range of a signed 64bit integer.
 
               PostgreSQL will treat the column type in question as a numeric.
               This may result in a slow sequential scan due to a comparison
@@ -132,14 +130,16 @@ 

To allow for this potentially unwanted behavior, set ActiveRecord.raise_int_wider_than_64bit to false. - ERROR - raise IntegerOutOf64BitRange.new exception - end - end

-
-
- - + ERROR + raise IntegerOutOf64BitRange.new exception + end + end + + See on GitHub + + + +

@@ -159,22 +159,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb, line 156
+        def column_name_matcher
+          COLUMN_NAME
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb, line 156
-def column_name_matcher
-  COLUMN_NAME
-end
-
-
- -

+ See on GitHub + + + +

@@ -194,22 +194,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb, line 160
+        def column_name_with_order_matcher
+          COLUMN_NAME_WITH_ORDER
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb, line 160
-def column_name_with_order_matcher
-  COLUMN_NAME_WITH_ORDER
-end
-
-
- -

+ See on GitHub + + + +

@@ -229,22 +229,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb, line 17
+        def escape_bytea(value)
+          valid_raw_connection.escape_bytea(value) if value
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb, line 17
-def escape_bytea(value)
-  valid_raw_connection.escape_bytea(value) if value
-end
-
-
- -

+ See on GitHub + + + +

@@ -264,22 +264,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb, line 93
+        def quote_schema_name(name)
+          PG::Connection.quote_ident(name)
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb, line 93
-def quote_schema_name(name)
-  PG::Connection.quote_ident(name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -299,22 +299,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb, line 97
+        def quote_table_name_for_assignment(table, attr)
+          quote_column_name(attr)
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb, line 97
-def quote_table_name_for_assignment(table, attr)
-  quote_column_name(attr)
-end
-
-
- -

+ See on GitHub + + + +

@@ -334,22 +334,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb, line 24
+        def unescape_bytea(value)
+          valid_raw_connection.unescape_bytea(value) if value
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb, line 24
-def unescape_bytea(value)
-  valid_raw_connection.unescape_bytea(value) if value
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/Quoting/IntegerOutOf64BitRange.html b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/Quoting/IntegerOutOf64BitRange.html index 93eb6a6133..7c6fa7fd94 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/Quoting/IntegerOutOf64BitRange.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/Quoting/IntegerOutOf64BitRange.html @@ -80,22 +80,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb, line 11
+          def initialize(msg)
+            super(msg)
+          end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb, line 11
-def initialize(msg)
-  super(msg)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/SchemaStatements.html b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/SchemaStatements.html index 9afb61e552..20a3593e8b 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/SchemaStatements.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/SchemaStatements.html @@ -212,26 +212,26 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 686
-def add_exclusion_constraint(table_name, expression, **options)
-  options = exclusion_constraint_options(table_name, expression, options)
-  at = create_alter_table(table_name)
-  at.add_exclusion_constraint(expression, options)
-
-  execute schema_creation.accept(at)
-end
-
-
- - + +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 686
+        def add_exclusion_constraint(table_name, expression, **options)
+          options = exclusion_constraint_options(table_name, expression, options)
+          at = create_alter_table(table_name)
+          at.add_exclusion_constraint(expression, options)
+
+          execute schema_creation.accept(at)
+        end
+ + See on GitHub + +
+ +

@@ -251,32 +251,32 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 517
-        def add_foreign_key(from_table, to_table, **options)
-          if options[:deferrable] == true
-            ActiveRecord.deprecator.warn(<<~MSG)
-              `deferrable: true` is deprecated in favor of `deferrable: :immediate`, and will be removed in Rails 7.2.
-            MSG
+          
+            
+ + Source code + - options[:deferrable] = :immediate - end +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 517
+        def add_foreign_key(from_table, to_table, **options)
+          if options[:deferrable] == true
+            ActiveRecord.deprecator.warn(<<~MSG)
+              `deferrable: true` is deprecated in favor of `deferrable: :immediate`, and will be removed in Rails 7.2.
+            MSG
 
-          assert_valid_deferrable(options[:deferrable])
+            options[:deferrable] = :immediate
+          end
 
-          super
-        end
-
-
- -

+ assert_valid_deferrable(options[:deferrable]) + + super + end + + See on GitHub + + + +

@@ -321,26 +321,26 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 737
-def add_unique_constraint(table_name, column_name = nil, **options)
-  options = unique_constraint_options(table_name, column_name, options)
-  at = create_alter_table(table_name)
-  at.add_unique_constraint(column_name, options)
+          
+            
+ + Source code + - execute schema_creation.accept(at) -end
-
-
- -

+
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 737
+        def add_unique_constraint(table_name, column_name = nil, **options)
+          options = unique_constraint_options(table_name, column_name, options)
+          at = create_alter_table(table_name)
+          at.add_unique_constraint(column_name, options)
+
+          execute schema_creation.accept(at)
+        end
+ + See on GitHub + + + +

@@ -360,22 +360,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 239
+        def client_min_messages
+          query_value("SHOW client_min_messages", "SCHEMA")
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 239
-def client_min_messages
-  query_value("SHOW client_min_messages", "SCHEMA")
-end
-
-
- -

+ See on GitHub + + + +

@@ -395,22 +395,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 244
+        def client_min_messages=(level)
+          internal_execute("SET client_min_messages TO '#{level}'")
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 244
-def client_min_messages=(level)
-  internal_execute("SET client_min_messages TO '#{level}'")
-end
-
-
- -

+ See on GitHub + + + +

@@ -430,22 +430,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 191
+        def collation
+          query_value("SELECT datcollate FROM pg_database WHERE datname = current_database()", "SCHEMA")
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 191
-def collation
-  query_value("SELECT datcollate FROM pg_database WHERE datname = current_database()", "SCHEMA")
-end
-
-
- -

+ See on GitHub + + + +

@@ -471,45 +471,45 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 22
-def create_database(name, options = {})
-  options = { encoding: "utf8" }.merge!(options.symbolize_keys)
+          
+            
+ + Source code + - option_string = options.each_with_object(+"") do |(key, value), memo| - memo << case key - when :owner - " OWNER = \"#{value}\"" - when :template - " TEMPLATE = \"#{value}\"" - when :encoding - " ENCODING = '#{value}'" - when :collation - " LC_COLLATE = '#{value}'" - when :ctype - " LC_CTYPE = '#{value}'" - when :tablespace - " TABLESPACE = \"#{value}\"" - when :connection_limit - " CONNECTION LIMIT = #{value}" - else - "" - end - end +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 22
+        def create_database(name, options = {})
+          options = { encoding: "utf8" }.merge!(options.symbolize_keys)
 
-  execute "CREATE DATABASE #{quote_table_name(name)}#{option_string}"
-end
-
-
- -

+ option_string = options.each_with_object(+"") do |(key, value), memo| + memo << case key + when :owner + " OWNER = \"#{value}\"" + when :template + " TEMPLATE = \"#{value}\"" + when :encoding + " ENCODING = '#{value}'" + when :collation + " LC_COLLATE = '#{value}'" + when :ctype + " LC_CTYPE = '#{value}'" + when :tablespace + " TABLESPACE = \"#{value}\"" + when :connection_limit + " CONNECTION LIMIT = #{value}" + else + "" + end + end + + execute "CREATE DATABASE #{quote_table_name(name)}#{option_string}" + end + + See on GitHub + + + +

@@ -529,22 +529,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 212
+        def create_schema(schema_name)
+          execute "CREATE SCHEMA #{quote_schema_name(schema_name)}"
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 212
-def create_schema(schema_name)
-  execute "CREATE SCHEMA #{quote_schema_name(schema_name)}"
-end
-
-
- -

+ See on GitHub + + + +

@@ -564,22 +564,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 196
+        def ctype
+          query_value("SELECT datctype FROM pg_database WHERE datname = current_database()", "SCHEMA")
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 196
-def ctype
-  query_value("SELECT datctype FROM pg_database WHERE datname = current_database()", "SCHEMA")
-end
-
-
- -

+ See on GitHub + + + +

@@ -599,22 +599,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 176
+        def current_database
+          query_value("SELECT current_database()", "SCHEMA")
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 176
-def current_database
-  query_value("SELECT current_database()", "SCHEMA")
-end
-
-
- -

+ See on GitHub + + + +

@@ -634,22 +634,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 181
+        def current_schema
+          query_value("SELECT current_schema", "SCHEMA")
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 181
-def current_schema
-  query_value("SELECT current_schema", "SCHEMA")
-end
-
-
- -

+ See on GitHub + + + +

@@ -669,22 +669,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 217
+        def drop_schema(schema_name, **options)
+          execute "DROP SCHEMA#{' IF EXISTS' if options[:if_exists]} #{quote_schema_name(schema_name)} CASCADE"
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 217
-def drop_schema(schema_name, **options)
-  execute "DROP SCHEMA#{' IF EXISTS' if options[:if_exists]} #{quote_schema_name(schema_name)} CASCADE"
-end
-
-
- -

+ See on GitHub + + + +

@@ -704,22 +704,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 186
+        def encoding
+          query_value("SELECT pg_encoding_to_char(encoding) FROM pg_database WHERE datname = current_database()", "SCHEMA")
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 186
-def encoding
-  query_value("SELECT pg_encoding_to_char(encoding) FROM pg_database WHERE datname = current_database()", "SCHEMA")
-end
-
-
- -

+ See on GitHub + + + +

@@ -739,50 +739,50 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 610
-        def exclusion_constraints(table_name)
-          scope = quoted_scope(table_name)
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 610
+        def exclusion_constraints(table_name)
+          scope = quoted_scope(table_name)
 
-          exclusion_info = internal_exec_query(<<-SQL, "SCHEMA")
-            SELECT conname, pg_get_constraintdef(c.oid) AS constraintdef, c.condeferrable, c.condeferred
+          exclusion_info = internal_exec_query(<<-SQL, "SCHEMA")
+            SELECT conname, pg_get_constraintdef(c.oid) AS constraintdef, c.condeferrable, c.condeferred
             FROM pg_constraint c
             JOIN pg_class t ON c.conrelid = t.oid
             JOIN pg_namespace n ON n.oid = c.connamespace
-            WHERE c.contype = 'x'
+            WHERE c.contype = 'x'
               AND t.relname = #{scope[:name]}
               AND n.nspname = #{scope[:schema]}
-          SQL
+          SQL
 
-          exclusion_info.map do |row|
-            method_and_elements, predicate = row["constraintdef"].split(" WHERE ")
-            method_and_elements_parts = method_and_elements.match(/EXCLUDE(?: USING (?<using>\S+))? \((?<expression>.+)\)/)
-            predicate.remove!(/ DEFERRABLE(?: INITIALLY (?:IMMEDIATE|DEFERRED))?/) if predicate
-            predicate = predicate.from(2).to(-3) if predicate # strip 2 opening and closing parentheses
+          exclusion_info.map do |row|
+            method_and_elements, predicate = row["constraintdef"].split(" WHERE ")
+            method_and_elements_parts = method_and_elements.match(/EXCLUDE(?: USING (?\S+))? \((?.+)\)/)
+            predicate.remove!(/ DEFERRABLE(?: INITIALLY (?:IMMEDIATE|DEFERRED))?/) if predicate
+            predicate = predicate.from(2).to(-3) if predicate # strip 2 opening and closing parentheses
 
-            deferrable = extract_constraint_deferrable(row["condeferrable"], row["condeferred"])
+            deferrable = extract_constraint_deferrable(row["condeferrable"], row["condeferred"])
 
-            options = {
-              name: row["conname"],
-              using: method_and_elements_parts["using"].to_sym,
-              where: predicate,
-              deferrable: deferrable
+            options = {
+              name: row["conname"],
+              using: method_and_elements_parts["using"].to_sym,
+              where: predicate,
+              deferrable: deferrable
             }
 
-            ExclusionConstraintDefinition.new(table_name, method_and_elements_parts["expression"], options)
-          end
-        end
-
-
- -

+ ExclusionConstraintDefinition.new(table_name, method_and_elements_parts["expression"], options) + end + end + + See on GitHub + + + +

@@ -802,63 +802,63 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 531
-        def foreign_keys(table_name)
-          scope = quoted_scope(table_name)
-          fk_info = internal_exec_query(<<~SQL, "SCHEMA", allow_retry: true, materialize_transactions: false)
-            SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete, c.convalidated AS valid, c.condeferrable AS deferrable, c.condeferred AS deferred, c.conkey, c.confkey, c.conrelid, c.confrelid
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 531
+        def foreign_keys(table_name)
+          scope = quoted_scope(table_name)
+          fk_info = internal_exec_query(<<~SQL, "SCHEMA", allow_retry: true, materialize_transactions: false)
+            SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete, c.convalidated AS valid, c.condeferrable AS deferrable, c.condeferred AS deferred, c.conkey, c.confkey, c.conrelid, c.confrelid
             FROM pg_constraint c
             JOIN pg_class t1 ON c.conrelid = t1.oid
             JOIN pg_class t2 ON c.confrelid = t2.oid
             JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
             JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
             JOIN pg_namespace t3 ON c.connamespace = t3.oid
-            WHERE c.contype = 'f'
+            WHERE c.contype = 'f'
               AND t1.relname = #{scope[:name]}
               AND t3.nspname = #{scope[:schema]}
             ORDER BY c.conname
-          SQL
-
-          fk_info.map do |row|
-            to_table = Utils.unquote_identifier(row["to_table"])
-            conkey = row["conkey"].scan(/\d+/).map(&:to_i)
-            confkey = row["confkey"].scan(/\d+/).map(&:to_i)
-
-            if conkey.size > 1
-              column = column_names_from_column_numbers(row["conrelid"], conkey)
-              primary_key = column_names_from_column_numbers(row["confrelid"], confkey)
-            else
-              column = Utils.unquote_identifier(row["column"])
-              primary_key = row["primary_key"]
-            end
-
-            options = {
-              column: column,
-              name: row["name"],
-              primary_key: primary_key
+          SQL
+
+          fk_info.map do |row|
+            to_table = Utils.unquote_identifier(row["to_table"])
+            conkey = row["conkey"].scan(/\d+/).map(&:to_i)
+            confkey = row["confkey"].scan(/\d+/).map(&:to_i)
+
+            if conkey.size > 1
+              column = column_names_from_column_numbers(row["conrelid"], conkey)
+              primary_key = column_names_from_column_numbers(row["confrelid"], confkey)
+            else
+              column = Utils.unquote_identifier(row["column"])
+              primary_key = row["primary_key"]
+            end
+
+            options = {
+              column: column,
+              name: row["name"],
+              primary_key: primary_key
             }
 
-            options[:on_delete] = extract_foreign_key_action(row["on_delete"])
-            options[:on_update] = extract_foreign_key_action(row["on_update"])
-            options[:deferrable] = extract_constraint_deferrable(row["deferrable"], row["deferred"])
+            options[:on_delete] = extract_foreign_key_action(row["on_delete"])
+            options[:on_update] = extract_foreign_key_action(row["on_update"])
+            options[:deferrable] = extract_constraint_deferrable(row["deferrable"], row["deferred"])
 
-            options[:validate] = row["valid"]
+            options[:validate] = row["valid"]
 
-            ForeignKeyDefinition.new(table_name, to_table, options)
-          end
-        end
-
-
- -

+ ForeignKeyDefinition.new(table_name, to_table, options) + end + end + + See on GitHub + + + +

@@ -878,22 +878,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 580
+        def foreign_table_exists?(table_name)
+          query_values(data_source_sql(table_name, type: "FOREIGN TABLE"), "SCHEMA").any? if table_name.present?
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 580
-def foreign_table_exists?(table_name)
-  query_values(data_source_sql(table_name, type: "FOREIGN TABLE"), "SCHEMA").any? if table_name.present?
-end
-
-
- -

+ See on GitHub + + + +

@@ -913,22 +913,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 576
+        def foreign_tables
+          query_values(data_source_sql(type: "FOREIGN TABLE"), "SCHEMA")
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 576
-def foreign_tables
-  query_values(data_source_sql(type: "FOREIGN TABLE"), "SCHEMA")
-end
-
-
- -

+ See on GitHub + + + +

@@ -948,35 +948,35 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 68
-        def index_name_exists?(table_name, index_name)
-          table = quoted_scope(table_name)
-          index = quoted_scope(index_name)
+          
+            
+ + Source code + - query_value(<<~SQL, "SCHEMA").to_i > 0 - SELECT COUNT(*) +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 68
+        def index_name_exists?(table_name, index_name)
+          table = quoted_scope(table_name)
+          index = quoted_scope(index_name)
+
+          query_value(<<~SQL, "SCHEMA").to_i > 0
+            SELECT COUNT(*)
             FROM pg_class t
             INNER JOIN pg_index d ON t.oid = d.indrelid
             INNER JOIN pg_class i ON d.indexrelid = i.oid
             LEFT JOIN pg_namespace n ON n.oid = t.relnamespace
-            WHERE i.relkind IN ('i', 'I')
+            WHERE i.relkind IN ('i', 'I')
               AND i.relname = #{index[:name]}
               AND t.relname = #{table[:name]}
               AND n.nspname = #{table[:schema]}
-          SQL
-        end
-
-
- -

+ SQL + end + + See on GitHub + + + +

@@ -1001,27 +1001,27 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 709
-def remove_exclusion_constraint(table_name, expression = nil, **options)
-  excl_name_to_delete = exclusion_constraint_for!(table_name, expression: expression, **options).name
+          
+            
+ + Source code + - at = create_alter_table(table_name) - at.drop_exclusion_constraint(excl_name_to_delete) +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 709
+        def remove_exclusion_constraint(table_name, expression = nil, **options)
+          excl_name_to_delete = exclusion_constraint_for!(table_name, expression: expression, **options).name
 
-  execute schema_creation.accept(at)
-end
-
-
- -

+ at = create_alter_table(table_name) + at.drop_exclusion_constraint(excl_name_to_delete) + + execute schema_creation.accept(at) + end + + See on GitHub + + + +

@@ -1046,27 +1046,27 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 764
-def remove_unique_constraint(table_name, column_name = nil, **options)
-  unique_name_to_delete = unique_constraint_for!(table_name, column: column_name, **options).name
+          
+            
+ + Source code + - at = create_alter_table(table_name) - at.drop_unique_constraint(unique_name_to_delete) +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 764
+        def remove_unique_constraint(table_name, column_name = nil, **options)
+          unique_name_to_delete = unique_constraint_for!(table_name, column: column_name, **options).name
 
-  execute schema_creation.accept(at)
-end
-
-
- -

+ at = create_alter_table(table_name) + at.drop_unique_constraint(unique_name_to_delete) + + execute schema_creation.accept(at) + end + + See on GitHub + + + +

@@ -1086,25 +1086,25 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 505
-def rename_index(table_name, old_name, new_name)
-  validate_index_length!(table_name, new_name)
+          
+            
+ + Source code + - schema, = extract_schema_qualified_name(table_name) - execute "ALTER INDEX #{quote_table_name(schema) + '.' if schema}#{quote_column_name(old_name)} RENAME TO #{quote_table_name(new_name)}" -end
-
-
- -

+
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 505
+        def rename_index(table_name, old_name, new_name)
+          validate_index_length!(table_name, new_name)
+
+          schema, = extract_schema_qualified_name(table_name)
+          execute "ALTER INDEX #{quote_table_name(schema) + '.' if schema}#{quote_column_name(old_name)} RENAME TO #{quote_table_name(new_name)}"
+        end
+ + See on GitHub + + + +

@@ -1129,37 +1129,37 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 380
+        def rename_table(table_name, new_name, **options)
+          validate_table_length!(new_name) unless options[:_uses_legacy_table_name]
+          clear_cache!
+          schema_cache.clear_data_source_cache!(table_name.to_s)
+          schema_cache.clear_data_source_cache!(new_name.to_s)
+          execute "ALTER TABLE #{quote_table_name(table_name)} RENAME TO #{quote_table_name(new_name)}"
+          pk, seq = pk_and_sequence_for(new_name)
+          if pk
+            idx = "#{table_name}_pkey"
+            new_idx = "#{new_name}_pkey"
+            execute "ALTER INDEX #{quote_table_name(idx)} RENAME TO #{quote_table_name(new_idx)}"
+            if seq && seq.identifier == "#{table_name}_#{pk}_seq"
+              new_seq = "#{new_name}_#{pk}_seq"
+              execute "ALTER TABLE #{seq.quoted} RENAME TO #{quote_table_name(new_seq)}"
+            end
+          end
+          rename_table_indexes(table_name, new_name)
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 380
-def rename_table(table_name, new_name, **options)
-  validate_table_length!(new_name) unless options[:_uses_legacy_table_name]
-  clear_cache!
-  schema_cache.clear_data_source_cache!(table_name.to_s)
-  schema_cache.clear_data_source_cache!(new_name.to_s)
-  execute "ALTER TABLE #{quote_table_name(table_name)} RENAME TO #{quote_table_name(new_name)}"
-  pk, seq = pk_and_sequence_for(new_name)
-  if pk
-    idx = "#{table_name}_pkey"
-    new_idx = "#{new_name}_pkey"
-    execute "ALTER INDEX #{quote_table_name(idx)} RENAME TO #{quote_table_name(new_idx)}"
-    if seq && seq.identifier == "#{table_name}_#{pk}_seq"
-      new_seq = "#{new_name}_#{pk}_seq"
-      execute "ALTER TABLE #{seq.quoted} RENAME TO #{quote_table_name(new_seq)}"
-    end
-  end
-  rename_table_indexes(table_name, new_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1179,22 +1179,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 63
+        def schema_exists?(name)
+          query_value("SELECT COUNT(*) FROM pg_namespace WHERE nspname = #{quote(name)}", "SCHEMA").to_i > 0
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 63
-def schema_exists?(name)
-  query_value("SELECT COUNT(*) FROM pg_namespace WHERE nspname = #{quote(name)}", "SCHEMA").to_i > 0
-end
-
-
- -

+ See on GitHub + + + +

@@ -1214,28 +1214,28 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 201
-        def schema_names
-          query_values(<<~SQL, "SCHEMA")
-            SELECT nspname
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 201
+        def schema_names
+          query_values(<<~SQL, "SCHEMA")
+            SELECT nspname
               FROM pg_namespace
-             WHERE nspname !~ '^pg_.*'
-               AND nspname NOT IN ('information_schema')
+             WHERE nspname !~ '^pg_.*'
+               AND nspname NOT IN ('information_schema')
              ORDER by nspname;
-          SQL
-        end
-
-
- -

+ SQL + end + + See on GitHub + + + +

@@ -1255,22 +1255,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 234
+        def schema_search_path
+          @schema_search_path ||= query_value("SHOW search_path", "SCHEMA")
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 234
-def schema_search_path
-  @schema_search_path ||= query_value("SHOW search_path", "SCHEMA")
-end
-
-
- -

+ See on GitHub + + + +

@@ -1292,25 +1292,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 226
+        def schema_search_path=(schema_csv)
+          if schema_csv
+            internal_execute("SET search_path TO #{schema_csv}")
+            @schema_search_path = schema_csv
+          end
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 226
-def schema_search_path=(schema_csv)
-  if schema_csv
-    internal_execute("SET search_path TO #{schema_csv}")
-    @schema_search_path = schema_csv
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1330,22 +1330,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 257
+        def serial_sequence(table, column)
+          query_value("SELECT pg_get_serial_sequence(#{quote(table)}, #{quote(column)})", "SCHEMA")
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 257
-def serial_sequence(table, column)
-  query_value("SELECT pg_get_serial_sequence(#{quote(table)}, #{quote(column)})", "SCHEMA")
-end
-
-
- -

+ See on GitHub + + + +

@@ -1365,46 +1365,46 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 644
-        def unique_constraints(table_name)
-          scope = quoted_scope(table_name)
+          
+            
+ + Source code + - unique_info = internal_exec_query(<<~SQL, "SCHEMA", allow_retry: true, materialize_transactions: false) - SELECT c.conname, c.conrelid, c.conkey, c.condeferrable, c.condeferred +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 644
+        def unique_constraints(table_name)
+          scope = quoted_scope(table_name)
+
+          unique_info = internal_exec_query(<<~SQL, "SCHEMA", allow_retry: true, materialize_transactions: false)
+            SELECT c.conname, c.conrelid, c.conkey, c.condeferrable, c.condeferred
             FROM pg_constraint c
             JOIN pg_class t ON c.conrelid = t.oid
             JOIN pg_namespace n ON n.oid = c.connamespace
-            WHERE c.contype = 'u'
+            WHERE c.contype = 'u'
               AND t.relname = #{scope[:name]}
               AND n.nspname = #{scope[:schema]}
-          SQL
+          SQL
 
-          unique_info.map do |row|
-            conkey = row["conkey"].delete("{}").split(",").map(&:to_i)
-            columns = column_names_from_column_numbers(row["conrelid"], conkey)
+          unique_info.map do |row|
+            conkey = row["conkey"].delete("{}").split(",").map(&:to_i)
+            columns = column_names_from_column_numbers(row["conrelid"], conkey)
 
-            deferrable = extract_constraint_deferrable(row["condeferrable"], row["condeferred"])
+            deferrable = extract_constraint_deferrable(row["condeferrable"], row["condeferred"])
 
-            options = {
-              name: row["conname"],
-              deferrable: deferrable
+            options = {
+              name: row["conname"],
+              deferrable: deferrable
             }
 
-            UniqueConstraintDefinition.new(table_name, columns, options)
-          end
-        end
-
-
- -

+ UniqueConstraintDefinition.new(table_name, columns, options) + end + end + + See on GitHub + + + +

@@ -1429,24 +1429,24 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 870
-def validate_check_constraint(table_name, **options)
-  chk_name_to_validate = check_constraint_for!(table_name, **options).name
+          
+            
+ + Source code + - validate_constraint table_name, chk_name_to_validate -end
-
-
- -

+
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 870
+        def validate_check_constraint(table_name, **options)
+          chk_name_to_validate = check_constraint_for!(table_name, **options).name
+
+          validate_constraint table_name, chk_name_to_validate
+        end
+ + See on GitHub + + + +

@@ -1471,25 +1471,25 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 837
-def validate_constraint(table_name, constraint_name)
-  at = create_alter_table table_name
-  at.validate_constraint constraint_name
+          
+            
+ + Source code + - execute schema_creation.accept(at) -end
-
-
- -

+
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 837
+        def validate_constraint(table_name, constraint_name)
+          at = create_alter_table table_name
+          at.validate_constraint constraint_name
+
+          execute schema_creation.accept(at)
+        end
+ + See on GitHub + + + +

@@ -1526,24 +1526,24 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 859
-def validate_foreign_key(from_table, to_table = nil, **options)
-  fk_name_to_validate = foreign_key_for!(from_table, to_table: to_table, **options).name
+          
+            
+ + Source code + - validate_constraint from_table, fk_name_to_validate -end
-
-
- -

+
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 859
+        def validate_foreign_key(from_table, to_table = nil, **options)
+          fk_name_to_validate = foreign_key_for!(from_table, to_table: to_table, **options).name
+
+          validate_constraint from_table, fk_name_to_validate
+        end
+ + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/Table.html b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/Table.html index bc51fc3247..dc95aa5db5 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/Table.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/Table.html @@ -118,22 +118,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 305
+        def exclusion_constraint(*args)
+          @base.add_exclusion_constraint(name, *args)
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 305
-def exclusion_constraint(*args)
-  @base.add_exclusion_constraint(name, *args)
-end
-
-
- - + See on GitHub + + + +

@@ -158,22 +158,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 314
+        def remove_exclusion_constraint(*args)
+          @base.remove_exclusion_constraint(name, *args)
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 314
-def remove_exclusion_constraint(*args)
-  @base.remove_exclusion_constraint(name, *args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -198,22 +198,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 332
+        def remove_unique_constraint(*args)
+          @base.remove_unique_constraint(name, *args)
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 332
-def remove_unique_constraint(*args)
-  @base.remove_unique_constraint(name, *args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -238,22 +238,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 323
+        def unique_constraint(*args)
+          @base.add_unique_constraint(name, *args)
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 323
-def unique_constraint(*args)
-  @base.add_unique_constraint(name, *args)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/TableDefinition.html b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/TableDefinition.html index 5b531372cb..b6f468c4de 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/TableDefinition.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/TableDefinition.html @@ -138,25 +138,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 244
+        def initialize(*, **)
+          super
+          @exclusion_constraints = []
+          @unique_constraints = []
+          @unlogged = ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.create_unlogged_tables
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 244
-def initialize(*, **)
-  super
-  @exclusion_constraints = []
-  @unique_constraints = []
-  @unlogged = ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.create_unlogged_tables
-end
-
-
- - + See on GitHub + + + + @@ -180,22 +180,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 251
+        def exclusion_constraint(expression, **options)
+          exclusion_constraints << new_exclusion_constraint_definition(expression, options)
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 251
-def exclusion_constraint(expression, **options)
-  exclusion_constraints << new_exclusion_constraint_definition(expression, options)
-end
-
-
- - + See on GitHub + + + +

@@ -215,22 +215,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 255
+        def unique_constraint(column_name, **options)
+          unique_constraints << new_unique_constraint_definition(column_name, options)
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb, line 255
-def unique_constraint(column_name, **options)
-  unique_constraints << new_unique_constraint_definition(column_name, options)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter.html b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter.html index 4173f29ae5..3ca76686de 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter.html @@ -583,21 +583,21 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 115
-class_attribute :create_unlogged_tables, default: false
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 115
+      class_attribute :create_unlogged_tables, default: false
 
-
-
- - + + See on GitHub + + + +

@@ -628,21 +628,21 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 133
-class_attribute :datetime_type, default: :timestamp
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 133
+      class_attribute :datetime_type, default: :timestamp
 
-
-
- -

+ + See on GitHub + + + +

@@ -662,37 +662,37 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 84
-def dbconsole(config, options = {})
-  pg_config = config.configuration_hash
+          
+            
+ + Source code + - ENV["PGUSER"] = pg_config[:username] if pg_config[:username] - ENV["PGHOST"] = pg_config[:host] if pg_config[:host] - ENV["PGPORT"] = pg_config[:port].to_s if pg_config[:port] - ENV["PGPASSWORD"] = pg_config[:password].to_s if pg_config[:password] && options[:include_password] - ENV["PGSSLMODE"] = pg_config[:sslmode].to_s if pg_config[:sslmode] - ENV["PGSSLCERT"] = pg_config[:sslcert].to_s if pg_config[:sslcert] - ENV["PGSSLKEY"] = pg_config[:sslkey].to_s if pg_config[:sslkey] - ENV["PGSSLROOTCERT"] = pg_config[:sslrootcert].to_s if pg_config[:sslrootcert] - if pg_config[:variables] - ENV["PGOPTIONS"] = pg_config[:variables].filter_map do |name, value| - "-c #{name}=#{value.to_s.gsub(/[ \\]/, '\\\\\0')}" unless value == ":default" || value == :default - end.join(" ") - end - find_cmd_and_exec("psql", config.database) -end
-
-
- -

+
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 84
+        def dbconsole(config, options = {})
+          pg_config = config.configuration_hash
+
+          ENV["PGUSER"]         = pg_config[:username] if pg_config[:username]
+          ENV["PGHOST"]         = pg_config[:host] if pg_config[:host]
+          ENV["PGPORT"]         = pg_config[:port].to_s if pg_config[:port]
+          ENV["PGPASSWORD"]     = pg_config[:password].to_s if pg_config[:password] && options[:include_password]
+          ENV["PGSSLMODE"]      = pg_config[:sslmode].to_s if pg_config[:sslmode]
+          ENV["PGSSLCERT"]      = pg_config[:sslcert].to_s if pg_config[:sslcert]
+          ENV["PGSSLKEY"]       = pg_config[:sslkey].to_s if pg_config[:sslkey]
+          ENV["PGSSLROOTCERT"]  = pg_config[:sslrootcert].to_s if pg_config[:sslrootcert]
+          if pg_config[:variables]
+            ENV["PGOPTIONS"] = pg_config[:variables].filter_map do |name, value|
+              "-c #{name}=#{value.to_s.gsub(/[ \\]/, '\\\\\0')}" unless value == ":default" || value == :default
+            end.join(" ")
+          end
+          find_cmd_and_exec("psql", config.database)
+        end
+ + See on GitHub + + + +

@@ -712,41 +712,41 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 317
-def initialize(...)
-  super
+          
+            
+ + Source code + - conn_params = @config.compact +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 317
+      def initialize(...)
+        super
 
-  # Map ActiveRecords param names to PGs.
-  conn_params[:user] = conn_params.delete(:username) if conn_params[:username]
-  conn_params[:dbname] = conn_params.delete(:database) if conn_params[:database]
+        conn_params = @config.compact
 
-  # Forward only valid config params to PG::Connection.connect.
-  valid_conn_param_keys = PG::Connection.conndefaults_hash.keys + [:requiressl]
-  conn_params.slice!(*valid_conn_param_keys)
+        # Map ActiveRecords param names to PGs.
+        conn_params[:user] = conn_params.delete(:username) if conn_params[:username]
+        conn_params[:dbname] = conn_params.delete(:database) if conn_params[:database]
 
-  @connection_parameters = conn_params
+        # Forward only valid config params to PG::Connection.connect.
+        valid_conn_param_keys = PG::Connection.conndefaults_hash.keys + [:requiressl]
+        conn_params.slice!(*valid_conn_param_keys)
 
-  @max_identifier_length = nil
-  @type_map = nil
-  @raw_connection = nil
-  @notice_receiver_sql_warnings = []
+        @connection_parameters = conn_params
 
-  @use_insert_returning = @config.key?(:insert_returning) ? self.class.type_cast_config_to_boolean(@config[:insert_returning]) : true
-end
-
-
- -

+ @max_identifier_length = nil + @type_map = nil + @raw_connection = nil + @notice_receiver_sql_warnings = [] + + @use_insert_returning = @config.key?(:insert_returning) ? self.class.type_cast_config_to_boolean(@config[:insert_returning]) : true + end + + See on GitHub + + + +

@@ -766,34 +766,34 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 68
+        def new_client(conn_params)
+          PG.connect(**conn_params)
+        rescue ::PG::Error => error
+          if conn_params && conn_params[:dbname] == "postgres"
+            raise ActiveRecord::ConnectionNotEstablished, error.message
+          elsif conn_params && conn_params[:dbname] && error.message.include?(conn_params[:dbname])
+            raise ActiveRecord::NoDatabaseError.db_error(conn_params[:dbname])
+          elsif conn_params && conn_params[:user] && error.message.include?(conn_params[:user])
+            raise ActiveRecord::DatabaseConnectionError.username_error(conn_params[:user])
+          elsif conn_params && conn_params[:host] && error.message.include?(conn_params[:host])
+            raise ActiveRecord::DatabaseConnectionError.hostname_error(conn_params[:host])
+          else
+            raise ActiveRecord::ConnectionNotEstablished, error.message
+          end
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 68
-def new_client(conn_params)
-  PG.connect(**conn_params)
-rescue ::PG::Error => error
-  if conn_params && conn_params[:dbname] == "postgres"
-    raise ActiveRecord::ConnectionNotEstablished, error.message
-  elsif conn_params && conn_params[:dbname] && error.message.include?(conn_params[:dbname])
-    raise ActiveRecord::NoDatabaseError.db_error(conn_params[:dbname])
-  elsif conn_params && conn_params[:user] && error.message.include?(conn_params[:user])
-    raise ActiveRecord::DatabaseConnectionError.username_error(conn_params[:user])
-  elsif conn_params && conn_params[:host] && error.message.include?(conn_params[:host])
-    raise ActiveRecord::DatabaseConnectionError.hostname_error(conn_params[:host])
-  else
-    raise ActiveRecord::ConnectionNotEstablished, error.message
-  end
-end
-
-
- -

+ See on GitHub + + + + @@ -817,28 +817,28 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 341
+      def active?
+        @lock.synchronize do
+          return false unless @raw_connection
+          @raw_connection.query ";"
+        end
+        true
+      rescue PG::Error
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 341
-def active?
-  @lock.synchronize do
-    return false unless @raw_connection
-    @raw_connection.query ";"
-  end
-  true
-rescue PG::Error
-  false
-end
-
-
- - + See on GitHub + + + +

@@ -858,33 +858,33 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 565
-def add_enum_value(type_name, value, options = {})
-  before, after = options.values_at(:before, :after)
-  sql = +"ALTER TYPE #{quote_table_name(type_name)} ADD VALUE '#{value}'"
+          
+            
+ + Source code + - if before && after - raise ArgumentError, "Cannot have both :before and :after at the same time" - elsif before - sql << " BEFORE '#{before}'" - elsif after - sql << " AFTER '#{after}'" - end +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 565
+      def add_enum_value(type_name, value, options = {})
+        before, after = options.values_at(:before, :after)
+        sql = +"ALTER TYPE #{quote_table_name(type_name)} ADD VALUE '#{value}'"
 
-  execute(sql).tap { reload_type_map }
-end
-
-
- -

+ if before && after + raise ArgumentError, "Cannot have both :before and :after at the same time" + elsif before + sql << " BEFORE '#{before}'" + elsif after + sql << " AFTER '#{after}'" + end + + execute(sql).tap { reload_type_map } + end + + See on GitHub + + + +

@@ -904,20 +904,18 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 520
-      def create_enum(name, values, **options)
-        sql_values = values.map { |s| quote(s) }.join(", ")
-        scope = quoted_scope(name)
-        query = <<~SQL
-          DO $$
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 520
+      def create_enum(name, values, **options)
+        sql_values = values.map { |s| quote(s) }.join(", ")
+        scope = quoted_scope(name)
+        query = <<~SQL
+          DO $$
           BEGIN
               IF NOT EXISTS (
                 SELECT 1
@@ -930,13 +928,15 @@ 

END IF; END $$; - SQL - internal_exec_query(query) - end

-
-
- -

+ SQL + internal_exec_query(query) + end + + See on GitHub + + + +

@@ -960,24 +960,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 478
+      def disable_extension(name, force: false)
+        internal_exec_query("DROP EXTENSION IF EXISTS \"#{name}\"#{' CASCADE' if force == :cascade}").tap {
+          reload_type_map
+        }
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 478
-def disable_extension(name, force: false)
-  internal_exec_query("DROP EXTENSION IF EXISTS \"#{name}\"#{' CASCADE' if force == :cascade}").tap {
-    reload_type_map
-  }
-end
-
-
- -

+ See on GitHub + + + +

@@ -997,26 +997,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 378
+      def disconnect!
+        @lock.synchronize do
+          super
+          @raw_connection&.close rescue nil
+          @raw_connection = nil
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 378
-def disconnect!
-  @lock.synchronize do
-    super
-    @raw_connection&.close rescue nil
-    @raw_connection = nil
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1040,25 +1040,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 550
+      def drop_enum(name, values = nil, **options)
+        query = <<~SQL
+          DROP TYPE#{' IF EXISTS' if options[:if_exists]} #{quote_table_name(name)};
+        SQL
+        internal_exec_query(query)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 550
-      def drop_enum(name, values = nil, **options)
-        query = <<~SQL
-          DROP TYPE#{' IF EXISTS' if options[:if_exists]} #{quote_table_name(name)};
-        SQL
-        internal_exec_query(query)
-      end
-
-
- -

+ See on GitHub + + + +

@@ -1078,26 +1078,26 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 465
-def enable_extension(name, **)
-  schema, name = name.to_s.split(".").values_at(-2, -1)
-  sql = +"CREATE EXTENSION IF NOT EXISTS \"#{name}\""
-  sql << " SCHEMA #{schema}" if schema
+          
+            
+ + Source code + - internal_exec_query(sql).tap { reload_type_map } -end
-
-
- -

+
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 465
+      def enable_extension(name, **)
+        schema, name = name.to_s.split(".").values_at(-2, -1)
+        sql = +"CREATE EXTENSION IF NOT EXISTS \"#{name}\""
+        sql << " SCHEMA #{schema}" if schema
+
+        internal_exec_query(sql).tap { reload_type_map }
+      end
+ + See on GitHub + + + +

@@ -1117,40 +1117,40 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 497
-      def enum_types
-        query = <<~SQL
-          SELECT
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 497
+      def enum_types
+        query = <<~SQL
+          SELECT
             type.typname AS name,
             type.OID AS oid,
             n.nspname AS schema,
-            string_agg(enum.enumlabel, ',' ORDER BY enum.enumsortorder) AS value
+            string_agg(enum.enumlabel, ',' ORDER BY enum.enumsortorder) AS value
           FROM pg_enum AS enum
           JOIN pg_type AS type ON (type.oid = enum.enumtypid)
           JOIN pg_namespace n ON type.typnamespace = n.oid
           WHERE n.nspname = ANY (current_schemas(false))
           GROUP BY type.OID, n.nspname, type.typname;
-        SQL
+        SQL
 
-        internal_exec_query(query, "SCHEMA", allow_retry: true, materialize_transactions: false).cast_values.each_with_object({}) do |row, memo|
-          name, schema = row[0], row[2]
-          schema = nil if schema == current_schema
-          full_name = [schema, name].compact.join(".")
-          memo[full_name] = row.last
-        end.to_a
-      end
-
-
- -

+ internal_exec_query(query, "SCHEMA", allow_retry: true, materialize_transactions: false).cast_values.each_with_object({}) do |row, memo| + name, schema = row[0], row[2] + schema = nil if schema == current_schema + full_name = [schema, name].compact.join(".") + memo[full_name] = row.last + end.to_a + end + + See on GitHub + + + +

@@ -1170,22 +1170,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 484
+      def extension_available?(name)
+        query_value("SELECT true FROM pg_available_extensions WHERE name = #{quote(name)}", "SCHEMA")
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 484
-def extension_available?(name)
-  query_value("SELECT true FROM pg_available_extensions WHERE name = #{quote(name)}", "SCHEMA")
-end
-
-
- -

+ See on GitHub + + + +

@@ -1205,22 +1205,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 488
+      def extension_enabled?(name)
+        query_value("SELECT installed_version IS NOT NULL FROM pg_available_extensions WHERE name = #{quote(name)}", "SCHEMA")
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 488
-def extension_enabled?(name)
-  query_value("SELECT installed_version IS NOT NULL FROM pg_available_extensions WHERE name = #{quote(name)}", "SCHEMA")
-end
-
-
- -

+ See on GitHub + + + +

@@ -1240,22 +1240,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 492
+      def extensions
+        internal_exec_query("SELECT extname FROM pg_extension", "SCHEMA", allow_retry: true, materialize_transactions: false).cast_values
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 492
-def extensions
-  internal_exec_query("SELECT extname FROM pg_extension", "SCHEMA", allow_retry: true, materialize_transactions: false).cast_values
-end
-
-
- -

+ See on GitHub + + + +

@@ -1275,22 +1275,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 284
+      def index_algorithms
+        { concurrently: "CONCURRENTLY" }
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 284
-def index_algorithms
-  { concurrently: "CONCURRENTLY" }
-end
-
-
- -

+ See on GitHub + + + +

@@ -1310,22 +1310,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 595
+      def max_identifier_length
+        @max_identifier_length ||= query_value("SHOW max_identifier_length", "SCHEMA").to_i
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 595
-def max_identifier_length
-  @max_identifier_length ||= query_value("SHOW max_identifier_length", "SCHEMA").to_i
-end
-
-
- -

+ See on GitHub + + + +

@@ -1345,24 +1345,24 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 558
-def rename_enum(name, options = {})
-  to = options.fetch(:to) { raise ArgumentError, ":to is required" }
+          
+            
+ + Source code + - exec_query("ALTER TYPE #{quote_table_name(name)} RENAME TO #{to}").tap { reload_type_map } -end
-
-
- -

+
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 558
+      def rename_enum(name, options = {})
+        to = options.fetch(:to) { raise ArgumentError, ":to is required" }
+
+        exec_query("ALTER TYPE #{quote_table_name(name)} RENAME TO #{to}").tap { reload_type_map }
+      end
+ + See on GitHub + + + +

@@ -1382,31 +1382,31 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 581
-def rename_enum_value(type_name, options = {})
-  unless database_version >= 10_00_00 # >= 10.0
-    raise ArgumentError, "Renaming enum values is only supported in PostgreSQL 10 or later"
-  end
+          
+            
+ + Source code + - from = options.fetch(:from) { raise ArgumentError, ":from is required" } - to = options.fetch(:to) { raise ArgumentError, ":to is required" } +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 581
+      def rename_enum_value(type_name, options = {})
+        unless database_version >= 10_00_00 # >= 10.0
+          raise ArgumentError, "Renaming enum values is only supported in PostgreSQL 10 or later"
+        end
 
-  execute("ALTER TYPE #{quote_table_name(type_name)} RENAME VALUE '#{from}' TO '#{to}'").tap {
-    reload_type_map
-  }
-end
-
-
- -

+ from = options.fetch(:from) { raise ArgumentError, ":from is required" } + to = options.fetch(:to) { raise ArgumentError, ":to is required" } + + execute("ALTER TYPE #{quote_table_name(type_name)} RENAME VALUE '#{from}' TO '#{to}'").tap { + reload_type_map + } + end + + See on GitHub + + + +

@@ -1426,31 +1426,31 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 363
-def reset!
-  @lock.synchronize do
-    return connect! unless @raw_connection
+          
+            
+ + Source code + - unless @raw_connection.transaction_status == ::PG::PQTRANS_IDLE - @raw_connection.query "ROLLBACK" - end - @raw_connection.query "DISCARD ALL" +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 363
+      def reset!
+        @lock.synchronize do
+          return connect! unless @raw_connection
 
-    super
-  end
-end
-
-
- -

+ unless @raw_connection.transaction_status == ::PG::PQTRANS_IDLE + @raw_connection.query "ROLLBACK" + end + @raw_connection.query "DISCARD ALL" + + super + end + end + + See on GitHub + + + +

@@ -1470,23 +1470,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 608
+      def session_auth=(user)
+        clear_cache!
+        internal_execute("SET SESSION AUTHORIZATION #{user}", nil, materialize_transactions: true)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 608
-def session_auth=(user)
-  clear_cache!
-  internal_execute("SET SESSION AUTHORIZATION #{user}", nil, materialize_transactions: true)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1506,22 +1506,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 404
+      def set_standard_conforming_strings
+        internal_execute("SET standard_conforming_strings = on")
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 404
-def set_standard_conforming_strings
-  internal_execute("SET standard_conforming_strings = on")
-end
-
-
- -

+ See on GitHub + + + +

@@ -1541,22 +1541,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 412
+      def supports_advisory_locks?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 412
-def supports_advisory_locks?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1576,22 +1576,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 189
+      def supports_bulk_alter?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 189
-def supports_bulk_alter?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1611,22 +1611,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 221
+      def supports_check_constraints?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 221
-def supports_check_constraints?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1646,22 +1646,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 253
+      def supports_comments?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 253
-def supports_comments?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1681,22 +1681,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 443
+      def supports_common_table_expressions?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 443
-def supports_common_table_expressions?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1716,22 +1716,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 245
+      def supports_datetime_with_precision?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 245
-def supports_datetime_with_precision?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1751,22 +1751,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 408
+      def supports_ddl_transactions?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 408
-def supports_ddl_transactions?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1786,22 +1786,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 237
+      def supports_deferrable_constraints?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 237
-def supports_deferrable_constraints?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1821,22 +1821,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 225
+      def supports_exclusion_constraints?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 225
-def supports_exclusion_constraints?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1856,22 +1856,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 416
+      def supports_explain?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 416
-def supports_explain?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1891,22 +1891,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 209
+      def supports_expression_index?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 209
-def supports_expression_index?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1926,22 +1926,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 420
+      def supports_extensions?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 420
-def supports_extensions?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1961,22 +1961,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 217
+      def supports_foreign_keys?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 217
-def supports_foreign_keys?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1996,22 +1996,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 428
+      def supports_foreign_tables?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 428
-def supports_foreign_tables?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -2031,22 +2031,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 205
+      def supports_index_include?
+        database_version >= 11_00_00 # >= 11.0
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 205
-def supports_index_include?
-  database_version >= 11_00_00 # >= 11.0
-end
-
-
- -

+ See on GitHub + + + +

@@ -2066,22 +2066,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 193
+      def supports_index_sort_order?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 193
-def supports_index_sort_order?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -2105,7 +2105,8 @@

-

+ +

@@ -2129,22 +2130,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 269
+      def supports_insert_on_conflict?
+        database_version >= 9_05_00 # >= 9.5
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 269
-def supports_insert_on_conflict?
-  database_version >= 9_05_00 # >= 9.5
-end
-
-
- -

+ See on GitHub + + + +

@@ -2168,7 +2169,8 @@

-

+ +

@@ -2192,7 +2194,8 @@

-

+ +

@@ -2212,22 +2215,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 265
+      def supports_insert_returning?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 265
-def supports_insert_returning?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -2247,22 +2250,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 249
+      def supports_json?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 249
-def supports_json?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -2282,22 +2285,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 447
+      def supports_lazy_transactions?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 447
-def supports_lazy_transactions?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -2317,22 +2320,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 424
+      def supports_materialized_views?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 424
-def supports_materialized_views?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -2352,22 +2355,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 280
+      def supports_nulls_not_distinct?
+        database_version >= 15_00_00 # >= 15.0
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 280
-def supports_nulls_not_distinct?
-  database_version >= 15_00_00 # >= 15.0
-end
-
-
- -

+ See on GitHub + + + +

@@ -2387,25 +2390,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 436
+      def supports_optimizer_hints?
+        unless defined?(@has_pg_hint_plan)
+          @has_pg_hint_plan = extension_available?("pg_hint_plan")
+        end
+        @has_pg_hint_plan
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 436
-def supports_optimizer_hints?
-  unless defined?(@has_pg_hint_plan)
-    @has_pg_hint_plan = extension_available?("pg_hint_plan")
-  end
-  @has_pg_hint_plan
-end
-
-
- -

+ See on GitHub + + + +

@@ -2425,22 +2428,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 201
+      def supports_partial_index?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 201
-def supports_partial_index?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -2460,22 +2463,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 197
+      def supports_partitioned_indexes?
+        database_version >= 11_00_00 # >= 11.0
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 197
-def supports_partitioned_indexes?
-  database_version >= 11_00_00 # >= 11.0
-end
-
-
- -

+ See on GitHub + + + +

@@ -2495,22 +2498,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 432
+      def supports_pgcrypto_uuid?
+        database_version >= 9_04_00 # >= 9.4
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 432
-def supports_pgcrypto_uuid?
-  database_version >= 9_04_00 # >= 9.4
-end
-
-
- -

+ See on GitHub + + + +

@@ -2530,22 +2533,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 261
+      def supports_restart_db_transaction?
+        database_version >= 12_00_00 # >= 12.0
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 261
-def supports_restart_db_transaction?
-  database_version >= 12_00_00 # >= 12.0
-end
-
-
- -

+ See on GitHub + + + +

@@ -2565,22 +2568,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 257
+      def supports_savepoints?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 257
-def supports_savepoints?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -2600,22 +2603,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 213
+      def supports_transaction_isolation?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 213
-def supports_transaction_isolation?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -2635,22 +2638,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 229
+      def supports_unique_constraints?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 229
-def supports_unique_constraints?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -2670,22 +2673,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 233
+      def supports_validate_constraints?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 233
-def supports_validate_constraints?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -2705,22 +2708,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 241
+      def supports_views?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 241
-def supports_views?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -2740,22 +2743,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 276
+      def supports_virtual_columns?
+        database_version >= 12_00_00 # >= 12.0
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 276
-def supports_virtual_columns?
-  database_version >= 12_00_00 # >= 12.0
-end
-
-
- -

+ See on GitHub + + + +

@@ -2775,25 +2778,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 600
+      def table_name_length
+        # PostgreSQL automatically creates an index for PRIMARY KEY with name consisting of
+        # truncated table name and "_pkey" suffix fitting into max_identifier_length number of characters.
+        # We allow smaller table names to be able to correctly rename this index when renaming the table.
+        max_identifier_length - "_pkey".length
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 600
-def table_name_length
-  # PostgreSQL automatically creates an index for PRIMARY KEY with name consisting of
-  # truncated table name and "_pkey" suffix fitting into max_identifier_length number of characters.
-  # We allow smaller table names to be able to correctly rename this index when renaming the table.
-  max_identifier_length - "_pkey".length
-end
-
-
- -

+ See on GitHub + + + +

@@ -2813,22 +2816,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 613
+      def use_insert_returning?
+        @use_insert_returning
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 613
-def use_insert_returning?
-  @use_insert_returning
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQLTypeMetadata.html b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQLTypeMetadata.html deleted file mode 100644 index dac2938acc..0000000000 --- a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQLTypeMetadata.html +++ /dev/null @@ -1,336 +0,0 @@ ---- -title: ActiveRecord::ConnectionAdapters::PostgreSQLTypeMetadata -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - -

Attributes

- - - - - - - - - - - - - - - - - - - - -
- [R] - array
- [R] - fmod
- [R] - oid
- - - - -

Class Public methods

- -
-

- - new(type_metadata, oid: nil, fmod: nil) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/type_metadata.rb, line 10
-def initialize(type_metadata, oid: nil, fmod: nil)
-  super(type_metadata)
-  @type_metadata = type_metadata
-  @oid = oid
-  @fmod = fmod
-  @array = /\[\]$/.match?(type_metadata.sql_type)
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - ==(other) - -

- - -
- -
- - - -
- Also aliased as: eql? -
- - - - - - -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/type_metadata.rb, line 22
-def ==(other)
-  other.is_a?(PostgreSQLTypeMetadata) &&
-    attributes_for_hash == other.attributes_for_hash
-end
-
-
- -
- -
-

- - eql?(other) - -

- - -
- -
- - - - - -
- Alias for: == -
- - - -
- -
-

- - hash() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/type_metadata.rb, line 28
-def hash
-  attributes_for_hash.hash
-end
-
-
- -
- -
-

- - sql_type() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/type_metadata.rb, line 18
-def sql_type
-  super.gsub(/\[\]$/, "".freeze)
-end
-
-
- -
- - -

Instance Protected methods

- -
-

- - attributes_for_hash() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/connection_adapters/postgresql/type_metadata.rb, line 34
-def attributes_for_hash
-  [self.class, @type_metadata, oid, fmod]
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveRecord/ConnectionAdapters/QueryCache.html b/src/classes/ActiveRecord/ConnectionAdapters/QueryCache.html index f2b2d5dc18..db18a70ac2 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/QueryCache.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/QueryCache.html @@ -133,29 +133,29 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb, line 20
-        def dirties_query_cache(base, *method_names)
-          method_names.each do |method_name|
-            base.class_eval <<-end_code, __FILE__, __LINE__ + 1
-              def #{method_name}(...)
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb, line 20
+        def dirties_query_cache(base, *method_names)
+          method_names.each do |method_name|
+            base.class_eval <<-end_code, __FILE__, __LINE__ + 1
+              def #{method_name}(...)
                 ActiveRecord::Base.clear_query_caches_for_current_thread
                 super
               end
-            end_code
-          end
-        end
-
-
- - + end_code + end + end + + See on GitHub + + + +

@@ -175,25 +175,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb, line 55
+      def initialize(*)
+        super
+        @query_cache         = {}
+        @query_cache_enabled = false
+        @query_cache_max_size = nil
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb, line 55
-def initialize(*)
-  super
-  @query_cache         = {}
-  @query_cache_enabled = false
-  @query_cache_max_size = nil
-end
-
-
- -

+ See on GitHub + + + + @@ -217,26 +217,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb, line 63
+      def cache
+        old, @query_cache_enabled = @query_cache_enabled, true
+        yield
+      ensure
+        @query_cache_enabled = old
+        clear_query_cache unless @query_cache_enabled
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb, line 63
-def cache
-  old, @query_cache_enabled = @query_cache_enabled, true
-  yield
-ensure
-  @query_cache_enabled = old
-  clear_query_cache unless @query_cache_enabled
-end
-
-
- - + See on GitHub + + + +

@@ -258,24 +258,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb, line 94
+      def clear_query_cache
+        @lock.synchronize do
+          @query_cache.clear
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb, line 94
-def clear_query_cache
-  @lock.synchronize do
-    @query_cache.clear
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -295,23 +295,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb, line 75
+      def disable_query_cache!
+        @query_cache_enabled = false
+        clear_query_cache
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb, line 75
-def disable_query_cache!
-  @query_cache_enabled = false
-  clear_query_cache
-end
-
-
- -

+ See on GitHub + + + +

@@ -331,22 +331,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb, line 71
+      def enable_query_cache!
+        @query_cache_enabled = true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb, line 71
-def enable_query_cache!
-  @query_cache_enabled = true
-end
-
-
- -

+ See on GitHub + + + +

@@ -366,25 +366,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb, line 81
+      def uncached
+        old, @query_cache_enabled = @query_cache_enabled, false
+        yield
+      ensure
+        @query_cache_enabled = old
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb, line 81
-def uncached
-  old, @query_cache_enabled = @query_cache_enabled, false
-  yield
-ensure
-  @query_cache_enabled = old
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/QueryCache/ConnectionPoolConfiguration.html b/src/classes/ActiveRecord/ConnectionAdapters/QueryCache/ConnectionPoolConfiguration.html index 938907087a..2d96e0ef0b 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/QueryCache/ConnectionPoolConfiguration.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/QueryCache/ConnectionPoolConfiguration.html @@ -86,23 +86,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb, line 33
+        def initialize(*)
+          super
+          @query_cache_enabled = Concurrent::Map.new { false }
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb, line 33
-def initialize(*)
-  super
-  @query_cache_enabled = Concurrent::Map.new { false }
-end
-
-
- - + See on GitHub + + + + @@ -126,23 +126,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb, line 43
+        def disable_query_cache!
+          @query_cache_enabled.delete connection_cache_key(current_thread)
+          connection.disable_query_cache! if active_connection?
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb, line 43
-def disable_query_cache!
-  @query_cache_enabled.delete connection_cache_key(current_thread)
-  connection.disable_query_cache! if active_connection?
-end
-
-
- - + See on GitHub + + + +

@@ -162,23 +162,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb, line 38
+        def enable_query_cache!
+          @query_cache_enabled[connection_cache_key(current_thread)] = true
+          connection.enable_query_cache! if active_connection?
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb, line 38
-def enable_query_cache!
-  @query_cache_enabled[connection_cache_key(current_thread)] = true
-  connection.enable_query_cache! if active_connection?
-end
-
-
- -

+ See on GitHub + + + +

@@ -198,22 +198,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb, line 48
+        def query_cache_enabled
+          @query_cache_enabled[connection_cache_key(current_thread)]
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb, line 48
-def query_cache_enabled
-  @query_cache_enabled[connection_cache_key(current_thread)]
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/Quoting.html b/src/classes/ActiveRecord/ConnectionAdapters/Quoting.html index 6bfec5e6de..9c6cc16228 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/Quoting.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/Quoting.html @@ -125,39 +125,39 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 12
+      def quote(value)
+        case value
+        when String, Symbol, ActiveSupport::Multibyte::Chars
+          "'#{quote_string(value.to_s)}'"
+        when true       then quoted_true
+        when false      then quoted_false
+        when nil        then "NULL"
+        # BigDecimals need to be put in a non-normalized form and quoted.
+        when BigDecimal then value.to_s("F")
+        when Numeric then value.to_s
+        when Type::Binary::Data then quoted_binary(value)
+        when Type::Time::Value then "'#{quoted_time(value)}'"
+        when Date, Time then "'#{quoted_date(value)}'"
+        when Class      then "'#{value}'"
+        when ActiveSupport::Duration
+          warn_quote_duration_deprecated
+          value.to_s
+        else raise TypeError, "can't quote #{value.class.name}"
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 12
-def quote(value)
-  case value
-  when String, Symbol, ActiveSupport::Multibyte::Chars
-    "'#{quote_string(value.to_s)}'"
-  when true       then quoted_true
-  when false      then quoted_false
-  when nil        then "NULL"
-  # BigDecimals need to be put in a non-normalized form and quoted.
-  when BigDecimal then value.to_s("F")
-  when Numeric then value.to_s
-  when Type::Binary::Data then quoted_binary(value)
-  when Type::Time::Value then "'#{quoted_time(value)}'"
-  when Date, Time then "'#{quoted_date(value)}'"
-  when Class      then "'#{value}'"
-  when ActiveSupport::Duration
-    warn_quote_duration_deprecated
-    value.to_s
-  else raise TypeError, "can't quote #{value.class.name}"
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -179,27 +179,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 57
+      def quote_bound_value(value)
+        ActiveRecord.deprecator.warn(<<~MSG.squish)
+          #quote_bound_value is deprecated and will be removed in Rails 7.2.
+          Consider Arel.sql(".. ? ..", value) or #sanitize_sql instead.
+        MSG
+
+        quote(cast_bound_value(value))
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 57
-      def quote_bound_value(value)
-        ActiveRecord.deprecator.warn(<<~MSG.squish)
-          #quote_bound_value is deprecated and will be removed in Rails 7.2.
-          Consider Arel.sql(".. ? ..", value) or #sanitize_sql instead.
-        MSG
-
-        quote(cast_bound_value(value))
-      end
-
-
- -

+ See on GitHub + + + +

@@ -219,22 +219,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 93
+      def quote_column_name(column_name)
+        column_name.to_s
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 93
-def quote_column_name(column_name)
-  column_name.to_s
-end
-
-
- -

+ See on GitHub + + + +

@@ -254,22 +254,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 88
+      def quote_string(s)
+        s.gsub("\\", '\&\&').gsub("'", "''") # ' (for ruby-mode)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 88
-def quote_string(s)
-  s.gsub("\\", '\&\&').gsub("'", "''") # ' (for ruby-mode)
-end
-
-
- -

+ See on GitHub + + + +

@@ -289,22 +289,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 98
+      def quote_table_name(table_name)
+        quote_column_name(table_name)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 98
-def quote_table_name(table_name)
-  quote_column_name(table_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -328,22 +328,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 110
+      def quote_table_name_for_assignment(table, attr)
+        quote_table_name("#{table}.#{attr}")
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 110
-def quote_table_name_for_assignment(table, attr)
-  quote_table_name("#{table}.#{attr}")
-end
-
-
- -

+ See on GitHub + + + +

@@ -363,35 +363,35 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 141
+      def quoted_date(value)
+        if value.acts_like?(:time)
+          if default_timezone == :utc
+            value = value.getutc if !value.utc?
+          else
+            value = value.getlocal
+          end
+        end
+
+        result = value.to_fs(:db)
+        if value.respond_to?(:usec) && value.usec > 0
+          result << "." << sprintf("%06d", value.usec)
+        else
+          result
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 141
-def quoted_date(value)
-  if value.acts_like?(:time)
-    if default_timezone == :utc
-      value = value.getutc if !value.utc?
-    else
-      value = value.getlocal
-    end
-  end
-
-  result = value.to_fs(:db)
-  if value.respond_to?(:usec) && value.usec > 0
-    result << "." << sprintf("%06d", value.usec)
-  else
-    result
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -411,22 +411,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 131
+      def quoted_false
+        "FALSE"
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 131
-def quoted_false
-  "FALSE"
-end
-
-
- -

+ See on GitHub + + + +

@@ -446,22 +446,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 123
+      def quoted_true
+        "TRUE"
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 123
-def quoted_true
-  "TRUE"
-end
-
-
- -

+ See on GitHub + + + +

@@ -481,33 +481,33 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 36
+      def type_cast(value)
+        case value
+        when Symbol, ActiveSupport::Multibyte::Chars, Type::Binary::Data
+          value.to_s
+        when true       then unquoted_true
+        when false      then unquoted_false
+        # BigDecimals need to be put in a non-normalized form and quoted.
+        when BigDecimal then value.to_s("F")
+        when nil, Numeric, String then value
+        when Type::Time::Value then quoted_time(value)
+        when Date, Time then quoted_date(value)
+        else raise TypeError, "can't cast #{value.class.name}"
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 36
-def type_cast(value)
-  case value
-  when Symbol, ActiveSupport::Multibyte::Chars, Type::Binary::Data
-    value.to_s
-  when true       then unquoted_true
-  when false      then unquoted_false
-  # BigDecimals need to be put in a non-normalized form and quoted.
-  when BigDecimal then value.to_s("F")
-  when nil, Numeric, String then value
-  when Type::Time::Value then quoted_time(value)
-  when Date, Time then quoted_date(value)
-  else raise TypeError, "can't cast #{value.class.name}"
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -527,22 +527,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 135
+      def unquoted_false
+        false
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 135
-def unquoted_false
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -562,22 +562,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 127
+      def unquoted_true
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/quoting.rb, line 127
-def unquoted_true
-  true
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/RealTransaction.html b/src/classes/ActiveRecord/ConnectionAdapters/RealTransaction.html index 0ed083412a..0ce8976005 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/RealTransaction.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/RealTransaction.html @@ -99,24 +99,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 399
+      def commit
+        connection.commit_db_transaction if materialized?
+        @state.full_commit!
+        @instrumenter.finish(:commit) if materialized?
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 399
-def commit
-  connection.commit_db_transaction if materialized?
-  @state.full_commit!
-  @instrumenter.finish(:commit) if materialized?
-end
-
-
- - + See on GitHub + + + +

@@ -136,28 +136,28 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 369
+      def materialize!
+        if isolation_level
+          connection.begin_isolated_db_transaction(isolation_level)
+        else
+          connection.begin_db_transaction
+        end
+
+        super
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 369
-def materialize!
-  if isolation_level
-    connection.begin_isolated_db_transaction(isolation_level)
-  else
-    connection.begin_db_transaction
-  end
-
-  super
-end
-
-
- -

+ See on GitHub + + + +

@@ -177,32 +177,32 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 379
+      def restart
+        return unless materialized?
+
+        @instrumenter.finish(:restart)
+
+        if connection.supports_restart_db_transaction?
+          @instrumenter.start
+          connection.restart_db_transaction
+        else
+          connection.rollback_db_transaction
+          materialize!
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 379
-def restart
-  return unless materialized?
-
-  @instrumenter.finish(:restart)
-
-  if connection.supports_restart_db_transaction?
-    @instrumenter.start
-    connection.restart_db_transaction
-  else
-    connection.rollback_db_transaction
-    materialize!
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -222,24 +222,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 393
+      def rollback
+        connection.rollback_db_transaction if materialized?
+        @state.full_rollback!
+        @instrumenter.finish(:rollback) if materialized?
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 393
-def rollback
-  connection.rollback_db_transaction if materialized?
-  @state.full_rollback!
-  @instrumenter.finish(:rollback) if materialized?
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/RestartParentTransaction.html b/src/classes/ActiveRecord/ConnectionAdapters/RestartParentTransaction.html index f5de58db49..09b67ee35e 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/RestartParentTransaction.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/RestartParentTransaction.html @@ -98,30 +98,30 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 296
+      def initialize(connection, parent_transaction, **options)
+        super(connection, **options)
+
+        @parent = parent_transaction
+
+        if isolation_level
+          raise ActiveRecord::TransactionIsolationError, "cannot set transaction isolation in a nested transaction"
+        end
+
+        @parent.state.add_child(@state)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 296
-def initialize(connection, parent_transaction, **options)
-  super(connection, **options)
-
-  @parent = parent_transaction
-
-  if isolation_level
-    raise ActiveRecord::TransactionIsolationError, "cannot set transaction isolation in a nested transaction"
-  end
-
-  @parent.state.add_child(@state)
-end
-
-
- - + See on GitHub + + + + @@ -145,22 +145,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 315
+      def commit
+        @state.commit!
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 315
-def commit
-  @state.commit!
-end
-
-
- - + See on GitHub + + + +

@@ -180,20 +180,20 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 319
+      def full_rollback?; false; end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 319
-def full_rollback?; false; end
-
-
- -

+ See on GitHub + + + +

@@ -213,23 +213,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 310
+      def rollback
+        @state.rollback!
+        @parent.restart
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 310
-def rollback
-  @state.rollback!
-  @parent.restart
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/SQLite3/DatabaseStatements.html b/src/classes/ActiveRecord/ConnectionAdapters/SQLite3/DatabaseStatements.html index ff04f073a5..96c5ea73f9 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/SQLite3/DatabaseStatements.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/SQLite3/DatabaseStatements.html @@ -79,24 +79,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/sqlite3/database_statements.rb, line 18
+        def explain(arel, binds = [], _options = [])
+          sql    = "EXPLAIN QUERY PLAN " + to_sql(arel, binds)
+          result = internal_exec_query(sql, "EXPLAIN", [])
+          SQLite3::ExplainPrettyPrinter.new.pp(result)
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3/database_statements.rb, line 18
-def explain(arel, binds = [], _options = [])
-  sql    = "EXPLAIN QUERY PLAN " + to_sql(arel, binds)
-  result = internal_exec_query(sql, "EXPLAIN", [])
-  SQLite3::ExplainPrettyPrinter.new.pp(result)
-end
-
-
- - + See on GitHub + + + +

@@ -116,22 +116,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/sqlite3/database_statements.rb, line 107
+        def high_precision_current_timestamp
+          HIGH_PRECISION_CURRENT_TIMESTAMP
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3/database_statements.rb, line 107
-def high_precision_current_timestamp
-  HIGH_PRECISION_CURRENT_TIMESTAMP
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/SQLite3/TableDefinition.html b/src/classes/ActiveRecord/ConnectionAdapters/SQLite3/TableDefinition.html index d8bebfc668..a3d8cfbcc7 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/SQLite3/TableDefinition.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/SQLite3/TableDefinition.html @@ -99,7 +99,8 @@

- + +

@@ -119,24 +120,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/sqlite3/schema_definitions.rb, line 8
+        def change_column(column_name, type, **options)
+          name = column_name.to_s
+          @columns_hash[name] = nil
+          column(name, type, **options)
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3/schema_definitions.rb, line 8
-def change_column(column_name, type, **options)
-  name = column_name.to_s
-  @columns_hash[name] = nil
-  column(name, type, **options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -160,22 +161,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/sqlite3/schema_definitions.rb, line 14
+        def references(*args, **options)
+          super(*args, type: :integer, **options)
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3/schema_definitions.rb, line 14
-def references(*args, **options)
-  super(*args, type: :integer, **options)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/SQLite3Adapter.html b/src/classes/ActiveRecord/ConnectionAdapters/SQLite3Adapter.html index e34cd68750..72cef8c72f 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/SQLite3Adapter.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/SQLite3Adapter.html @@ -326,28 +326,28 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 51
-def dbconsole(config, options = {})
-  args = []
+          
+            
+ + Source code + - args << "-#{options[:mode]}" if options[:mode] - args << "-header" if options[:header] - args << File.expand_path(config.database, Rails.respond_to?(:root) ? Rails.root : nil) +
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 51
+        def dbconsole(config, options = {})
+          args = []
 
-  find_cmd_and_exec("sqlite3", *args)
-end
-
-
- - + args << "-#{options[:mode]}" if options[:mode] + args << "-header" if options[:header] + args << File.expand_path(config.database, Rails.respond_to?(:root) ? Rails.root : nil) + + find_cmd_and_exec("sqlite3", *args) + end + + See on GitHub + + + +

@@ -367,50 +367,50 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 100
-def initialize(...)
-  super
-
-  @memory_database = false
-  case @config[:database].to_s
-  when ""
-    raise ArgumentError, "No database file specified. Missing argument: database"
-  when ":memory:"
-    @memory_database = true
-  when /\Afile:/
-  else
-    # Otherwise we have a path relative to Rails.root
-    @config[:database] = File.expand_path(@config[:database], Rails.root) if defined?(Rails.root)
-    dirname = File.dirname(@config[:database])
-    unless File.directory?(dirname)
-      begin
-        Dir.mkdir(dirname)
-      rescue Errno::ENOENT => error
-        if error.message.include?("No such file or directory")
-          raise ActiveRecord::NoDatabaseError.new(connection_pool: @pool)
-        else
-          raise
-        end
-      end
-    end
-  end
-
-  @config[:strict] = ConnectionAdapters::SQLite3Adapter.strict_strings_by_default unless @config.key?(:strict)
-  @connection_parameters = @config.merge(database: @config[:database].to_s, results_as_hash: true)
-  @use_insert_returning = @config.key?(:insert_returning) ? self.class.type_cast_config_to_boolean(@config[:insert_returning]) : true
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 100
+      def initialize(...)
+        super
+
+        @memory_database = false
+        case @config[:database].to_s
+        when ""
+          raise ArgumentError, "No database file specified. Missing argument: database"
+        when ":memory:"
+          @memory_database = true
+        when /\Afile:/
+        else
+          # Otherwise we have a path relative to Rails.root
+          @config[:database] = File.expand_path(@config[:database], Rails.root) if defined?(Rails.root)
+          dirname = File.dirname(@config[:database])
+          unless File.directory?(dirname)
+            begin
+              Dir.mkdir(dirname)
+            rescue Errno::ENOENT => error
+              if error.message.include?("No such file or directory")
+                raise ActiveRecord::NoDatabaseError.new(connection_pool: @pool)
+              else
+                raise
+              end
+            end
+          end
+        end
+
+        @config[:strict] = ConnectionAdapters::SQLite3Adapter.strict_strings_by_default unless @config.key?(:strict)
+        @connection_parameters = @config.merge(database: @config[:database].to_s, results_as_hash: true)
+        @use_insert_returning = @config.key?(:insert_returning) ? self.class.type_cast_config_to_boolean(@config[:insert_returning]) : true
+      end
+ + See on GitHub + +
+ +

@@ -430,28 +430,28 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 41
+        def new_client(config)
+          ::SQLite3::Database.new(config[:database].to_s, config)
+        rescue Errno::ENOENT => error
+          if error.message.include?("No such file or directory")
+            raise ActiveRecord::NoDatabaseError
+          else
+            raise
+          end
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 41
-def new_client(config)
-  ::SQLite3::Database.new(config[:database].to_s, config)
-rescue Errno::ENOENT => error
-  if error.message.include?("No such file or directory")
-    raise ActiveRecord::NoDatabaseError
-  else
-    raise
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -474,21 +474,21 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 74
-class_attribute :strict_strings_by_default, default: false
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 74
+      class_attribute :strict_strings_by_default, default: false
 
-
-
- -

+ + See on GitHub + + + + @@ -512,22 +512,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 199
+      def active?
+        @raw_connection && !@raw_connection.closed?
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 199
-def active?
-  @raw_connection && !@raw_connection.closed?
-end
-
-
- - + See on GitHub + + + +

@@ -547,31 +547,31 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 350
-def add_timestamps(table_name, **options)
-  options[:null] = false if options[:null].nil?
+          
+            
+ + Source code + - if !options.key?(:precision) - options[:precision] = 6 - end +
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 350
+      def add_timestamps(table_name, **options)
+        options[:null] = false if options[:null].nil?
 
-  alter_table(table_name) do |definition|
-    definition.column :created_at, :datetime, **options
-    definition.column :updated_at, :datetime, **options
-  end
-end
-
-
- -

+ if !options.key?(:precision) + options[:precision] = 6 + end + + alter_table(table_name) do |definition| + definition.column :created_at, :datetime, **options + definition.column :updated_at, :datetime, **options + end + end + + See on GitHub + + + +

@@ -591,22 +591,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 132
+      def database_exists?
+        @config[:database] == ":memory:" || File.exist?(@config[:database].to_s)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 132
-def database_exists?
-  @config[:database] == ":memory:" || File.exist?(@config[:database].to_s)
-end
-
-
- -

+ See on GitHub + + + +

@@ -626,25 +626,25 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 211
-def disconnect!
-  super
+          
+            
+ + Source code + - @raw_connection&.close rescue nil - @raw_connection = nil -end
-
-
- -

+
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 211
+      def disconnect!
+        super
+
+        @raw_connection&.close rescue nil
+        @raw_connection = nil
+      end
+ + See on GitHub + + + +

@@ -664,22 +664,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 227
+      def encoding
+        any_raw_connection.encoding.to_s
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 227
-def encoding
-  any_raw_connection.encoding.to_s
-end
-
-
- -

+ See on GitHub + + + +

@@ -699,40 +699,40 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 368
-def foreign_keys(table_name)
-  # SQLite returns 1 row for each column of composite foreign keys.
-  fk_info = internal_exec_query("PRAGMA foreign_key_list(#{quote(table_name)})", "SCHEMA")
-  grouped_fk = fk_info.group_by { |row| row["id"] }.values.each { |group| group.sort_by! { |row| row["seq"] } }
-  grouped_fk.map do |group|
-    row = group.first
-    options = {
-      on_delete: extract_foreign_key_action(row["on_delete"]),
-      on_update: extract_foreign_key_action(row["on_update"])
-    }
+          
+            
+ + Source code + - if group.one? - options[:column] = row["from"] - options[:primary_key] = row["to"] - else - options[:column] = group.map { |row| row["from"] } - options[:primary_key] = group.map { |row| row["to"] } - end - ForeignKeyDefinition.new(table_name, row["table"], options) - end -end
-
-
- -

+
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 368
+      def foreign_keys(table_name)
+        # SQLite returns 1 row for each column of composite foreign keys.
+        fk_info = internal_exec_query("PRAGMA foreign_key_list(#{quote(table_name)})", "SCHEMA")
+        grouped_fk = fk_info.group_by { |row| row["id"] }.values.each { |group| group.sort_by! { |row| row["seq"] } }
+        grouped_fk.map do |group|
+          row = group.first
+          options = {
+            on_delete: extract_foreign_key_action(row["on_delete"]),
+            on_update: extract_foreign_key_action(row["on_update"])
+          }
+
+          if group.one?
+            options[:column] = row["from"]
+            options[:primary_key] = row["to"]
+          else
+            options[:column] = group.map { |row| row["from"] }
+            options[:primary_key] = group.map { |row| row["to"] }
+          end
+          ForeignKeyDefinition.new(table_name, row["table"], options)
+        end
+      end
+ + See on GitHub + + + +

@@ -757,26 +757,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 284
+      def rename_table(table_name, new_name, **options)
+        validate_table_length!(new_name) unless options[:_uses_legacy_table_name]
+        schema_cache.clear_data_source_cache!(table_name.to_s)
+        schema_cache.clear_data_source_cache!(new_name.to_s)
+        exec_query "ALTER TABLE #{quote_table_name(table_name)} RENAME TO #{quote_table_name(new_name)}"
+        rename_table_indexes(table_name, new_name)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 284
-def rename_table(table_name, new_name, **options)
-  validate_table_length!(new_name) unless options[:_uses_legacy_table_name]
-  schema_cache.clear_data_source_cache!(table_name.to_s)
-  schema_cache.clear_data_source_cache!(new_name.to_s)
-  exec_query "ALTER TABLE #{quote_table_name(table_name)} RENAME TO #{quote_table_name(new_name)}"
-  rename_table_indexes(table_name, new_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -796,22 +796,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 156
+      def requires_reloading?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 156
-def requires_reloading?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -831,22 +831,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 164
+      def supports_check_constraints?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 164
-def supports_check_constraints?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -866,22 +866,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 180
+      def supports_common_table_expressions?
+        database_version >= "3.8.3"
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 180
-def supports_common_table_expressions?
-  database_version >= "3.8.3"
-end
-
-
- -

+ See on GitHub + + + +

@@ -901,22 +901,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 195
+      def supports_concurrent_connections?
+        !@memory_database
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 195
-def supports_concurrent_connections?
-  !@memory_database
-end
-
-
- -

+ See on GitHub + + + +

@@ -936,22 +936,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 172
+      def supports_datetime_with_precision?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 172
-def supports_datetime_with_precision?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -971,22 +971,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 136
+      def supports_ddl_transactions?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 136
-def supports_ddl_transactions?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1006,22 +1006,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 231
+      def supports_explain?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 231
-def supports_explain?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1041,22 +1041,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 152
+      def supports_expression_index?
+        database_version >= "3.9.0"
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 152
-def supports_expression_index?
-  database_version >= "3.9.0"
-end
-
-
- -

+ See on GitHub + + + +

@@ -1076,22 +1076,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 160
+      def supports_foreign_keys?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 160
-def supports_foreign_keys?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1111,22 +1111,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 218
+      def supports_index_sort_order?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 218
-def supports_index_sort_order?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1150,7 +1150,8 @@

-

+ +

@@ -1174,22 +1175,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 188
+      def supports_insert_on_conflict?
+        database_version >= "3.24.0"
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 188
-def supports_insert_on_conflict?
-  database_version >= "3.24.0"
-end
-
-
- -

+ See on GitHub + + + +

@@ -1213,7 +1214,8 @@

-

+ +

@@ -1237,7 +1239,8 @@

-

+ +

@@ -1257,22 +1260,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 184
+      def supports_insert_returning?
+        database_version >= "3.35.0"
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 184
-def supports_insert_returning?
-  database_version >= "3.35.0"
-end
-
-
- -

+ See on GitHub + + + +

@@ -1292,22 +1295,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 176
+      def supports_json?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 176
-def supports_json?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1327,22 +1330,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 235
+      def supports_lazy_transactions?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 235
-def supports_lazy_transactions?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1362,22 +1365,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 148
+      def supports_partial_index?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 148
-def supports_partial_index?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1397,22 +1400,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 140
+      def supports_savepoints?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 140
-def supports_savepoints?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1432,22 +1435,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 144
+      def supports_transaction_isolation?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 144
-def supports_transaction_isolation?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1467,22 +1470,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 168
+      def supports_views?
+        true
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 168
-def supports_views?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1502,22 +1505,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 413
+      def use_insert_returning?
+        @use_insert_returning
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 413
-def use_insert_returning?
-  @use_insert_returning
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/SavepointTransaction.html b/src/classes/ActiveRecord/ConnectionAdapters/SavepointTransaction.html index 49f2b38451..ccf40e71eb 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/SavepointTransaction.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/SavepointTransaction.html @@ -106,30 +106,30 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 324
+      def initialize(connection, savepoint_name, parent_transaction, **options)
+        super(connection, **options)
+
+        parent_transaction.state.add_child(@state)
+
+        if isolation_level
+          raise ActiveRecord::TransactionIsolationError, "cannot set transaction isolation in a nested transaction"
+        end
+
+        @savepoint_name = savepoint_name
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 324
-def initialize(connection, savepoint_name, parent_transaction, **options)
-  super(connection, **options)
-
-  parent_transaction.state.add_child(@state)
-
-  if isolation_level
-    raise ActiveRecord::TransactionIsolationError, "cannot set transaction isolation in a nested transaction"
-  end
-
-  @savepoint_name = savepoint_name
-end
-
-
- - + See on GitHub + + + + @@ -153,24 +153,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 358
+      def commit
+        connection.release_savepoint(savepoint_name) if materialized?
+        @state.commit!
+        @instrumenter.finish(:commit) if materialized?
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 358
-def commit
-  connection.release_savepoint(savepoint_name) if materialized?
-  @state.commit!
-  @instrumenter.finish(:commit) if materialized?
-end
-
-
- - + See on GitHub + + + +

@@ -190,20 +190,20 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 364
+      def full_rollback?; false; end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 364
-def full_rollback?; false; end
-
-
- -

+ See on GitHub + + + +

@@ -223,23 +223,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 336
+      def materialize!
+        connection.create_savepoint(savepoint_name)
+        super
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 336
-def materialize!
-  connection.create_savepoint(savepoint_name)
-  super
-end
-
-
- -

+ See on GitHub + + + +

@@ -259,27 +259,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 341
+      def restart
+        return unless materialized?
+
+        @instrumenter.finish(:restart)
+        @instrumenter.start
+
+        connection.rollback_to_savepoint(savepoint_name)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 341
-def restart
-  return unless materialized?
-
-  @instrumenter.finish(:restart)
-  @instrumenter.start
-
-  connection.rollback_to_savepoint(savepoint_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -299,26 +299,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 350
+      def rollback
+        unless @state.invalidated?
+          connection.rollback_to_savepoint(savepoint_name) if materialized?
+        end
+        @state.rollback!
+        @instrumenter.finish(:rollback) if materialized?
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 350
-def rollback
-  unless @state.invalidated?
-    connection.rollback_to_savepoint(savepoint_name) if materialized?
-  end
-  @state.rollback!
-  @instrumenter.finish(:rollback) if materialized?
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/Savepoints.html b/src/classes/ActiveRecord/ConnectionAdapters/Savepoints.html index bf31333e15..3f1c3c68ab 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/Savepoints.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/Savepoints.html @@ -93,22 +93,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/savepoints.rb, line 11
+      def create_savepoint(name = current_savepoint_name)
+        internal_execute("SAVEPOINT #{name}", "TRANSACTION")
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/savepoints.rb, line 11
-def create_savepoint(name = current_savepoint_name)
-  internal_execute("SAVEPOINT #{name}", "TRANSACTION")
-end
-
-
- - + See on GitHub + + + +

@@ -128,22 +128,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/savepoints.rb, line 7
+      def current_savepoint_name
+        current_transaction.savepoint_name
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/savepoints.rb, line 7
-def current_savepoint_name
-  current_transaction.savepoint_name
-end
-
-
- -

+ See on GitHub + + + +

@@ -163,22 +163,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/savepoints.rb, line 15
+      def exec_rollback_to_savepoint(name = current_savepoint_name)
+        internal_execute("ROLLBACK TO SAVEPOINT #{name}", "TRANSACTION")
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/savepoints.rb, line 15
-def exec_rollback_to_savepoint(name = current_savepoint_name)
-  internal_execute("ROLLBACK TO SAVEPOINT #{name}", "TRANSACTION")
-end
-
-
- -

+ See on GitHub + + + +

@@ -198,22 +198,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/savepoints.rb, line 19
+      def release_savepoint(name = current_savepoint_name)
+        internal_execute("RELEASE SAVEPOINT #{name}", "TRANSACTION")
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/savepoints.rb, line 19
-def release_savepoint(name = current_savepoint_name)
-  internal_execute("RELEASE SAVEPOINT #{name}", "TRANSACTION")
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/SchemaCache.html b/src/classes/ActiveRecord/ConnectionAdapters/SchemaCache.html index 57f01a0d53..4d459b1fe7 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/SchemaCache.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/SchemaCache.html @@ -146,28 +146,28 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 261
-def initialize
-  @columns      = {}
-  @columns_hash = {}
-  @primary_keys = {}
-  @data_sources = {}
-  @indexes      = {}
-  @database_version = nil
-  @version = nil
-end
-
-
- - + +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 261
+      def initialize
+        @columns      = {}
+        @columns_hash = {}
+        @primary_keys = {}
+        @data_sources = {}
+        @indexes      = {}
+        @database_version = nil
+        @version = nil
+      end
+ + See on GitHub + +
+ +

@@ -187,22 +187,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 223
+        def new(connection)
+          BoundSchemaReflection.new(SchemaReflection.new(nil), connection)
+        end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 223
-def new(connection)
-  BoundSchemaReflection.new(SchemaReflection.new(nil), connection)
-end
-
-
- -

+ See on GitHub + + + + @@ -226,27 +226,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 325
+      def add(connection, table_name)
+        if data_source_exists?(connection, table_name)
+          primary_keys(connection, table_name)
+          columns(connection, table_name)
+          columns_hash(connection, table_name)
+          indexes(connection, table_name)
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 325
-def add(connection, table_name)
-  if data_source_exists?(connection, table_name)
-    primary_keys(connection, table_name)
-    columns(connection, table_name)
-    columns_hash(connection, table_name)
-    indexes(connection, table_name)
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -266,22 +266,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 303
+      def cached?(table_name)
+        @columns.key?(table_name)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 303
-def cached?(table_name)
-  @columns.key?(table_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -301,26 +301,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 390
+      def clear_data_source_cache!(_connection, name)
+        @columns.delete name
+        @columns_hash.delete name
+        @primary_keys.delete name
+        @data_sources.delete name
+        @indexes.delete name
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 390
-def clear_data_source_cache!(_connection, name)
-  @columns.delete name
-  @columns_hash.delete name
-  @primary_keys.delete name
-  @data_sources.delete name
-  @indexes.delete name
-end
-
-
- -

+ See on GitHub + + + +

@@ -340,28 +340,28 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 340
-def columns(connection, table_name)
-  if ignored_table?(table_name)
-    raise ActiveRecord::StatementInvalid, "Table '#{table_name}' doesn't exist"
-  end
+          
+            
+ + Source code + - @columns.fetch(table_name) do - @columns[deep_deduplicate(table_name)] = deep_deduplicate(connection.columns(table_name)) - end -end
-
-
- -

+
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 340
+      def columns(connection, table_name)
+        if ignored_table?(table_name)
+          raise ActiveRecord::StatementInvalid, "Table '#{table_name}' doesn't exist"
+        end
+
+        @columns.fetch(table_name) do
+          @columns[deep_deduplicate(table_name)] = deep_deduplicate(connection.columns(table_name))
+        end
+      end
+ + See on GitHub + + + +

@@ -381,24 +381,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 352
+      def columns_hash(connection, table_name)
+        @columns_hash.fetch(table_name) do
+          @columns_hash[deep_deduplicate(table_name)] = columns(connection, table_name).index_by(&:name).freeze
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 352
-def columns_hash(connection, table_name)
-  @columns_hash.fetch(table_name) do
-    @columns_hash[deep_deduplicate(table_name)] = columns(connection, table_name).index_by(&:name).freeze
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -418,22 +418,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 359
+      def columns_hash?(connection, table_name)
+        @columns_hash.key?(table_name)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 359
-def columns_hash?(connection, table_name)
-  @columns_hash.key?(table_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -453,26 +453,26 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 316
-def data_source_exists?(connection, name)
-  return if ignored_table?(name)
-  prepare_data_sources(connection) if @data_sources.empty?
-  return @data_sources[name] if @data_sources.key? name
+          
+            
+ + Source code + - @data_sources[deep_deduplicate(name)] = connection.data_source_exists?(name) -end
-
-
- -

+
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 316
+      def data_source_exists?(connection, name)
+        return if ignored_table?(name)
+        prepare_data_sources(connection) if @data_sources.empty?
+        return @data_sources[name] if @data_sources.key? name
+
+        @data_sources[deep_deduplicate(name)] = connection.data_source_exists?(name)
+      end
+ + See on GitHub + + + +

@@ -492,28 +492,28 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 407
+      def dump_to(filename)
+        open(filename) { |f|
+          if filename.include?(".dump")
+            f.write(Marshal.dump(self))
+          else
+            f.write(YAML.dump(self))
+          end
+        }
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 407
-def dump_to(filename)
-  open(filename) { |f|
-    if filename.include?(".dump")
-      f.write(Marshal.dump(self))
-    else
-      f.write(YAML.dump(self))
-    end
-  }
-end
-
-
- -

+ See on GitHub + + + +

@@ -533,28 +533,28 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 363
+      def indexes(connection, table_name)
+        @indexes.fetch(table_name) do
+          if data_source_exists?(connection, table_name)
+            @indexes[deep_deduplicate(table_name)] = deep_deduplicate(connection.indexes(table_name))
+          else
+            []
+          end
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 363
-def indexes(connection, table_name)
-  @indexes.fetch(table_name) do
-    if data_source_exists?(connection, table_name)
-      @indexes[deep_deduplicate(table_name)] = deep_deduplicate(connection.indexes(table_name))
-    else
-      []
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -574,32 +574,32 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 289
-def init_with(coder)
-  @columns          = coder["columns"]
-  @columns_hash     = coder["columns_hash"]
-  @primary_keys     = coder["primary_keys"]
-  @data_sources     = coder["data_sources"]
-  @indexes          = coder["indexes"] || {}
-  @version          = coder["version"]
-  @database_version = coder["database_version"]
+          
+            
+ + Source code + - unless coder["deduplicated"] - derive_columns_hash_and_deduplicate_values - end -end
-
-
- -

+
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 289
+      def init_with(coder)
+        @columns          = coder["columns"]
+        @columns_hash     = coder["columns_hash"]
+        @primary_keys     = coder["primary_keys"]
+        @data_sources     = coder["data_sources"]
+        @indexes          = coder["indexes"] || {}
+        @version          = coder["version"]
+        @database_version = coder["database_version"]
+
+        unless coder["deduplicated"]
+          derive_columns_hash_and_deduplicate_values
+        end
+      end
+ + See on GitHub + + + +

@@ -619,26 +619,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 307
+      def primary_keys(connection, table_name)
+        @primary_keys.fetch(table_name) do
+          if data_source_exists?(connection, table_name)
+            @primary_keys[deep_deduplicate(table_name)] = deep_deduplicate(connection.primary_key(table_name))
+          end
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 307
-def primary_keys(connection, table_name)
-  @primary_keys.fetch(table_name) do
-    if data_source_exists?(connection, table_name)
-      @primary_keys[deep_deduplicate(table_name)] = deep_deduplicate(connection.primary_key(table_name))
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -658,22 +658,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 381
+      def schema_version
+        @version
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 381
-def schema_version
-  @version
-end
-
-
- -

+ See on GitHub + + + +

@@ -693,22 +693,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 385
+      def size
+        [@columns, @columns_hash, @primary_keys, @data_sources].sum(&:size)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 385
-def size
-  [@columns, @columns_hash, @primary_keys, @data_sources].sum(&:size)
-end
-
-
- -

+ See on GitHub + + + +

@@ -728,22 +728,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 377
+      def version(connection)
+        @version ||= connection.schema_version
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 377
-def version(connection)
-  @version ||= connection.schema_version
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/SchemaReflection.html b/src/classes/ActiveRecord/ConnectionAdapters/SchemaReflection.html index 0717110cee..a1639fdeec 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/SchemaReflection.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/SchemaReflection.html @@ -166,23 +166,23 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 16
-def initialize(cache_path, cache = nil)
-  @cache = cache
-  @cache_path = cache_path
-end
-
-
- - + +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 16
+      def initialize(cache_path, cache = nil)
+        @cache = cache
+        @cache_path = cache_path
+      end
+ + See on GitHub + +
+ + @@ -206,22 +206,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 45
+      def add(connection, name)
+        cache(connection).add(connection, name)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 45
-def add(connection, name)
-  cache(connection).add(connection, name)
-end
-
-
- - + See on GitHub + + + +

@@ -241,30 +241,30 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 87
-def cached?(table_name)
-  if @cache.nil?
-    # If `check_schema_cache_dump_version` is enabled we can't load
-    # the schema cache dump without connecting to the database.
-    unless self.class.check_schema_cache_dump_version
-      @cache = load_cache(nil)
-    end
-  end
+          
+            
+ + Source code + - @cache&.cached?(table_name) -end
-
-
- -

+
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 87
+      def cached?(table_name)
+        if @cache.nil?
+          # If `check_schema_cache_dump_version` is enabled we can't load
+          # the schema cache dump without connecting to the database.
+          unless self.class.check_schema_cache_dump_version
+            @cache = load_cache(nil)
+          end
+        end
+
+        @cache&.cached?(table_name)
+      end
+ + See on GitHub + + + +

@@ -284,24 +284,24 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 25
-def clear!
-  @cache = empty_cache
+          
+            
+ + Source code + - nil -end
-
-
- -

+
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 25
+      def clear!
+        @cache = empty_cache
+
+        nil
+      end
+ + See on GitHub + + + +

@@ -321,24 +321,24 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 81
-def clear_data_source_cache!(connection, name)
-  return if @cache.nil? && !possible_cache_available?
+          
+            
+ + Source code + - cache(connection).clear_data_source_cache!(connection, name) -end
-
-
- -

+
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 81
+      def clear_data_source_cache!(connection, name)
+        return if @cache.nil? && !possible_cache_available?
+
+        cache(connection).clear_data_source_cache!(connection, name)
+      end
+ + See on GitHub + + + +

@@ -358,22 +358,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 53
+      def columns(connection, table_name)
+        cache(connection).columns(connection, table_name)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 53
-def columns(connection, table_name)
-  cache(connection).columns(connection, table_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -393,22 +393,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 57
+      def columns_hash(connection, table_name)
+        cache(connection).columns_hash(connection, table_name)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 57
-def columns_hash(connection, table_name)
-  cache(connection).columns_hash(connection, table_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -428,22 +428,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 61
+      def columns_hash?(connection, table_name)
+        cache(connection).columns_hash?(connection, table_name)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 61
-def columns_hash?(connection, table_name)
-  cache(connection).columns_hash?(connection, table_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -463,22 +463,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 41
+      def data_source_exists?(connection, name)
+        cache(connection).data_source_exists?(connection, name)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 41
-def data_source_exists?(connection, name)
-  cache(connection).data_source_exists?(connection, name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -498,22 +498,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 49
+      def data_sources(connection, name)
+        cache(connection).data_sources(connection, name)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 49
-def data_sources(connection, name)
-  cache(connection).data_sources(connection, name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -533,26 +533,26 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 99
-def dump_to(connection, filename)
-  fresh_cache = empty_cache
-  fresh_cache.add_all(connection)
-  fresh_cache.dump_to(filename)
+          
+            
+ + Source code + - @cache = fresh_cache -end
-
-
- -

+
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 99
+      def dump_to(connection, filename)
+        fresh_cache = empty_cache
+        fresh_cache.add_all(connection)
+        fresh_cache.dump_to(filename)
+
+        @cache = fresh_cache
+      end
+ + See on GitHub + + + +

@@ -572,22 +572,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 65
+      def indexes(connection, table_name)
+        cache(connection).indexes(connection, table_name)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 65
-def indexes(connection, table_name)
-  cache(connection).indexes(connection, table_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -607,24 +607,24 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 31
-def load!(connection)
-  cache(connection)
+          
+            
+ + Source code + - self -end
-
-
- -

+
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 31
+      def load!(connection)
+        cache(connection)
+
+        self
+      end
+ + See on GitHub + + + +

@@ -644,22 +644,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 37
+      def primary_keys(connection, table_name)
+        cache(connection).primary_keys(connection, table_name)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 37
-def primary_keys(connection, table_name)
-  cache(connection).primary_keys(connection, table_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -679,22 +679,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 21
+      def set_schema_cache(cache)
+        @cache = cache
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 21
-def set_schema_cache(cache)
-  @cache = cache
-end
-
-
- -

+ See on GitHub + + + +

@@ -714,22 +714,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 77
+      def size(connection)
+        cache(connection).size
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 77
-def size(connection)
-  cache(connection).size
-end
-
-
- -

+ See on GitHub + + + +

@@ -749,22 +749,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 73
+      def version(connection)
+        cache(connection).version(connection)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 73
-def version(connection)
-  cache(connection).version(connection)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html b/src/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html index 8d5f2685a9..0993509f81 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html @@ -287,7 +287,8 @@

- + +

@@ -327,30 +328,30 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1262
-def add_check_constraint(table_name, expression, if_not_exists: false, **options)
-  return unless supports_check_constraints?
+          
+            
+ + Source code + - options = check_constraint_options(table_name, expression, options) - return if if_not_exists && check_constraint_exists?(table_name, **options) +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1262
+      def add_check_constraint(table_name, expression, if_not_exists: false, **options)
+        return unless supports_check_constraints?
 
-  at = create_alter_table(table_name)
-  at.add_check_constraint(expression, options)
+        options = check_constraint_options(table_name, expression, options)
+        return if if_not_exists && check_constraint_exists?(table_name, **options)
 
-  execute schema_creation.accept(at)
-end
-
-
- -

+ at = create_alter_table(table_name) + at.add_check_constraint(expression, options) + + execute schema_creation.accept(at) + end + + See on GitHub + + + +

@@ -443,25 +444,25 @@

Examples

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 620
-def add_column(table_name, column_name, type, **options)
-  add_column_def = build_add_column_definition(table_name, column_name, type, **options)
-  return unless add_column_def
+          
+            
+ + Source code + - execute schema_creation.accept(add_column_def) -end
-
-
- -
+
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 620
+      def add_column(table_name, column_name, type, **options)
+        add_column_def = build_add_column_definition(table_name, column_name, type, **options)
+        return unless add_column_def
+
+        execute schema_creation.accept(add_column_def)
+      end
+ + See on GitHub + + + +

@@ -557,29 +558,29 @@

Creatin - -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1142
-def add_foreign_key(from_table, to_table, **options)
-  return unless use_foreign_keys?
-  return if options[:if_not_exists] == true && foreign_key_exists?(from_table, to_table, **options.slice(:column))
+          
+            
+ + Source code + - options = foreign_key_options(from_table, to_table, options) - at = create_alter_table from_table - at.add_foreign_key to_table, options +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1142
+      def add_foreign_key(from_table, to_table, **options)
+        return unless use_foreign_keys?
+        return if options[:if_not_exists] == true && foreign_key_exists?(from_table, to_table, **options.slice(:column))
 
-  execute schema_creation.accept(at)
-end
-
-
- -
+ options = foreign_key_options(from_table, to_table, options) + at = create_alter_table from_table + at.add_foreign_key to_table, options + + execute schema_creation.accept(at) + end + + See on GitHub + + + +

@@ -752,23 +753,23 @@

Cr - -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 886
+      def add_index(table_name, column_name, **options)
+        create_index = build_create_index_definition(table_name, column_name, **options)
+        execute schema_creation.accept(create_index)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 886
-def add_index(table_name, column_name, **options)
-  create_index = build_create_index_definition(table_name, column_name, **options)
-  execute schema_creation.accept(create_index)
-end
-
-
- -
+ See on GitHub + + + +

@@ -845,22 +846,22 @@

+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1031
+      def add_reference(table_name, ref_name, **options)
+        ReferenceDefinition.new(ref_name, **options).add(table_name, self)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1031
-def add_reference(table_name, ref_name, **options)
-  ReferenceDefinition.new(ref_name, **options).add(table_name, self)
-end
-
-
- - + See on GitHub + + + +

@@ -883,23 +884,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1421
+      def add_timestamps(table_name, **options)
+        fragments = add_timestamps_for_alter(table_name, **options)
+        execute "ALTER TABLE #{quote_table_name(table_name)} #{fragments.join(', ')}"
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1421
-def add_timestamps(table_name, **options)
-  fragments = add_timestamps_for_alter(table_name, **options)
-  execute "ALTER TABLE #{quote_table_name(table_name)} #{fragments.join(', ')}"
-end
-
-
- -

+ See on GitHub + + + +

@@ -919,38 +920,38 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1327
-def assume_migrated_upto_version(version)
-  version = version.to_i
-  sm_table = quote_table_name(schema_migration.table_name)
+          
+            
+ + Source code + - migrated = migration_context.get_all_versions - versions = migration_context.migrations.map(&:version) +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1327
+      def assume_migrated_upto_version(version)
+        version = version.to_i
+        sm_table = quote_table_name(schema_migration.table_name)
 
-  unless migrated.include?(version)
-    execute "INSERT INTO #{sm_table} (version) VALUES (#{quote(version)})"
-  end
+        migrated = migration_context.get_all_versions
+        versions = migration_context.migrations.map(&:version)
 
-  inserting = (versions - migrated).select { |v| v < version }
-  if inserting.any?
-    if (duplicate = inserting.detect { |v| inserting.count(v) > 1 })
-      raise "Duplicate migration #{duplicate}. Please renumber your migrations to resolve the conflict."
-    end
-    execute insert_versions_sql(inserting)
-  end
-end
-
-
- -

+ unless migrated.include?(version) + execute "INSERT INTO #{sm_table} (version) VALUES (#{quote(version)})" + end + + inserting = (versions - migrated).select { |v| v < version } + if inserting.any? + if (duplicate = inserting.detect { |v| inserting.count(v) > 1 }) + raise "Duplicate migration #{duplicate}. Please renumber your migrations to resolve the conflict." + end + execute insert_versions_sql(inserting) + end + end + + See on GitHub + + + +

@@ -970,27 +971,27 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 328
-def build_create_table_definition(table_name, id: :primary_key, primary_key: nil, force: nil, **options)
-  table_definition = create_table_definition(table_name, **options.extract!(*valid_table_definition_options, :_skip_validate_options))
-  table_definition.set_primary_key(table_name, id, primary_key, **options.extract!(*valid_primary_key_options, :_skip_validate_options))
+          
+            
+ + Source code + - yield table_definition if block_given? +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 328
+      def build_create_table_definition(table_name, id: :primary_key, primary_key: nil, force: nil, **options)
+        table_definition = create_table_definition(table_name, **options.extract!(*valid_table_definition_options, :_skip_validate_options))
+        table_definition.set_primary_key(table_name, id, primary_key, **options.extract!(*valid_primary_key_options, :_skip_validate_options))
 
-  table_definition
-end
-
-
- -

+ yield table_definition if block_given? + + table_definition + end + + See on GitHub + + + +

@@ -1014,22 +1015,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 695
+      def change_column(table_name, column_name, type, **options)
+        raise NotImplementedError, "change_column is not implemented"
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 695
-def change_column(table_name, column_name, type, **options)
-  raise NotImplementedError, "change_column is not implemented"
-end
-
-
- -

+ See on GitHub + + + +

@@ -1054,22 +1055,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1499
+      def change_column_comment(table_name, column_name, comment_or_changes)
+        raise NotImplementedError, "#{self.class} does not support changing column comments"
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1499
-def change_column_comment(table_name, column_name, comment_or_changes)
-  raise NotImplementedError, "#{self.class} does not support changing column comments"
-end
-
-
- -

+ See on GitHub + + + +

@@ -1103,22 +1104,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 713
+      def change_column_default(table_name, column_name, default_or_changes)
+        raise NotImplementedError, "change_column_default is not implemented"
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 713
-def change_column_default(table_name, column_name, default_or_changes)
-  raise NotImplementedError, "change_column_default is not implemented"
-end
-
-
- -

+ See on GitHub + + + +

@@ -1152,22 +1153,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 742
+      def change_column_null(table_name, column_name, null, default = nil)
+        raise NotImplementedError, "change_column_null is not implemented"
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 742
-def change_column_null(table_name, column_name, null, default = nil)
-  raise NotImplementedError, "change_column_null is not implemented"
-end
-
-
- -

+ See on GitHub + + + +

@@ -1277,28 +1278,28 @@

Remove an index
- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 496
+      def change_table(table_name, base = self, **options)
+        if supports_bulk_alter? && options[:bulk]
+          recorder = ActiveRecord::Migration::CommandRecorder.new(self)
+          yield update_table_definition(table_name, recorder)
+          bulk_change_table(table_name, recorder.commands)
+        else
+          yield update_table_definition(table_name, base)
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 496
-def change_table(table_name, base = self, **options)
-  if supports_bulk_alter? && options[:bulk]
-    recorder = ActiveRecord::Migration::CommandRecorder.new(self)
-    yield update_table_definition(table_name, recorder)
-    bulk_change_table(table_name, recorder.commands)
-  else
-    yield update_table_definition(table_name, base)
-  end
-end
-
-
- -
+ See on GitHub + + + +

@@ -1323,22 +1324,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1489
+      def change_table_comment(table_name, comment_or_changes)
+        raise NotImplementedError, "#{self.class} does not support changing table comments"
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1489
-def change_table_comment(table_name, comment_or_changes)
-  raise NotImplementedError, "#{self.class} does not support changing table comments"
-end
-
-
- -

+ See on GitHub + + + +

@@ -1361,25 +1362,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1311
+      def check_constraint_exists?(table_name, **options)
+        if !options.key?(:name) && !options.key?(:expression)
+          raise ArgumentError, "At least one of :name or :expression must be supplied"
+        end
+        check_constraint_for(table_name, **options).present?
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1311
-def check_constraint_exists?(table_name, **options)
-  if !options.key?(:name) && !options.key?(:expression)
-    raise ArgumentError, "At least one of :name or :expression must be supplied"
-  end
-  check_constraint_for(table_name, **options).present?
-end
-
-
- -

+ See on GitHub + + + +

@@ -1399,22 +1400,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1242
+      def check_constraints(table_name)
+        raise NotImplementedError
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1242
-def check_constraints(table_name)
-  raise NotImplementedError
-end
-
-
- -

+ See on GitHub + + + +

@@ -1450,30 +1451,30 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 132
-def column_exists?(table_name, column_name, type = nil, **options)
-  column_name = column_name.to_s
-  checks = []
-  checks << lambda { |c| c.name == column_name }
-  checks << lambda { |c| c.type == type.to_sym rescue nil } if type
-  column_options_keys.each do |attr|
-    checks << lambda { |c| c.send(attr) == options[attr] } if options.key?(attr)
-  end
+          
+            
+ + Source code + - columns(table_name).any? { |c| checks.all? { |check| check[c] } } -end
-
-
- -

+
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 132
+      def column_exists?(table_name, column_name, type = nil, **options)
+        column_name = column_name.to_s
+        checks = []
+        checks << lambda { |c| c.name == column_name }
+        checks << lambda { |c| c.type == type.to_sym rescue nil } if type
+        column_options_keys.each do |attr|
+          checks << lambda { |c| c.send(attr) == options[attr] } if options.key?(attr)
+        end
+
+        columns(table_name).any? { |c| checks.all? { |check| check[c] } }
+      end
+ + See on GitHub + + + +

@@ -1493,26 +1494,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 107
+      def columns(table_name)
+        table_name = table_name.to_s
+        definitions = column_definitions(table_name)
+        definitions.map do |field|
+          new_column_from_field(table_name, field, definitions)
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 107
-def columns(table_name)
-  table_name = table_name.to_s
-  definitions = column_definitions(table_name)
-  definitions.map do |field|
-    new_column_from_field(table_name, field, definitions)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1575,32 +1576,32 @@

- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 375
-def create_join_table(table_1, table_2, column_options: {}, **options)
-  join_table_name = find_join_table_name(table_1, table_2, options)
+          
+            
+ + Source code + - column_options.reverse_merge!(null: false, index: false) +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 375
+      def create_join_table(table_1, table_2, column_options: {}, **options)
+        join_table_name = find_join_table_name(table_1, table_2, options)
 
-  t1_ref, t2_ref = [table_1, table_2].map { |t| reference_name_for_table(t) }
+        column_options.reverse_merge!(null: false, index: false)
 
-  create_table(join_table_name, **options.merge!(id: false)) do |td|
-    td.references t1_ref, **column_options
-    td.references t2_ref, **column_options
-    yield td if block_given?
-  end
-end
-
-
- - + t1_ref, t2_ref = [table_1, table_2].map { |t| reference_name_for_table(t) } + + create_table(join_table_name, **options.merge!(id: false)) do |td| + td.references t1_ref, **column_options + td.references t2_ref, **column_options + yield td if block_given? + end + end + + See on GitHub + + + +

@@ -1772,50 +1773,50 @@

C - -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 293
-def create_table(table_name, id: :primary_key, primary_key: nil, force: nil, **options, &block)
-  validate_create_table_options!(options)
-  validate_table_length!(table_name) unless options[:_uses_legacy_table_name]
-  td = build_create_table_definition(table_name, id: id, primary_key: primary_key, force: force, **options, &block)
+          
+            
+ + Source code + - if force - drop_table(table_name, force: force, if_exists: true) - else - schema_cache.clear_data_source_cache!(table_name.to_s) - end +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 293
+      def create_table(table_name, id: :primary_key, primary_key: nil, force: nil, **options, &block)
+        validate_create_table_options!(options)
+        validate_table_length!(table_name) unless options[:_uses_legacy_table_name]
+        td = build_create_table_definition(table_name, id: id, primary_key: primary_key, force: force, **options, &block)
 
-  result = execute schema_creation.accept(td)
+        if force
+          drop_table(table_name, force: force, if_exists: true)
+        else
+          schema_cache.clear_data_source_cache!(table_name.to_s)
+        end
 
-  unless supports_indexes_in_create?
-    td.indexes.each do |column_name, index_options|
-      add_index(table_name, column_name, **index_options, if_not_exists: td.if_not_exists)
-    end
-  end
+        result = execute schema_creation.accept(td)
 
-  if supports_comments? && !supports_comments_in_create?
-    if table_comment = td.comment.presence
-      change_table_comment(table_name, table_comment)
-    end
+        unless supports_indexes_in_create?
+          td.indexes.each do |column_name, index_options|
+            add_index(table_name, column_name, **index_options, if_not_exists: td.if_not_exists)
+          end
+        end
 
-    td.columns.each do |column|
-      change_column_comment(table_name, column.name, column.comment) if column.comment.present?
-    end
-  end
+        if supports_comments? && !supports_comments_in_create?
+          if table_comment = td.comment.presence
+            change_table_comment(table_name, table_comment)
+          end
 
-  result
-end
-
-
- -
+ td.columns.each do |column| + change_column_comment(table_name, column.name, column.comment) if column.comment.present? + end + end + + result + end + + See on GitHub + + + +

@@ -1838,24 +1839,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 44
+      def data_source_exists?(name)
+        query_values(data_source_sql(name), "SCHEMA").any? if name.present?
+      rescue NotImplementedError
+        data_sources.include?(name.to_s)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 44
-def data_source_exists?(name)
-  query_values(data_source_sql(name), "SCHEMA").any? if name.present?
-rescue NotImplementedError
-  data_sources.include?(name.to_s)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1875,24 +1876,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 34
+      def data_sources
+        query_values(data_source_sql, "SCHEMA")
+      rescue NotImplementedError
+        tables | views
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 34
-def data_sources
-  query_values(data_source_sql, "SCHEMA")
-rescue NotImplementedError
-  tables | views
-end
-
-
- -

+ See on GitHub + + + +

@@ -1914,23 +1915,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 413
+      def drop_join_table(table_1, table_2, **options)
+        join_table_name = find_join_table_name(table_1, table_2, options)
+        drop_table(join_table_name, **options)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 413
-def drop_join_table(table_1, table_2, **options)
-  join_table_name = find_join_table_name(table_1, table_2, options)
-  drop_table(join_table_name, **options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1959,23 +1960,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 526
+      def drop_table(table_name, **options)
+        schema_cache.clear_data_source_cache!(table_name.to_s)
+        execute "DROP TABLE#{' IF EXISTS' if options[:if_exists]} #{quote_table_name(table_name)}"
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 526
-def drop_table(table_name, **options)
-  schema_cache.clear_data_source_cache!(table_name.to_s)
-  execute "DROP TABLE#{' IF EXISTS' if options[:if_exists]} #{quote_table_name(table_name)}"
-end
-
-
- -

+ See on GitHub + + + +

@@ -2005,22 +2006,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1206
+      def foreign_key_exists?(from_table, to_table = nil, **options)
+        foreign_key_for(from_table, to_table: to_table, **options).present?
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1206
-def foreign_key_exists?(from_table, to_table = nil, **options)
-  foreign_key_for(from_table, to_table: to_table, **options).present?
-end
-
-
- -

+ See on GitHub + + + +

@@ -2040,22 +2041,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1072
+      def foreign_keys(table_name)
+        raise NotImplementedError, "foreign_keys is not implemented"
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1072
-def foreign_keys(table_name)
-  raise NotImplementedError, "foreign_keys is not implemented"
-end
-
-
- -

+ See on GitHub + + + +

@@ -2091,22 +2092,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 102
+      def index_exists?(table_name, column_name, **options)
+        indexes(table_name).any? { |i| i.defined_for?(column_name, **options) }
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 102
-def index_exists?(table_name, column_name, **options)
-  indexes(table_name).any? { |i| i.defined_for?(column_name, **options) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -2126,23 +2127,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 978
+      def index_name_exists?(table_name, index_name)
+        index_name = index_name.to_s
+        indexes(table_name).detect { |i| i.name == index_name }
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 978
-def index_name_exists?(table_name, index_name)
-  index_name = index_name.to_s
-  indexes(table_name).detect { |i| i.name == index_name }
-end
-
-
- -

+ See on GitHub + + + +

@@ -2162,22 +2163,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 81
+      def indexes(table_name)
+        raise NotImplementedError, "#indexes is not implemented"
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 81
-def indexes(table_name)
-  raise NotImplementedError, "#indexes is not implemented"
-end
-
-
- -

+ See on GitHub + + + +

@@ -2197,22 +2198,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1555
+      def max_index_name_size
+        62
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1555
-def max_index_name_size
-  62
-end
-
-
- -

+ See on GitHub + + + +

@@ -2232,22 +2233,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 14
+      def native_database_types
+        {}
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 14
-def native_database_types
-  {}
-end
-
-
- -

+ See on GitHub + + + +

@@ -2267,22 +2268,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1479
+      def options_include_default?(options)
+        options.include?(:default) && !(options[:null] == false && options[:default].nil?)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1479
-def options_include_default?(options)
-  options.include?(:default) && !(options[:null] == false && options[:default].nil?)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2302,24 +2303,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 145
+      def primary_key(table_name)
+        pk = primary_keys(table_name)
+        pk = pk.first unless pk.size > 1
+        pk
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 145
-def primary_key(table_name)
-  pk = primary_keys(table_name)
-  pk = pk.first unless pk.size > 1
-  pk
-end
-
-
- -

+ See on GitHub + + + +

@@ -2343,7 +2344,8 @@

-

+ +

@@ -2373,31 +2375,31 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1293
-def remove_check_constraint(table_name, expression = nil, if_exists: false, **options)
-  return unless supports_check_constraints?
+          
+            
+ + Source code + - return if if_exists && !check_constraint_exists?(table_name, **options) +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1293
+      def remove_check_constraint(table_name, expression = nil, if_exists: false, **options)
+        return unless supports_check_constraints?
 
-  chk_name_to_delete = check_constraint_for!(table_name, expression: expression, **options).name
+        return if if_exists && !check_constraint_exists?(table_name, **options)
 
-  at = create_alter_table(table_name)
-  at.drop_check_constraint(chk_name_to_delete)
+        chk_name_to_delete = check_constraint_for!(table_name, expression: expression, **options).name
 
-  execute schema_creation.accept(at)
-end
-
-
- -

+ at = create_alter_table(table_name) + at.drop_check_constraint(chk_name_to_delete) + + execute schema_creation.accept(at) + end + + See on GitHub + + + +

@@ -2427,24 +2429,24 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 683
-def remove_column(table_name, column_name, type = nil, **options)
-  return if options[:if_exists] == true && !column_exists?(table_name, column_name)
+          
+            
+ + Source code + - execute "ALTER TABLE #{quote_table_name(table_name)} #{remove_column_for_alter(table_name, column_name, type, **options)}" -end
-
-
- -

+
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 683
+      def remove_column(table_name, column_name, type = nil, **options)
+        return if options[:if_exists] == true && !column_exists?(table_name, column_name)
+
+        execute "ALTER TABLE #{quote_table_name(table_name)} #{remove_column_for_alter(table_name, column_name, type, **options)}"
+      end
+ + See on GitHub + + + +

@@ -2472,27 +2474,27 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 659
-def remove_columns(table_name, *column_names, type: nil, **options)
-  if column_names.empty?
-    raise ArgumentError.new("You must specify at least one column name. Example: remove_columns(:people, :first_name)")
-  end
+          
+            
+ + Source code + - remove_column_fragments = remove_columns_for_alter(table_name, *column_names, type: type, **options) - execute "ALTER TABLE #{quote_table_name(table_name)} #{remove_column_fragments.join(', ')}" -end
-
-
- -

+
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 659
+      def remove_columns(table_name, *column_names, type: nil, **options)
+        if column_names.empty?
+          raise ArgumentError.new("You must specify at least one column name. Example: remove_columns(:people, :first_name)")
+        end
+
+        remove_column_fragments = remove_columns_for_alter(table_name, *column_names, type: type, **options)
+        execute "ALTER TABLE #{quote_table_name(table_name)} #{remove_column_fragments.join(', ')}"
+      end
+ + See on GitHub + + + +

@@ -2543,30 +2545,30 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1183
-def remove_foreign_key(from_table, to_table = nil, **options)
-  return unless use_foreign_keys?
-  return if options.delete(:if_exists) == true && !foreign_key_exists?(from_table, to_table)
+          
+            
+ + Source code + - fk_name_to_delete = foreign_key_for!(from_table, to_table: to_table, **options).name +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1183
+      def remove_foreign_key(from_table, to_table = nil, **options)
+        return unless use_foreign_keys?
+        return if options.delete(:if_exists) == true && !foreign_key_exists?(from_table, to_table)
 
-  at = create_alter_table from_table
-  at.drop_foreign_key fk_name_to_delete
+        fk_name_to_delete = foreign_key_for!(from_table, to_table: to_table, **options).name
 
-  execute schema_creation.accept(at)
-end
-
-
- -

+ at = create_alter_table from_table + at.drop_foreign_key fk_name_to_delete + + execute schema_creation.accept(at) + end + + See on GitHub + + + +

@@ -2627,26 +2629,26 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 937
-def remove_index(table_name, column_name = nil, **options)
-  return if options[:if_exists] && !index_exists?(table_name, column_name, **options)
+          
+            
+ + Source code + - index_name = index_name_for_remove(table_name, column_name, options) +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 937
+      def remove_index(table_name, column_name = nil, **options)
+        return if options[:if_exists] && !index_exists?(table_name, column_name, **options)
 
-  execute "DROP INDEX #{quote_column_name(index_name)} ON #{quote_table_name(table_name)}"
-end
-
-
- -

+ index_name = index_name_for_remove(table_name, column_name, options) + + execute "DROP INDEX #{quote_column_name(index_name)} ON #{quote_table_name(table_name)}" + end + + See on GitHub + + + +

@@ -2685,36 +2687,36 @@

- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1051
-def remove_reference(table_name, ref_name, foreign_key: false, polymorphic: false, **options)
-  conditional_options = options.slice(:if_exists, :if_not_exists)
+          
+            
+ + Source code + - if foreign_key - reference_name = Base.pluralize_table_names ? ref_name.to_s.pluralize : ref_name - if foreign_key.is_a?(Hash) - foreign_key_options = foreign_key.merge(conditional_options) - else - foreign_key_options = { to_table: reference_name, **conditional_options } - end - foreign_key_options[:column] ||= "#{ref_name}_id" - remove_foreign_key(table_name, **foreign_key_options) - end +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1051
+      def remove_reference(table_name, ref_name, foreign_key: false, polymorphic: false, **options)
+        conditional_options = options.slice(:if_exists, :if_not_exists)
 
-  remove_column(table_name, "#{ref_name}_id", **conditional_options)
-  remove_column(table_name, "#{ref_name}_type", **conditional_options) if polymorphic
-end
-
-
- - + if foreign_key + reference_name = Base.pluralize_table_names ? ref_name.to_s.pluralize : ref_name + if foreign_key.is_a?(Hash) + foreign_key_options = foreign_key.merge(conditional_options) + else + foreign_key_options = { to_table: reference_name, **conditional_options } + end + foreign_key_options[:column] ||= "#{ref_name}_id" + remove_foreign_key(table_name, **foreign_key_options) + end + + remove_column(table_name, "#{ref_name}_id", **conditional_options) + remove_column(table_name, "#{ref_name}_type", **conditional_options) if polymorphic + end + + See on GitHub + + + +

@@ -2737,22 +2739,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1430
+      def remove_timestamps(table_name, **options)
+        remove_columns table_name, :updated_at, :created_at
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1430
-def remove_timestamps(table_name, **options)
-  remove_columns table_name, :updated_at, :created_at
-end
-
-
- -

+ See on GitHub + + + +

@@ -2775,22 +2777,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 750
+      def rename_column(table_name, column_name, new_column_name)
+        raise NotImplementedError, "rename_column is not implemented"
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 750
-def rename_column(table_name, column_name, new_column_name)
-  raise NotImplementedError, "rename_column is not implemented"
-end
-
-
- -

+ See on GitHub + + + +

@@ -2815,30 +2817,30 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 951
-def rename_index(table_name, old_name, new_name)
-  old_name = old_name.to_s
-  new_name = new_name.to_s
-  validate_index_length!(table_name, new_name)
+          
+            
+ + Source code + - # this is a naive implementation; some DBs may support this more efficiently (PostgreSQL, for instance) - old_index_def = indexes(table_name).detect { |i| i.name == old_name } - return unless old_index_def - add_index(table_name, old_index_def.columns, name: new_name, unique: old_index_def.unique) - remove_index(table_name, name: old_name) -end
-
-
- -

+
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 951
+      def rename_index(table_name, old_name, new_name)
+        old_name = old_name.to_s
+        new_name = new_name.to_s
+        validate_index_length!(table_name, new_name)
+
+        # this is a naive implementation; some DBs may support this more efficiently (PostgreSQL, for instance)
+        old_index_def = indexes(table_name).detect { |i| i.name == old_name }
+        return unless old_index_def
+        add_index(table_name, old_index_def.columns, name: new_name, unique: old_index_def.unique)
+        remove_index(table_name, name: old_name)
+      end
+ + See on GitHub + + + +

@@ -2861,22 +2863,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 510
+      def rename_table(table_name, new_name, **)
+        raise NotImplementedError, "rename_table is not implemented"
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 510
-def rename_table(table_name, new_name, **)
-  raise NotImplementedError, "rename_table is not implemented"
-end
-
-
- -

+ See on GitHub + + + +

@@ -2896,22 +2898,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 28
+      def table_alias_for(table_name)
+        table_name[0...table_alias_length].tr(".", "_")
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 28
-def table_alias_for(table_name)
-  table_name[0...table_alias_length].tr(".", "_")
-end
-
-
- -

+ See on GitHub + + + +

@@ -2931,22 +2933,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 23
+      def table_comment(table_name)
+        nil
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 23
-def table_comment(table_name)
-  nil
-end
-
-
- -

+ See on GitHub + + + +

@@ -2969,24 +2971,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 59
+      def table_exists?(table_name)
+        query_values(data_source_sql(table_name, type: "BASE TABLE"), "SCHEMA").any? if table_name.present?
+      rescue NotImplementedError
+        tables.include?(table_name.to_s)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 59
-def table_exists?(table_name)
-  query_values(data_source_sql(table_name, type: "BASE TABLE"), "SCHEMA").any? if table_name.present?
-rescue NotImplementedError
-  tables.include?(table_name.to_s)
-end
-
-
- -

+ See on GitHub + + + +

@@ -3006,22 +3008,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 18
+      def table_options(table_name)
+        nil
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 18
-def table_options(table_name)
-  nil
-end
-
-
- -

+ See on GitHub + + + +

@@ -3041,22 +3043,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 51
+      def tables
+        query_values(data_source_sql(type: "BASE TABLE"), "SCHEMA")
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 51
-def tables
-  query_values(data_source_sql(type: "BASE TABLE"), "SCHEMA")
-end
-
-
- -

+ See on GitHub + + + +

@@ -3076,22 +3078,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1507
+      def use_foreign_keys?
+        supports_foreign_keys? && foreign_keys_enabled?
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 1507
-def use_foreign_keys?
-  supports_foreign_keys? && foreign_keys_enabled?
-end
-
-
- -

+ See on GitHub + + + +

@@ -3114,24 +3116,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 74
+      def view_exists?(view_name)
+        query_values(data_source_sql(view_name, type: "VIEW"), "SCHEMA").any? if view_name.present?
+      rescue NotImplementedError
+        views.include?(view_name.to_s)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 74
-def view_exists?(view_name)
-  query_values(data_source_sql(view_name, type: "VIEW"), "SCHEMA").any? if view_name.present?
-rescue NotImplementedError
-  views.include?(view_name.to_s)
-end
-
-
- -

+ See on GitHub + + + +

@@ -3151,22 +3153,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 66
+      def views
+        query_values(data_source_sql(type: "VIEW"), "SCHEMA")
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 66
-def views
-  query_values(data_source_sql(type: "VIEW"), "SCHEMA")
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/Table.html b/src/classes/ActiveRecord/ConnectionAdapters/Table.html index 164de9ca6b..5d2ce82425 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/Table.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/Table.html @@ -250,23 +250,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 711
+      def initialize(table_name, base)
+        @name = table_name
+        @base = base
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 711
-def initialize(table_name, base)
-  @name = table_name
-  @base = base
-end
-
-
- - + See on GitHub + + + + @@ -294,7 +294,8 @@

- + +

@@ -320,23 +321,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 788
+      def change(column_name, type, **options)
+        raise_on_if_exist_options(options)
+        @base.change_column(name, column_name, type, **options)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 788
-def change(column_name, type, **options)
-  raise_on_if_exist_options(options)
-  @base.change_column(name, column_name, type, **options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -363,22 +364,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 800
+      def change_default(column_name, default_or_changes)
+        @base.change_column_default(name, column_name, default_or_changes)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 800
-def change_default(column_name, default_or_changes)
-  @base.change_column_default(name, column_name, default_or_changes)
-end
-
-
- -

+ See on GitHub + + + +

@@ -404,22 +405,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 810
+      def change_null(column_name, null, default = nil)
+        @base.change_column_null(name, column_name, null, default)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 810
-def change_null(column_name, null, default = nil)
-  @base.change_column_null(name, column_name, null, default)
-end
-
-
- -

+ See on GitHub + + + +

@@ -444,22 +445,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 920
+      def check_constraint(*args, **options)
+        @base.add_check_constraint(name, *args, **options)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 920
-def check_constraint(*args, **options)
-  @base.add_check_constraint(name, *args, **options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -486,22 +487,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 940
+      def check_constraint_exists?(*args, **options)
+        @base.check_constraint_exists?(name, *args, **options)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 940
-def check_constraint_exists?(*args, **options)
-  @base.check_constraint_exists?(name, *args, **options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -526,27 +527,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 721
+      def column(column_name, type, index: nil, **options)
+        raise_on_if_exist_options(options)
+        @base.add_column(name, column_name, type, **options)
+        if index
+          index_options = index.is_a?(Hash) ? index : {}
+          index(column_name, **index_options)
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 721
-def column(column_name, type, index: nil, **options)
-  raise_on_if_exist_options(options)
-  @base.add_column(name, column_name, type, **options)
-  if index
-    index_options = index.is_a?(Hash) ? index : {}
-    index(column_name, **index_options)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -571,22 +572,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 735
+      def column_exists?(column_name, type = nil, **options)
+        @base.column_exists?(name, column_name, type, **options)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 735
-def column_exists?(column_name, type = nil, **options)
-  @base.column_exists?(name, column_name, type, **options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -612,23 +613,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 890
+      def foreign_key(*args, **options)
+        raise_on_if_exist_options(options)
+        @base.add_foreign_key(name, *args, **options)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 890
-def foreign_key(*args, **options)
-  raise_on_if_exist_options(options)
-  @base.add_foreign_key(name, *args, **options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -653,22 +654,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 911
+      def foreign_key_exists?(*args, **options)
+        @base.foreign_key_exists?(name, *args, **options)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 911
-def foreign_key_exists?(*args, **options)
-  @base.foreign_key_exists?(name, *args, **options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -695,23 +696,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 747
+      def index(column_name, **options)
+        raise_on_if_exist_options(options)
+        @base.add_index(name, column_name, **options)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 747
-def index(column_name, **options)
-  raise_on_if_exist_options(options)
-  @base.add_index(name, column_name, **options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -738,22 +739,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 759
+      def index_exists?(column_name, **options)
+        @base.index_exists?(name, column_name, **options)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 759
-def index_exists?(column_name, **options)
-  @base.index_exists?(name, column_name, **options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -783,25 +784,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 862
+      def references(*args, **options)
+        raise_on_if_exist_options(options)
+        args.each do |ref_name|
+          @base.add_reference(name, ref_name, **options)
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 862
-def references(*args, **options)
-  raise_on_if_exist_options(options)
-  args.each do |ref_name|
-    @base.add_reference(name, ref_name, **options)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -827,23 +828,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 820
+      def remove(*column_names, **options)
+        raise_on_if_exist_options(options)
+        @base.remove_columns(name, *column_names, **options)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 820
-def remove(*column_names, **options)
-  raise_on_if_exist_options(options)
-  @base.remove_columns(name, *column_names, **options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -867,7 +868,8 @@

-

+ +

@@ -892,22 +894,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 929
+      def remove_check_constraint(*args, **options)
+        @base.remove_check_constraint(name, *args, **options)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 929
-def remove_check_constraint(*args, **options)
-  @base.remove_check_constraint(name, *args, **options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -933,23 +935,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 901
+      def remove_foreign_key(*args, **options)
+        raise_on_if_exist_options(options)
+        @base.remove_foreign_key(name, *args, **options)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 901
-def remove_foreign_key(*args, **options)
-  raise_on_if_exist_options(options)
-  @base.remove_foreign_key(name, *args, **options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -977,23 +979,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 833
+      def remove_index(column_name = nil, **options)
+        raise_on_if_exist_options(options)
+        @base.remove_index(name, column_name, **options)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 833
-def remove_index(column_name = nil, **options)
-  raise_on_if_exist_options(options)
-  @base.remove_index(name, column_name, **options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1023,25 +1025,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 876
+      def remove_references(*args, **options)
+        raise_on_if_exist_options(options)
+        args.each do |ref_name|
+          @base.remove_reference(name, ref_name, **options)
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 876
-def remove_references(*args, **options)
-  raise_on_if_exist_options(options)
-  args.each do |ref_name|
-    @base.remove_reference(name, ref_name, **options)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1066,22 +1068,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 843
+      def remove_timestamps(**options)
+        @base.remove_timestamps(name, **options)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 843
-def remove_timestamps(**options)
-  @base.remove_timestamps(name, **options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1106,22 +1108,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 852
+      def rename(column_name, new_column_name)
+        @base.rename_column(name, column_name, new_column_name)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 852
-def rename(column_name, new_column_name)
-  @base.rename_column(name, column_name, new_column_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1146,22 +1148,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 768
+      def rename_index(index_name, new_index_name)
+        @base.rename_index(name, index_name, new_index_name)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 768
-def rename_index(index_name, new_index_name)
-  @base.rename_index(name, index_name, new_index_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1186,23 +1188,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 777
+      def timestamps(**options)
+        raise_on_if_exist_options(options)
+        @base.add_timestamps(name, **options)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 777
-def timestamps(**options)
-  raise_on_if_exist_options(options)
-  @base.add_timestamps(name, **options)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/TableDefinition.html b/src/classes/ActiveRecord/ConnectionAdapters/TableDefinition.html index 6bfcb83bc8..653bd40daa 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/TableDefinition.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/TableDefinition.html @@ -239,42 +239,42 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 368
+      def initialize(
+        conn,
+        name,
+        temporary: false,
+        if_not_exists: false,
+        options: nil,
+        as: nil,
+        comment: nil,
+        **
+      )
+        @conn = conn
+        @columns_hash = {}
+        @indexes = []
+        @foreign_keys = []
+        @primary_keys = nil
+        @check_constraints = []
+        @temporary = temporary
+        @if_not_exists = if_not_exists
+        @options = options
+        @as = as
+        @name = name
+        @comment = comment
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 368
-def initialize(
-  conn,
-  name,
-  temporary: false,
-  if_not_exists: false,
-  options: nil,
-  as: nil,
-  comment: nil,
-  **
-)
-  @conn = conn
-  @columns_hash = {}
-  @indexes = []
-  @foreign_keys = []
-  @primary_keys = nil
-  @check_constraints = []
-  @temporary = temporary
-  @if_not_exists = if_not_exists
-  @options = options
-  @as = as
-  @name = name
-  @comment = comment
-end
-
-
- - + See on GitHub + + + + @@ -298,22 +298,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 418
+      def [](name)
+        @columns_hash[name.to_s]
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 418
-def [](name)
-  @columns_hash[name.to_s]
-end
-
-
- - + See on GitHub + + + +

@@ -337,7 +337,8 @@

-

+ +

@@ -357,22 +358,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 522
+      def check_constraint(expression, **options)
+        check_constraints << new_check_constraint_definition(expression, options)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 522
-def check_constraint(expression, **options)
-  check_constraints << new_check_constraint_definition(expression, options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -455,33 +456,33 @@

Short-hand examples

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 489
+      def column(name, type, index: nil, **options)
+        name = name.to_s
+        type = type.to_sym if type
+
+        raise_on_duplicate_column(name)
+        @columns_hash[name] = new_column_definition(name, type, **options)
+
+        if index
+          index_options = index.is_a?(Hash) ? index : {}
+          index(name, **index_options)
+        end
+
+        self
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 489
-def column(name, type, index: nil, **options)
-  name = name.to_s
-  type = type.to_sym if type
-
-  raise_on_duplicate_column(name)
-  @columns_hash[name] = new_column_definition(name, type, **options)
-
-  if index
-    index_options = index.is_a?(Hash) ? index : {}
-    index(name, **index_options)
-  end
-
-  self
-end
-
-
- -
+ See on GitHub + + + +

@@ -501,20 +502,20 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 415
+      def columns; @columns_hash.values; end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 415
-def columns; @columns_hash.values; end
-
-
- -

+ See on GitHub + + + +

@@ -534,22 +535,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 518
+      def foreign_key(to_table, **options)
+        foreign_keys << new_foreign_key_definition(to_table, options)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 518
-def foreign_key(to_table, **options)
-  foreign_keys << new_foreign_key_definition(to_table, options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -572,22 +573,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 514
+      def index(column_name, **options)
+        indexes << [column_name, options]
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 514
-def index(column_name, **options)
-  indexes << [column_name, options]
-end
-
-
- -

+ See on GitHub + + + +

@@ -618,24 +619,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 548
+      def references(*args, **options)
+        args.each do |ref_name|
+          ReferenceDefinition.new(ref_name, **options).add_to(self)
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 548
-def references(*args, **options)
-  args.each do |ref_name|
-    ReferenceDefinition.new(ref_name, **options).add_to(self)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -658,22 +659,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 506
+      def remove_column(name)
+        @columns_hash.delete name.to_s
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 506
-def remove_column(name)
-  @columns_hash.delete name.to_s
-end
-
-
- -

+ See on GitHub + + + +

@@ -693,35 +694,35 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 392
+      def set_primary_key(table_name, id, primary_key, **options)
+        if id && !as
+          pk = primary_key || Base.get_primary_key(table_name.to_s.singularize)
+
+          if id.is_a?(Hash)
+            options.merge!(id.except(:type))
+            id = id.fetch(:type, :primary_key)
+          end
+
+          if pk.is_a?(Array)
+            primary_keys(pk)
+          else
+            primary_key(pk, id, **options)
+          end
+        end
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 392
-def set_primary_key(table_name, id, primary_key, **options)
-  if id && !as
-    pk = primary_key || Base.get_primary_key(table_name.to_s.singularize)
-
-    if id.is_a?(Hash)
-      options.merge!(id.except(:type))
-      id = id.fetch(:type, :primary_key)
-    end
-
-    if pk.is_a?(Array)
-      primary_keys(pk)
-    else
-      primary_key(pk, id, **options)
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -744,29 +745,29 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 530
+      def timestamps(**options)
+        options[:null] = false if options[:null].nil?
+
+        if !options.key?(:precision) && @conn.supports_datetime_with_precision?
+          options[:precision] = 6
+        end
+
+        column(:created_at, :datetime, **options)
+        column(:updated_at, :datetime, **options)
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 530
-def timestamps(**options)
-  options[:null] = false if options[:null].nil?
-
-  if !options.key?(:precision) && @conn.supports_datetime_with_precision?
-    options[:precision] = 6
-  end
-
-  column(:created_at, :datetime, **options)
-  column(:updated_at, :datetime, **options)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/TransactionInstrumenter.html b/src/classes/ActiveRecord/ConnectionAdapters/TransactionInstrumenter.html index 9756da33bf..f72175d901 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/TransactionInstrumenter.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/TransactionInstrumenter.html @@ -103,25 +103,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 78
+      def initialize(payload = {})
+        @handle = nil
+        @started = false
+        @payload = nil
+        @base_payload = payload
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 78
-def initialize(payload = {})
-  @handle = nil
-  @started = false
-  @payload = nil
-  @base_payload = payload
-end
-
-
- - + See on GitHub + + + + @@ -145,26 +145,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 97
+      def finish(outcome)
+        raise InstrumentationNotStartedError.new("Called finish on a transaction that hasn't started") unless @started
+        @started = false
+
+        @payload[:outcome] = outcome
+        @handle.finish
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 97
-def finish(outcome)
-  raise InstrumentationNotStartedError.new("Called finish on a transaction that hasn't started") unless @started
-  @started = false
-
-  @payload[:outcome] = outcome
-  @handle.finish
-end
-
-
- - + See on GitHub + + + +

@@ -184,27 +184,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 88
+      def start
+        raise InstrumentationAlreadyStartedError.new("Called start on an already started transaction") if @started
+        @started = true
+
+        @payload = @base_payload.dup
+        @handle = ActiveSupport::Notifications.instrumenter.build_handle("transaction.active_record", @payload)
+        @handle.start
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 88
-def start
-  raise InstrumentationAlreadyStartedError.new("Called start on an already started transaction") if @started
-  @started = true
-
-  @payload = @base_payload.dup
-  @handle = ActiveSupport::Notifications.instrumenter.build_handle("transaction.active_record", @payload)
-  @handle.start
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/TransactionState.html b/src/classes/ActiveRecord/ConnectionAdapters/TransactionState.html index 50d667dd9e..10874d3a1c 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/TransactionState.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/TransactionState.html @@ -146,23 +146,23 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 7
-def initialize(state = nil)
-  @state = state
-  @children = nil
-end
-
-
- - + +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 7
+      def initialize(state = nil)
+        @state = state
+        @children = nil
+      end
+ + See on GitHub + +
+ + @@ -186,23 +186,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 12
+      def add_child(state)
+        @children ||= []
+        @children << state
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 12
-def add_child(state)
-  @children ||= []
-  @children << state
-end
-
-
- - + See on GitHub + + + +

@@ -222,22 +222,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 64
+      def commit!
+        @state = :committed
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 64
-def commit!
-  @state = :committed
-end
-
-
- -

+ See on GitHub + + + +

@@ -257,22 +257,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 21
+      def committed?
+        @state == :committed || @state == :fully_committed
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 21
-def committed?
-  @state == :committed || @state == :fully_committed
-end
-
-
- -

+ See on GitHub + + + +

@@ -292,22 +292,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 45
+      def completed?
+        committed? || rolledback?
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 45
-def completed?
-  committed? || rolledback?
-end
-
-
- -

+ See on GitHub + + + +

@@ -327,22 +327,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 17
+      def finalized?
+        @state
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 17
-def finalized?
-  @state
-end
-
-
- -

+ See on GitHub + + + +

@@ -362,22 +362,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 68
+      def full_commit!
+        @state = :fully_committed
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 68
-def full_commit!
-  @state = :fully_committed
-end
-
-
- -

+ See on GitHub + + + +

@@ -397,23 +397,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 54
+      def full_rollback!
+        @children&.each { |c| c.rollback! }
+        @state = :fully_rolledback
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 54
-def full_rollback!
-  @children&.each { |c| c.rollback! }
-  @state = :fully_rolledback
-end
-
-
- -

+ See on GitHub + + + +

@@ -433,22 +433,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 25
+      def fully_committed?
+        @state == :fully_committed
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 25
-def fully_committed?
-  @state == :fully_committed
-end
-
-
- -

+ See on GitHub + + + +

@@ -468,22 +468,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 41
+      def fully_completed?
+        completed?
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 41
-def fully_completed?
-  completed?
-end
-
-
- -

+ See on GitHub + + + +

@@ -503,22 +503,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 33
+      def fully_rolledback?
+        @state == :fully_rolledback
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 33
-def fully_rolledback?
-  @state == :fully_rolledback
-end
-
-
- -

+ See on GitHub + + + +

@@ -538,23 +538,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 59
+      def invalidate!
+        @children&.each { |c| c.invalidate! }
+        @state = :invalidated
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 59
-def invalidate!
-  @children&.each { |c| c.invalidate! }
-  @state = :invalidated
-end
-
-
- -

+ See on GitHub + + + +

@@ -574,22 +574,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 37
+      def invalidated?
+        @state == :invalidated
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 37
-def invalidated?
-  @state == :invalidated
-end
-
-
- -

+ See on GitHub + + + +

@@ -609,22 +609,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 72
+      def nullify!
+        @state = nil
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 72
-def nullify!
-  @state = nil
-end
-
-
- -

+ See on GitHub + + + +

@@ -644,23 +644,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 49
+      def rollback!
+        @children&.each { |c| c.rollback! }
+        @state = :rolledback
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 49
-def rollback!
-  @children&.each { |c| c.rollback! }
-  @state = :rolledback
-end
-
-
- -

+ See on GitHub + + + +

@@ -680,22 +680,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 29
+      def rolledback?
+        @state == :rolledback || @state == :fully_rolledback
+      end
- -
-
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 29
-def rolledback?
-  @state == :rolledback || @state == :fully_rolledback
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionAdapters/TrilogyAdapter.html b/src/classes/ActiveRecord/ConnectionAdapters/TrilogyAdapter.html index 2e39807e04..13d2a81c2a 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/TrilogyAdapter.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/TrilogyAdapter.html @@ -238,25 +238,25 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/trilogy_adapter.rb, line 57
-def new_client(config)
-  config[:ssl_mode] = parse_ssl_mode(config[:ssl_mode]) if config[:ssl_mode]
-  ::Trilogy.new(config)
-rescue ::Trilogy::ConnectionError, ::Trilogy::ProtocolError => error
-  raise translate_connect_error(config, error)
-end
-
-
- - + +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/trilogy_adapter.rb, line 57
+        def new_client(config)
+          config[:ssl_mode] = parse_ssl_mode(config[:ssl_mode]) if config[:ssl_mode]
+          ::Trilogy.new(config)
+        rescue ::Trilogy::ConnectionError, ::Trilogy::ProtocolError => error
+          raise translate_connect_error(config, error)
+        end
+ + See on GitHub + +
+ +

@@ -276,27 +276,27 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/trilogy_adapter.rb, line 64
-def parse_ssl_mode(mode)
-  return mode if mode.is_a? Integer
-
-  m = mode.to_s.upcase
-  m = "SSL_MODE_#{m}" unless m.start_with? "SSL_MODE_"
-
-  SSL_MODES.fetch(m.to_sym, mode)
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/trilogy_adapter.rb, line 64
+        def parse_ssl_mode(mode)
+          return mode if mode.is_a? Integer
+
+          m = mode.to_s.upcase
+          m = "SSL_MODE_#{m}" unless m.start_with? "SSL_MODE_"
+
+          SSL_MODES.fetch(m.to_sym, mode)
+        end
+ + See on GitHub + +
+ +

@@ -316,33 +316,33 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/trilogy_adapter.rb, line 73
-def translate_connect_error(config, error)
-  case error.error_code
-  when ER_DBACCESS_DENIED_ERROR, ER_BAD_DB_ERROR
-    ActiveRecord::NoDatabaseError.db_error(config[:database])
-  when ER_ACCESS_DENIED_ERROR
-    ActiveRecord::DatabaseConnectionError.username_error(config[:username])
-  else
-    if error.message.include?("TRILOGY_DNS_ERROR")
-      ActiveRecord::DatabaseConnectionError.hostname_error(config[:host])
-    else
-      ActiveRecord::ConnectionNotEstablished.new(error.message)
-    end
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/trilogy_adapter.rb, line 73
+        def translate_connect_error(config, error)
+          case error.error_code
+          when ER_DBACCESS_DENIED_ERROR, ER_BAD_DB_ERROR
+            ActiveRecord::NoDatabaseError.db_error(config[:database])
+          when ER_ACCESS_DENIED_ERROR
+            ActiveRecord::DatabaseConnectionError.username_error(config[:username])
+          else
+            if error.message.include?("TRILOGY_DNS_ERROR")
+              ActiveRecord::DatabaseConnectionError.hostname_error(config[:host])
+            else
+              ActiveRecord::ConnectionNotEstablished.new(error.message)
+            end
+          end
+        end
+ + See on GitHub + +
+ + @@ -366,24 +366,24 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/trilogy_adapter.rb, line 134
-def active?
-  connection&.ping || false
-rescue ::Trilogy::Error
-  false
-end
-
-
- - + +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/trilogy_adapter.rb, line 134
+      def active?
+        connection&.ping || false
+      rescue ::Trilogy::Error
+        false
+      end
+ + See on GitHub + +
+ +

@@ -403,26 +403,26 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/trilogy_adapter.rb, line 150
-def discard!
-  super
-  unless connection.nil?
-    connection.discard!
-    self.connection = nil
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/trilogy_adapter.rb, line 150
+      def discard!
+        super
+        unless connection.nil?
+          connection.discard!
+          self.connection = nil
+        end
+      end
+ + See on GitHub + +
+ +

@@ -442,26 +442,26 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/trilogy_adapter.rb, line 142
-def disconnect!
-  super
-  unless connection.nil?
-    connection.close
-    self.connection = nil
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/trilogy_adapter.rb, line 142
+      def disconnect!
+        super
+        unless connection.nil?
+          connection.close
+          self.connection = nil
+        end
+      end
+ + See on GitHub + +
+ +

@@ -481,24 +481,24 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/trilogy_adapter.rb, line 128
-def quote_string(string)
-  with_raw_connection(allow_retry: true, materialize_transactions: false) do |conn|
-    conn.escape(string)
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/trilogy_adapter.rb, line 128
+      def quote_string(string)
+        with_raw_connection(allow_retry: true, materialize_transactions: false) do |conn|
+          conn.escape(string)
+        end
+      end
+ + See on GitHub + +
+ +

@@ -518,22 +518,22 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/trilogy_adapter.rb, line 120
-def savepoint_errors_invalidate_transactions?
-  true
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/trilogy_adapter.rb, line 120
+      def savepoint_errors_invalidate_transactions?
+        true
+      end
+ + See on GitHub + +
+ +

@@ -553,22 +553,22 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/trilogy_adapter.rb, line 108
-def supports_comments?
-  true
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/trilogy_adapter.rb, line 108
+      def supports_comments?
+        true
+      end
+ + See on GitHub + +
+ +

@@ -588,22 +588,22 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/trilogy_adapter.rb, line 112
-def supports_comments_in_create?
-  true
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/trilogy_adapter.rb, line 112
+      def supports_comments_in_create?
+        true
+      end
+ + See on GitHub + +
+ +

@@ -623,22 +623,22 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/trilogy_adapter.rb, line 104
-def supports_json?
-  !mariadb? && database_version >= "5.7.8"
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/trilogy_adapter.rb, line 104
+      def supports_json?
+        !mariadb? && database_version >= "5.7.8"
+      end
+ + See on GitHub + +
+ +

@@ -658,22 +658,22 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/trilogy_adapter.rb, line 124
-def supports_lazy_transactions?
-  true
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/trilogy_adapter.rb, line 124
+      def supports_lazy_transactions?
+        true
+      end
+ + See on GitHub + +
+ +

@@ -693,22 +693,22 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_adapters/trilogy_adapter.rb, line 116
-def supports_savepoints?
-  true
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_adapters/trilogy_adapter.rb, line 116
+      def supports_savepoints?
+        true
+      end
+ + See on GitHub + +
+ + diff --git a/src/classes/ActiveRecord/ConnectionHandling.html b/src/classes/ActiveRecord/ConnectionHandling.html index 30a96df79d..9eba2a4ded 100644 --- a/src/classes/ActiveRecord/ConnectionHandling.html +++ b/src/classes/ActiveRecord/ConnectionHandling.html @@ -221,23 +221,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_handling.rb, line 319
+    def clear_active_connections!(role = nil)
+      deprecation_for_delegation(__method__)
+      connection_handler.clear_active_connections!(role)
+    end
- -
-
# File activerecord/lib/active_record/connection_handling.rb, line 319
-def clear_active_connections!(role = nil)
-  deprecation_for_delegation(__method__)
-  connection_handler.clear_active_connections!(role)
-end
-
-
- - + See on GitHub + + + +

@@ -257,23 +257,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_handling.rb, line 329
+    def clear_all_connections!(role = nil)
+      deprecation_for_delegation(__method__)
+      connection_handler.clear_all_connections!(role)
+    end
- -
-
# File activerecord/lib/active_record/connection_handling.rb, line 329
-def clear_all_connections!(role = nil)
-  deprecation_for_delegation(__method__)
-  connection_handler.clear_all_connections!(role)
-end
-
-
- -

+ See on GitHub + + + +

@@ -293,24 +293,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_handling.rb, line 244
+    def clear_query_caches_for_current_thread
+      connection_handler.each_connection_pool do |pool|
+        pool.connection.clear_query_cache if pool.active_connection?
+      end
+    end
- -
-
# File activerecord/lib/active_record/connection_handling.rb, line 244
-def clear_query_caches_for_current_thread
-  connection_handler.each_connection_pool do |pool|
-    pool.connection.clear_query_cache if pool.active_connection?
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -330,23 +330,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_handling.rb, line 324
+    def clear_reloadable_connections!(role = nil)
+      deprecation_for_delegation(__method__)
+      connection_handler.clear_reloadable_connections!(role)
+    end
- -
-
# File activerecord/lib/active_record/connection_handling.rb, line 324
-def clear_reloadable_connections!(role = nil)
-  deprecation_for_delegation(__method__)
-  connection_handler.clear_reloadable_connections!(role)
-end
-
-
- -

+ See on GitHub + + + +

@@ -366,22 +366,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_handling.rb, line 291
+    def connected?
+      connection_handler.connected?(connection_specification_name, role: current_role, shard: current_shard)
+    end
- -
-
# File activerecord/lib/active_record/connection_handling.rb, line 291
-def connected?
-  connection_handler.connected?(connection_specification_name, role: current_role, shard: current_shard)
-end
-
-
- -

+ See on GitHub + + + +

@@ -421,34 +421,34 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_handling.rb, line 134
+    def connected_to(role: nil, shard: nil, prevent_writes: false, &blk)
+      if self != Base && !abstract_class
+        raise NotImplementedError, "calling `connected_to` is only allowed on ActiveRecord::Base or abstract classes."
+      end
+
+      if !connection_class? && !primary_class?
+        raise NotImplementedError, "calling `connected_to` is only allowed on the abstract class that established the connection."
+      end
+
+      unless role || shard
+        raise ArgumentError, "must provide a `shard` and/or `role`."
+      end
+
+      with_role_and_shard(role, shard, prevent_writes, &blk)
+    end
- -
-
# File activerecord/lib/active_record/connection_handling.rb, line 134
-def connected_to(role: nil, shard: nil, prevent_writes: false, &blk)
-  if self != Base && !abstract_class
-    raise NotImplementedError, "calling `connected_to` is only allowed on ActiveRecord::Base or abstract classes."
-  end
-
-  if !connection_class? && !primary_class?
-    raise NotImplementedError, "calling `connected_to` is only allowed on the abstract class that established the connection."
-  end
-
-  unless role || shard
-    raise ArgumentError, "must provide a `shard` and/or `role`."
-  end
-
-  with_role_and_shard(role, shard, prevent_writes, &blk)
-end
-
-
- -

+ See on GitHub + + + +

@@ -480,22 +480,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_handling.rb, line 239
+    def connected_to?(role:, shard: ActiveRecord::Base.default_shard)
+      current_role == role.to_sym && current_shard == shard.to_sym
+    end
- -
-
# File activerecord/lib/active_record/connection_handling.rb, line 239
-def connected_to?(role:, shard: ActiveRecord::Base.default_shard)
-  current_role == role.to_sym && current_shard == shard.to_sym
-end
-
-
- -

+ See on GitHub + + + +

@@ -526,33 +526,33 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_handling.rb, line 163
+    def connected_to_many(*classes, role:, shard: nil, prevent_writes: false)
+      classes = classes.flatten
+
+      if self != Base || classes.include?(Base)
+        raise NotImplementedError, "connected_to_many can only be called on ActiveRecord::Base."
+      end
+
+      prevent_writes = true if role == ActiveRecord.reading_role
+
+      append_to_connected_to_stack(role: role, shard: shard, prevent_writes: prevent_writes, klasses: classes)
+      yield
+    ensure
+      connected_to_stack.pop
+    end
- -
-
# File activerecord/lib/active_record/connection_handling.rb, line 163
-def connected_to_many(*classes, role:, shard: nil, prevent_writes: false)
-  classes = classes.flatten
-
-  if self != Base || classes.include?(Base)
-    raise NotImplementedError, "connected_to_many can only be called on ActiveRecord::Base."
-  end
-
-  prevent_writes = true if role == ActiveRecord.reading_role
-
-  append_to_connected_to_stack(role: role, shard: shard, prevent_writes: prevent_writes, klasses: classes)
-  yield
-ensure
-  connected_to_stack.pop
-end
-
-
- -

+ See on GitHub + + + +

@@ -576,24 +576,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_handling.rb, line 185
+    def connecting_to(role: default_role, shard: default_shard, prevent_writes: false)
+      prevent_writes = true if role == ActiveRecord.reading_role
+
+      append_to_connected_to_stack(role: role, shard: shard, prevent_writes: prevent_writes, klasses: [self])
+    end
- -
-
# File activerecord/lib/active_record/connection_handling.rb, line 185
-def connecting_to(role: default_role, shard: default_shard, prevent_writes: false)
-  prevent_writes = true if role == ActiveRecord.reading_role
-
-  append_to_connected_to_stack(role: role, shard: shard, prevent_writes: prevent_writes, klasses: [self])
-end
-
-
- -

+ See on GitHub + + + +

@@ -613,22 +613,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_handling.rb, line 253
+    def connection
+      retrieve_connection
+    end
- -
-
# File activerecord/lib/active_record/connection_handling.rb, line 253
-def connection
-  retrieve_connection
-end
-
-
- -

+ See on GitHub + + + +

@@ -655,22 +655,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_handling.rb, line 278
+    def connection_db_config
+      connection_pool.db_config
+    end
- -
-
# File activerecord/lib/active_record/connection_handling.rb, line 278
-def connection_db_config
-  connection_pool.db_config
-end
-
-
- -

+ See on GitHub + + + +

@@ -690,22 +690,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_handling.rb, line 282
+    def connection_pool
+      connection_handler.retrieve_connection_pool(connection_specification_name, role: current_role, shard: current_shard) || raise(ConnectionNotEstablished)
+    end
- -
-
# File activerecord/lib/active_record/connection_handling.rb, line 282
-def connection_pool
-  connection_handler.retrieve_connection_pool(connection_specification_name, role: current_role, shard: current_shard) || raise(ConnectionNotEstablished)
-end
-
-
- -

+ See on GitHub + + + +

@@ -725,25 +725,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_handling.rb, line 260
+    def connection_specification_name
+      if !defined?(@connection_specification_name) || @connection_specification_name.nil?
+        return self == Base ? Base.name : superclass.connection_specification_name
+      end
+      @connection_specification_name
+    end
- -
-
# File activerecord/lib/active_record/connection_handling.rb, line 260
-def connection_specification_name
-  if !defined?(@connection_specification_name) || @connection_specification_name.nil?
-    return self == Base ? Base.name : superclass.connection_specification_name
-  end
-  @connection_specification_name
-end
-
-
- -

+ See on GitHub + + + +

@@ -786,45 +786,45 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_handling.rb, line 81
+    def connects_to(database: {}, shards: {})
+      raise NotImplementedError, "`connects_to` can only be called on ActiveRecord::Base or abstract classes" unless self == Base || abstract_class?
+
+      if database.present? && shards.present?
+        raise ArgumentError, "`connects_to` can only accept a `database` or `shards` argument, but not both arguments."
+      end
+
+      connections = []
+
+      if shards.empty?
+        shards[:default] = database
+      end
+
+      self.default_shard = shards.keys.first
+
+      shards.each do |shard, database_keys|
+        database_keys.each do |role, database_key|
+          db_config = resolve_config_for_connection(database_key)
+
+          self.connection_class = true
+          connections << connection_handler.establish_connection(db_config, owner_name: self, role: role, shard: shard.to_sym)
+        end
+      end
+
+      connections
+    end
- -
-
# File activerecord/lib/active_record/connection_handling.rb, line 81
-def connects_to(database: {}, shards: {})
-  raise NotImplementedError, "`connects_to` can only be called on ActiveRecord::Base or abstract classes" unless self == Base || abstract_class?
-
-  if database.present? && shards.present?
-    raise ArgumentError, "`connects_to` can only accept a `database` or `shards` argument, but not both arguments."
-  end
-
-  connections = []
-
-  if shards.empty?
-    shards[:default] = database
-  end
-
-  self.default_shard = shards.keys.first
-
-  shards.each do |shard, database_keys|
-    database_keys.each do |role, database_key|
-      db_config = resolve_config_for_connection(database_key)
-
-      self.connection_class = true
-      connections << connection_handler.establish_connection(db_config, owner_name: self, role: role, shard: shard.to_sym)
-    end
-  end
-
-  connections
-end
-
-
- -

+ See on GitHub + + + +

@@ -883,24 +883,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_handling.rb, line 50
+    def establish_connection(config_or_env = nil)
+      config_or_env ||= DEFAULT_ENV.call.to_sym
+      db_config = resolve_config_for_connection(config_or_env)
+      connection_handler.establish_connection(db_config, owner_name: self, role: current_role, shard: current_shard)
+    end
- -
-
# File activerecord/lib/active_record/connection_handling.rb, line 50
-def establish_connection(config_or_env = nil)
-  config_or_env ||= DEFAULT_ENV.call.to_sym
-  db_config = resolve_config_for_connection(config_or_env)
-  connection_handler.establish_connection(db_config, owner_name: self, role: current_role, shard: current_shard)
-end
-
-
- -

+ See on GitHub + + + +

@@ -920,23 +920,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_handling.rb, line 334
+    def flush_idle_connections!(role = nil)
+      deprecation_for_delegation(__method__)
+      connection_handler.flush_idle_connections!(role)
+    end
- -
-
# File activerecord/lib/active_record/connection_handling.rb, line 334
-def flush_idle_connections!(role = nil)
-  deprecation_for_delegation(__method__)
-  connection_handler.flush_idle_connections!(role)
-end
-
-
- -

+ See on GitHub + + + +

@@ -958,26 +958,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_handling.rb, line 197
+    def prohibit_shard_swapping(enabled = true)
+      prev_value = ActiveSupport::IsolatedExecutionState[:active_record_prohibit_shard_swapping]
+      ActiveSupport::IsolatedExecutionState[:active_record_prohibit_shard_swapping] = enabled
+      yield
+    ensure
+      ActiveSupport::IsolatedExecutionState[:active_record_prohibit_shard_swapping] = prev_value
+    end
- -
-
# File activerecord/lib/active_record/connection_handling.rb, line 197
-def prohibit_shard_swapping(enabled = true)
-  prev_value = ActiveSupport::IsolatedExecutionState[:active_record_prohibit_shard_swapping]
-  ActiveSupport::IsolatedExecutionState[:active_record_prohibit_shard_swapping] = enabled
-  yield
-ensure
-  ActiveSupport::IsolatedExecutionState[:active_record_prohibit_shard_swapping] = prev_value
-end
-
-
- -

+ See on GitHub + + + +

@@ -997,38 +997,38 @@

- -
- - -
-
# File activerecord/lib/active_record/connection_handling.rb, line 295
-    def remove_connection(name = nil)
-      if name
-        ActiveRecord.deprecator.warn(<<-MSG.squish)
-          The name argument for `#remove_connection` is deprecated without replacement
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/connection_handling.rb, line 295
+    def remove_connection(name = nil)
+      if name
+        ActiveRecord.deprecator.warn(<<-MSG.squish)
+          The name argument for `#remove_connection` is deprecated without replacement
           and will be removed in Rails 7.2. `#remove_connection` should always be called
           on the connection class directly, which makes the name argument obsolete.
-        MSG
-      end
-
-      name ||= @connection_specification_name if defined?(@connection_specification_name)
-      # if removing a connection that has a pool, we reset the
-      # connection_specification_name so it will use the parent
-      # pool.
-      if connection_handler.retrieve_connection_pool(name, role: current_role, shard: current_shard)
-        self.connection_specification_name = nil
-      end
-
-      connection_handler.remove_connection_pool(name, role: current_role, shard: current_shard)
-    end
-
-
- -

+ MSG + end + + name ||= @connection_specification_name if defined?(@connection_specification_name) + # if removing a connection that has a pool, we reset the + # connection_specification_name so it will use the parent + # pool. + if connection_handler.retrieve_connection_pool(name, role: current_role, shard: current_shard) + self.connection_specification_name = nil + end + + connection_handler.remove_connection_pool(name, role: current_role, shard: current_shard) + end + + See on GitHub + + + +

@@ -1048,22 +1048,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_handling.rb, line 286
+    def retrieve_connection
+      connection_handler.retrieve_connection(connection_specification_name, role: current_role, shard: current_shard)
+    end
- -
-
# File activerecord/lib/active_record/connection_handling.rb, line 286
-def retrieve_connection
-  connection_handler.retrieve_connection(connection_specification_name, role: current_role, shard: current_shard)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1083,22 +1083,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_handling.rb, line 206
+    def shard_swapping_prohibited?
+      ActiveSupport::IsolatedExecutionState[:active_record_prohibit_shard_swapping]
+    end
- -
-
# File activerecord/lib/active_record/connection_handling.rb, line 206
-def shard_swapping_prohibited?
-  ActiveSupport::IsolatedExecutionState[:active_record_prohibit_shard_swapping]
-end
-
-
- -

+ See on GitHub + + + +

@@ -1124,22 +1124,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/connection_handling.rb, line 221
+    def while_preventing_writes(enabled = true, &block)
+      connected_to(role: current_role, prevent_writes: enabled, &block)
+    end
- -
-
# File activerecord/lib/active_record/connection_handling.rb, line 221
-def while_preventing_writes(enabled = true, &block)
-  connected_to(role: current_role, prevent_writes: enabled, &block)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ConnectionNotEstablished.html b/src/classes/ActiveRecord/ConnectionNotEstablished.html index 989afcb706..54aaad9081 100644 --- a/src/classes/ActiveRecord/ConnectionNotEstablished.html +++ b/src/classes/ActiveRecord/ConnectionNotEstablished.html @@ -90,22 +90,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/errors.rb, line 72
+    def initialize(message = nil, connection_pool: nil)
+      super(message, connection_pool: connection_pool)
+    end
- -
-
# File activerecord/lib/active_record/errors.rb, line 72
-def initialize(message = nil, connection_pool: nil)
-  super(message, connection_pool: connection_pool)
-end
-
-
- - + See on GitHub + + + + @@ -129,26 +129,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/errors.rb, line 76
+    def set_pool(connection_pool)
+      unless @connection_pool
+        @connection_pool = connection_pool
+      end
+
+      self
+    end
- -
-
# File activerecord/lib/active_record/errors.rb, line 76
-def set_pool(connection_pool)
-  unless @connection_pool
-    @connection_pool = connection_pool
-  end
-
-  self
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Core.html b/src/classes/ActiveRecord/Core.html index 71c49a7440..3998720373 100644 --- a/src/classes/ActiveRecord/Core.html +++ b/src/classes/ActiveRecord/Core.html @@ -234,22 +234,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/core.rb, line 76
+      def self.configurations
+        @@configurations
+      end
- -
-
# File activerecord/lib/active_record/core.rb, line 76
-def self.configurations
-  @@configurations
-end
-
-
- - + See on GitHub + + + +

@@ -290,22 +290,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/core.rb, line 70
+      def self.configurations=(config)
+        @@configurations = ActiveRecord::DatabaseConfigurations.new(config)
+      end
- -
-
# File activerecord/lib/active_record/core.rb, line 70
-def self.configurations=(config)
-  @@configurations = ActiveRecord::DatabaseConfigurations.new(config)
-end
-
-
- -

+ See on GitHub + + + +

@@ -325,22 +325,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/core.rb, line 116
+      def self.connection_handler
+        ActiveSupport::IsolatedExecutionState[:active_record_connection_handler] || default_connection_handler
+      end
- -
-
# File activerecord/lib/active_record/core.rb, line 116
-def self.connection_handler
-  ActiveSupport::IsolatedExecutionState[:active_record_connection_handler] || default_connection_handler
-end
-
-
- -

+ See on GitHub + + + +

@@ -360,22 +360,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/core.rb, line 120
+      def self.connection_handler=(handler)
+        ActiveSupport::IsolatedExecutionState[:active_record_connection_handler] = handler
+      end
- -
-
# File activerecord/lib/active_record/core.rb, line 120
-def self.connection_handler=(handler)
-  ActiveSupport::IsolatedExecutionState[:active_record_connection_handler] = handler
-end
-
-
- -

+ See on GitHub + + + +

@@ -404,27 +404,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/core.rb, line 179
+      def self.current_preventing_writes
+        connected_to_stack.reverse_each do |hash|
+          return hash[:prevent_writes] if !hash[:prevent_writes].nil? && hash[:klasses].include?(Base)
+          return hash[:prevent_writes] if !hash[:prevent_writes].nil? && hash[:klasses].include?(connection_class_for_self)
+        end
+
+        false
+      end
- -
-
# File activerecord/lib/active_record/core.rb, line 179
-def self.current_preventing_writes
-  connected_to_stack.reverse_each do |hash|
-    return hash[:prevent_writes] if !hash[:prevent_writes].nil? && hash[:klasses].include?(Base)
-    return hash[:prevent_writes] if !hash[:prevent_writes].nil? && hash[:klasses].include?(connection_class_for_self)
-  end
-
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -453,27 +453,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/core.rb, line 142
+      def self.current_role
+        connected_to_stack.reverse_each do |hash|
+          return hash[:role] if hash[:role] && hash[:klasses].include?(Base)
+          return hash[:role] if hash[:role] && hash[:klasses].include?(connection_class_for_self)
+        end
+
+        default_role
+      end
- -
-
# File activerecord/lib/active_record/core.rb, line 142
-def self.current_role
-  connected_to_stack.reverse_each do |hash|
-    return hash[:role] if hash[:role] && hash[:klasses].include?(Base)
-    return hash[:role] if hash[:role] && hash[:klasses].include?(connection_class_for_self)
-  end
-
-  default_role
-end
-
-
- -

+ See on GitHub + + + +

@@ -502,27 +502,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/core.rb, line 160
+      def self.current_shard
+        connected_to_stack.reverse_each do |hash|
+          return hash[:shard] if hash[:shard] && hash[:klasses].include?(Base)
+          return hash[:shard] if hash[:shard] && hash[:klasses].include?(connection_class_for_self)
+        end
+
+        default_shard
+      end
- -
-
# File activerecord/lib/active_record/core.rb, line 160
-def self.current_shard
-  connected_to_stack.reverse_each do |hash|
-    return hash[:shard] if hash[:shard] && hash[:klasses].include?(Base)
-    return hash[:shard] if hash[:shard] && hash[:klasses].include?(connection_class_for_self)
-  end
-
-  default_shard
-end
-
-
- -

+ See on GitHub + + + +

@@ -542,21 +542,21 @@

- -
- - -
-
# File activerecord/lib/active_record/core.rb, line 46
-class_attribute :destroy_association_async_batch_size, instance_writer: false, instance_predicate: false, default: nil
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/core.rb, line 46
+      class_attribute :destroy_association_async_batch_size, instance_writer: false, instance_predicate: false, default: nil
 
-
-
- -

+ + See on GitHub + + + +

@@ -576,27 +576,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/core.rb, line 26
+      def self.destroy_association_async_job
+        if _destroy_association_async_job.is_a?(String)
+          self._destroy_association_async_job = _destroy_association_async_job.constantize
+        end
+        _destroy_association_async_job
+      rescue NameError => error
+        raise NameError, "Unable to load destroy_association_async_job: #{error.message}"
+      end
- -
-
# File activerecord/lib/active_record/core.rb, line 26
-def self.destroy_association_async_job
-  if _destroy_association_async_job.is_a?(String)
-    self._destroy_association_async_job = _destroy_association_async_job.constantize
-  end
-  _destroy_association_async_job
-rescue NameError => error
-  raise NameError, "Unable to load destroy_association_async_job: #{error.message}"
-end
-
-
- -

+ See on GitHub + + + +

@@ -616,21 +616,21 @@

- -
- - -
-
# File activerecord/lib/active_record/core.rb, line 86
-class_attribute :enumerate_columns_in_select_statements, instance_accessor: false, default: false
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/core.rb, line 86
+      class_attribute :enumerate_columns_in_select_statements, instance_accessor: false, default: false
 
-
-
- -

+ + See on GitHub + + + +

@@ -650,21 +650,21 @@

- -
- - -
-
# File activerecord/lib/active_record/core.rb, line 21
-class_attribute :logger, instance_writer: false
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/core.rb, line 21
+      class_attribute :logger, instance_writer: false
 
-
-
- -

+ + See on GitHub + + + +

@@ -690,31 +690,31 @@

Example

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/core.rb, line 424
+    def initialize(attributes = nil)
+      @new_record = true
+      @attributes = self.class._default_attributes.deep_dup
+
+      init_internals
+      initialize_internals_callback
+
+      assign_attributes(attributes) if attributes
+
+      yield self if block_given?
+      _run_initialize_callbacks
+    end
- -
-
# File activerecord/lib/active_record/core.rb, line 424
-def initialize(attributes = nil)
-  @new_record = true
-  @attributes = self.class._default_attributes.deep_dup
-
-  init_internals
-  initialize_internals_callback
-
-  assign_attributes(attributes) if attributes
-
-  yield self if block_given?
-  _run_initialize_callbacks
-end
-
-
- -
+ See on GitHub + + + + @@ -738,26 +738,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/core.rb, line 582
+    def <=>(other_object)
+      if other_object.is_a?(self.class)
+        to_key <=> other_object.to_key
+      else
+        super
+      end
+    end
- -
-
# File activerecord/lib/active_record/core.rb, line 582
-def <=>(other_object)
-  if other_object.is_a?(self.class)
-    to_key <=> other_object.to_key
-  else
-    super
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -785,25 +785,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/core.rb, line 548
+    def ==(comparison_object)
+      super ||
+        comparison_object.instance_of?(self.class) &&
+        primary_key_values_present? &&
+        comparison_object.id == id
+    end
- -
-
# File activerecord/lib/active_record/core.rb, line 548
-def ==(comparison_object)
-  super ||
-    comparison_object.instance_of?(self.class) &&
-    primary_key_values_present? &&
-    comparison_object.id == id
-end
-
-
- -

+ See on GitHub + + + +

@@ -835,20 +835,10 @@

- -
- - -
-
# File activerecord/lib/active_record/core.rb, line 476
-    
-
-
- -

+ + See on GitHub + +

@@ -868,22 +858,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/core.rb, line 658
+    def connection_handler
+      self.class.connection_handler
+    end
- -
-
# File activerecord/lib/active_record/core.rb, line 658
-def connection_handler
-  self.class.connection_handler
-end
-
-
- -

+ See on GitHub + + + +

@@ -903,20 +893,10 @@

- -
- - -
-
# File activerecord/lib/active_record/core.rb, line 493
-    
-
-
- -

+ + See on GitHub + +

@@ -945,24 +925,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/core.rb, line 533
+    def encode_with(coder)
+      self.class.yaml_encoder.encode(@attributes, coder)
+      coder["new_record"] = new_record?
+      coder["active_record_yaml_version"] = 2
+    end
- -
-
# File activerecord/lib/active_record/core.rb, line 533
-def encode_with(coder)
-  self.class.yaml_encoder.encode(@attributes, coder)
-  coder["new_record"] = new_record?
-  coder["active_record_yaml_version"] = 2
-end
-
-
- -

+ See on GitHub + + + +

@@ -986,7 +966,8 @@

-

+ +

@@ -1006,23 +987,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/core.rb, line 571
+    def freeze
+      @attributes = @attributes.clone.freeze
+      self
+    end
- -
-
# File activerecord/lib/active_record/core.rb, line 571
-def freeze
-  @attributes = @attributes.clone.freeze
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -1042,22 +1023,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/core.rb, line 577
+    def frozen?
+      @attributes.frozen?
+    end
- -
-
# File activerecord/lib/active_record/core.rb, line 577
-def frozen?
-  @attributes.frozen?
-end
-
-
- -

+ See on GitHub + + + +

@@ -1080,28 +1061,28 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/core.rb, line 558
+    def hash
+      id = self.id
+
+      if primary_key_values_present?
+        self.class.hash ^ id.hash
+      else
+        super
+      end
+    end
- -
-
# File activerecord/lib/active_record/core.rb, line 558
-def hash
-  id = self.id
-
-  if primary_key_values_present?
-    self.class.hash ^ id.hash
-  else
-    super
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1133,24 +1114,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/core.rb, line 451
+    def init_with(coder, &block)
+      coder = LegacyYamlAdapter.convert(coder)
+      attributes = self.class.yaml_encoder.decode(coder)
+      init_with_attributes(attributes, coder["new_record"], &block)
+    end
- -
-
# File activerecord/lib/active_record/core.rb, line 451
-def init_with(coder, &block)
-  coder = LegacyYamlAdapter.convert(coder)
-  attributes = self.class.yaml_encoder.decode(coder)
-  init_with_attributes(attributes, coder["new_record"], &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1170,34 +1151,34 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/core.rb, line 663
+    def inspect
+      # We check defined?(@attributes) not to issue warnings if the object is
+      # allocated but not initialized.
+      inspection = if defined?(@attributes) && @attributes
+        attribute_names.filter_map do |name|
+          if _has_attribute?(name)
+            "#{name}: #{attribute_for_inspect(name)}"
+          end
+        end.join(", ")
+      else
+        "not initialized"
+      end
+
+      "#<#{self.class} #{inspection}>"
+    end
- -
-
# File activerecord/lib/active_record/core.rb, line 663
-def inspect
-  # We check defined?(@attributes) not to issue warnings if the object is
-  # allocated but not initialized.
-  inspection = if defined?(@attributes) && @attributes
-    attribute_names.filter_map do |name|
-      if _has_attribute?(name)
-        "#{name}: #{attribute_for_inspect(name)}"
-      end
-    end.join(", ")
-  else
-    "not initialized"
-  end
-
-  "#<#{self.class} #{inspection}>"
-end
-
-
- -

+ See on GitHub + + + +

@@ -1217,41 +1198,41 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/core.rb, line 681
+    def pretty_print(pp)
+      return super if custom_inspect_method_defined?
+      pp.object_address_group(self) do
+        if defined?(@attributes) && @attributes
+          attr_names = self.class.attribute_names.select { |name| _has_attribute?(name) }
+          pp.seplist(attr_names, proc { pp.text "," }) do |attr_name|
+            pp.breakable " "
+            pp.group(1) do
+              pp.text attr_name
+              pp.text ":"
+              pp.breakable
+              value = _read_attribute(attr_name)
+              value = inspection_filter.filter_param(attr_name, value) unless value.nil?
+              pp.pp value
+            end
+          end
+        else
+          pp.breakable " "
+          pp.text "not initialized"
+        end
+      end
+    end
- -
-
# File activerecord/lib/active_record/core.rb, line 681
-def pretty_print(pp)
-  return super if custom_inspect_method_defined?
-  pp.object_address_group(self) do
-    if defined?(@attributes) && @attributes
-      attr_names = self.class.attribute_names.select { |name| _has_attribute?(name) }
-      pp.seplist(attr_names, proc { pp.text "," }) do |attr_name|
-        pp.breakable " "
-        pp.group(1) do
-          pp.text attr_name
-          pp.text ":"
-          pp.breakable
-          value = _read_attribute(attr_name)
-          value = inspection_filter.filter_param(attr_name, value) unless value.nil?
-          pp.pp value
-        end
-      end
-    else
-      pp.breakable " "
-      pp.text "not initialized"
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1271,22 +1252,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/core.rb, line 654
+    def readonly!
+      @readonly = true
+    end
- -
-
# File activerecord/lib/active_record/core.rb, line 654
-def readonly!
-  @readonly = true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1306,22 +1287,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/core.rb, line 599
+    def readonly?
+      @readonly
+    end
- -
-
# File activerecord/lib/active_record/core.rb, line 599
-def readonly?
-  @readonly
-end
-
-
- -

+ See on GitHub + + + +

@@ -1370,27 +1351,27 @@

Examples

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/core.rb, line 637
+    def strict_loading!(value = true, mode: :all)
+      unless [:all, :n_plus_one_only].include?(mode)
+        raise ArgumentError, "The :mode option must be one of [:all, :n_plus_one_only] but #{mode.inspect} was provided."
+      end
+
+      @strict_loading_mode = mode
+      @strict_loading = value
+    end
- -
-
# File activerecord/lib/active_record/core.rb, line 637
-def strict_loading!(value = true, mode: :all)
-  unless [:all, :n_plus_one_only].include?(mode)
-    raise ArgumentError, "The :mode option must be one of [:all, :n_plus_one_only] but #{mode.inspect} was provided."
-  end
-
-  @strict_loading_mode = mode
-  @strict_loading = value
-end
-
-
- -
+ See on GitHub + + + +

@@ -1410,22 +1391,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/core.rb, line 604
+    def strict_loading?
+      @strict_loading
+    end
- -
-
# File activerecord/lib/active_record/core.rb, line 604
-def strict_loading?
-  @strict_loading
-end
-
-
- -

+ See on GitHub + + + +

@@ -1445,22 +1426,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/core.rb, line 649
+    def strict_loading_n_plus_one_only?
+      @strict_loading_mode == :n_plus_one_only
+    end
- -
-
# File activerecord/lib/active_record/core.rb, line 649
-def strict_loading_n_plus_one_only?
-  @strict_loading_mode == :n_plus_one_only
-end
-
-
- -

+ See on GitHub + + + +

@@ -1481,20 +1462,10 @@

- -
- - -
-
# File activerecord/lib/active_record/core.rb, line 705
-    
-
-
- -

+ + See on GitHub + + diff --git a/src/classes/ActiveRecord/Core/ClassMethods.html b/src/classes/ActiveRecord/Core/ClassMethods.html index ba0b852b2c..49cd8a997e 100644 --- a/src/classes/ActiveRecord/Core/ClassMethods.html +++ b/src/classes/ActiveRecord/Core/ClassMethods.html @@ -79,26 +79,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/core.rb, line 306
+      def filter_attributes
+        if @filter_attributes.nil?
+          superclass.filter_attributes
+        else
+          @filter_attributes
+        end
+      end
- -
-
# File activerecord/lib/active_record/core.rb, line 306
-def filter_attributes
-  if @filter_attributes.nil?
-    superclass.filter_attributes
-  else
-    @filter_attributes
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -118,23 +118,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/core.rb, line 315
+      def filter_attributes=(filter_attributes)
+        @inspection_filter = nil
+        @filter_attributes = filter_attributes
+      end
- -
-
# File activerecord/lib/active_record/core.rb, line 315
-def filter_attributes=(filter_attributes)
-  @inspection_filter = nil
-  @filter_attributes = filter_attributes
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Core/InspectionMask.html b/src/classes/ActiveRecord/Core/InspectionMask.html index d0f89c0c9f..2aa4333c98 100644 --- a/src/classes/ActiveRecord/Core/InspectionMask.html +++ b/src/classes/ActiveRecord/Core/InspectionMask.html @@ -81,22 +81,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/core.rb, line 764
+        def pretty_print(pp)
+          pp.text __getobj__
+        end
- -
-
# File activerecord/lib/active_record/core.rb, line 764
-def pretty_print(pp)
-  pp.text __getobj__
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/CounterCache/ClassMethods.html b/src/classes/ActiveRecord/CounterCache/ClassMethods.html index 96d370a304..5c9c39b11c 100644 --- a/src/classes/ActiveRecord/CounterCache/ClassMethods.html +++ b/src/classes/ActiveRecord/CounterCache/ClassMethods.html @@ -114,22 +114,22 @@

Examples

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/counter_cache.rb, line 176
+      def decrement_counter(counter_name, id, by: 1, touch: nil)
+        update_counters(id, counter_name => -by, touch: touch)
+      end
- -
-
# File activerecord/lib/active_record/counter_cache.rb, line 176
-def decrement_counter(counter_name, id, by: 1, touch: nil)
-  update_counters(id, counter_name => -by, touch: touch)
-end
-
-
- - + See on GitHub + + + +

@@ -176,22 +176,22 @@

Examples

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/counter_cache.rb, line 146
+      def increment_counter(counter_name, id, by: 1, touch: nil)
+        update_counters(id, counter_name => by, touch: touch)
+      end
- -
-
# File activerecord/lib/active_record/counter_cache.rb, line 146
-def increment_counter(counter_name, id, by: 1, touch: nil)
-  update_counters(id, counter_name => by, touch: touch)
-end
-
-
- -
+ See on GitHub + + + +

@@ -230,58 +230,58 @@

Examples

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/counter_cache.rb, line 33
+      def reset_counters(id, *counters, touch: nil)
+        object = find(id)
+
+        updates = {}
+        counters.each do |counter_association|
+          has_many_association = _reflect_on_association(counter_association)
+          unless has_many_association
+            has_many = reflect_on_all_associations(:has_many)
+            has_many_association = has_many.find { |association| association.counter_cache_column && association.counter_cache_column.to_sym == counter_association.to_sym }
+            counter_association = has_many_association.plural_name if has_many_association
+          end
+          raise ArgumentError, "'#{name}' has no association called '#{counter_association}'" unless has_many_association
+
+          if has_many_association.is_a? ActiveRecord::Reflection::ThroughReflection
+            has_many_association = has_many_association.through_reflection
+          end
+
+          foreign_key  = has_many_association.foreign_key.to_s
+          child_class  = has_many_association.klass
+          reflection   = child_class._reflections.values.find { |e| e.belongs_to? && e.foreign_key.to_s == foreign_key && e.options[:counter_cache].present? }
+          counter_name = reflection.counter_cache_column
+
+          count_was = object.send(counter_name)
+          count = object.send(counter_association).count(:all)
+          updates[counter_name] = count if count != count_was
+        end
+
+        if touch
+          names = touch if touch != true
+          names = Array.wrap(names)
+          options = names.extract_options!
+          touch_updates = touch_attributes_with_time(*names, **options)
+          updates.merge!(touch_updates)
+        end
+
+        unscoped.where(primary_key => object.id).update_all(updates) if updates.any?
+
+        true
+      end
- -
-
# File activerecord/lib/active_record/counter_cache.rb, line 33
-def reset_counters(id, *counters, touch: nil)
-  object = find(id)
-
-  updates = {}
-  counters.each do |counter_association|
-    has_many_association = _reflect_on_association(counter_association)
-    unless has_many_association
-      has_many = reflect_on_all_associations(:has_many)
-      has_many_association = has_many.find { |association| association.counter_cache_column && association.counter_cache_column.to_sym == counter_association.to_sym }
-      counter_association = has_many_association.plural_name if has_many_association
-    end
-    raise ArgumentError, "'#{name}' has no association called '#{counter_association}'" unless has_many_association
-
-    if has_many_association.is_a? ActiveRecord::Reflection::ThroughReflection
-      has_many_association = has_many_association.through_reflection
-    end
-
-    foreign_key  = has_many_association.foreign_key.to_s
-    child_class  = has_many_association.klass
-    reflection   = child_class._reflections.values.find { |e| e.belongs_to? && e.foreign_key.to_s == foreign_key && e.options[:counter_cache].present? }
-    counter_name = reflection.counter_cache_column
-
-    count_was = object.send(counter_name)
-    count = object.send(counter_association).count(:all)
-    updates[counter_name] = count if count != count_was
-  end
-
-  if touch
-    names = touch if touch != true
-    names = Array.wrap(names)
-    options = names.extract_options!
-    touch_updates = touch_attributes_with_time(*names, **options)
-    updates.merge!(touch_updates)
-  end
-
-  unscoped.where(primary_key => object.id).update_all(updates) if updates.any?
-
-  true
-end
-
-
- -
+ See on GitHub + + + +

@@ -338,22 +338,22 @@

Examples

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/counter_cache.rb, line 114
+      def update_counters(id, counters)
+        unscoped.where!(primary_key => id).update_counters(counters)
+      end
- -
-
# File activerecord/lib/active_record/counter_cache.rb, line 114
-def update_counters(id, counters)
-  unscoped.where!(primary_key => id).update_counters(counters)
-end
-
-
- -
+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/DatabaseConfigurations.html b/src/classes/ActiveRecord/DatabaseConfigurations.html index 11a17e21b9..86228ba847 100644 --- a/src/classes/ActiveRecord/DatabaseConfigurations.html +++ b/src/classes/ActiveRecord/DatabaseConfigurations.html @@ -151,22 +151,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/database_configurations.rb, line 73
+    def initialize(configurations = {})
+      @configurations = build_configs(configurations)
+    end
- -
-
# File activerecord/lib/active_record/database_configurations.rb, line 73
-def initialize(configurations = {})
-  @configurations = build_configs(configurations)
-end
-
-
- - + See on GitHub + + + +

@@ -205,22 +205,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/database_configurations.rb, line 61
+    def self.register_db_config_handler(&block)
+      db_config_handlers << block
+    end
- -
-
# File activerecord/lib/active_record/database_configurations.rb, line 61
-def self.register_db_config_handler(&block)
-  db_config_handlers << block
-end
-
-
- -

+ See on GitHub + + + + @@ -248,7 +248,8 @@

- + +

@@ -281,43 +282,43 @@

Options

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/database_configurations.rb, line 98
+    def configs_for(env_name: nil, name: nil, config_key: nil, include_hidden: false)
+      env_name ||= default_env if name
+      configs = env_with_configs(env_name)
+
+      unless include_hidden
+        configs = configs.select do |db_config|
+          db_config.database_tasks?
+        end
+      end
+
+      if config_key
+        configs = configs.select do |db_config|
+          db_config.configuration_hash.key?(config_key)
+        end
+      end
+
+      if name
+        configs.find do |db_config|
+          db_config.name == name
+        end
+      else
+        configs
+      end
+    end
- -
-
# File activerecord/lib/active_record/database_configurations.rb, line 98
-def configs_for(env_name: nil, name: nil, config_key: nil, include_hidden: false)
-  env_name ||= default_env if name
-  configs = env_with_configs(env_name)
-
-  unless include_hidden
-    configs = configs.select do |db_config|
-      db_config.database_tasks?
-    end
-  end
-
-  if config_key
-    configs = configs.select do |db_config|
-      db_config.configuration_hash.key?(config_key)
-    end
-  end
-
-  if name
-    configs.find do |db_config|
-      db_config.name == name
-    end
-  else
-    configs
-  end
-end
-
-
- -
+ See on GitHub + + + +

@@ -341,22 +342,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/database_configurations.rb, line 150
+    def empty?
+      configurations.empty?
+    end
- -
-
# File activerecord/lib/active_record/database_configurations.rb, line 150
-def empty?
-  configurations.empty?
-end
-
-
- -

+ See on GitHub + + + +

@@ -378,27 +379,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/database_configurations.rb, line 127
+    def find_db_config(env)
+      env = env.to_s
+      configurations.find do |db_config|
+        db_config.for_current_env? && (db_config.env_name == env || db_config.name == env)
+      end || configurations.find do |db_config|
+        db_config.env_name == env
+      end
+    end
- -
-
# File activerecord/lib/active_record/database_configurations.rb, line 127
-def find_db_config(env)
-  env = env.to_s
-  configurations.find do |db_config|
-    db_config.for_current_env? && (db_config.env_name == env || db_config.name == env)
-  end || configurations.find do |db_config|
-    db_config.env_name == env
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/DatabaseConfigurations/HashConfig.html b/src/classes/ActiveRecord/DatabaseConfigurations/HashConfig.html index a59be74587..eefa9f8046 100644 --- a/src/classes/ActiveRecord/DatabaseConfigurations/HashConfig.html +++ b/src/classes/ActiveRecord/DatabaseConfigurations/HashConfig.html @@ -192,23 +192,23 @@

Options

- -
- - -
-
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 36
-def initialize(env_name, name, configuration_hash)
-  super(env_name, name)
-  @configuration_hash = configuration_hash.symbolize_keys.freeze
-end
-
-
- - + +
+ + Source code + + +
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 36
+      def initialize(env_name, name, configuration_hash)
+        super(env_name, name)
+        @configuration_hash = configuration_hash.symbolize_keys.freeze
+      end
+ + See on GitHub + +
+ + @@ -232,22 +232,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 106
+      def adapter
+        configuration_hash[:adapter]
+      end
- -
-
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 106
-def adapter
-  configuration_hash[:adapter]
-end
-
-
- - + See on GitHub + + + +

@@ -267,22 +267,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 91
+      def checkout_timeout
+        (configuration_hash[:checkout_timeout] || 5).to_f
+      end
- -
-
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 91
-def checkout_timeout
-  (configuration_hash[:checkout_timeout] || 5).to_f
-end
-
-
- -

+ See on GitHub + + + +

@@ -302,22 +302,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 63
+      def database
+        configuration_hash[:database]
+      end
- -
-
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 63
-def database
-  configuration_hash[:database]
-end
-
-
- -

+ See on GitHub + + + +

@@ -337,22 +337,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 117
+      def default_schema_cache_path
+        "db/schema_cache.yml"
+      end
- -
-
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 117
-def default_schema_cache_path
-  "db/schema_cache.yml"
-end
-
-
- -

+ See on GitHub + + + +

@@ -372,22 +372,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 55
+      def host
+        configuration_hash[:host]
+      end
- -
-
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 55
-def host
-  configuration_hash[:host]
-end
-
-
- -

+ See on GitHub + + + +

@@ -407,23 +407,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 101
+      def idle_timeout
+        timeout = configuration_hash.fetch(:idle_timeout, 300).to_f
+        timeout if timeout > 0
+      end
- -
-
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 101
-def idle_timeout
-  timeout = configuration_hash.fetch(:idle_timeout, 300).to_f
-  timeout if timeout > 0
-end
-
-
- -

+ See on GitHub + + + +

@@ -443,22 +443,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 121
+      def lazy_schema_cache_path
+        schema_cache_path || default_schema_cache_path
+      end
- -
-
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 121
-def lazy_schema_cache_path
-  schema_cache_path || default_schema_cache_path
-end
-
-
- -

+ See on GitHub + + + +

@@ -478,22 +478,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 87
+      def max_queue
+        max_threads * 4
+      end
- -
-
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 87
-def max_queue
-  max_threads * 4
-end
-
-
- -

+ See on GitHub + + + +

@@ -513,22 +513,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 79
+      def max_threads
+        (configuration_hash[:max_threads] || pool).to_i
+      end
- -
-
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 79
-def max_threads
-  (configuration_hash[:max_threads] || pool).to_i
-end
-
-
- -

+ See on GitHub + + + +

@@ -548,22 +548,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 51
+      def migrations_paths
+        configuration_hash[:migrations_paths]
+      end
- -
-
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 51
-def migrations_paths
-  configuration_hash[:migrations_paths]
-end
-
-
- -

+ See on GitHub + + + +

@@ -583,22 +583,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 75
+      def min_threads
+        (configuration_hash[:min_threads] || 0).to_i
+      end
- -
-
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 75
-def min_threads
-  (configuration_hash[:min_threads] || 0).to_i
-end
-
-
- -

+ See on GitHub + + + +

@@ -618,22 +618,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 71
+      def pool
+        (configuration_hash[:pool] || 5).to_i
+      end
- -
-
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 71
-def pool
-  (configuration_hash[:pool] || 5).to_i
-end
-
-
- -

+ See on GitHub + + + +

@@ -653,22 +653,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 83
+      def query_cache
+        configuration_hash[:query_cache]
+      end
- -
-
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 83
-def query_cache
-  configuration_hash[:query_cache]
-end
-
-
- -

+ See on GitHub + + + +

@@ -688,22 +688,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 97
+      def reaping_frequency
+        configuration_hash.fetch(:reaping_frequency, 60)&.to_f
+      end
- -
-
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 97
-def reaping_frequency
-  configuration_hash.fetch(:reaping_frequency, 60)&.to_f
-end
-
-
- -

+ See on GitHub + + + +

@@ -723,22 +723,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 44
+      def replica?
+        configuration_hash[:replica]
+      end
- -
-
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 44
-def replica?
-  configuration_hash[:replica]
-end
-
-
- -

+ See on GitHub + + + +

@@ -758,22 +758,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 113
+      def schema_cache_path
+        configuration_hash[:schema_cache_path]
+      end
- -
-
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 113
-def schema_cache_path
-  configuration_hash[:schema_cache_path]
-end
-
-
- -

+ See on GitHub + + + +

@@ -797,30 +797,30 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 137
+      def schema_dump(format = ActiveRecord.schema_format)
+        if configuration_hash.key?(:schema_dump)
+          if config = configuration_hash[:schema_dump]
+            config
+          end
+        elsif primary?
+          schema_file_type(format)
+        else
+          "#{name}_#{schema_file_type(format)}"
+        end
+      end
- -
-
# File activerecord/lib/active_record/database_configurations/hash_config.rb, line 137
-def schema_dump(format = ActiveRecord.schema_format)
-  if configuration_hash.key?(:schema_dump)
-    if config = configuration_hash[:schema_dump]
-      config
-    end
-  elsif primary?
-    schema_file_type(format)
-  else
-    "#{name}_#{schema_file_type(format)}"
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/DatabaseConfigurations/UrlConfig.html b/src/classes/ActiveRecord/DatabaseConfigurations/UrlConfig.html index 62b41c778a..3c0a1a1b92 100644 --- a/src/classes/ActiveRecord/DatabaseConfigurations/UrlConfig.html +++ b/src/classes/ActiveRecord/DatabaseConfigurations/UrlConfig.html @@ -128,25 +128,25 @@

Options

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/database_configurations/url_config.rb, line 40
+      def initialize(env_name, name, url, configuration_hash = {})
+        super(env_name, name, configuration_hash)
+
+        @url = url
+        @configuration_hash = @configuration_hash.merge(build_url_hash).freeze
+      end
- -
-
# File activerecord/lib/active_record/database_configurations/url_config.rb, line 40
-def initialize(env_name, name, url, configuration_hash = {})
-  super(env_name, name, configuration_hash)
-
-  @url = url
-  @configuration_hash = @configuration_hash.merge(build_url_hash).freeze
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/DatabaseConnectionError.html b/src/classes/ActiveRecord/DatabaseConnectionError.html index 5e736262b0..42a1ce5790 100644 --- a/src/classes/ActiveRecord/DatabaseConnectionError.html +++ b/src/classes/ActiveRecord/DatabaseConnectionError.html @@ -94,25 +94,25 @@

- -
- - -
-
# File activerecord/lib/active_record/errors.rb, line 99
-      def hostname_error(hostname)
-        DatabaseConnectionError.new(<<~MSG)
-          There is an issue connecting with your hostname: #{hostname}.\n
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/errors.rb, line 99
+      def hostname_error(hostname)
+        DatabaseConnectionError.new(<<~MSG)
+          There is an issue connecting with your hostname: #{hostname}.\n
           Please check your database configuration and ensure there is a valid connection to your database.
-        MSG
-      end
-
-
- - + MSG + end + + See on GitHub + + + +

@@ -132,22 +132,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/errors.rb, line 94
+    def initialize(message = nil)
+      super(message || "Database connection error")
+    end
- -
-
# File activerecord/lib/active_record/errors.rb, line 94
-def initialize(message = nil)
-  super(message || "Database connection error")
-end
-
-
- -

+ See on GitHub + + + +

@@ -167,25 +167,25 @@

- -
- - -
-
# File activerecord/lib/active_record/errors.rb, line 106
-      def username_error(username)
-        DatabaseConnectionError.new(<<~MSG)
-          There is an issue connecting to your database with your username/password, username: #{username}.\n
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/errors.rb, line 106
+      def username_error(username)
+        DatabaseConnectionError.new(<<~MSG)
+          There is an issue connecting to your database with your username/password, username: #{username}.\n
           Please check your database configuration to ensure the username/password are valid.
-        MSG
-      end
-
-
- -

+ MSG + end + + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/DefineCallbacks.html b/src/classes/ActiveRecord/DefineCallbacks.html deleted file mode 100644 index c57d4e92c1..0000000000 --- a/src/classes/ActiveRecord/DefineCallbacks.html +++ /dev/null @@ -1,74 +0,0 @@ ---- -title: ActiveRecord::DefineCallbacks -layout: default ---- -
- -
-
- -
- -

This module exists because ActiveRecord::AttributeMethods::Dirty needs to define callbacks, but continue to have its version of save be the super method of ActiveRecord::Callbacks. This will be removed when the removal of deprecated code removes this need.

- -
- - - - - - - - - - - - - - -

Included Modules

- - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveRecord/DelegatedType.html b/src/classes/ActiveRecord/DelegatedType.html index 119162a711..39c63ef3fb 100644 --- a/src/classes/ActiveRecord/DelegatedType.html +++ b/src/classes/ActiveRecord/DelegatedType.html @@ -264,23 +264,23 @@

Options

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/delegated_type.rb, line 211
+    def delegated_type(role, types:, **options)
+      belongs_to role, options.delete(:scope), **options.merge(polymorphic: true)
+      define_delegated_type_methods role, types: types, options: options
+    end
- -
-
# File activerecord/lib/active_record/delegated_type.rb, line 211
-def delegated_type(role, types:, **options)
-  belongs_to role, options.delete(:scope), **options.merge(polymorphic: true)
-  define_delegated_type_methods role, types: types, options: options
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/DestroyAssociationAsyncJob.html b/src/classes/ActiveRecord/DestroyAssociationAsyncJob.html index 427c812c6c..26586a4817 100644 --- a/src/classes/ActiveRecord/DestroyAssociationAsyncJob.html +++ b/src/classes/ActiveRecord/DestroyAssociationAsyncJob.html @@ -89,36 +89,36 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/destroy_association_async_job.rb, line 15
+    def perform(
+      owner_model_name: nil, owner_id: nil,
+      association_class: nil, association_ids: nil, association_primary_key_column: nil,
+      ensuring_owner_was_method: nil
+    )
+      association_model = association_class.constantize
+      owner_class = owner_model_name.constantize
+      owner = owner_class.find_by(owner_class.primary_key.to_sym => owner_id)
+
+      if !owner_destroyed?(owner, ensuring_owner_was_method)
+        raise DestroyAssociationAsyncError, "owner record not destroyed"
+      end
+
+      association_model.where(association_primary_key_column => association_ids).find_each do |r|
+        r.destroy
+      end
+    end
- -
-
# File activerecord/lib/active_record/destroy_association_async_job.rb, line 15
-def perform(
-  owner_model_name: nil, owner_id: nil,
-  association_class: nil, association_ids: nil, association_primary_key_column: nil,
-  ensuring_owner_was_method: nil
-)
-  association_model = association_class.constantize
-  owner_class = owner_model_name.constantize
-  owner = owner_class.find_by(owner_class.primary_key.to_sym => owner_id)
-
-  if !owner_destroyed?(owner, ensuring_owner_was_method)
-    raise DestroyAssociationAsyncError, "owner record not destroyed"
-  end
-
-  association_model.where(association_primary_key_column => association_ids).find_each do |r|
-    r.destroy
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/DynamicMatchers/FindBy.html b/src/classes/ActiveRecord/DynamicMatchers/FindBy.html index 21a75fdd10..a7d23e7bd0 100644 --- a/src/classes/ActiveRecord/DynamicMatchers/FindBy.html +++ b/src/classes/ActiveRecord/DynamicMatchers/FindBy.html @@ -84,22 +84,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/dynamic_matchers.rb, line 96
+        def self.prefix
+          "find_by"
+        end
- -
-
# File activerecord/lib/active_record/dynamic_matchers.rb, line 96
-def self.prefix
-  "find_by"
-end
-
-
- - + See on GitHub + + + + @@ -123,22 +123,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/dynamic_matchers.rb, line 100
+        def finder
+          "find_by"
+        end
- -
-
# File activerecord/lib/active_record/dynamic_matchers.rb, line 100
-def finder
-  "find_by"
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/DynamicMatchers/FindByBang.html b/src/classes/ActiveRecord/DynamicMatchers/FindByBang.html index cfacf5fa4c..d031ab3298 100644 --- a/src/classes/ActiveRecord/DynamicMatchers/FindByBang.html +++ b/src/classes/ActiveRecord/DynamicMatchers/FindByBang.html @@ -88,22 +88,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/dynamic_matchers.rb, line 108
+        def self.prefix
+          "find_by"
+        end
- -
-
# File activerecord/lib/active_record/dynamic_matchers.rb, line 108
-def self.prefix
-  "find_by"
-end
-
-
- - + See on GitHub + + + +

@@ -123,22 +123,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/dynamic_matchers.rb, line 112
+        def self.suffix
+          "!"
+        end
- -
-
# File activerecord/lib/active_record/dynamic_matchers.rb, line 112
-def self.suffix
-  "!"
-end
-
-
- -

+ See on GitHub + + + + @@ -162,22 +162,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/dynamic_matchers.rb, line 116
+        def finder
+          "find_by!"
+        end
- -
-
# File activerecord/lib/active_record/dynamic_matchers.rb, line 116
-def finder
-  "find_by!"
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/DynamicMatchers/Method.html b/src/classes/ActiveRecord/DynamicMatchers/Method.html index e9eb2f8ab7..d14e29c6a5 100644 --- a/src/classes/ActiveRecord/DynamicMatchers/Method.html +++ b/src/classes/ActiveRecord/DynamicMatchers/Method.html @@ -142,23 +142,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/dynamic_matchers.rb, line 32
+          def match(model, name)
+            klass = matchers.find { |k| k.pattern.match?(name) }
+            klass.new(model, name) if klass
+          end
- -
-
# File activerecord/lib/active_record/dynamic_matchers.rb, line 32
-def match(model, name)
-  klass = matchers.find { |k| k.pattern.match?(name) }
-  klass.new(model, name) if klass
-end
-
-
- - + See on GitHub + + + +

@@ -178,25 +178,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/dynamic_matchers.rb, line 52
+        def initialize(model, method_name)
+          @model           = model
+          @name            = method_name.to_s
+          @attribute_names = @name.match(self.class.pattern)[1].split("_and_")
+          @attribute_names.map! { |name| @model.attribute_aliases[name] || name }
+        end
- -
-
# File activerecord/lib/active_record/dynamic_matchers.rb, line 52
-def initialize(model, method_name)
-  @model           = model
-  @name            = method_name.to_s
-  @attribute_names = @name.match(self.class.pattern)[1].split("_and_")
-  @attribute_names.map! { |name| @model.attribute_aliases[name] || name }
-end
-
-
- -

+ See on GitHub + + + +

@@ -216,22 +216,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/dynamic_matchers.rb, line 37
+          def pattern
+            @pattern ||= /\A#{prefix}_([_a-zA-Z]\w*)#{suffix}\Z/
+          end
- -
-
# File activerecord/lib/active_record/dynamic_matchers.rb, line 37
-def pattern
-  @pattern ||= /\A#{prefix}_([_a-zA-Z]\w*)#{suffix}\Z/
-end
-
-
- -

+ See on GitHub + + + +

@@ -251,22 +251,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/dynamic_matchers.rb, line 41
+          def prefix
+            raise NotImplementedError
+          end
- -
-
# File activerecord/lib/active_record/dynamic_matchers.rb, line 41
-def prefix
-  raise NotImplementedError
-end
-
-
- -

+ See on GitHub + + + +

@@ -286,22 +286,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/dynamic_matchers.rb, line 45
+          def suffix
+            ""
+          end
- -
-
# File activerecord/lib/active_record/dynamic_matchers.rb, line 45
-def suffix
-  ""
-end
-
-
- -

+ See on GitHub + + + + @@ -325,26 +325,26 @@

- -
- - -
-
# File activerecord/lib/active_record/dynamic_matchers.rb, line 63
-        def define
-          model.class_eval <<-CODE, __FILE__, __LINE__ + 1
-            def self.#{name}(#{signature})
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/dynamic_matchers.rb, line 63
+        def define
+          model.class_eval <<-CODE, __FILE__, __LINE__ + 1
+            def self.#{name}(#{signature})
               #{body}
             end
-          CODE
-        end
-
-
- - + CODE + end + + See on GitHub + + + +

@@ -364,22 +364,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/dynamic_matchers.rb, line 59
+        def valid?
+          attribute_names.all? { |name| model.columns_hash[name] || model.reflect_on_aggregation(name.to_sym) }
+        end
- -
-
# File activerecord/lib/active_record/dynamic_matchers.rb, line 59
-def valid?
-  attribute_names.all? { |name| model.columns_hash[name] || model.reflect_on_aggregation(name.to_sym) }
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/EagerLoadPolymorphicError.html b/src/classes/ActiveRecord/EagerLoadPolymorphicError.html index 517634348c..e60f340da2 100644 --- a/src/classes/ActiveRecord/EagerLoadPolymorphicError.html +++ b/src/classes/ActiveRecord/EagerLoadPolymorphicError.html @@ -86,26 +86,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/associations.rb, line 244
+    def initialize(reflection = nil)
+      if reflection
+        super("Cannot eagerly load the polymorphic association #{reflection.name.inspect}")
+      else
+        super("Eager load polymorphic error.")
+      end
+    end
- -
-
# File activerecord/lib/active_record/associations.rb, line 244
-def initialize(reflection = nil)
-  if reflection
-    super("Cannot eagerly load the polymorphic association #{reflection.name.inspect}")
-  else
-    super("Eager load polymorphic error.")
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption.html b/src/classes/ActiveRecord/Encryption.html index 42f71a0907..8eb9860a97 100644 --- a/src/classes/ActiveRecord/Encryption.html +++ b/src/classes/ActiveRecord/Encryption.html @@ -220,24 +220,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption.rb, line 50
+    def self.eager_load!
+      super
+
+      Cipher.eager_load!
+    end
- -
-
# File activerecord/lib/active_record/encryption.rb, line 50
-def self.eager_load!
-  super
-
-  Cipher.eager_load!
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/AutoFilteredParameters.html b/src/classes/ActiveRecord/Encryption/AutoFilteredParameters.html index 2b77a11003..3120628541 100644 --- a/src/classes/ActiveRecord/Encryption/AutoFilteredParameters.html +++ b/src/classes/ActiveRecord/Encryption/AutoFilteredParameters.html @@ -84,26 +84,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/auto_filtered_parameters.rb, line 6
+      def initialize(app)
+        @app = app
+        @attributes_by_class = Concurrent::Map.new
+        @collecting = true
+
+        install_collecting_hook
+      end
- -
-
# File activerecord/lib/active_record/encryption/auto_filtered_parameters.rb, line 6
-def initialize(app)
-  @app = app
-  @attributes_by_class = Concurrent::Map.new
-  @collecting = true
-
-  install_collecting_hook
-end
-
-
- - + See on GitHub + + + + @@ -127,23 +127,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/auto_filtered_parameters.rb, line 14
+      def enable
+        apply_collected_attributes
+        @collecting = false
+      end
- -
-
# File activerecord/lib/active_record/encryption/auto_filtered_parameters.rb, line 14
-def enable
-  apply_collected_attributes
-  @collecting = false
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/Cipher.html b/src/classes/ActiveRecord/Encryption/Cipher.html index 2c21e51607..a91881f456 100644 --- a/src/classes/ActiveRecord/Encryption/Cipher.html +++ b/src/classes/ActiveRecord/Encryption/Cipher.html @@ -140,24 +140,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/cipher.rb, line 25
+      def decrypt(encrypted_message, key:)
+        try_to_decrypt_with_each(encrypted_message, keys: Array(key)).tap do |decrypted_text|
+          decrypted_text.force_encoding(encrypted_message.headers.encoding || DEFAULT_ENCODING)
+        end
+      end
- -
-
# File activerecord/lib/active_record/encryption/cipher.rb, line 25
-def decrypt(encrypted_message, key:)
-  try_to_decrypt_with_each(encrypted_message, keys: Array(key)).tap do |decrypted_text|
-    decrypted_text.force_encoding(encrypted_message.headers.encoding || DEFAULT_ENCODING)
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -177,24 +177,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/cipher.rb, line 15
+      def encrypt(clean_text, key:, deterministic: false)
+        cipher_for(key, deterministic: deterministic).encrypt(clean_text).tap do |message|
+          message.headers.encoding = clean_text.encoding.name unless clean_text.encoding == DEFAULT_ENCODING
+        end
+      end
- -
-
# File activerecord/lib/active_record/encryption/cipher.rb, line 15
-def encrypt(clean_text, key:, deterministic: false)
-  cipher_for(key, deterministic: deterministic).encrypt(clean_text).tap do |message|
-    message.headers.encoding = clean_text.encoding.name unless clean_text.encoding == DEFAULT_ENCODING
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -214,22 +214,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/cipher.rb, line 35
+      def iv_length
+        Aes256Gcm.iv_length
+      end
- -
-
# File activerecord/lib/active_record/encryption/cipher.rb, line 35
-def iv_length
-  Aes256Gcm.iv_length
-end
-
-
- -

+ See on GitHub + + + +

@@ -249,22 +249,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/cipher.rb, line 31
+      def key_length
+        Aes256Gcm.key_length
+      end
- -
-
# File activerecord/lib/active_record/encryption/cipher.rb, line 31
-def key_length
-  Aes256Gcm.key_length
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/Cipher/Aes256Gcm.html b/src/classes/ActiveRecord/Encryption/Cipher/Aes256Gcm.html index d91983f7ca..cc325d0168 100644 --- a/src/classes/ActiveRecord/Encryption/Cipher/Aes256Gcm.html +++ b/src/classes/ActiveRecord/Encryption/Cipher/Aes256Gcm.html @@ -124,22 +124,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/cipher/aes256_gcm.rb, line 22
+          def iv_length
+            OpenSSL::Cipher.new(CIPHER_TYPE).iv_len
+          end
- -
-
# File activerecord/lib/active_record/encryption/cipher/aes256_gcm.rb, line 22
-def iv_length
-  OpenSSL::Cipher.new(CIPHER_TYPE).iv_len
-end
-
-
- - + See on GitHub + + + +

@@ -159,22 +159,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/cipher/aes256_gcm.rb, line 18
+          def key_length
+            OpenSSL::Cipher.new(CIPHER_TYPE).key_len
+          end
- -
-
# File activerecord/lib/active_record/encryption/cipher/aes256_gcm.rb, line 18
-def key_length
-  OpenSSL::Cipher.new(CIPHER_TYPE).key_len
-end
-
-
- -

+ See on GitHub + + + +

@@ -194,23 +194,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/cipher/aes256_gcm.rb, line 29
+        def initialize(secret, deterministic: false)
+          @secret = secret
+          @deterministic = deterministic
+        end
- -
-
# File activerecord/lib/active_record/encryption/cipher/aes256_gcm.rb, line 29
-def initialize(secret, deterministic: false)
-  @secret = secret
-  @deterministic = deterministic
-end
-
-
- -

+ See on GitHub + + + + @@ -234,45 +234,45 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/cipher/aes256_gcm.rb, line 55
+        def decrypt(encrypted_message)
+          encrypted_data = encrypted_message.payload
+          iv = encrypted_message.headers.iv
+          auth_tag = encrypted_message.headers.auth_tag
+
+          # Currently the OpenSSL bindings do not raise an error if auth_tag is
+          # truncated, which would allow an attacker to easily forge it. See
+          # https://github.com/ruby/openssl/issues/63
+          raise ActiveRecord::Encryption::Errors::EncryptedContentIntegrity if auth_tag.nil? || auth_tag.bytes.length != 16
+
+          cipher = OpenSSL::Cipher.new(CIPHER_TYPE)
+
+          cipher.decrypt
+          cipher.key = @secret
+          cipher.iv = iv
+
+          cipher.auth_tag = auth_tag
+          cipher.auth_data = ""
+
+          decrypted_data = encrypted_data.empty? ? encrypted_data : cipher.update(encrypted_data)
+          decrypted_data << cipher.final
+
+          decrypted_data
+        rescue OpenSSL::Cipher::CipherError, TypeError, ArgumentError
+          raise ActiveRecord::Encryption::Errors::Decryption
+        end
- -
-
# File activerecord/lib/active_record/encryption/cipher/aes256_gcm.rb, line 55
-def decrypt(encrypted_message)
-  encrypted_data = encrypted_message.payload
-  iv = encrypted_message.headers.iv
-  auth_tag = encrypted_message.headers.auth_tag
-
-  # Currently the OpenSSL bindings do not raise an error if auth_tag is
-  # truncated, which would allow an attacker to easily forge it. See
-  # https://github.com/ruby/openssl/issues/63
-  raise ActiveRecord::Encryption::Errors::EncryptedContentIntegrity if auth_tag.nil? || auth_tag.bytes.length != 16
-
-  cipher = OpenSSL::Cipher.new(CIPHER_TYPE)
-
-  cipher.decrypt
-  cipher.key = @secret
-  cipher.iv = iv
-
-  cipher.auth_tag = auth_tag
-  cipher.auth_data = ""
-
-  decrypted_data = encrypted_data.empty? ? encrypted_data : cipher.update(encrypted_data)
-  decrypted_data << cipher.final
-
-  decrypted_data
-rescue OpenSSL::Cipher::CipherError, TypeError, ArgumentError
-  raise ActiveRecord::Encryption::Errors::Decryption
-end
-
-
- - + See on GitHub + + + +

@@ -292,39 +292,39 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/cipher/aes256_gcm.rb, line 34
+        def encrypt(clear_text)
+          # This code is extracted from +ActiveSupport::MessageEncryptor+. Not using it directly because we want to control
+          # the message format and only serialize things once at the +ActiveRecord::Encryption::Message+ level. Also, this
+          # cipher is prepared to deal with deterministic/non deterministic encryption modes.
+
+          cipher = OpenSSL::Cipher.new(CIPHER_TYPE)
+          cipher.encrypt
+          cipher.key = @secret
+
+          iv = generate_iv(cipher, clear_text)
+          cipher.iv = iv
+
+          encrypted_data = clear_text.empty? ? clear_text.dup : cipher.update(clear_text)
+          encrypted_data << cipher.final
+
+          ActiveRecord::Encryption::Message.new(payload: encrypted_data).tap do |message|
+            message.headers.iv = iv
+            message.headers.auth_tag = cipher.auth_tag
+          end
+        end
- -
-
# File activerecord/lib/active_record/encryption/cipher/aes256_gcm.rb, line 34
-def encrypt(clear_text)
-  # This code is extracted from +ActiveSupport::MessageEncryptor+. Not using it directly because we want to control
-  # the message format and only serialize things once at the +ActiveRecord::Encryption::Message+ level. Also, this
-  # cipher is prepared to deal with deterministic/non deterministic encryption modes.
-
-  cipher = OpenSSL::Cipher.new(CIPHER_TYPE)
-  cipher.encrypt
-  cipher.key = @secret
-
-  iv = generate_iv(cipher, clear_text)
-  cipher.iv = iv
-
-  encrypted_data = clear_text.empty? ? clear_text.dup : cipher.update(clear_text)
-  encrypted_data << cipher.final
-
-  ActiveRecord::Encryption::Message.new(payload: encrypted_data).tap do |message|
-    message.headers.iv = iv
-    message.headers.auth_tag = cipher.auth_tag
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/Config.html b/src/classes/ActiveRecord/Encryption/Config.html index 49c6b0057f..ab91295cad 100644 --- a/src/classes/ActiveRecord/Encryption/Config.html +++ b/src/classes/ActiveRecord/Encryption/Config.html @@ -204,22 +204,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/config.rb, line 13
+      def initialize
+        set_defaults
+      end
- -
-
# File activerecord/lib/active_record/encryption/config.rb, line 13
-def initialize
-  set_defaults
-end
-
-
- - + See on GitHub + + + + @@ -246,24 +246,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/config.rb, line 20
+      def previous=(previous_schemes_properties)
+        previous_schemes_properties.each do |properties|
+          add_previous_scheme(**properties)
+        end
+      end
- -
-
# File activerecord/lib/active_record/encryption/config.rb, line 20
-def previous=(previous_schemes_properties)
-  previous_schemes_properties.each do |properties|
-    add_previous_scheme(**properties)
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -283,26 +283,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/config.rb, line 26
+      def support_sha1_for_non_deterministic_encryption=(value)
+        if value && has_primary_key?
+          sha1_key_generator = ActiveRecord::Encryption::KeyGenerator.new(hash_digest_class: OpenSSL::Digest::SHA1)
+          sha1_key_provider = ActiveRecord::Encryption::DerivedSecretKeyProvider.new(primary_key, key_generator: sha1_key_generator)
+          add_previous_scheme key_provider: sha1_key_provider
+        end
+      end
- -
-
# File activerecord/lib/active_record/encryption/config.rb, line 26
-def support_sha1_for_non_deterministic_encryption=(value)
-  if value && has_primary_key?
-    sha1_key_generator = ActiveRecord::Encryption::KeyGenerator.new(hash_digest_class: OpenSSL::Digest::SHA1)
-    sha1_key_provider = ActiveRecord::Encryption::DerivedSecretKeyProvider.new(primary_key, key_generator: sha1_key_generator)
-    add_previous_scheme key_provider: sha1_key_provider
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/Configurable.html b/src/classes/ActiveRecord/Encryption/Configurable.html index a2fe2f1f1b..920fbda3c3 100644 --- a/src/classes/ActiveRecord/Encryption/Configurable.html +++ b/src/classes/ActiveRecord/Encryption/Configurable.html @@ -88,23 +88,23 @@

Example

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/configurable.rb, line 47
+        def on_encrypted_attribute_declared(&block)
+          self.encrypted_attribute_declaration_listeners ||= Concurrent::Array.new
+          self.encrypted_attribute_declaration_listeners << block
+        end
- -
-
# File activerecord/lib/active_record/encryption/configurable.rb, line 47
-def on_encrypted_attribute_declared(&block)
-  self.encrypted_attribute_declaration_listeners ||= Concurrent::Array.new
-  self.encrypted_attribute_declaration_listeners << block
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/Context.html b/src/classes/ActiveRecord/Encryption/Context.html index 315c3df3db..27bbe9b094 100644 --- a/src/classes/ActiveRecord/Encryption/Context.html +++ b/src/classes/ActiveRecord/Encryption/Context.html @@ -119,22 +119,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/context.rb, line 17
+      def initialize
+        set_defaults
+      end
- -
-
# File activerecord/lib/active_record/encryption/context.rb, line 17
-def initialize
-  set_defaults
-end
-
-
- - + See on GitHub + + + + @@ -158,22 +158,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/context.rb, line 24
+      def key_provider
+        @key_provider ||= build_default_key_provider
+      end
- -
-
# File activerecord/lib/active_record/encryption/context.rb, line 24
-def key_provider
-  @key_provider ||= build_default_key_provider
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/Contexts.html b/src/classes/ActiveRecord/Encryption/Contexts.html index 778a0e81b8..8843009abe 100644 --- a/src/classes/ActiveRecord/Encryption/Contexts.html +++ b/src/classes/ActiveRecord/Encryption/Contexts.html @@ -105,22 +105,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/contexts.rb, line 62
+        def context
+          self.current_custom_context || self.default_context
+        end
- -
-
# File activerecord/lib/active_record/encryption/contexts.rb, line 62
-def context
-  self.current_custom_context || self.default_context
-end
-
-
- - + See on GitHub + + + +

@@ -140,22 +140,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/contexts.rb, line 66
+        def current_custom_context
+          self.custom_contexts&.last
+        end
- -
-
# File activerecord/lib/active_record/encryption/contexts.rb, line 66
-def current_custom_context
-  self.custom_contexts&.last
-end
-
-
- -

+ See on GitHub + + + +

@@ -180,22 +180,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/contexts.rb, line 57
+        def protecting_encrypted_data(&block)
+          with_encryption_context encryptor: ActiveRecord::Encryption::EncryptingOnlyEncryptor.new, frozen_encryption: true, &block
+        end
- -
-
# File activerecord/lib/active_record/encryption/contexts.rb, line 57
-def protecting_encrypted_data(&block)
-  with_encryption_context encryptor: ActiveRecord::Encryption::EncryptingOnlyEncryptor.new, frozen_encryption: true, &block
-end
-
-
- -

+ See on GitHub + + + +

@@ -215,22 +215,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/contexts.rb, line 70
+        def reset_default_context
+          self.default_context = Context.new
+        end
- -
-
# File activerecord/lib/active_record/encryption/contexts.rb, line 70
-def reset_default_context
-  self.default_context = Context.new
-end
-
-
- -

+ See on GitHub + + + +

@@ -261,30 +261,30 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/contexts.rb, line 33
+        def with_encryption_context(properties)
+          self.custom_contexts ||= []
+          self.custom_contexts << default_context.dup
+          properties.each do |key, value|
+            self.current_custom_context.send("#{key}=", value)
+          end
+
+          yield
+        ensure
+          self.custom_contexts.pop
+        end
- -
-
# File activerecord/lib/active_record/encryption/contexts.rb, line 33
-def with_encryption_context(properties)
-  self.custom_contexts ||= []
-  self.custom_contexts << default_context.dup
-  properties.each do |key, value|
-    self.current_custom_context.send("#{key}=", value)
-  end
-
-  yield
-ensure
-  self.custom_contexts.pop
-end
-
-
- -

+ See on GitHub + + + +

@@ -309,22 +309,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/contexts.rb, line 49
+        def without_encryption(&block)
+          with_encryption_context encryptor: ActiveRecord::Encryption::NullEncryptor.new, &block
+        end
- -
-
# File activerecord/lib/active_record/encryption/contexts.rb, line 49
-def without_encryption(&block)
-  with_encryption_context encryptor: ActiveRecord::Encryption::NullEncryptor.new, &block
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/DerivedSecretKeyProvider.html b/src/classes/ActiveRecord/Encryption/DerivedSecretKeyProvider.html index c5367feb44..09649ce861 100644 --- a/src/classes/ActiveRecord/Encryption/DerivedSecretKeyProvider.html +++ b/src/classes/ActiveRecord/Encryption/DerivedSecretKeyProvider.html @@ -86,22 +86,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/derived_secret_key_provider.rb, line 7
+      def initialize(passwords, key_generator: ActiveRecord::Encryption.key_generator)
+        super(Array(passwords).collect { |password| derive_key_from(password, using: key_generator) })
+      end
- -
-
# File activerecord/lib/active_record/encryption/derived_secret_key_provider.rb, line 7
-def initialize(passwords, key_generator: ActiveRecord::Encryption.key_generator)
-  super(Array(passwords).collect { |password| derive_key_from(password, using: key_generator) })
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/DeterministicKeyProvider.html b/src/classes/ActiveRecord/Encryption/DeterministicKeyProvider.html index abb07f4f10..eae0ef0d10 100644 --- a/src/classes/ActiveRecord/Encryption/DeterministicKeyProvider.html +++ b/src/classes/ActiveRecord/Encryption/DeterministicKeyProvider.html @@ -86,24 +86,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/deterministic_key_provider.rb, line 7
+      def initialize(password)
+        passwords = Array(password)
+        raise ActiveRecord::Encryption::Errors::Configuration, "Deterministic encryption keys can't be rotated" if passwords.length > 1
+        super(passwords)
+      end
- -
-
# File activerecord/lib/active_record/encryption/deterministic_key_provider.rb, line 7
-def initialize(password)
-  passwords = Array(password)
-  raise ActiveRecord::Encryption::Errors::Configuration, "Deterministic encryption keys can't be rotated" if passwords.length > 1
-  super(passwords)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/EncryptableRecord.html b/src/classes/ActiveRecord/Encryption/EncryptableRecord.html index cd1aa624b7..7ae2dead41 100644 --- a/src/classes/ActiveRecord/Encryption/EncryptableRecord.html +++ b/src/classes/ActiveRecord/Encryption/EncryptableRecord.html @@ -155,24 +155,24 @@

- -
- - -
-
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 132
-def add_length_validation_for_encrypted_columns
-  encrypted_attributes&.each do |attribute_name|
-    validate_column_size attribute_name
-  end
-end
-
-
- - + +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 132
+          def add_length_validation_for_encrypted_columns
+            encrypted_attributes&.each do |attribute_name|
+              validate_column_size attribute_name
+            end
+          end
+ + See on GitHub + +
+ +

@@ -192,26 +192,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 151
+      def ciphertext_for(attribute_name)
+        if encrypted_attribute?(attribute_name)
+          read_attribute_before_type_cast(attribute_name)
+        else
+          read_attribute_for_database(attribute_name)
+        end
+      end
- -
-
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 151
-def ciphertext_for(attribute_name)
-  if encrypted_attribute?(attribute_name)
-    read_attribute_before_type_cast(attribute_name)
-  else
-    read_attribute_for_database(attribute_name)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -231,22 +231,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 165
+      def decrypt
+        decrypt_attributes if has_encrypted_attributes?
+      end
- -
-
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 165
-def decrypt
-  decrypt_attributes if has_encrypted_attributes?
-end
-
-
- -

+ See on GitHub + + + +

@@ -266,24 +266,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 58
+        def deterministic_encrypted_attributes
+          @deterministic_encrypted_attributes ||= encrypted_attributes&.find_all do |attribute_name|
+            type_for_attribute(attribute_name).deterministic?
+          end
+        end
- -
-
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 58
-def deterministic_encrypted_attributes
-  @deterministic_encrypted_attributes ||= encrypted_attributes&.find_all do |attribute_name|
-    type_for_attribute(attribute_name).deterministic?
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -303,22 +303,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 160
+      def encrypt
+        encrypt_attributes if has_encrypted_attributes?
+      end
- -
-
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 160
-def encrypt
-  encrypt_attributes if has_encrypted_attributes?
-end
-
-
- -

+ See on GitHub + + + +

@@ -338,32 +338,32 @@

- -
- - -
-
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 84
-def encrypt_attribute(name, key_provider: nil, key: nil, deterministic: false, support_unencrypted_data: nil, downcase: false, ignore_case: false, previous: [], **context_properties)
-  encrypted_attributes << name.to_sym
+          
+            
+ + Source code + - attribute name do |cast_type| - scheme = scheme_for key_provider: key_provider, key: key, deterministic: deterministic, support_unencrypted_data: support_unencrypted_data, \ - downcase: downcase, ignore_case: ignore_case, previous: previous, **context_properties +
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 84
+          def encrypt_attribute(name, key_provider: nil, key: nil, deterministic: false, support_unencrypted_data: nil, downcase: false, ignore_case: false, previous: [], **context_properties)
+            encrypted_attributes << name.to_sym
 
-    ActiveRecord::Encryption::EncryptedAttributeType.new(scheme: scheme, cast_type: cast_type, default: columns_hash[name.to_s]&.default)
-  end
+            attribute name do |cast_type|
+              scheme = scheme_for key_provider: key_provider, key: key, deterministic: deterministic, support_unencrypted_data: support_unencrypted_data, \
+                downcase: downcase, ignore_case: ignore_case, previous: previous, **context_properties
 
-  preserve_original_encrypted(name) if ignore_case
-  ActiveRecord::Encryption.encrypted_attribute_was_declared(self, name)
-end
-
-
- -

+ ActiveRecord::Encryption::EncryptedAttributeType.new(scheme: scheme, cast_type: cast_type, default: columns_hash[name.to_s]&.default) + end + + preserve_original_encrypted(name) if ignore_case + ActiveRecord::Encryption.encrypted_attribute_was_declared(self, name) + end + + See on GitHub + + + +

@@ -383,22 +383,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 146
+      def encrypted_attribute?(attribute_name)
+        ActiveRecord::Encryption.encryptor.encrypted? read_attribute_before_type_cast(attribute_name)
+      end
- -
-
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 146
-def encrypted_attribute?(attribute_name)
-  ActiveRecord::Encryption.encryptor.encrypted? read_attribute_before_type_cast(attribute_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -437,26 +437,26 @@

Options

- -
- - -
-
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 49
-def encrypts(*names, key_provider: nil, key: nil, deterministic: false, support_unencrypted_data: nil, downcase: false, ignore_case: false, previous: [], **context_properties)
-  self.encrypted_attributes ||= Set.new # not using :default because the instance would be shared across classes
+          
+            
+ + Source code + - names.each do |name| - encrypt_attribute name, key_provider: key_provider, key: key, deterministic: deterministic, support_unencrypted_data: support_unencrypted_data, downcase: downcase, ignore_case: ignore_case, previous: previous, **context_properties - end -end
-
-
- -
+
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 49
+        def encrypts(*names, key_provider: nil, key: nil, deterministic: false, support_unencrypted_data: nil, downcase: false, ignore_case: false, previous: [], **context_properties)
+          self.encrypted_attributes ||= Set.new # not using :default because the instance would be shared across classes
+
+          names.each do |name|
+            encrypt_attribute name, key_provider: key_provider, key: key, deterministic: deterministic, support_unencrypted_data: support_unencrypted_data, downcase: downcase, ignore_case: ignore_case, previous: previous, **context_properties
+          end
+        end
+ + See on GitHub + + + +

@@ -476,24 +476,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 78
+          def global_previous_schemes_for(scheme)
+            ActiveRecord::Encryption.config.previous_schemes.filter_map do |previous_scheme|
+              scheme.merge(previous_scheme) if scheme.compatible_with?(previous_scheme)
+            end
+          end
- -
-
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 78
-def global_previous_schemes_for(scheme)
-  ActiveRecord::Encryption.config.previous_schemes.filter_map do |previous_scheme|
-    scheme.merge(previous_scheme) if scheme.compatible_with?(previous_scheme)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -513,24 +513,24 @@

- -
- - -
-
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 126
-def load_schema!
-  super
+          
+            
+ + Source code + - add_length_validation_for_encrypted_columns if ActiveRecord::Encryption.config.validate_column_size -end
-
-
- -

+
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 126
+          def load_schema!
+            super
+
+            add_length_validation_for_encrypted_columns if ActiveRecord::Encryption.config.validate_column_size
+          end
+ + See on GitHub + + + +

@@ -550,35 +550,35 @@

- -
- - -
-
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 109
-def override_accessors_to_preserve_original(name, original_attribute_name)
-  include(Module.new do
-    define_method name do
-      if ((value = super()) && encrypted_attribute?(name)) || !ActiveRecord::Encryption.config.support_unencrypted_data
-        send(original_attribute_name)
-      else
-        value
-      end
-    end
+          
+            
+ + Source code + - define_method "#{name}=" do |value| - self.send "#{original_attribute_name}=", value - super(value) - end - end) -end
-
-
- -

+
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 109
+          def override_accessors_to_preserve_original(name, original_attribute_name)
+            include(Module.new do
+              define_method name do
+                if ((value = super()) && encrypted_attribute?(name)) || !ActiveRecord::Encryption.config.support_unencrypted_data
+                  send(original_attribute_name)
+                else
+                  value
+                end
+              end
+
+              define_method "#{name}=" do |value|
+                self.send "#{original_attribute_name}=", value
+                super(value)
+              end
+            end)
+          end
+ + See on GitHub + + + +

@@ -598,29 +598,29 @@

- -
- - -
-
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 98
-def preserve_original_encrypted(name)
-  original_attribute_name = "#{ORIGINAL_ATTRIBUTE_PREFIX}#{name}".to_sym
+          
+            
+ + Source code + - if !ActiveRecord::Encryption.config.support_unencrypted_data && !column_names.include?(original_attribute_name.to_s) - raise Errors::Configuration, "To use :ignore_case for '#{name}' you must create an additional column named '#{original_attribute_name}'" - end +
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 98
+          def preserve_original_encrypted(name)
+            original_attribute_name = "#{ORIGINAL_ATTRIBUTE_PREFIX}#{name}".to_sym
 
-  encrypts original_attribute_name
-  override_accessors_to_preserve_original name, original_attribute_name
-end
-
-
- -

+ if !ActiveRecord::Encryption.config.support_unencrypted_data && !column_names.include?(original_attribute_name.to_s) + raise Errors::Configuration, "To use :ignore_case for '#{name}' you must create an additional column named '#{original_attribute_name}'" + end + + encrypts original_attribute_name + override_accessors_to_preserve_original name, original_attribute_name + end + + See on GitHub + + + +

@@ -640,26 +640,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 70
+          def scheme_for(key_provider: nil, key: nil, deterministic: false, support_unencrypted_data: nil, downcase: false, ignore_case: false, previous: [], **context_properties)
+            ActiveRecord::Encryption::Scheme.new(key_provider: key_provider, key: key, deterministic: deterministic,
+              support_unencrypted_data: support_unencrypted_data, downcase: downcase, ignore_case: ignore_case, **context_properties).tap do |scheme|
+              scheme.previous_schemes = global_previous_schemes_for(scheme) +
+              Array.wrap(previous).collect { |scheme_config| ActiveRecord::Encryption::Scheme.new(**scheme_config) }
+            end
+          end
- -
-
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 70
-def scheme_for(key_provider: nil, key: nil, deterministic: false, support_unencrypted_data: nil, downcase: false, ignore_case: false, previous: [], **context_properties)
-  ActiveRecord::Encryption::Scheme.new(key_provider: key_provider, key: key, deterministic: deterministic,
-    support_unencrypted_data: support_unencrypted_data, downcase: downcase, ignore_case: ignore_case, **context_properties).tap do |scheme|
-    scheme.previous_schemes = global_previous_schemes_for(scheme) +
-    Array.wrap(previous).collect { |scheme_config| ActiveRecord::Encryption::Scheme.new(**scheme_config) }
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -679,22 +679,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 65
+        def source_attribute_from_preserved_attribute(attribute_name)
+          attribute_name.to_s.sub(ORIGINAL_ATTRIBUTE_PREFIX, "") if attribute_name.start_with?(ORIGINAL_ATTRIBUTE_PREFIX)
+        end
- -
-
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 65
-def source_attribute_from_preserved_attribute(attribute_name)
-  attribute_name.to_s.sub(ORIGINAL_ATTRIBUTE_PREFIX, "") if attribute_name.start_with?(ORIGINAL_ATTRIBUTE_PREFIX)
-end
-
-
- -

+ See on GitHub + + + +

@@ -714,24 +714,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 138
+          def validate_column_size(attribute_name)
+            if limit = columns_hash[attribute_name.to_s]&.limit
+              validates_length_of attribute_name, maximum: limit
+            end
+          end
- -
-
# File activerecord/lib/active_record/encryption/encryptable_record.rb, line 138
-def validate_column_size(attribute_name)
-  if limit = columns_hash[attribute_name.to_s]&.limit
-    validates_length_of attribute_name, maximum: limit
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/EncryptedAttributeType.html b/src/classes/ActiveRecord/Encryption/EncryptedAttributeType.html index 4db522b58c..004f5d8a24 100644 --- a/src/classes/ActiveRecord/Encryption/EncryptedAttributeType.html +++ b/src/classes/ActiveRecord/Encryption/EncryptedAttributeType.html @@ -149,26 +149,26 @@

Options

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/encrypted_attribute_type.rb, line 23
+      def initialize(scheme:, cast_type: ActiveModel::Type::String.new, previous_type: false, default: nil)
+        super()
+        @scheme = scheme
+        @cast_type = cast_type
+        @previous_type = previous_type
+        @default = default
+      end
- -
-
# File activerecord/lib/active_record/encryption/encrypted_attribute_type.rb, line 23
-def initialize(scheme:, cast_type: ActiveModel::Type::String.new, previous_type: false, default: nil)
-  super()
-  @scheme = scheme
-  @cast_type = cast_type
-  @previous_type = previous_type
-  @default = default
-end
-
-
- - + See on GitHub + + + + @@ -192,22 +192,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/encrypted_attribute_type.rb, line 31
+      def cast(value)
+        cast_type.cast(value)
+      end
- -
-
# File activerecord/lib/active_record/encryption/encrypted_attribute_type.rb, line 31
-def cast(value)
-  cast_type.cast(value)
-end
-
-
- - + See on GitHub + + + +

@@ -227,23 +227,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/encrypted_attribute_type.rb, line 47
+      def changed_in_place?(raw_old_value, new_value)
+        old_value = raw_old_value.nil? ? nil : deserialize(raw_old_value)
+        old_value != new_value
+      end
- -
-
# File activerecord/lib/active_record/encryption/encrypted_attribute_type.rb, line 47
-def changed_in_place?(raw_old_value, new_value)
-  old_value = raw_old_value.nil? ? nil : deserialize(raw_old_value)
-  old_value != new_value
-end
-
-
- -

+ See on GitHub + + + +

@@ -263,22 +263,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/encrypted_attribute_type.rb, line 35
+      def deserialize(value)
+        cast_type.deserialize decrypt(value)
+      end
- -
-
# File activerecord/lib/active_record/encryption/encrypted_attribute_type.rb, line 35
-def deserialize(value)
-  cast_type.deserialize decrypt(value)
-end
-
-
- -

+ See on GitHub + + + +

@@ -298,26 +298,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/encrypted_attribute_type.rb, line 39
+      def serialize(value)
+        if serialize_with_oldest?
+          serialize_with_oldest(value)
+        else
+          serialize_with_current(value)
+        end
+      end
- -
-
# File activerecord/lib/active_record/encryption/encrypted_attribute_type.rb, line 39
-def serialize(value)
-  if serialize_with_oldest?
-    serialize_with_oldest(value)
-  else
-    serialize_with_current(value)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -337,22 +337,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/encrypted_attribute_type.rb, line 57
+      def support_unencrypted_data?
+        ActiveRecord::Encryption.config.support_unencrypted_data && scheme.support_unencrypted_data? && !previous_type?
+      end
- -
-
# File activerecord/lib/active_record/encryption/encrypted_attribute_type.rb, line 57
-def support_unencrypted_data?
-  ActiveRecord::Encryption.config.support_unencrypted_data && scheme.support_unencrypted_data? && !previous_type?
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/EncryptedFixtures.html b/src/classes/ActiveRecord/Encryption/EncryptedFixtures.html index d3b4dd23b5..b22e083382 100644 --- a/src/classes/ActiveRecord/Encryption/EncryptedFixtures.html +++ b/src/classes/ActiveRecord/Encryption/EncryptedFixtures.html @@ -74,25 +74,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/encrypted_fixtures.rb, line 6
+      def initialize(fixture, model_class)
+        @clean_values = {}
+        encrypt_fixture_data(fixture, model_class)
+        process_preserved_original_columns(fixture, model_class)
+        super
+      end
- -
-
# File activerecord/lib/active_record/encryption/encrypted_fixtures.rb, line 6
-def initialize(fixture, model_class)
-  @clean_values = {}
-  encrypt_fixture_data(fixture, model_class)
-  process_preserved_original_columns(fixture, model_class)
-  super
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/EncryptingOnlyEncryptor.html b/src/classes/ActiveRecord/Encryption/EncryptingOnlyEncryptor.html index 2acdf4792a..3b1231fc42 100644 --- a/src/classes/ActiveRecord/Encryption/EncryptingOnlyEncryptor.html +++ b/src/classes/ActiveRecord/Encryption/EncryptingOnlyEncryptor.html @@ -87,22 +87,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/encrypting_only_encryptor.rb, line 7
+      def decrypt(encrypted_text, key_provider: nil, cipher_options: {})
+        encrypted_text
+      end
- -
-
# File activerecord/lib/active_record/encryption/encrypting_only_encryptor.rb, line 7
-def decrypt(encrypted_text, key_provider: nil, cipher_options: {})
-  encrypted_text
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/Encryptor.html b/src/classes/ActiveRecord/Encryption/Encryptor.html index 6ced477e7b..221d658741 100644 --- a/src/classes/ActiveRecord/Encryption/Encryptor.html +++ b/src/classes/ActiveRecord/Encryption/Encryptor.html @@ -148,27 +148,27 @@

Options

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/encryptor.rb, line 52
+      def decrypt(encrypted_text, key_provider: default_key_provider, cipher_options: {})
+        message = deserialize_message(encrypted_text)
+        keys = key_provider.decryption_keys(message)
+        raise Errors::Decryption unless keys.present?
+        uncompress_if_needed(cipher.decrypt(message, key: keys.collect(&:secret), **cipher_options), message.headers.compressed)
+      rescue *(ENCODING_ERRORS + DECRYPT_ERRORS)
+        raise Errors::Decryption
+      end
- -
-
# File activerecord/lib/active_record/encryption/encryptor.rb, line 52
-def decrypt(encrypted_text, key_provider: default_key_provider, cipher_options: {})
-  message = deserialize_message(encrypted_text)
-  keys = key_provider.decryption_keys(message)
-  raise Errors::Decryption unless keys.present?
-  uncompress_if_needed(cipher.decrypt(message, key: keys.collect(&:secret), **cipher_options), message.headers.compressed)
-rescue *(ENCODING_ERRORS + DECRYPT_ERRORS)
-  raise Errors::Decryption
-end
-
-
- - + See on GitHub + + + +

@@ -208,25 +208,25 @@

Options

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/encryptor.rb, line 34
+      def encrypt(clear_text, key_provider: default_key_provider, cipher_options: {})
+        clear_text = force_encoding_if_needed(clear_text) if cipher_options[:deterministic]
+
+        validate_payload_type(clear_text)
+        serialize_message build_encrypted_message(clear_text, key_provider: key_provider, cipher_options: cipher_options)
+      end
- -
-
# File activerecord/lib/active_record/encryption/encryptor.rb, line 34
-def encrypt(clear_text, key_provider: default_key_provider, cipher_options: {})
-  clear_text = force_encoding_if_needed(clear_text) if cipher_options[:deterministic]
-
-  validate_payload_type(clear_text)
-  serialize_message build_encrypted_message(clear_text, key_provider: key_provider, cipher_options: cipher_options)
-end
-
-
- -
+ See on GitHub + + + +

@@ -246,25 +246,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/encryptor.rb, line 62
+      def encrypted?(text)
+        deserialize_message(text)
+        true
+      rescue Errors::Encoding, *DECRYPT_ERRORS
+        false
+      end
- -
-
# File activerecord/lib/active_record/encryption/encryptor.rb, line 62
-def encrypted?(text)
-  deserialize_message(text)
-  true
-rescue Errors::Encoding, *DECRYPT_ERRORS
-  false
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/EnvelopeEncryptionKeyProvider.html b/src/classes/ActiveRecord/Encryption/EnvelopeEncryptionKeyProvider.html index e2de6569ca..dec9c34ac3 100644 --- a/src/classes/ActiveRecord/Encryption/EnvelopeEncryptionKeyProvider.html +++ b/src/classes/ActiveRecord/Encryption/EnvelopeEncryptionKeyProvider.html @@ -104,22 +104,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/envelope_encryption_key_provider.rb, line 31
+      def active_primary_key
+        @active_primary_key ||= primary_key_provider.encryption_key
+      end
- -
-
# File activerecord/lib/active_record/encryption/envelope_encryption_key_provider.rb, line 31
-def active_primary_key
-  @active_primary_key ||= primary_key_provider.encryption_key
-end
-
-
- - + See on GitHub + + + +

@@ -139,23 +139,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/envelope_encryption_key_provider.rb, line 26
+      def decryption_keys(encrypted_message)
+        secret = decrypt_data_key(encrypted_message)
+        secret ? [ActiveRecord::Encryption::Key.new(secret)] : []
+      end
- -
-
# File activerecord/lib/active_record/encryption/envelope_encryption_key_provider.rb, line 26
-def decryption_keys(encrypted_message)
-  secret = decrypt_data_key(encrypted_message)
-  secret ? [ActiveRecord::Encryption::Key.new(secret)] : []
-end
-
-
- -

+ See on GitHub + + + +

@@ -175,26 +175,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/envelope_encryption_key_provider.rb, line 18
+      def encryption_key
+        random_secret = generate_random_secret
+        ActiveRecord::Encryption::Key.new(random_secret).tap do |key|
+          key.public_tags.encrypted_data_key = encrypt_data_key(random_secret)
+          key.public_tags.encrypted_data_key_id = active_primary_key.id if ActiveRecord::Encryption.config.store_key_references
+        end
+      end
- -
-
# File activerecord/lib/active_record/encryption/envelope_encryption_key_provider.rb, line 18
-def encryption_key
-  random_secret = generate_random_secret
-  ActiveRecord::Encryption::Key.new(random_secret).tap do |key|
-    key.public_tags.encrypted_data_key = encrypt_data_key(random_secret)
-    key.public_tags.encrypted_data_key_id = active_primary_key.id if ActiveRecord::Encryption.config.store_key_references
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries.html b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries.html index 554a08b672..094cd2694c 100644 --- a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries.html +++ b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries.html @@ -125,28 +125,28 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/extended_deterministic_queries.rb, line 24
+      def self.install_support
+        # ActiveRecord::Base relies on ActiveRecord::Relation (ActiveRecord::QueryMethods) but it does
+        # some prepared statements caching. That's why we need to intercept +ActiveRecord::Base+ as soon
+        # as it's invoked (so that the proper prepared statement is cached).
+        ActiveRecord::Relation.prepend(RelationQueries)
+        ActiveRecord::Base.include(CoreQueries)
+        ActiveRecord::Encryption::EncryptedAttributeType.prepend(ExtendedEncryptableType)
+        Arel::Nodes::HomogeneousIn.prepend(InWithAdditionalValues)
+      end
- -
-
# File activerecord/lib/active_record/encryption/extended_deterministic_queries.rb, line 24
-def self.install_support
-  # ActiveRecord::Base relies on ActiveRecord::Relation (ActiveRecord::QueryMethods) but it does
-  # some prepared statements caching. That's why we need to intercept +ActiveRecord::Base+ as soon
-  # as it's invoked (so that the proper prepared statement is cached).
-  ActiveRecord::Relation.prepend(RelationQueries)
-  ActiveRecord::Base.include(CoreQueries)
-  ActiveRecord::Encryption::EncryptedAttributeType.prepend(ExtendedEncryptableType)
-  Arel::Nodes::HomogeneousIn.prepend(InWithAdditionalValues)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/AdditionalValue.html b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/AdditionalValue.html index 744ae0f821..39acacbd47 100644 --- a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/AdditionalValue.html +++ b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/AdditionalValue.html @@ -102,23 +102,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/extended_deterministic_queries.rb, line 136
+        def initialize(value, type)
+          @type = type
+          @value = process(value)
+        end
- -
-
# File activerecord/lib/active_record/encryption/extended_deterministic_queries.rb, line 136
-def initialize(value, type)
-  @type = type
-  @value = process(value)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/CoreQueries.html b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/CoreQueries.html index f85c4bb09c..3732b66417 100644 --- a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/CoreQueries.html +++ b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/CoreQueries.html @@ -75,22 +75,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/extended_deterministic_queries.rb, line 127
+          def find_by(*args)
+            super(*EncryptedQuery.process_arguments(self, args, false))
+          end
- -
-
# File activerecord/lib/active_record/encryption/extended_deterministic_queries.rb, line 127
-def find_by(*args)
-  super(*EncryptedQuery.process_arguments(self, args, false))
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/EncryptedQueryArgumentProcessor.html b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/EncryptedQueryArgumentProcessor.html deleted file mode 100644 index 5e87913e0e..0000000000 --- a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/EncryptedQueryArgumentProcessor.html +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: ActiveRecord::Encryption::ExtendedDeterministicQueries::EncryptedQueryArgumentProcessor -layout: default ---- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/ExtendedEncryptableType.html b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/ExtendedEncryptableType.html index 52da0e4981..39fd2b6d46 100644 --- a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/ExtendedEncryptableType.html +++ b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/ExtendedEncryptableType.html @@ -75,26 +75,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/extended_deterministic_queries.rb, line 148
+        def serialize(data)
+          if data.is_a?(AdditionalValue)
+            data.value
+          else
+            super
+          end
+        end
- -
-
# File activerecord/lib/active_record/encryption/extended_deterministic_queries.rb, line 148
-def serialize(data)
-  if data.is_a?(AdditionalValue)
-    data.value
-  else
-    super
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/InWithAdditionalValues.html b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/InWithAdditionalValues.html index b0ec3ac0a9..fedb3c92d5 100644 --- a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/InWithAdditionalValues.html +++ b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/InWithAdditionalValues.html @@ -79,26 +79,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/extended_deterministic_queries.rb, line 162
+        def encryption_aware_type_caster
+          if attribute.type_caster.is_a?(ActiveRecord::Encryption::EncryptedAttributeType)
+            attribute.type_caster.cast_type
+          else
+            attribute.type_caster
+          end
+        end
- -
-
# File activerecord/lib/active_record/encryption/extended_deterministic_queries.rb, line 162
-def encryption_aware_type_caster
-  if attribute.type_caster.is_a?(ActiveRecord::Encryption::EncryptedAttributeType)
-    attribute.type_caster.cast_type
-  else
-    attribute.type_caster
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -118,22 +118,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/extended_deterministic_queries.rb, line 158
+        def proc_for_binds
+          -> value { ActiveModel::Attribute.with_cast_value(attribute.name, value, encryption_aware_type_caster) }
+        end
- -
-
# File activerecord/lib/active_record/encryption/extended_deterministic_queries.rb, line 158
-def proc_for_binds
-  -> value { ActiveModel::Attribute.with_cast_value(attribute.name, value, encryption_aware_type_caster) }
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/RelationQueries.html b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/RelationQueries.html index 4e31be29f8..e4c10bf797 100644 --- a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/RelationQueries.html +++ b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/RelationQueries.html @@ -83,22 +83,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/extended_deterministic_queries.rb, line 101
+        def exists?(*args)
+          super(*EncryptedQuery.process_arguments(self, args, true))
+        end
- -
-
# File activerecord/lib/active_record/encryption/extended_deterministic_queries.rb, line 101
-def exists?(*args)
-  super(*EncryptedQuery.process_arguments(self, args, true))
-end
-
-
- - + See on GitHub + + + +

@@ -118,35 +118,35 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/extended_deterministic_queries.rb, line 105
+        def scope_for_create
+          return super unless klass.deterministic_encrypted_attributes&.any?
+
+          scope_attributes = super
+          wheres = where_values_hash
+
+          klass.deterministic_encrypted_attributes.each do |attribute_name|
+            attribute_name = attribute_name.to_s
+            values = wheres[attribute_name]
+            if values.is_a?(Array) && values[1..].all?(AdditionalValue)
+              scope_attributes[attribute_name] = values.first
+            end
+          end
+
+          scope_attributes
+        end
- -
-
# File activerecord/lib/active_record/encryption/extended_deterministic_queries.rb, line 105
-def scope_for_create
-  return super unless klass.deterministic_encrypted_attributes&.any?
-
-  scope_attributes = super
-  wheres = where_values_hash
-
-  klass.deterministic_encrypted_attributes.each do |attribute_name|
-    attribute_name = attribute_name.to_s
-    values = wheres[attribute_name]
-    if values.is_a?(Array) && values[1..].all?(AdditionalValue)
-      scope_attributes[attribute_name] = values.first
-    end
-  end
-
-  scope_attributes
-end
-
-
- -

+ See on GitHub + + + +

@@ -166,22 +166,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/extended_deterministic_queries.rb, line 97
+        def where(*args)
+          super(*EncryptedQuery.process_arguments(self, args, true))
+        end
- -
-
# File activerecord/lib/active_record/encryption/extended_deterministic_queries.rb, line 97
-def where(*args)
-  super(*EncryptedQuery.process_arguments(self, args, true))
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicUniquenessValidator.html b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicUniquenessValidator.html index 486ebeead4..eb0ecee947 100644 --- a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicUniquenessValidator.html +++ b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicUniquenessValidator.html @@ -87,22 +87,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/extended_deterministic_uniqueness_validator.rb, line 6
+      def self.install_support
+        ActiveRecord::Validations::UniquenessValidator.prepend(EncryptedUniquenessValidator)
+      end
- -
-
# File activerecord/lib/active_record/encryption/extended_deterministic_uniqueness_validator.rb, line 6
-def self.install_support
-  ActiveRecord::Validations::UniquenessValidator.prepend(EncryptedUniquenessValidator)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicUniquenessValidator/EncryptedUniquenessValidator.html b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicUniquenessValidator/EncryptedUniquenessValidator.html index 1423536376..51c6f440b0 100644 --- a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicUniquenessValidator/EncryptedUniquenessValidator.html +++ b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicUniquenessValidator/EncryptedUniquenessValidator.html @@ -75,33 +75,33 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/extended_deterministic_uniqueness_validator.rb, line 11
+        def validate_each(record, attribute, value)
+          super(record, attribute, value)
+
+          klass = record.class
+          if klass.deterministic_encrypted_attributes&.include?(attribute)
+            encrypted_type = klass.type_for_attribute(attribute)
+            encrypted_type.previous_types.each do |type|
+              encrypted_value = type.serialize(value)
+              ActiveRecord::Encryption.without_encryption do
+                super(record, attribute, encrypted_value)
+              end
+            end
+          end
+        end
- -
-
# File activerecord/lib/active_record/encryption/extended_deterministic_uniqueness_validator.rb, line 11
-def validate_each(record, attribute, value)
-  super(record, attribute, value)
-
-  klass = record.class
-  if klass.deterministic_encrypted_attributes&.include?(attribute)
-    encrypted_type = klass.type_for_attribute(attribute)
-    encrypted_type.previous_types.each do |type|
-      encrypted_value = type.serialize(value)
-      ActiveRecord::Encryption.without_encryption do
-        super(record, attribute, encrypted_value)
-      end
-    end
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/Key.html b/src/classes/ActiveRecord/Encryption/Key.html index 867d7ebe65..140e21705e 100644 --- a/src/classes/ActiveRecord/Encryption/Key.html +++ b/src/classes/ActiveRecord/Encryption/Key.html @@ -118,23 +118,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/key.rb, line 18
+      def self.derive_from(password)
+        secret = ActiveRecord::Encryption.key_generator.derive_key_from(password)
+        ActiveRecord::Encryption::Key.new(secret)
+      end
- -
-
# File activerecord/lib/active_record/encryption/key.rb, line 18
-def self.derive_from(password)
-  secret = ActiveRecord::Encryption.key_generator.derive_key_from(password)
-  ActiveRecord::Encryption::Key.new(secret)
-end
-
-
- - + See on GitHub + + + +

@@ -154,23 +154,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/key.rb, line 13
+      def initialize(secret)
+        @secret = secret
+        @public_tags = Properties.new
+      end
- -
-
# File activerecord/lib/active_record/encryption/key.rb, line 13
-def initialize(secret)
-  @secret = secret
-  @public_tags = Properties.new
-end
-
-
- -

+ See on GitHub + + + + @@ -194,22 +194,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/key.rb, line 23
+      def id
+        Digest::SHA1.hexdigest(secret).first(4)
+      end
- -
-
# File activerecord/lib/active_record/encryption/key.rb, line 23
-def id
-  Digest::SHA1.hexdigest(secret).first(4)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/KeyGenerator.html b/src/classes/ActiveRecord/Encryption/KeyGenerator.html index db281a5fd4..8fd5ccba8f 100644 --- a/src/classes/ActiveRecord/Encryption/KeyGenerator.html +++ b/src/classes/ActiveRecord/Encryption/KeyGenerator.html @@ -112,22 +112,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/key_generator.rb, line 11
+      def initialize(hash_digest_class: ActiveRecord::Encryption.config.hash_digest_class)
+        @hash_digest_class = hash_digest_class
+      end
- -
-
# File activerecord/lib/active_record/encryption/key_generator.rb, line 11
-def initialize(hash_digest_class: ActiveRecord::Encryption.config.hash_digest_class)
-  @hash_digest_class = hash_digest_class
-end
-
-
- - + See on GitHub + + + + @@ -153,23 +153,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/key_generator.rb, line 38
+      def derive_key_from(password, length: key_length)
+        ActiveSupport::KeyGenerator.new(password, hash_digest_class: hash_digest_class)
+          .generate_key(key_derivation_salt, length)
+      end
- -
-
# File activerecord/lib/active_record/encryption/key_generator.rb, line 38
-def derive_key_from(password, length: key_length)
-  ActiveSupport::KeyGenerator.new(password, hash_digest_class: hash_digest_class)
-    .generate_key(key_derivation_salt, length)
-end
-
-
- - + See on GitHub + + + +

@@ -196,22 +196,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/key_generator.rb, line 30
+      def generate_random_hex_key(length: key_length)
+        generate_random_key(length: length).unpack("H*")[0]
+      end
- -
-
# File activerecord/lib/active_record/encryption/key_generator.rb, line 30
-def generate_random_hex_key(length: key_length)
-  generate_random_key(length: length).unpack("H*")[0]
-end
-
-
- -

+ See on GitHub + + + +

@@ -231,22 +231,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/key_generator.rb, line 16
+      def generate_random_key(length: key_length)
+        SecureRandom.random_bytes(length)
+      end
- -
-
# File activerecord/lib/active_record/encryption/key_generator.rb, line 16
-def generate_random_key(length: key_length)
-  SecureRandom.random_bytes(length)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/KeyProvider.html b/src/classes/ActiveRecord/Encryption/KeyProvider.html index 3f248d8a2f..fbd6e2e2e0 100644 --- a/src/classes/ActiveRecord/Encryption/KeyProvider.html +++ b/src/classes/ActiveRecord/Encryption/KeyProvider.html @@ -99,22 +99,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/key_provider.rb, line 11
+      def initialize(keys)
+        @keys = Array(keys)
+      end
- -
-
# File activerecord/lib/active_record/encryption/key_provider.rb, line 11
-def initialize(keys)
-  @keys = Array(keys)
-end
-
-
- - + See on GitHub + + + + @@ -140,26 +140,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/key_provider.rb, line 32
+      def decryption_keys(encrypted_message)
+        if encrypted_message.headers.encrypted_data_key_id
+          keys_grouped_by_id[encrypted_message.headers.encrypted_data_key_id]
+        else
+          @keys
+        end
+      end
- -
-
# File activerecord/lib/active_record/encryption/key_provider.rb, line 32
-def decryption_keys(encrypted_message)
-  if encrypted_message.headers.encrypted_data_key_id
-    keys_grouped_by_id[encrypted_message.headers.encrypted_data_key_id]
-  else
-    @keys
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -181,26 +181,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/key_provider.rb, line 20
+      def encryption_key
+        @encryption_key ||= @keys.last.tap do |key|
+          key.public_tags.encrypted_data_key_id = key.id if ActiveRecord::Encryption.config.store_key_references
+        end
+
+        @encryption_key
+      end
- -
-
# File activerecord/lib/active_record/encryption/key_provider.rb, line 20
-def encryption_key
-  @encryption_key ||= @keys.last.tap do |key|
-    key.public_tags.encrypted_data_key_id = key.id if ActiveRecord::Encryption.config.store_key_references
-  end
-
-  @encryption_key
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/Message.html b/src/classes/ActiveRecord/Encryption/Message.html index f0987fa9b2..2437cdf4aa 100644 --- a/src/classes/ActiveRecord/Encryption/Message.html +++ b/src/classes/ActiveRecord/Encryption/Message.html @@ -119,25 +119,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/message.rb, line 14
+      def initialize(payload: nil, headers: {})
+        validate_payload_type(payload)
+
+        @payload = payload
+        @headers = Properties.new(headers)
+      end
- -
-
# File activerecord/lib/active_record/encryption/message.rb, line 14
-def initialize(payload: nil, headers: {})
-  validate_payload_type(payload)
-
-  @payload = payload
-  @headers = Properties.new(headers)
-end
-
-
- - + See on GitHub + + + + @@ -161,22 +161,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/message.rb, line 21
+      def ==(other_message)
+        payload == other_message.payload && headers == other_message.headers
+      end
- -
-
# File activerecord/lib/active_record/encryption/message.rb, line 21
-def ==(other_message)
-  payload == other_message.payload && headers == other_message.headers
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/MessageSerializer.html b/src/classes/ActiveRecord/Encryption/MessageSerializer.html index 14999540c9..1da370dfc0 100644 --- a/src/classes/ActiveRecord/Encryption/MessageSerializer.html +++ b/src/classes/ActiveRecord/Encryption/MessageSerializer.html @@ -105,23 +105,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/message_serializer.rb, line 31
+      def dump(message)
+        raise ActiveRecord::Encryption::Errors::ForbiddenClass unless message.is_a?(ActiveRecord::Encryption::Message)
+        JSON.dump message_to_json(message)
+      end
- -
-
# File activerecord/lib/active_record/encryption/message_serializer.rb, line 31
-def dump(message)
-  raise ActiveRecord::Encryption::Errors::ForbiddenClass unless message.is_a?(ActiveRecord::Encryption::Message)
-  JSON.dump message_to_json(message)
-end
-
-
- - + See on GitHub + + + +

@@ -141,25 +141,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/message_serializer.rb, line 24
+      def load(serialized_content)
+        data = JSON.parse(serialized_content)
+        parse_message(data, 1)
+      rescue JSON::ParserError
+        raise ActiveRecord::Encryption::Errors::Encoding
+      end
- -
-
# File activerecord/lib/active_record/encryption/message_serializer.rb, line 24
-def load(serialized_content)
-  data = JSON.parse(serialized_content)
-  parse_message(data, 1)
-rescue JSON::ParserError
-  raise ActiveRecord::Encryption::Errors::Encoding
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/NullEncryptor.html b/src/classes/ActiveRecord/Encryption/NullEncryptor.html index 406a376c1a..e5ba85dfe9 100644 --- a/src/classes/ActiveRecord/Encryption/NullEncryptor.html +++ b/src/classes/ActiveRecord/Encryption/NullEncryptor.html @@ -95,22 +95,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/null_encryptor.rb, line 12
+      def decrypt(encrypted_text, key_provider: nil, cipher_options: {})
+        encrypted_text
+      end
- -
-
# File activerecord/lib/active_record/encryption/null_encryptor.rb, line 12
-def decrypt(encrypted_text, key_provider: nil, cipher_options: {})
-  encrypted_text
-end
-
-
- - + See on GitHub + + + +

@@ -130,22 +130,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/null_encryptor.rb, line 8
+      def encrypt(clean_text, key_provider: nil, cipher_options: {})
+        clean_text
+      end
- -
-
# File activerecord/lib/active_record/encryption/null_encryptor.rb, line 8
-def encrypt(clean_text, key_provider: nil, cipher_options: {})
-  clean_text
-end
-
-
- -

+ See on GitHub + + + +

@@ -165,22 +165,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/null_encryptor.rb, line 16
+      def encrypted?(text)
+        false
+      end
- -
-
# File activerecord/lib/active_record/encryption/null_encryptor.rb, line 16
-def encrypted?(text)
-  false
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/Properties.html b/src/classes/ActiveRecord/Encryption/Properties.html index 42de5ba07e..55a924cb3d 100644 --- a/src/classes/ActiveRecord/Encryption/Properties.html +++ b/src/classes/ActiveRecord/Encryption/Properties.html @@ -146,23 +146,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/properties.rb, line 42
+      def initialize(initial_properties = {})
+        @data = {}
+        add(initial_properties)
+      end
- -
-
# File activerecord/lib/active_record/encryption/properties.rb, line 42
-def initialize(initial_properties = {})
-  @data = {}
-  add(initial_properties)
-end
-
-
- - + See on GitHub + + + + @@ -188,24 +188,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/properties.rb, line 50
+      def []=(key, value)
+        raise Errors::EncryptedContentIntegrity, "Properties can't be overridden: #{key}" if key?(key)
+        validate_value_type(value)
+        data[key] = value
+      end
- -
-
# File activerecord/lib/active_record/encryption/properties.rb, line 50
-def []=(key, value)
-  raise Errors::EncryptedContentIntegrity, "Properties can't be overridden: #{key}" if key?(key)
-  validate_value_type(value)
-  data[key] = value
-end
-
-
- - + See on GitHub + + + +

@@ -225,24 +225,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/properties.rb, line 62
+      def add(other_properties)
+        other_properties.each do |key, value|
+          self[key.to_sym] = value
+        end
+      end
- -
-
# File activerecord/lib/active_record/encryption/properties.rb, line 62
-def add(other_properties)
-  other_properties.each do |key, value|
-    self[key.to_sym] = value
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -262,22 +262,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/properties.rb, line 68
+      def to_h
+        data
+      end
- -
-
# File activerecord/lib/active_record/encryption/properties.rb, line 68
-def to_h
-  data
-end
-
-
- -

+ See on GitHub + + + +

@@ -297,24 +297,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/properties.rb, line 56
+      def validate_value_type(value)
+        unless ALLOWED_VALUE_CLASSES.include?(value.class) || ALLOWED_VALUE_CLASSES.any? { |klass| value.is_a?(klass) }
+          raise ActiveRecord::Encryption::Errors::ForbiddenClass, "Can't store a #{value.class}, only properties of type #{ALLOWED_VALUE_CLASSES.inspect} are allowed"
+        end
+      end
- -
-
# File activerecord/lib/active_record/encryption/properties.rb, line 56
-def validate_value_type(value)
-  unless ALLOWED_VALUE_CLASSES.include?(value.class) || ALLOWED_VALUE_CLASSES.any? { |klass| value.is_a?(klass) }
-    raise ActiveRecord::Encryption::Errors::ForbiddenClass, "Can't store a #{value.class}, only properties of type #{ALLOWED_VALUE_CLASSES.inspect} are allowed"
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/ReadOnlyNullEncryptor.html b/src/classes/ActiveRecord/Encryption/ReadOnlyNullEncryptor.html index 23a1d8f446..3eed9006f2 100644 --- a/src/classes/ActiveRecord/Encryption/ReadOnlyNullEncryptor.html +++ b/src/classes/ActiveRecord/Encryption/ReadOnlyNullEncryptor.html @@ -97,22 +97,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/read_only_null_encryptor.rb, line 15
+      def decrypt(encrypted_text, key_provider: nil, cipher_options: {})
+        encrypted_text
+      end
- -
-
# File activerecord/lib/active_record/encryption/read_only_null_encryptor.rb, line 15
-def decrypt(encrypted_text, key_provider: nil, cipher_options: {})
-  encrypted_text
-end
-
-
- - + See on GitHub + + + +

@@ -132,22 +132,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/read_only_null_encryptor.rb, line 11
+      def encrypt(clean_text, key_provider: nil, cipher_options: {})
+        raise Errors::Encryption, "This encryptor is read-only"
+      end
- -
-
# File activerecord/lib/active_record/encryption/read_only_null_encryptor.rb, line 11
-def encrypt(clean_text, key_provider: nil, cipher_options: {})
-  raise Errors::Encryption, "This encryptor is read-only"
-end
-
-
- -

+ See on GitHub + + + +

@@ -167,22 +167,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/read_only_null_encryptor.rb, line 19
+      def encrypted?(text)
+        false
+      end
- -
-
# File activerecord/lib/active_record/encryption/read_only_null_encryptor.rb, line 19
-def encrypted?(text)
-  false
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Encryption/Scheme.html b/src/classes/ActiveRecord/Encryption/Scheme.html index 51794ab47c..c95770ba7d 100644 --- a/src/classes/ActiveRecord/Encryption/Scheme.html +++ b/src/classes/ActiveRecord/Encryption/Scheme.html @@ -144,36 +144,36 @@

- -
- - -
-
# File activerecord/lib/active_record/encryption/scheme.rb, line 13
-def initialize(key_provider: nil, key: nil, deterministic: nil, support_unencrypted_data: nil, downcase: nil, ignore_case: nil,
-               previous_schemes: nil, **context_properties)
-  # Initializing all attributes to +nil+ as we want to allow a "not set" semantics so that we
-  # can merge schemes without overriding values with defaults. See +#merge+
-
-  @key_provider_param = key_provider
-  @key = key
-  @deterministic = deterministic
-  @support_unencrypted_data = support_unencrypted_data
-  @downcase = downcase || ignore_case
-  @ignore_case = ignore_case
-  @previous_schemes_param = previous_schemes
-  @previous_schemes = Array.wrap(previous_schemes)
-  @context_properties = context_properties
-
-  validate_config!
-end
-
-
- - + +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/scheme.rb, line 13
+      def initialize(key_provider: nil, key: nil, deterministic: nil, support_unencrypted_data: nil, downcase: nil, ignore_case: nil,
+                     previous_schemes: nil, **context_properties)
+        # Initializing all attributes to +nil+ as we want to allow a "not set" semantics so that we
+        # can merge schemes without overriding values with defaults. See +#merge+
+
+        @key_provider_param = key_provider
+        @key = key
+        @deterministic = deterministic
+        @support_unencrypted_data = support_unencrypted_data
+        @downcase = downcase || ignore_case
+        @ignore_case = ignore_case
+        @previous_schemes_param = previous_schemes
+        @previous_schemes = Array.wrap(previous_schemes)
+        @context_properties = context_properties
+
+        validate_config!
+      end
+ + See on GitHub + +
+ + @@ -197,22 +197,22 @@

- -
- - -
-
# File activerecord/lib/active_record/encryption/scheme.rb, line 73
-def compatible_with?(other_scheme)
-  deterministic? == other_scheme.deterministic?
-end
-
-
- - + +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/scheme.rb, line 73
+      def compatible_with?(other_scheme)
+        deterministic? == other_scheme.deterministic?
+      end
+ + See on GitHub + +
+ +

@@ -232,22 +232,22 @@

- -
- - -
-
# File activerecord/lib/active_record/encryption/scheme.rb, line 39
-def deterministic?
-  !!@deterministic
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/scheme.rb, line 39
+      def deterministic?
+        !!@deterministic
+      end
+ + See on GitHub + +
+ +

@@ -267,22 +267,22 @@

- -
- - -
-
# File activerecord/lib/active_record/encryption/scheme.rb, line 35
-def downcase?
-  @downcase
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/scheme.rb, line 35
+      def downcase?
+        @downcase
+      end
+ + See on GitHub + +
+ +

@@ -302,23 +302,23 @@

- -
- - -
-
# File activerecord/lib/active_record/encryption/scheme.rb, line 47
-def fixed?
-  # by default deterministic encryption is fixed
-  @fixed ||= @deterministic && (!@deterministic.is_a?(Hash) || @deterministic[:fixed])
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/scheme.rb, line 47
+      def fixed?
+        # by default deterministic encryption is fixed
+        @fixed ||= @deterministic && (!@deterministic.is_a?(Hash) || @deterministic[:fixed])
+      end
+ + See on GitHub + +
+ +

@@ -338,22 +338,22 @@

- -
- - -
-
# File activerecord/lib/active_record/encryption/scheme.rb, line 31
-def ignore_case?
-  @ignore_case
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/scheme.rb, line 31
+      def ignore_case?
+        @ignore_case
+      end
+ + See on GitHub + +
+ +

@@ -373,22 +373,22 @@

- -
- - -
-
# File activerecord/lib/active_record/encryption/scheme.rb, line 52
-def key_provider
-  @key_provider ||= @key_provider_param || build_key_provider || default_key_provider
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/scheme.rb, line 52
+      def key_provider
+        @key_provider ||= @key_provider_param || build_key_provider || default_key_provider
+      end
+ + See on GitHub + +
+ +

@@ -408,22 +408,22 @@

- -
- - -
-
# File activerecord/lib/active_record/encryption/scheme.rb, line 56
-def merge(other_scheme)
-  self.class.new(**to_h.merge(other_scheme.to_h))
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/scheme.rb, line 56
+      def merge(other_scheme)
+        self.class.new(**to_h.merge(other_scheme.to_h))
+      end
+ + See on GitHub + +
+ +

@@ -443,22 +443,22 @@

- -
- - -
-
# File activerecord/lib/active_record/encryption/scheme.rb, line 43
-def support_unencrypted_data?
-  @support_unencrypted_data.nil? ? ActiveRecord::Encryption.config.support_unencrypted_data : @support_unencrypted_data
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/scheme.rb, line 43
+      def support_unencrypted_data?
+        @support_unencrypted_data.nil? ? ActiveRecord::Encryption.config.support_unencrypted_data : @support_unencrypted_data
+      end
+ + See on GitHub + +
+ +

@@ -478,23 +478,23 @@

- -
- - -
-
# File activerecord/lib/active_record/encryption/scheme.rb, line 60
-def to_h
-  { key_provider: @key_provider_param, deterministic: @deterministic, downcase: @downcase, ignore_case: @ignore_case,
-    previous_schemes: @previous_schemes_param, **@context_properties }.compact
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/scheme.rb, line 60
+      def to_h
+        { key_provider: @key_provider_param, deterministic: @deterministic, downcase: @downcase, ignore_case: @ignore_case,
+          previous_schemes: @previous_schemes_param, **@context_properties }.compact
+      end
+ + See on GitHub + +
+ +

@@ -514,26 +514,26 @@

- -
- - -
-
# File activerecord/lib/active_record/encryption/scheme.rb, line 65
-def with_context(&block)
-  if @context_properties.present?
-    ActiveRecord::Encryption.with_encryption_context(**@context_properties, &block)
-  else
-    block.call
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File activerecord/lib/active_record/encryption/scheme.rb, line 65
+      def with_context(&block)
+        if @context_properties.present?
+          ActiveRecord::Encryption.with_encryption_context(**@context_properties, &block)
+        else
+          block.call
+        end
+      end
+ + See on GitHub + +
+ + diff --git a/src/classes/ActiveRecord/Enum.html b/src/classes/ActiveRecord/Enum.html index 31fd57cd08..42124996aa 100644 --- a/src/classes/ActiveRecord/Enum.html +++ b/src/classes/ActiveRecord/Enum.html @@ -236,30 +236,30 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/enum.rb, line 225
+    def enum(name = nil, values = nil, **options)
+      if name
+        values, options = options, {} unless values
+        return _enum(name, values, **options)
+      end
+
+      definitions = options.slice!(:_prefix, :_suffix, :_scopes, :_default, :_instance_methods)
+      options.transform_keys! { |key| :"#{key[1..-1]}" }
+
+      definitions.each { |name, values| _enum(name, values, **options) }
+    end
- -
-
# File activerecord/lib/active_record/enum.rb, line 225
-def enum(name = nil, values = nil, **options)
-  if name
-    values, options = options, {} unless values
-    return _enum(name, values, **options)
-  end
-
-  definitions = options.slice!(:_prefix, :_suffix, :_scopes, :_default, :_instance_methods)
-  options.transform_keys! { |key| :"#{key[1..-1]}" }
-
-  definitions.each { |name, values| _enum(name, values, **options) }
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/EnvironmentMismatchError.html b/src/classes/ActiveRecord/EnvironmentMismatchError.html index 74ba328f02..1102b87ee7 100644 --- a/src/classes/ActiveRecord/EnvironmentMismatchError.html +++ b/src/classes/ActiveRecord/EnvironmentMismatchError.html @@ -80,30 +80,30 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/migration.rb, line 204
+    def initialize(current: nil, stored: nil)
+      msg = +"You are attempting to modify a database that was last run in `#{ stored }` environment.\n"
+      msg << "You are running in `#{ current }` environment. "
+      msg << "If you are sure you want to continue, first set the environment using:\n\n"
+      msg << "        bin/rails db:environment:set"
+      if defined?(Rails.env)
+        super("#{msg} RAILS_ENV=#{::Rails.env}\n\n")
+      else
+        super("#{msg}\n\n")
+      end
+    end
- -
-
# File activerecord/lib/active_record/migration.rb, line 204
-def initialize(current: nil, stored: nil)
-  msg = +"You are attempting to modify a database that was last run in `#{ stored }` environment.\n"
-  msg << "You are running in `#{ current }` environment. "
-  msg << "If you are sure you want to continue, first set the environment using:\n\n"
-  msg << "        bin/rails db:environment:set"
-  if defined?(Rails.env)
-    super("#{msg} RAILS_ENV=#{::Rails.env}\n\n")
-  else
-    super("#{msg}\n\n")
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/FinderMethods.html b/src/classes/ActiveRecord/FinderMethods.html index bd8f15e294..e27dc54364 100644 --- a/src/classes/ActiveRecord/FinderMethods.html +++ b/src/classes/ActiveRecord/FinderMethods.html @@ -228,41 +228,41 @@

- -
- - -
-
# File activerecord/lib/active_record/relation/finder_methods.rb, line 349
-    def exists?(conditions = :none)
-      return false if @none
-
-      if Base === conditions
-        raise ArgumentError, <<-MSG.squish
-          You are passing an instance of ActiveRecord::Base to `exists?`.
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/relation/finder_methods.rb, line 349
+    def exists?(conditions = :none)
+      return false if @none
+
+      if Base === conditions
+        raise ArgumentError, <<-MSG.squish
+          You are passing an instance of ActiveRecord::Base to `exists?`.
           Please pass the id of the object by calling `.id`.
-        MSG
-      end
+        MSG
+      end
 
-      return false if !conditions || limit_value == 0
+      return false if !conditions || limit_value == 0
 
-      if eager_loading?
-        relation = apply_join_dependency(eager_loading: false)
-        return relation.exists?(conditions)
-      end
+      if eager_loading?
+        relation = apply_join_dependency(eager_loading: false)
+        return relation.exists?(conditions)
+      end
 
-      relation = construct_relation_for_exists(conditions)
-      return false if relation.where_clause.contradiction?
+      relation = construct_relation_for_exists(conditions)
+      return false if relation.where_clause.contradiction?
 
-      skip_query_cache_if_necessary { connection.select_rows(relation.arel, "#{name} Exists?").size == 1 }
-    end
-
-
- - + skip_query_cache_if_necessary { connection.select_rows(relation.arel, "#{name} Exists?").size == 1 } + end + + See on GitHub + + + +

@@ -287,22 +287,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/finder_methods.rb, line 263
+    def fifth
+      find_nth 4
+    end
- -
-
# File activerecord/lib/active_record/relation/finder_methods.rb, line 263
-def fifth
-  find_nth 4
-end
-
-
- -

+ See on GitHub + + + +

@@ -322,22 +322,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/finder_methods.rb, line 269
+    def fifth!
+      fifth || raise_record_not_found_exception!
+    end
- -
-
# File activerecord/lib/active_record/relation/finder_methods.rb, line 269
-def fifth!
-  fifth || raise_record_not_found_exception!
-end
-
-
- -

+ See on GitHub + + + + - - + See on GitHub + + + +

@@ -474,22 +474,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/finder_methods.rb, line 103
+    def find_by(arg, *args)
+      where(arg, *args).take
+    end
- -
-
# File activerecord/lib/active_record/relation/finder_methods.rb, line 103
-def find_by(arg, *args)
-  where(arg, *args).take
-end
-
-
- -

+ See on GitHub + + + +

@@ -509,22 +509,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/finder_methods.rb, line 109
+    def find_by!(arg, *args)
+      where(arg, *args).take!
+    end
- -
-
# File activerecord/lib/active_record/relation/finder_methods.rb, line 109
-def find_by!(arg, *args)
-  where(arg, *args).take!
-end
-
-
- -

+ See on GitHub + + + +

@@ -547,22 +547,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/finder_methods.rb, line 152
+    def find_sole_by(arg, *args)
+      where(arg, *args).sole
+    end
- -
-
# File activerecord/lib/active_record/relation/finder_methods.rb, line 152
-def find_sole_by(arg, *args)
-  where(arg, *args).sole
-end
-
-
- -

+ See on GitHub + + + +

@@ -589,26 +589,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/finder_methods.rb, line 165
+    def first(limit = nil)
+      if limit
+        find_nth_with_limit(0, limit)
+      else
+        find_nth 0
+      end
+    end
- -
-
# File activerecord/lib/active_record/relation/finder_methods.rb, line 165
-def first(limit = nil)
-  if limit
-    find_nth_with_limit(0, limit)
-  else
-    find_nth 0
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -628,22 +628,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/finder_methods.rb, line 175
+    def first!
+      first || raise_record_not_found_exception!
+    end
- -
-
# File activerecord/lib/active_record/relation/finder_methods.rb, line 175
-def first!
-  first || raise_record_not_found_exception!
-end
-
-
- -

+ See on GitHub + + + +

@@ -668,22 +668,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/finder_methods.rb, line 279
+    def forty_two
+      find_nth 41
+    end
- -
-
# File activerecord/lib/active_record/relation/finder_methods.rb, line 279
-def forty_two
-  find_nth 41
-end
-
-
- -

+ See on GitHub + + + +

@@ -703,22 +703,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/finder_methods.rb, line 285
+    def forty_two!
+      forty_two || raise_record_not_found_exception!
+    end
- -
-
# File activerecord/lib/active_record/relation/finder_methods.rb, line 285
-def forty_two!
-  forty_two || raise_record_not_found_exception!
-end
-
-
- -

+ See on GitHub + + + +

@@ -743,22 +743,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/finder_methods.rb, line 247
+    def fourth
+      find_nth 3
+    end
- -
-
# File activerecord/lib/active_record/relation/finder_methods.rb, line 247
-def fourth
-  find_nth 3
-end
-
-
- -

+ See on GitHub + + + +

@@ -778,22 +778,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/finder_methods.rb, line 253
+    def fourth!
+      fourth || raise_record_not_found_exception!
+    end
- -
-
# File activerecord/lib/active_record/relation/finder_methods.rb, line 253
-def fourth!
-  fourth || raise_record_not_found_exception!
-end
-
-
- -

+ See on GitHub + + + +

@@ -819,36 +819,36 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/finder_methods.rb, line 377
+    def include?(record)
+      # The existing implementation relies on receiving an Active Record instance as the input parameter named record.
+      # Any non-Active Record object passed to this implementation is guaranteed to return `false`.
+      return false unless record.is_a?(klass)
+
+      if loaded? || offset_value || limit_value || having_clause.any?
+        records.include?(record)
+      else
+        id = if record.class.composite_primary_key?
+          record.class.primary_key.zip(record.id).to_h
+        else
+          record.id
+        end
+
+        exists?(id)
+      end
+    end
- -
-
# File activerecord/lib/active_record/relation/finder_methods.rb, line 377
-def include?(record)
-  # The existing implementation relies on receiving an Active Record instance as the input parameter named record.
-  # Any non-Active Record object passed to this implementation is guaranteed to return `false`.
-  return false unless record.is_a?(klass)
-
-  if loaded? || offset_value || limit_value || having_clause.any?
-    records.include?(record)
-  else
-    id = if record.class.composite_primary_key?
-      record.class.primary_key.zip(record.id).to_h
-    else
-      record.id
-    end
-
-    exists?(id)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -884,27 +884,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/finder_methods.rb, line 194
+    def last(limit = nil)
+      return find_last(limit) if loaded? || has_limit_or_offset?
+
+      result = ordered_relation.limit(limit)
+      result = result.reverse_order!
+
+      limit ? result.reverse : result.first
+    end
- -
-
# File activerecord/lib/active_record/relation/finder_methods.rb, line 194
-def last(limit = nil)
-  return find_last(limit) if loaded? || has_limit_or_offset?
-
-  result = ordered_relation.limit(limit)
-  result = result.reverse_order!
-
-  limit ? result.reverse : result.first
-end
-
-
- -

+ See on GitHub + + + +

@@ -924,22 +924,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/finder_methods.rb, line 205
+    def last!
+      last || raise_record_not_found_exception!
+    end
- -
-
# File activerecord/lib/active_record/relation/finder_methods.rb, line 205
-def last!
-  last || raise_record_not_found_exception!
-end
-
-
- -

+ See on GitHub + + + +

@@ -963,7 +963,8 @@

-

+ +

@@ -988,22 +989,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/finder_methods.rb, line 215
+    def second
+      find_nth 1
+    end
- -
-
# File activerecord/lib/active_record/relation/finder_methods.rb, line 215
-def second
-  find_nth 1
-end
-
-
- -

+ See on GitHub + + + +

@@ -1023,22 +1024,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/finder_methods.rb, line 221
+    def second!
+      second || raise_record_not_found_exception!
+    end
- -
-
# File activerecord/lib/active_record/relation/finder_methods.rb, line 221
-def second!
-  second || raise_record_not_found_exception!
-end
-
-
- -

+ See on GitHub + + + +

@@ -1063,22 +1064,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/finder_methods.rb, line 311
+    def second_to_last
+      find_nth_from_last 2
+    end
- -
-
# File activerecord/lib/active_record/relation/finder_methods.rb, line 311
-def second_to_last
-  find_nth_from_last 2
-end
-
-
- -

+ See on GitHub + + + +

@@ -1098,22 +1099,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/finder_methods.rb, line 317
+    def second_to_last!
+      second_to_last || raise_record_not_found_exception!
+    end
- -
-
# File activerecord/lib/active_record/relation/finder_methods.rb, line 317
-def second_to_last!
-  second_to_last || raise_record_not_found_exception!
-end
-
-
- -

+ See on GitHub + + + +

@@ -1136,30 +1137,30 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/finder_methods.rb, line 135
+    def sole
+      found, undesired = first(2)
+
+      if found.nil?
+        raise_record_not_found_exception!
+      elsif undesired.present?
+        raise ActiveRecord::SoleRecordExceeded.new(self)
+      else
+        found
+      end
+    end
- -
-
# File activerecord/lib/active_record/relation/finder_methods.rb, line 135
-def sole
-  found, undesired = first(2)
-
-  if found.nil?
-    raise_record_not_found_exception!
-  elsif undesired.present?
-    raise ActiveRecord::SoleRecordExceeded.new(self)
-  else
-    found
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1184,22 +1185,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/finder_methods.rb, line 120
+    def take(limit = nil)
+      limit ? find_take_with_limit(limit) : find_take
+    end
- -
-
# File activerecord/lib/active_record/relation/finder_methods.rb, line 120
-def take(limit = nil)
-  limit ? find_take_with_limit(limit) : find_take
-end
-
-
- -

+ See on GitHub + + + +

@@ -1219,22 +1220,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/finder_methods.rb, line 126
+    def take!
+      take || raise_record_not_found_exception!
+    end
- -
-
# File activerecord/lib/active_record/relation/finder_methods.rb, line 126
-def take!
-  take || raise_record_not_found_exception!
-end
-
-
- -

+ See on GitHub + + + +

@@ -1259,22 +1260,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/finder_methods.rb, line 231
+    def third
+      find_nth 2
+    end
- -
-
# File activerecord/lib/active_record/relation/finder_methods.rb, line 231
-def third
-  find_nth 2
-end
-
-
- -

+ See on GitHub + + + +

@@ -1294,22 +1295,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/finder_methods.rb, line 237
+    def third!
+      third || raise_record_not_found_exception!
+    end
- -
-
# File activerecord/lib/active_record/relation/finder_methods.rb, line 237
-def third!
-  third || raise_record_not_found_exception!
-end
-
-
- -

+ See on GitHub + + + +

@@ -1334,22 +1335,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/finder_methods.rb, line 295
+    def third_to_last
+      find_nth_from_last 3
+    end
- -
-
# File activerecord/lib/active_record/relation/finder_methods.rb, line 295
-def third_to_last
-  find_nth_from_last 3
-end
-
-
- -

+ See on GitHub + + + +

@@ -1369,22 +1370,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/finder_methods.rb, line 301
+    def third_to_last!
+      third_to_last || raise_record_not_found_exception!
+    end
- -
-
# File activerecord/lib/active_record/relation/finder_methods.rb, line 301
-def third_to_last!
-  third_to_last || raise_record_not_found_exception!
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/FixtureSet.html b/src/classes/ActiveRecord/FixtureSet.html index 5a44e9a1bf..ad51288c32 100644 --- a/src/classes/ActiveRecord/FixtureSet.html +++ b/src/classes/ActiveRecord/FixtureSet.html @@ -702,22 +702,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/fixtures.rb, line 556
+      def cache_fixtures(connection, fixtures_map)
+        cache_for_connection(connection).update(fixtures_map)
+      end
- -
-
# File activerecord/lib/active_record/fixtures.rb, line 556
-def cache_fixtures(connection, fixtures_map)
-  cache_for_connection(connection).update(fixtures_map)
-end
-
-
- - + See on GitHub + + + +

@@ -737,22 +737,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/fixtures.rb, line 540
+      def cache_for_connection(connection)
+        @@all_cached_fixtures[connection]
+      end
- -
-
# File activerecord/lib/active_record/fixtures.rb, line 540
-def cache_for_connection(connection)
-  @@all_cached_fixtures[connection]
-end
-
-
- -

+ See on GitHub + + + +

@@ -772,26 +772,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/fixtures.rb, line 548
+      def cached_fixtures(connection, keys_to_fetch = nil)
+        if keys_to_fetch
+          cache_for_connection(connection).values_at(*keys_to_fetch)
+        else
+          cache_for_connection(connection).values
+        end
+      end
- -
-
# File activerecord/lib/active_record/fixtures.rb, line 548
-def cached_fixtures(connection, keys_to_fetch = nil)
-  if keys_to_fetch
-    cache_for_connection(connection).values_at(*keys_to_fetch)
-  else
-    cache_for_connection(connection).values
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -816,25 +816,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/fixtures.rb, line 615
+      def composite_identify(label, key)
+        key
+          .index_with
+          .with_index { |sub_key, index| (identify(label) << index) % MAX_ID }
+          .with_indifferent_access
+      end
- -
-
# File activerecord/lib/active_record/fixtures.rb, line 615
-def composite_identify(label, key)
-  key
-    .index_with
-    .with_index { |sub_key, index| (identify(label) << index) % MAX_ID }
-    .with_indifferent_access
-end
-
-
- -

+ See on GitHub + + + +

@@ -854,22 +854,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/fixtures.rb, line 623
+      def context_class
+        @context_class ||= Class.new
+      end
- -
-
# File activerecord/lib/active_record/fixtures.rb, line 623
-def context_class
-  @context_class ||= Class.new
-end
-
-
- -

+ See on GitHub + + + +

@@ -889,41 +889,41 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/fixtures.rb, line 575
+      def create_fixtures(fixtures_directories, fixture_set_names, class_names = {}, config = ActiveRecord::Base, &block)
+        fixture_set_names = Array(fixture_set_names).map(&:to_s)
+        class_names.stringify_keys!
+
+        # FIXME: Apparently JK uses this.
+        connection = block_given? ? block : lambda { ActiveRecord::Base.connection }
+
+        fixture_files_to_read = fixture_set_names.reject do |fs_name|
+          fixture_is_cached?(connection.call, fs_name)
+        end
+
+        if fixture_files_to_read.any?
+          fixtures_map = read_and_insert(
+            Array(fixtures_directories),
+            fixture_files_to_read,
+            class_names,
+            connection,
+          )
+          cache_fixtures(connection.call, fixtures_map)
+        end
+        cached_fixtures(connection.call, fixture_set_names)
+      end
- -
-
# File activerecord/lib/active_record/fixtures.rb, line 575
-def create_fixtures(fixtures_directories, fixture_set_names, class_names = {}, config = ActiveRecord::Base, &block)
-  fixture_set_names = Array(fixture_set_names).map(&:to_s)
-  class_names.stringify_keys!
-
-  # FIXME: Apparently JK uses this.
-  connection = block_given? ? block : lambda { ActiveRecord::Base.connection }
-
-  fixture_files_to_read = fixture_set_names.reject do |fs_name|
-    fixture_is_cached?(connection.call, fs_name)
-  end
-
-  if fixture_files_to_read.any?
-    fixtures_map = read_and_insert(
-      Array(fixtures_directories),
-      fixture_files_to_read,
-      class_names,
-      connection,
-    )
-    cache_fixtures(connection.call, fixtures_map)
-  end
-  cached_fixtures(connection.call, fixture_set_names)
-end
-
-
- -

+ See on GitHub + + + +

@@ -943,22 +943,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/fixtures.rb, line 544
+      def fixture_is_cached?(connection, table_name)
+        cache_for_connection(connection)[table_name]
+      end
- -
-
# File activerecord/lib/active_record/fixtures.rb, line 544
-def fixture_is_cached?(connection, table_name)
-  cache_for_connection(connection)[table_name]
-end
-
-
- -

+ See on GitHub + + + +

@@ -980,26 +980,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/fixtures.rb, line 601
+      def identify(label, column_type = :integer)
+        if column_type == :uuid
+          Digest::UUID.uuid_v5(Digest::UUID::OID_NAMESPACE, label.to_s)
+        else
+          Zlib.crc32(label.to_s) % MAX_ID
+        end
+      end
- -
-
# File activerecord/lib/active_record/fixtures.rb, line 601
-def identify(label, column_type = :integer)
-  if column_type == :uuid
-    Digest::UUID.uuid_v5(Digest::UUID::OID_NAMESPACE, label.to_s)
-  else
-    Zlib.crc32(label.to_s) % MAX_ID
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1019,24 +1019,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/fixtures.rb, line 569
+      def instantiate_all_loaded_fixtures(object, load_instances = true)
+        all_loaded_fixtures.each_value do |fixture_set|
+          instantiate_fixtures(object, fixture_set, load_instances)
+        end
+      end
- -
-
# File activerecord/lib/active_record/fixtures.rb, line 569
-def instantiate_all_loaded_fixtures(object, load_instances = true)
-  all_loaded_fixtures.each_value do |fixture_set|
-    instantiate_fixtures(object, fixture_set, load_instances)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1056,27 +1056,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/fixtures.rb, line 560
+      def instantiate_fixtures(object, fixture_set, load_instances = true)
+        return unless load_instances
+        fixture_set.each do |fixture_name, fixture|
+          object.instance_variable_set "@#{fixture_name}", fixture.find
+        rescue FixtureClassNotFound
+          nil
+        end
+      end
- -
-
# File activerecord/lib/active_record/fixtures.rb, line 560
-def instantiate_fixtures(object, fixture_set, load_instances = true)
-  return unless load_instances
-  fixture_set.each do |fixture_name, fixture|
-    object.instance_variable_set "@#{fixture_name}", fixture.find
-  rescue FixtureClassNotFound
-    nil
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1096,29 +1096,29 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/fixtures.rb, line 693
+    def initialize(_, name, class_name, path, config = ActiveRecord::Base)
+      @name     = name
+      @path     = path
+      @config   = config
+
+      self.model_class = class_name
+      @fixtures = read_fixture_files(path)
+
+      @table_name = model_class&.table_name || self.class.default_fixture_table_name(name, config)
+    end
- -
-
# File activerecord/lib/active_record/fixtures.rb, line 693
-def initialize(_, name, class_name, path, config = ActiveRecord::Base)
-  @name     = name
-  @path     = path
-  @config   = config
-
-  self.model_class = class_name
-  @fixtures = read_fixture_files(path)
-
-  @table_name = model_class&.table_name || self.class.default_fixture_table_name(name, config)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1138,22 +1138,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/fixtures.rb, line 536
+      def reset_cache
+        @@all_cached_fixtures.clear
+      end
- -
-
# File activerecord/lib/active_record/fixtures.rb, line 536
-def reset_cache
-  @@all_cached_fixtures.clear
-end
-
-
- -

+ See on GitHub + + + + @@ -1177,22 +1177,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/fixtures.rb, line 704
+    def [](x)
+      fixtures[x]
+    end
- -
-
# File activerecord/lib/active_record/fixtures.rb, line 704
-def [](x)
-  fixtures[x]
-end
-
-
- - + See on GitHub + + + +

@@ -1212,22 +1212,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/fixtures.rb, line 708
+    def []=(k, v)
+      fixtures[k] = v
+    end
- -
-
# File activerecord/lib/active_record/fixtures.rb, line 708
-def []=(k, v)
-  fixtures[k] = v
-end
-
-
- -

+ See on GitHub + + + +

@@ -1247,22 +1247,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/fixtures.rb, line 712
+    def each(&block)
+      fixtures.each(&block)
+    end
- -
-
# File activerecord/lib/active_record/fixtures.rb, line 712
-def each(&block)
-  fixtures.each(&block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1282,22 +1282,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/fixtures.rb, line 716
+    def size
+      fixtures.size
+    end
- -
-
# File activerecord/lib/active_record/fixtures.rb, line 716
-def size
-  fixtures.size
-end
-
-
- -

+ See on GitHub + + + +

@@ -1317,29 +1317,29 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/fixtures.rb, line 722
+    def table_rows
+      # allow specifying fixtures to be ignored by setting `ignore` in `_fixture` section
+      fixtures.except!(*ignored_fixtures)
+
+      TableRows.new(
+        table_name,
+        model_class: model_class,
+        fixtures: fixtures,
+      ).to_hash
+    end
- -
-
# File activerecord/lib/active_record/fixtures.rb, line 722
-def table_rows
-  # allow specifying fixtures to be ignored by setting `ignore` in `_fixture` section
-  fixtures.except!(*ignored_fixtures)
-
-  TableRows.new(
-    table_name,
-    model_class: model_class,
-    fixtures: fixtures,
-  ).to_hash
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/FixtureSet/ClassCache.html b/src/classes/ActiveRecord/FixtureSet/ClassCache.html deleted file mode 100644 index b6db7a6a39..0000000000 --- a/src/classes/ActiveRecord/FixtureSet/ClassCache.html +++ /dev/null @@ -1,158 +0,0 @@ ---- -title: ActiveRecord::FixtureSet::ClassCache -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

-
    - -
  • - [] -
  • - -
  • - new -
  • - -
- - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - new(class_names, config) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/fixtures.rb, line 471
-def initialize(class_names, config)
-  @class_names = class_names.stringify_keys
-  @config      = config
-
-  # Remove string values that aren't constants or subclasses of AR
-  @class_names.delete_if do |klass_name, klass|
-    !insert_class(@class_names, klass_name, klass)
-  end
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - [](fs_name) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/fixtures.rb, line 481
-def [](fs_name)
-  @class_names.fetch(fs_name) do
-    klass = default_fixture_model(fs_name, @config).safe_constantize
-    insert_class(@class_names, fs_name, klass)
-  end
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveRecord/FutureResult/Complete.html b/src/classes/ActiveRecord/FutureResult/Complete.html index e36fd5438b..c102c5e484 100644 --- a/src/classes/ActiveRecord/FutureResult/Complete.html +++ b/src/classes/ActiveRecord/FutureResult/Complete.html @@ -106,22 +106,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/future_result.rb, line 9
+      def initialize(result)
+        @result = result
+      end
- -
-
# File activerecord/lib/active_record/future_result.rb, line 9
-def initialize(result)
-  @result = result
-end
-
-
- - + See on GitHub + + + + @@ -145,22 +145,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/future_result.rb, line 17
+      def canceled?
+        false
+      end
- -
-
# File activerecord/lib/active_record/future_result.rb, line 17
-def canceled?
-  false
-end
-
-
- - + See on GitHub + + + +

@@ -180,22 +180,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/future_result.rb, line 13
+      def pending?
+        false
+      end
- -
-
# File activerecord/lib/active_record/future_result.rb, line 13
-def pending?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -215,22 +215,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/future_result.rb, line 21
+      def then(&block)
+        Promise::Complete.new(@result.then(&block))
+      end
- -
-
# File activerecord/lib/active_record/future_result.rb, line 21
-def then(&block)
-  Promise::Complete.new(@result.then(&block))
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/FutureResult/EventBuffer.html b/src/classes/ActiveRecord/FutureResult/EventBuffer.html index 0993c0eecc..475172702d 100644 --- a/src/classes/ActiveRecord/FutureResult/EventBuffer.html +++ b/src/classes/ActiveRecord/FutureResult/EventBuffer.html @@ -88,24 +88,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/future_result.rb, line 27
+      def initialize(future_result, instrumenter)
+        @future_result = future_result
+        @instrumenter = instrumenter
+        @events = []
+      end
- -
-
# File activerecord/lib/active_record/future_result.rb, line 27
-def initialize(future_result, instrumenter)
-  @future_result = future_result
-  @instrumenter = instrumenter
-  @events = []
-end
-
-
- - + See on GitHub + + + + @@ -129,26 +129,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/future_result.rb, line 39
+      def flush
+        events, @events = @events, []
+        events.each do |event|
+          event.payload[:lock_wait] = @future_result.lock_wait
+          ActiveSupport::Notifications.publish_event(event)
+        end
+      end
- -
-
# File activerecord/lib/active_record/future_result.rb, line 39
-def flush
-  events, @events = @events, []
-  events.each do |event|
-    event.payload[:lock_wait] = @future_result.lock_wait
-    ActiveSupport::Notifications.publish_event(event)
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -168,24 +168,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/future_result.rb, line 33
+      def instrument(name, payload = {}, &block)
+        event = @instrumenter.new_event(name, payload)
+        @events << event
+        event.record(&block)
+      end
- -
-
# File activerecord/lib/active_record/future_result.rb, line 33
-def instrument(name, payload = {}, &block)
-  event = @instrumenter.new_event(name, payload)
-  @events << event
-  event.record(&block)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/HasManyThroughAssociationNotFoundError.html b/src/classes/ActiveRecord/HasManyThroughAssociationNotFoundError.html deleted file mode 100644 index 4fa3ec93a4..0000000000 --- a/src/classes/ActiveRecord/HasManyThroughAssociationNotFoundError.html +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: ActiveRecord::HasManyThroughAssociationNotFoundError -layout: default ---- -
- -
-
- - - - - - - - - -

Namespace

- - - - -

Class

- - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveRecord/HasManyThroughAssociationNotFoundError/Correction.html b/src/classes/ActiveRecord/HasManyThroughAssociationNotFoundError/Correction.html deleted file mode 100644 index 553afb9be8..0000000000 --- a/src/classes/ActiveRecord/HasManyThroughAssociationNotFoundError/Correction.html +++ /dev/null @@ -1,158 +0,0 @@ ---- -title: ActiveRecord::HasManyThroughAssociationNotFoundError::Correction -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - new(error) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/associations.rb, line 93
-def initialize(error)
-  @error = error
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - corrections() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/associations.rb, line 97
-def corrections
-  if @error.reflection && @error.owner_class
-    maybe_these = @error.owner_class.reflections.keys
-    maybe_these -= [@error.reflection.name.to_s] # remove failing reflection
-
-    maybe_these.sort_by { |n|
-      DidYouMean::Jaro.distance(@error.reflection.options[:through].to_s, n)
-    }.reverse.first(4)
-  else
-    []
-  end
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveRecord/Inheritance.html b/src/classes/ActiveRecord/Inheritance.html index a6238ae228..c9f455f701 100644 --- a/src/classes/ActiveRecord/Inheritance.html +++ b/src/classes/ActiveRecord/Inheritance.html @@ -118,23 +118,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/inheritance.rb, line 341
+    def initialize_dup(other)
+      super
+      ensure_proper_type
+    end
- -
-
# File activerecord/lib/active_record/inheritance.rb, line 341
-def initialize_dup(other)
-  super
-  ensure_proper_type
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Inheritance/ClassMethods.html b/src/classes/ActiveRecord/Inheritance/ClassMethods.html index f1296d8a2d..5c88785d98 100644 --- a/src/classes/ActiveRecord/Inheritance/ClassMethods.html +++ b/src/classes/ActiveRecord/Inheritance/ClassMethods.html @@ -182,22 +182,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/inheritance.rb, line 167
+      def abstract_class?
+        defined?(@abstract_class) && @abstract_class == true
+      end
- -
-
# File activerecord/lib/active_record/inheritance.rb, line 167
-def abstract_class?
-  defined?(@abstract_class) && @abstract_class == true
-end
-
-
- - + See on GitHub + + + +

@@ -217,22 +217,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/inheritance.rb, line 119
+      def base_class?
+        base_class == self
+      end
- -
-
# File activerecord/lib/active_record/inheritance.rb, line 119
-def base_class?
-  base_class == self
-end
-
-
- -

+ See on GitHub + + + +

@@ -252,28 +252,28 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/inheritance.rb, line 82
+      def descends_from_active_record?
+        if self == Base
+          false
+        elsif superclass.abstract_class?
+          superclass.descends_from_active_record?
+        else
+          superclass == Base || !columns_hash.include?(inheritance_column)
+        end
+      end
- -
-
# File activerecord/lib/active_record/inheritance.rb, line 82
-def descends_from_active_record?
-  if self == Base
-    false
-  elsif superclass.abstract_class?
-    superclass.descends_from_active_record?
-  else
-    superclass == Base || !columns_hash.include?(inheritance_column)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -293,42 +293,42 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/inheritance.rb, line 56
+      def new(attributes = nil, &block)
+        if abstract_class? || self == Base
+          raise NotImplementedError, "#{self} is an abstract class and cannot be instantiated."
+        end
+
+        if _has_attribute?(inheritance_column)
+          subclass = subclass_from_attributes(attributes)
+
+          if subclass.nil? && scope_attributes = current_scope&.scope_for_create
+            subclass = subclass_from_attributes(scope_attributes)
+          end
+
+          if subclass.nil? && base_class?
+            subclass = subclass_from_attributes(column_defaults)
+          end
+        end
+
+        if subclass && subclass != self
+          subclass.new(attributes, &block)
+        else
+          super
+        end
+      end
- -
-
# File activerecord/lib/active_record/inheritance.rb, line 56
-def new(attributes = nil, &block)
-  if abstract_class? || self == Base
-    raise NotImplementedError, "#{self} is an abstract class and cannot be instantiated."
-  end
-
-  if _has_attribute?(inheritance_column)
-    subclass = subclass_from_attributes(attributes)
-
-    if subclass.nil? && scope_attributes = current_scope&.scope_for_create
-      subclass = subclass_from_attributes(scope_attributes)
-    end
-
-    if subclass.nil? && base_class?
-      subclass = subclass_from_attributes(column_defaults)
-    end
-  end
-
-  if subclass && subclass != self
-    subclass.new(attributes, &block)
-  else
-    super
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -350,26 +350,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/inheritance.rb, line 216
+      def polymorphic_class_for(name)
+        if store_full_class_name
+          name.constantize
+        else
+          compute_type(name)
+        end
+      end
- -
-
# File activerecord/lib/active_record/inheritance.rb, line 216
-def polymorphic_class_for(name)
-  if store_full_class_name
-    name.constantize
-  else
-    compute_type(name)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -389,22 +389,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/inheritance.rb, line 209
+      def polymorphic_name
+        store_full_class_name ? base_class.name : base_class.name.demodulize
+      end
- -
-
# File activerecord/lib/active_record/inheritance.rb, line 209
-def polymorphic_name
-  store_full_class_name ? base_class.name : base_class.name.demodulize
-end
-
-
- -

+ See on GitHub + + + +

@@ -426,27 +426,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/inheritance.rb, line 177
+      def primary_abstract_class
+        if ActiveRecord.application_record_class && ActiveRecord.application_record_class.name != name
+          raise ArgumentError, "The `primary_abstract_class` is already set to #{ActiveRecord.application_record_class.inspect}. There can only be one `primary_abstract_class` in an application."
+        end
+
+        self.abstract_class = true
+        ActiveRecord.application_record_class = self
+      end
- -
-
# File activerecord/lib/active_record/inheritance.rb, line 177
-def primary_abstract_class
-  if ActiveRecord.application_record_class && ActiveRecord.application_record_class.name != name
-    raise ArgumentError, "The `primary_abstract_class` is already set to #{ActiveRecord.application_record_class.inspect}. There can only be one `primary_abstract_class` in an application."
-  end
-
-  self.abstract_class = true
-  ActiveRecord.application_record_class = self
-end
-
-
- -

+ See on GitHub + + + +

@@ -468,32 +468,32 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/inheritance.rb, line 194
+      def sti_class_for(type_name)
+        if store_full_sti_class && store_full_class_name
+          type_name.constantize
+        else
+          compute_type(type_name)
+        end
+      rescue NameError
+        raise SubclassNotFound,
+          "The single-table inheritance mechanism failed to locate the subclass: '#{type_name}'. " \
+          "This error is raised because the column '#{inheritance_column}' is reserved for storing the class in case of inheritance. " \
+          "Please rename this column if you didn't intend it to be used for storing the inheritance class " \
+          "or overwrite #{name}.inheritance_column to use another column for that information."
+      end
- -
-
# File activerecord/lib/active_record/inheritance.rb, line 194
-def sti_class_for(type_name)
-  if store_full_sti_class && store_full_class_name
-    type_name.constantize
-  else
-    compute_type(type_name)
-  end
-rescue NameError
-  raise SubclassNotFound,
-    "The single-table inheritance mechanism failed to locate the subclass: '#{type_name}'. " \
-    "This error is raised because the column '#{inheritance_column}' is reserved for storing the class in case of inheritance. " \
-    "Please rename this column if you didn't intend it to be used for storing the inheritance class " \
-    "or overwrite #{name}.inheritance_column to use another column for that information."
-end
-
-
- -

+ See on GitHub + + + +

@@ -513,22 +513,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/inheritance.rb, line 187
+      def sti_name
+        store_full_sti_class && store_full_class_name ? name : name.demodulize
+      end
- -
-
# File activerecord/lib/active_record/inheritance.rb, line 187
-def sti_name
-  store_full_sti_class && store_full_class_name ? name : name.demodulize
-end
-
-
- -

+ See on GitHub + + + +

Instance Protected methods

@@ -551,46 +551,46 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/inheritance.rb, line 240
+        def compute_type(type_name)
+          if type_name.start_with?("::")
+            # If the type is prefixed with a scope operator then we assume that
+            # the type_name is an absolute reference.
+            type_name.constantize
+          else
+            type_candidate = @_type_candidates_cache[type_name]
+            if type_candidate && type_constant = type_candidate.safe_constantize
+              return type_constant
+            end
+
+            # Build a list of candidates to search for
+            candidates = []
+            name.scan(/::|$/) { candidates.unshift "#{$`}::#{type_name}" }
+            candidates << type_name
+
+            candidates.each do |candidate|
+              constant = candidate.safe_constantize
+              if candidate == constant.to_s
+                @_type_candidates_cache[type_name] = candidate
+                return constant
+              end
+            end
+
+            raise NameError.new("uninitialized constant #{candidates.first}", candidates.first)
+          end
+        end
- -
-
# File activerecord/lib/active_record/inheritance.rb, line 240
-def compute_type(type_name)
-  if type_name.start_with?("::")
-    # If the type is prefixed with a scope operator then we assume that
-    # the type_name is an absolute reference.
-    type_name.constantize
-  else
-    type_candidate = @_type_candidates_cache[type_name]
-    if type_candidate && type_constant = type_candidate.safe_constantize
-      return type_constant
-    end
-
-    # Build a list of candidates to search for
-    candidates = []
-    name.scan(/::|$/) { candidates.unshift "#{$`}::#{type_name}" }
-    candidates << type_name
-
-    candidates.each do |candidate|
-      constant = candidate.safe_constantize
-      if candidate == constant.to_s
-        @_type_candidates_cache[type_name] = candidate
-        return constant
-      end
-    end
-
-    raise NameError.new("uninitialized constant #{candidates.first}", candidates.first)
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Integration.html b/src/classes/ActiveRecord/Integration.html index 6e0a765d8c..9bccf5e2ce 100644 --- a/src/classes/ActiveRecord/Integration.html +++ b/src/classes/ActiveRecord/Integration.html @@ -113,21 +113,21 @@

- -
- - -
-
# File activerecord/lib/active_record/integration.rb, line 16
-class_attribute :cache_timestamp_format, instance_writer: false, default: :usec
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/integration.rb, line 16
+      class_attribute :cache_timestamp_format, instance_writer: false, default: :usec
 
-
-
- - + + See on GitHub + + + +

@@ -149,21 +149,21 @@

- -
- - -
-
# File activerecord/lib/active_record/integration.rb, line 24
-class_attribute :cache_versioning, instance_writer: false, default: false
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/integration.rb, line 24
+      class_attribute :cache_versioning, instance_writer: false, default: false
 
-
-
- -

+ + See on GitHub + + + +

@@ -185,21 +185,21 @@

- -
- - -
-
# File activerecord/lib/active_record/integration.rb, line 32
-class_attribute :collection_cache_versioning, instance_writer: false, default: false
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/integration.rb, line 32
+      class_attribute :collection_cache_versioning, instance_writer: false, default: false
 
-
-
- -

+ + See on GitHub + + + + @@ -233,37 +233,37 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/integration.rb, line 72
+    def cache_key
+      if new_record?
+        "#{model_name.cache_key}/new"
+      else
+        if cache_version
+          "#{model_name.cache_key}/#{id}"
+        else
+          timestamp = max_updated_column_timestamp
+
+          if timestamp
+            timestamp = timestamp.utc.to_fs(cache_timestamp_format)
+            "#{model_name.cache_key}/#{id}-#{timestamp}"
+          else
+            "#{model_name.cache_key}/#{id}"
+          end
+        end
+      end
+    end
- -
-
# File activerecord/lib/active_record/integration.rb, line 72
-def cache_key
-  if new_record?
-    "#{model_name.cache_key}/new"
-  else
-    if cache_version
-      "#{model_name.cache_key}/#{id}"
-    else
-      timestamp = max_updated_column_timestamp
-
-      if timestamp
-        timestamp = timestamp.utc.to_fs(cache_timestamp_format)
-        "#{model_name.cache_key}/#{id}-#{timestamp}"
-      else
-        "#{model_name.cache_key}/#{id}"
-      end
-    end
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -283,26 +283,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/integration.rb, line 114
+    def cache_key_with_version
+      if version = cache_version
+        "#{cache_key}-#{version}"
+      else
+        cache_key
+      end
+    end
- -
-
# File activerecord/lib/active_record/integration.rb, line 114
-def cache_key_with_version
-  if version = cache_version
-    "#{cache_key}-#{version}"
-  else
-    cache_key
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -324,34 +324,34 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/integration.rb, line 97
+    def cache_version
+      return unless cache_versioning
+
+      if has_attribute?("updated_at")
+        timestamp = updated_at_before_type_cast
+        if can_use_fast_cache_version?(timestamp)
+          raw_timestamp_to_cache_version(timestamp)
+
+        elsif timestamp = updated_at
+          timestamp.utc.to_fs(cache_timestamp_format)
+        end
+      elsif self.class.has_attribute?("updated_at")
+        raise ActiveModel::MissingAttributeError, "missing attribute 'updated_at' for #{self.class}"
+      end
+    end
- -
-
# File activerecord/lib/active_record/integration.rb, line 97
-def cache_version
-  return unless cache_versioning
-
-  if has_attribute?("updated_at")
-    timestamp = updated_at_before_type_cast
-    if can_use_fast_cache_version?(timestamp)
-      raw_timestamp_to_cache_version(timestamp)
-
-    elsif timestamp = updated_at
-      timestamp.utc.to_fs(cache_timestamp_format)
-    end
-  elsif self.class.has_attribute?("updated_at")
-    raise ActiveModel::MissingAttributeError, "missing attribute 'updated_at' for #{self.class}"
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -389,23 +389,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/integration.rb, line 57
+    def to_param
+      return unless id
+      Array(id).join(self.class.param_delimiter)
+    end
- -
-
# File activerecord/lib/active_record/integration.rb, line 57
-def to_param
-  return unless id
-  Array(id).join(self.class.param_delimiter)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Integration/ClassMethods.html b/src/classes/ActiveRecord/Integration/ClassMethods.html index 0a06852929..66bd1e2249 100644 --- a/src/classes/ActiveRecord/Integration/ClassMethods.html +++ b/src/classes/ActiveRecord/Integration/ClassMethods.html @@ -97,34 +97,34 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/integration.rb, line 147
+      def to_param(method_name = nil)
+        if method_name.nil?
+          super()
+        else
+          define_method :to_param do
+            if (default = super()) &&
+                 (result = send(method_name).to_s).present? &&
+                   (param = result.squish.parameterize.truncate(20, separator: /-/, omission: "")).present?
+              "#{default}-#{param}"
+            else
+              default
+            end
+          end
+        end
+      end
- -
-
# File activerecord/lib/active_record/integration.rb, line 147
-def to_param(method_name = nil)
-  if method_name.nil?
-    super()
-  else
-    define_method :to_param do
-      if (default = super()) &&
-           (result = send(method_name).to_s).present? &&
-             (param = result.squish.parameterize.truncate(20, separator: /-/, omission: "")).present?
-        "#{default}-#{param}"
-      else
-        default
-      end
-    end
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/InverseOfAssociationNotFoundError.html b/src/classes/ActiveRecord/InverseOfAssociationNotFoundError.html deleted file mode 100644 index 73133f4d8f..0000000000 --- a/src/classes/ActiveRecord/InverseOfAssociationNotFoundError.html +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: ActiveRecord::InverseOfAssociationNotFoundError -layout: default ---- -
- -
-
- - - - - - - - - -

Namespace

- - - - -

Class

- - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveRecord/InverseOfAssociationNotFoundError/Correction.html b/src/classes/ActiveRecord/InverseOfAssociationNotFoundError/Correction.html deleted file mode 100644 index 7f0e4d99c7..0000000000 --- a/src/classes/ActiveRecord/InverseOfAssociationNotFoundError/Correction.html +++ /dev/null @@ -1,157 +0,0 @@ ---- -title: ActiveRecord::InverseOfAssociationNotFoundError::Correction -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - new(error) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/associations.rb, line 56
-def initialize(error)
-  @error = error
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - corrections() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/associations.rb, line 60
-def corrections
-  if @error.reflection && @error.associated_class
-    maybe_these = @error.associated_class.reflections.keys
-
-    maybe_these.sort_by { |n|
-      DidYouMean::Jaro.distance(@error.reflection.options[:inverse_of].to_s, n)
-    }.reverse.first(4)
-  else
-    []
-  end
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveRecord/LegacyYamlAdapter.html b/src/classes/ActiveRecord/LegacyYamlAdapter.html deleted file mode 100644 index a386e9f02e..0000000000 --- a/src/classes/ActiveRecord/LegacyYamlAdapter.html +++ /dev/null @@ -1,126 +0,0 @@ ---- -title: ActiveRecord::LegacyYamlAdapter -layout: default ---- -
- -
-
- - - - - - - - - -

Namespace

- - -

Module

- - - - - - - -

Methods

- - - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - convert(klass, coder) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/legacy_yaml_adapter.rb, line 5
-def self.convert(klass, coder)
-  return coder unless coder.is_a?(Psych::Coder)
-
-  case coder["active_record_yaml_version"]
-  when 1, 2 then coder
-  else
-    if coder["attributes"].is_a?(ActiveModel::AttributeSet)
-      Rails420.convert(klass, coder)
-    else
-      Rails41.convert(klass, coder)
-    end
-  end
-end
-
-
- -
- - - - - -
- -
-
diff --git a/src/classes/ActiveRecord/LegacyYamlAdapter/Rails41.html b/src/classes/ActiveRecord/LegacyYamlAdapter/Rails41.html deleted file mode 100644 index 889e2cd0d1..0000000000 --- a/src/classes/ActiveRecord/LegacyYamlAdapter/Rails41.html +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: ActiveRecord::LegacyYamlAdapter::Rails41 -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - convert(klass, coder) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/legacy_yaml_adapter.rb, line 36
-def self.convert(klass, coder)
-  attributes = klass.attributes_builder
-    .build_from_database(coder["attributes"])
-  new_record = coder["attributes"][klass.primary_key].blank?
-
-  {
-    "attributes" => attributes,
-    "new_record" => new_record,
-  }
-end
-
-
- -
- - - - - -
- -
-
diff --git a/src/classes/ActiveRecord/LegacyYamlAdapter/Rails420.html b/src/classes/ActiveRecord/LegacyYamlAdapter/Rails420.html deleted file mode 100644 index 1149d544a2..0000000000 --- a/src/classes/ActiveRecord/LegacyYamlAdapter/Rails420.html +++ /dev/null @@ -1,111 +0,0 @@ ---- -title: ActiveRecord::LegacyYamlAdapter::Rails420 -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - convert(klass, coder) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/legacy_yaml_adapter.rb, line 20
-def self.convert(klass, coder)
-  attribute_set = coder["attributes"]
-
-  klass.attribute_names.each do |attr_name|
-    attribute = attribute_set[attr_name]
-    if attribute.type.is_a?(Delegator)
-      type_from_klass = klass.type_for_attribute(attr_name)
-      attribute_set[attr_name] = attribute.with_type(type_from_klass)
-    end
-  end
-
-  coder
-end
-
-
- -
- - - - - -
- -
-
diff --git a/src/classes/ActiveRecord/Locking/Optimistic/ClassMethods.html b/src/classes/ActiveRecord/Locking/Optimistic/ClassMethods.html index 3bc5ed9172..7dca9ed1ce 100644 --- a/src/classes/ActiveRecord/Locking/Optimistic/ClassMethods.html +++ b/src/classes/ActiveRecord/Locking/Optimistic/ClassMethods.html @@ -119,23 +119,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/locking/optimistic.rb, line 165
+          def locking_column=(value)
+            reload_schema_from_cache
+            @locking_column = value.to_s
+          end
- -
-
# File activerecord/lib/active_record/locking/optimistic.rb, line 165
-def locking_column=(value)
-  reload_schema_from_cache
-  @locking_column = value.to_s
-end
-
-
- - + See on GitHub + + + +

@@ -155,22 +155,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/locking/optimistic.rb, line 160
+          def locking_enabled?
+            lock_optimistically && columns_hash[locking_column]
+          end
- -
-
# File activerecord/lib/active_record/locking/optimistic.rb, line 160
-def locking_enabled?
-  lock_optimistically && columns_hash[locking_column]
-end
-
-
- -

+ See on GitHub + + + +

@@ -190,22 +190,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/locking/optimistic.rb, line 174
+          def reset_locking_column
+            self.locking_column = DEFAULT_LOCKING_COLUMN
+          end
- -
-
# File activerecord/lib/active_record/locking/optimistic.rb, line 174
-def reset_locking_column
-  self.locking_column = DEFAULT_LOCKING_COLUMN
-end
-
-
- -

+ See on GitHub + + + +

@@ -225,23 +225,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/locking/optimistic.rb, line 180
+          def update_counters(id, counters)
+            counters = counters.merge(locking_column => 1) if locking_enabled?
+            super
+          end
- -
-
# File activerecord/lib/active_record/locking/optimistic.rb, line 180
-def update_counters(id, counters)
-  counters = counters.merge(locking_column => 1) if locking_enabled?
-  super
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Locking/Pessimistic.html b/src/classes/ActiveRecord/Locking/Pessimistic.html index e65a036ba7..6568e60744 100644 --- a/src/classes/ActiveRecord/Locking/Pessimistic.html +++ b/src/classes/ActiveRecord/Locking/Pessimistic.html @@ -143,34 +143,34 @@

- -
- - -
-
# File activerecord/lib/active_record/locking/pessimistic.rb, line 69
-      def lock!(lock = true)
-        if persisted?
-          if has_changes_to_save?
-            raise(<<-MSG.squish)
-              Locking a record with unpersisted changes is not supported. Use
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/locking/pessimistic.rb, line 69
+      def lock!(lock = true)
+        if persisted?
+          if has_changes_to_save?
+            raise(<<-MSG.squish)
+              Locking a record with unpersisted changes is not supported. Use
               `save` to persist the changes, or `reload` to discard them
               explicitly.
-              Changed attributes: #{changed.map(&:inspect).join(', ')}.
-            MSG
-          end
-
-          reload(lock: lock)
-        end
-        self
-      end
-
-
- - + Changed attributes: #{changed.map(&:inspect).join(', ')}. + MSG + end + + reload(lock: lock) + end + self + end + + See on GitHub + + + +

@@ -192,27 +192,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/locking/pessimistic.rb, line 92
+      def with_lock(*args)
+        transaction_opts = args.extract_options!
+        lock = args.present? ? args.first : true
+        transaction(**transaction_opts) do
+          lock!(lock)
+          yield
+        end
+      end
- -
-
# File activerecord/lib/active_record/locking/pessimistic.rb, line 92
-def with_lock(*args)
-  transaction_opts = args.extract_options!
-  lock = args.present? ? args.first : true
-  transaction(**transaction_opts) do
-    lock!(lock)
-    yield
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/LogSubscriber.html b/src/classes/ActiveRecord/LogSubscriber.html index 105b951aec..74eb5e108c 100644 --- a/src/classes/ActiveRecord/LogSubscriber.html +++ b/src/classes/ActiveRecord/LogSubscriber.html @@ -114,25 +114,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/log_subscriber.rb, line 23
+    def self.reset_runtime
+      ActiveRecord.deprecator.warn(<<-MSG.squish)
+        ActiveRecord::LogSubscriber.reset_runtime is deprecated and will be removed in Rails 7.2.
+      MSG
+      ActiveRecord::RuntimeRegistry.reset
+    end
- -
-
# File activerecord/lib/active_record/log_subscriber.rb, line 23
-    def self.reset_runtime
-      ActiveRecord.deprecator.warn(<<-MSG.squish)
-        ActiveRecord::LogSubscriber.reset_runtime is deprecated and will be removed in Rails 7.2.
-      MSG
-      ActiveRecord::RuntimeRegistry.reset
-    end
-
-
- - + See on GitHub + + + +

@@ -152,25 +152,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/log_subscriber.rb, line 16
+    def self.runtime
+      ActiveRecord.deprecator.warn(<<-MSG.squish)
+        ActiveRecord::LogSubscriber.runtime is deprecated and will be removed in Rails 7.2.
+      MSG
+      ActiveRecord::RuntimeRegistry.sql_runtime
+    end
- -
-
# File activerecord/lib/active_record/log_subscriber.rb, line 16
-    def self.runtime
-      ActiveRecord.deprecator.warn(<<-MSG.squish)
-        ActiveRecord::LogSubscriber.runtime is deprecated and will be removed in Rails 7.2.
-      MSG
-      ActiveRecord::RuntimeRegistry.sql_runtime
-    end
-
-
- -

+ See on GitHub + + + +

@@ -190,25 +190,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/log_subscriber.rb, line 9
+    def self.runtime=(value)
+      ActiveRecord.deprecator.warn(<<-MSG.squish)
+        ActiveRecord::LogSubscriber.runtime= is deprecated and will be removed in Rails 7.2.
+      MSG
+      ActiveRecord::RuntimeRegistry.sql_runtime = value
+    end
- -
-
# File activerecord/lib/active_record/log_subscriber.rb, line 9
-    def self.runtime=(value)
-      ActiveRecord.deprecator.warn(<<-MSG.squish)
-        ActiveRecord::LogSubscriber.runtime= is deprecated and will be removed in Rails 7.2.
-      MSG
-      ActiveRecord::RuntimeRegistry.sql_runtime = value
-    end
-
-
- -

+ See on GitHub + + + + @@ -232,59 +232,59 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/log_subscriber.rb, line 39
+    def sql(event)
+      payload = event.payload
+
+      return if IGNORE_PAYLOAD_NAMES.include?(payload[:name])
+
+      name = if payload[:async]
+        "ASYNC #{payload[:name]} (#{payload[:lock_wait].round(1)}ms) (db time #{event.duration.round(1)}ms)"
+      else
+        "#{payload[:name]} (#{event.duration.round(1)}ms)"
+      end
+      name  = "CACHE #{name}" if payload[:cached]
+      sql   = payload[:sql]
+      binds = nil
+
+      if payload[:binds]&.any?
+        casted_params = type_casted_binds(payload[:type_casted_binds])
+
+        binds = []
+        payload[:binds].each_with_index do |attr, i|
+          attribute_name = if attr.respond_to?(:name)
+            attr.name
+          elsif attr.respond_to?(:[]) && attr[i].respond_to?(:name)
+            attr[i].name
+          else
+            nil
+          end
+
+          filtered_params = filter(attribute_name, casted_params[i])
+
+          binds << render_bind(attr, filtered_params)
+        end
+        binds = binds.inspect
+        binds.prepend("  ")
+      end
+
+      name = colorize_payload_name(name, payload[:name])
+      sql  = color(sql, sql_color(sql), bold: true) if colorize_logging
+
+      debug "  #{name}  #{sql}#{binds}"
+    end
- -
-
# File activerecord/lib/active_record/log_subscriber.rb, line 39
-def sql(event)
-  payload = event.payload
-
-  return if IGNORE_PAYLOAD_NAMES.include?(payload[:name])
-
-  name = if payload[:async]
-    "ASYNC #{payload[:name]} (#{payload[:lock_wait].round(1)}ms) (db time #{event.duration.round(1)}ms)"
-  else
-    "#{payload[:name]} (#{event.duration.round(1)}ms)"
-  end
-  name  = "CACHE #{name}" if payload[:cached]
-  sql   = payload[:sql]
-  binds = nil
-
-  if payload[:binds]&.any?
-    casted_params = type_casted_binds(payload[:type_casted_binds])
-
-    binds = []
-    payload[:binds].each_with_index do |attr, i|
-      attribute_name = if attr.respond_to?(:name)
-        attr.name
-      elsif attr.respond_to?(:[]) && attr[i].respond_to?(:name)
-        attr[i].name
-      else
-        nil
-      end
-
-      filtered_params = filter(attribute_name, casted_params[i])
-
-      binds << render_bind(attr, filtered_params)
-    end
-    binds = binds.inspect
-    binds.prepend("  ")
-  end
-
-  name = colorize_payload_name(name, payload[:name])
-  sql  = color(sql, sql_color(sql), bold: true) if colorize_logging
-
-  debug "  #{name}  #{sql}#{binds}"
-end
-
-
- - + See on GitHub + + + +

@@ -304,26 +304,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/log_subscriber.rb, line 30
+    def strict_loading_violation(event)
+      debug do
+        owner = event.payload[:owner]
+        reflection = event.payload[:reflection]
+        color(reflection.strict_loading_violation_message(owner), RED)
+      end
+    end
- -
-
# File activerecord/lib/active_record/log_subscriber.rb, line 30
-def strict_loading_violation(event)
-  debug do
-    owner = event.payload[:owner]
-    reflection = event.payload[:reflection]
-    color(reflection.strict_loading_violation_message(owner), RED)
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Marshalling.html b/src/classes/ActiveRecord/Marshalling.html index 0f09dae198..7bb62dfeaf 100644 --- a/src/classes/ActiveRecord/Marshalling.html +++ b/src/classes/ActiveRecord/Marshalling.html @@ -101,30 +101,30 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/marshalling.rb, line 10
+      def format_version=(version)
+        case version
+        when 6.1
+          Methods.remove_method(:marshal_dump) if Methods.method_defined?(:marshal_dump)
+        when 7.1
+          Methods.alias_method(:marshal_dump, :_marshal_dump_7_1)
+        else
+          raise ArgumentError, "Unknown marshalling format: #{version.inspect}"
+        end
+        @format_version = version
+      end
- -
-
# File activerecord/lib/active_record/marshalling.rb, line 10
-def format_version=(version)
-  case version
-  when 6.1
-    Methods.remove_method(:marshal_dump) if Methods.method_defined?(:marshal_dump)
-  when 7.1
-    Methods.alias_method(:marshal_dump, :_marshal_dump_7_1)
-  else
-    raise ArgumentError, "Unknown marshalling format: #{version.inspect}"
-  end
-  @format_version = version
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Marshalling/Methods.html b/src/classes/ActiveRecord/Marshalling/Methods.html index 87fa175199..51d5c61074 100644 --- a/src/classes/ActiveRecord/Marshalling/Methods.html +++ b/src/classes/ActiveRecord/Marshalling/Methods.html @@ -79,34 +79,34 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/marshalling.rb, line 24
+      def _marshal_dump_7_1
+        payload = [attributes_for_database, new_record?]
+
+        cached_associations = self.class.reflect_on_all_associations.select do |reflection|
+          association_cached?(reflection.name)
+        end
+
+        unless cached_associations.empty?
+          payload << cached_associations.map do |reflection|
+            [reflection.name, association(reflection.name).target]
+          end
+        end
+
+        payload
+      end
- -
-
# File activerecord/lib/active_record/marshalling.rb, line 24
-def _marshal_dump_7_1
-  payload = [attributes_for_database, new_record?]
-
-  cached_associations = self.class.reflect_on_all_associations.select do |reflection|
-    association_cached?(reflection.name)
-  end
-
-  unless cached_associations.empty?
-    payload << cached_associations.map do |reflection|
-      [reflection.name, association(reflection.name).target]
-    end
-  end
-
-  payload
-end
-
-
- - + See on GitHub + + + +

@@ -126,33 +126,33 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/marshalling.rb, line 40
+      def marshal_load(state)
+        attributes_from_database, new_record, associations = state
+
+        attributes = self.class.attributes_builder.build_from_database(attributes_from_database)
+        init_with_attributes(attributes, new_record)
+
+        if associations
+          associations.each do |name, target|
+            association(name).target = target
+          rescue ActiveRecord::AssociationNotFoundError
+            # the association no longer exist, we can just skip it.
+          end
+        end
+      end
- -
-
# File activerecord/lib/active_record/marshalling.rb, line 40
-def marshal_load(state)
-  attributes_from_database, new_record, associations = state
-
-  attributes = self.class.attributes_builder.build_from_database(attributes_from_database)
-  init_with_attributes(attributes, new_record)
-
-  if associations
-    associations.each do |name, target|
-      association(name).target = target
-    rescue ActiveRecord::AssociationNotFoundError
-      # the association no longer exist, we can just skip it.
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/MessagePack/Decoder.html b/src/classes/ActiveRecord/MessagePack/Decoder.html index af6ca18aa0..f6d66622e5 100644 --- a/src/classes/ActiveRecord/MessagePack/Decoder.html +++ b/src/classes/ActiveRecord/MessagePack/Decoder.html @@ -92,23 +92,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/message_pack.rb, line 91
+      def initialize(entries)
+        @records = entries.map { |entry| build_record(entry) }
+        @records.zip(entries) { |record, entry| resolve_cached_associations(record, entry) }
+      end
- -
-
# File activerecord/lib/active_record/message_pack.rb, line 91
-def initialize(entries)
-  @records = entries.map { |entry| build_record(entry) }
-  @records.zip(entries) { |record, entry| resolve_cached_associations(record, entry) }
-end
-
-
- - + See on GitHub + + + + @@ -132,25 +132,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/message_pack.rb, line 104
+      def build_record(entry)
+        class_name, attributes_hash, is_new_record, * = entry
+        klass = ActiveSupport::MessagePack::Extensions.load_class(class_name)
+        attributes = klass.attributes_builder.build_from_database(attributes_hash)
+        klass.allocate.init_with_attributes(attributes, is_new_record)
+      end
- -
-
# File activerecord/lib/active_record/message_pack.rb, line 104
-def build_record(entry)
-  class_name, attributes_hash, is_new_record, * = entry
-  klass = ActiveSupport::MessagePack::Extensions.load_class(class_name)
-  attributes = klass.attributes_builder.build_from_database(attributes_hash)
-  klass.allocate.init_with_attributes(attributes, is_new_record)
-end
-
-
- - + See on GitHub + + + +

@@ -170,26 +170,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/message_pack.rb, line 96
+      def decode(ref)
+        if ref.is_a?(Array)
+          ref.map { |r| @records[r] }
+        elsif ref
+          @records[ref]
+        end
+      end
- -
-
# File activerecord/lib/active_record/message_pack.rb, line 96
-def decode(ref)
-  if ref.is_a?(Array)
-    ref.map { |r| @records[r] }
-  elsif ref
-    @records[ref]
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -209,30 +209,30 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/message_pack.rb, line 111
+      def resolve_cached_associations(record, entry)
+        i = 3 # entry == [class_name, attributes_hash, is_new_record, *associations]
+        while i < entry.length
+          begin
+            record.association(entry[i]).target = decode(entry[i + 1])
+          rescue ActiveRecord::AssociationNotFoundError
+            # The association no longer exists, so just skip it.
+          end
+          i += 2
+        end
+      end
- -
-
# File activerecord/lib/active_record/message_pack.rb, line 111
-def resolve_cached_associations(record, entry)
-  i = 3 # entry == [class_name, attributes_hash, is_new_record, *associations]
-  while i < entry.length
-    begin
-      record.association(entry[i]).target = decode(entry[i + 1])
-    rescue ActiveRecord::AssociationNotFoundError
-      # The association no longer exists, so just skip it.
-    end
-    i += 2
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/MessagePack/Encoder.html b/src/classes/ActiveRecord/MessagePack/Encoder.html index a0ea6c4d1e..d772d4e14a 100644 --- a/src/classes/ActiveRecord/MessagePack/Encoder.html +++ b/src/classes/ActiveRecord/MessagePack/Encoder.html @@ -110,23 +110,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/message_pack.rb, line 48
+      def initialize
+        @entries = []
+        @refs = {}.compare_by_identity
+      end
- -
-
# File activerecord/lib/active_record/message_pack.rb, line 48
-def initialize
-  @entries = []
-  @refs = {}.compare_by_identity
-end
-
-
- - + See on GitHub + + + + @@ -150,26 +150,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/message_pack.rb, line 81
+      def add_cached_associations(record, entry)
+        record.class.reflections.each_value do |reflection|
+          if record.association_cached?(reflection.name)
+            entry << reflection.name << encode(record.association(reflection.name).target)
+          end
+        end
+      end
- -
-
# File activerecord/lib/active_record/message_pack.rb, line 81
-def add_cached_associations(record, entry)
-  record.class.reflections.each_value do |reflection|
-    if record.association_cached?(reflection.name)
-      entry << reflection.name << encode(record.association(reflection.name).target)
-    end
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -189,26 +189,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/message_pack.rb, line 73
+      def build_entry(record)
+        [
+          ActiveSupport::MessagePack::Extensions.dump_class(record.class),
+          record.attributes_for_database,
+          record.new_record?
+        ]
+      end
- -
-
# File activerecord/lib/active_record/message_pack.rb, line 73
-def build_entry(record)
-  [
-    ActiveSupport::MessagePack::Extensions.dump_class(record.class),
-    record.attributes_for_database,
-    record.new_record?
-  ]
-end
-
-
- -

+ See on GitHub + + + +

@@ -228,26 +228,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/message_pack.rb, line 53
+      def encode(input)
+        if input.is_a?(Array)
+          input.map { |record| encode_record(record) }
+        elsif input
+          encode_record(input)
+        end
+      end
- -
-
# File activerecord/lib/active_record/message_pack.rb, line 53
-def encode(input)
-  if input.is_a?(Array)
-    input.map { |record| encode_record(record) }
-  elsif input
-    encode_record(input)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -267,30 +267,30 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/message_pack.rb, line 61
+      def encode_record(record)
+        ref = @refs[record]
+
+        if !ref
+          ref = @refs[record] = @entries.size
+          @entries << build_entry(record)
+          add_cached_associations(record, @entries.last)
+        end
+
+        ref
+      end
- -
-
# File activerecord/lib/active_record/message_pack.rb, line 61
-def encode_record(record)
-  ref = @refs[record]
-
-  if !ref
-    ref = @refs[record] = @entries.size
-    @entries << build_entry(record)
-    add_cached_associations(record, @entries.last)
-  end
-
-  ref
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/MessagePack/Extensions.html b/src/classes/ActiveRecord/MessagePack/Extensions.html index c604f31b66..4e388852ea 100644 --- a/src/classes/ActiveRecord/MessagePack/Extensions.html +++ b/src/classes/ActiveRecord/MessagePack/Extensions.html @@ -83,29 +83,29 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/message_pack.rb, line 25
+      def install(registry)
+        registry.register_type 119, ActiveModel::Type::Binary::Data,
+          packer: :to_s,
+          unpacker: :new
+
+        registry.register_type 120, ActiveRecord::Base,
+          packer: method(:write_record),
+          unpacker: method(:read_record),
+          recursive: true
+      end
- -
-
# File activerecord/lib/active_record/message_pack.rb, line 25
-def install(registry)
-  registry.register_type 119, ActiveModel::Type::Binary::Data,
-    packer: :to_s,
-    unpacker: :new
-
-  registry.register_type 120, ActiveRecord::Base,
-    packer: method(:write_record),
-    unpacker: method(:read_record),
-    recursive: true
-end
-
-
- - + See on GitHub + + + +

@@ -125,22 +125,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/message_pack.rb, line 40
+      def read_record(unpacker)
+        ActiveRecord::MessagePack.load(unpacker.read)
+      end
- -
-
# File activerecord/lib/active_record/message_pack.rb, line 40
-def read_record(unpacker)
-  ActiveRecord::MessagePack.load(unpacker.read)
-end
-
-
- -

+ See on GitHub + + + +

@@ -160,22 +160,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/message_pack.rb, line 36
+      def write_record(record, packer)
+        packer.write(ActiveRecord::MessagePack.dump(record))
+      end
- -
-
# File activerecord/lib/active_record/message_pack.rb, line 36
-def write_record(record, packer)
-  packer.write(ActiveRecord::MessagePack.dump(record))
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Middleware/DatabaseSelector.html b/src/classes/ActiveRecord/Middleware/DatabaseSelector.html index 258ee93f08..970b2a034f 100644 --- a/src/classes/ActiveRecord/Middleware/DatabaseSelector.html +++ b/src/classes/ActiveRecord/Middleware/DatabaseSelector.html @@ -155,25 +155,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/middleware/database_selector.rb, line 52
+      def initialize(app, resolver_klass = nil, context_klass = nil, options = {})
+        @app = app
+        @resolver_klass = resolver_klass || Resolver
+        @context_klass = context_klass || Resolver::Session
+        @options = options
+      end
- -
-
# File activerecord/lib/active_record/middleware/database_selector.rb, line 52
-def initialize(app, resolver_klass = nil, context_klass = nil, options = {})
-  @app = app
-  @resolver_klass = resolver_klass || Resolver
-  @context_klass = context_klass || Resolver::Session
-  @options = options
-end
-
-
- - + See on GitHub + + + + @@ -197,26 +197,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/middleware/database_selector.rb, line 63
+      def call(env)
+        request = ActionDispatch::Request.new(env)
+
+        select_database(request) do
+          @app.call(env)
+        end
+      end
- -
-
# File activerecord/lib/active_record/middleware/database_selector.rb, line 63
-def call(env)
-  request = ActionDispatch::Request.new(env)
-
-  select_database(request) do
-    @app.call(env)
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Middleware/ShardSelector.html b/src/classes/ActiveRecord/Middleware/ShardSelector.html index 14d0f34d33..1354c5f55b 100644 --- a/src/classes/ActiveRecord/Middleware/ShardSelector.html +++ b/src/classes/ActiveRecord/Middleware/ShardSelector.html @@ -130,24 +130,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/middleware/shard_selector.rb, line 32
+      def initialize(app, resolver, options = {})
+        @app = app
+        @resolver = resolver
+        @options = options
+      end
- -
-
# File activerecord/lib/active_record/middleware/shard_selector.rb, line 32
-def initialize(app, resolver, options = {})
-  @app = app
-  @resolver = resolver
-  @options = options
-end
-
-
- - + See on GitHub + + + + @@ -171,28 +171,28 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/middleware/shard_selector.rb, line 40
+      def call(env)
+        request = ActionDispatch::Request.new(env)
+
+        shard = selected_shard(request)
+
+        set_shard(shard) do
+          @app.call(env)
+        end
+      end
- -
-
# File activerecord/lib/active_record/middleware/shard_selector.rb, line 40
-def call(env)
-  request = ActionDispatch::Request.new(env)
-
-  shard = selected_shard(request)
-
-  set_shard(shard) do
-    @app.call(env)
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Migration.html b/src/classes/ActiveRecord/Migration.html index 072f3f6786..404ff8bdc7 100644 --- a/src/classes/ActiveRecord/Migration.html +++ b/src/classes/ActiveRecord/Migration.html @@ -521,22 +521,22 @@

- -
- - -
-
# File activerecord/lib/active_record/migration.rb, line 611
-def self.[](version)
-  Compatibility.find(version)
-end
-
-
- - + +
+ + Source code + + +
# File activerecord/lib/active_record/migration.rb, line 611
+    def self.[](version)
+      Compatibility.find(version)
+    end
+ + See on GitHub + +
+ +

@@ -556,34 +556,34 @@

- -
- - -
-
# File activerecord/lib/active_record/migration.rb, line 696
-def check_all_pending!
-  pending_migrations = []
+          
+            
+ + Source code + - ActiveRecord::Tasks::DatabaseTasks.with_temporary_connection_for_each(env: env) do |connection| - if pending = connection.migration_context.open.pending_migrations - pending_migrations << pending - end - end +
# File activerecord/lib/active_record/migration.rb, line 696
+      def check_all_pending!
+        pending_migrations = []
 
-  migrations = pending_migrations.flatten
+        ActiveRecord::Tasks::DatabaseTasks.with_temporary_connection_for_each(env: env) do |connection|
+          if pending = connection.migration_context.open.pending_migrations
+            pending_migrations << pending
+          end
+        end
 
-  if migrations.any?
-    raise ActiveRecord::PendingMigrationError.new(pending_migrations: migrations)
-  end
-end
-
-
- -

+ migrations = pending_migrations.flatten + + if migrations.any? + raise ActiveRecord::PendingMigrationError.new(pending_migrations: migrations) + end + end + + See on GitHub + + + +

@@ -605,32 +605,32 @@

- -
- - -
-
# File activerecord/lib/active_record/migration.rb, line 680
-      def check_pending!(connection = ActiveRecord::Tasks::DatabaseTasks.migration_connection)
-        ActiveRecord.deprecator.warn(<<-MSG.squish)
-          The `check_pending!` method is deprecated in favor of `check_all_pending!`. The
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/migration.rb, line 680
+      def check_pending!(connection = ActiveRecord::Tasks::DatabaseTasks.migration_connection)
+        ActiveRecord.deprecator.warn(<<-MSG.squish)
+          The `check_pending!` method is deprecated in favor of `check_all_pending!`. The
           new implementation will loop through all available database configurations and find
           pending migrations. The prior implementation did not permit this.
-        MSG
+        MSG
 
-        pending_migrations = connection.migration_context.open.pending_migrations
+        pending_migrations = connection.migration_context.open.pending_migrations
 
-        if pending_migrations.any?
-          raise ActiveRecord::PendingMigrationError.new(pending_migrations: pending_migrations)
-        end
-      end
-
-
- -

+ if pending_migrations.any? + raise ActiveRecord::PendingMigrationError.new(pending_migrations: pending_migrations) + end + end + + See on GitHub + + + +

@@ -650,22 +650,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/migration.rb, line 615
+    def self.current_version
+      ActiveRecord::VERSION::STRING.to_f
+    end
- -
-
# File activerecord/lib/active_record/migration.rb, line 615
-def self.current_version
-  ActiveRecord::VERSION::STRING.to_f
-end
-
-
- -

+ See on GitHub + + + +

@@ -687,22 +687,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/migration.rb, line 745
+      def disable_ddl_transaction!
+        @disable_ddl_transaction = true
+      end
- -
-
# File activerecord/lib/active_record/migration.rb, line 745
-def disable_ddl_transaction!
-  @disable_ddl_transaction = true
-end
-
-
- -

+ See on GitHub + + + +

@@ -722,32 +722,32 @@

- -
- - -
-
# File activerecord/lib/active_record/migration.rb, line 712
-def load_schema_if_pending!
-  if any_schema_needs_update?
-    # Roundtrip to Rake to allow plugins to hook into database initialization.
-    root = defined?(ENGINE_ROOT) ? ENGINE_ROOT : Rails.root
+          
+            
+ + Source code + - FileUtils.cd(root) do - Base.connection_handler.clear_all_connections!(:all) - system("bin/rails db:test:prepare") - end - end +
# File activerecord/lib/active_record/migration.rb, line 712
+      def load_schema_if_pending!
+        if any_schema_needs_update?
+          # Roundtrip to Rake to allow plugins to hook into database initialization.
+          root = defined?(ENGINE_ROOT) ? ENGINE_ROOT : Rails.root
 
-  check_pending_migrations
-end
-
-
- -

+ FileUtils.cd(root) do + Base.connection_handler.clear_all_connections!(:all) + system("bin/rails db:test:prepare") + end + end + + check_pending_migrations + end + + See on GitHub + + + +

@@ -767,22 +767,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/migration.rb, line 737
+      def migrate(direction)
+        new.migrate direction
+      end
- -
-
# File activerecord/lib/active_record/migration.rb, line 737
-def migrate(direction)
-  new.migrate direction
-end
-
-
- -

+ See on GitHub + + + +

@@ -802,24 +802,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/migration.rb, line 792
+    def initialize(name = self.class.name, version = nil)
+      @name       = name
+      @version    = version
+      @connection = nil
+    end
- -
-
# File activerecord/lib/active_record/migration.rb, line 792
-def initialize(name = self.class.name, version = nil)
-  @name       = name
-  @version    = version
-  @connection = nil
-end
-
-
- -

+ See on GitHub + + + + @@ -843,24 +843,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/migration.rb, line 996
+    def announce(message)
+      text = "#{version} #{name}: #{message}"
+      length = [0, 75 - text.length].max
+      write "== %s %s" % [text, "=" * length]
+    end
- -
-
# File activerecord/lib/active_record/migration.rb, line 996
-def announce(message)
-  text = "#{version} #{name}: #{message}"
-  length = [0, 75 - text.length].max
-  write "== %s %s" % [text, "=" * length]
-end
-
-
- - + See on GitHub + + + +

@@ -880,22 +880,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/migration.rb, line 1027
+    def connection
+      @connection || ActiveRecord::Tasks::DatabaseTasks.migration_connection
+    end
- -
-
# File activerecord/lib/active_record/migration.rb, line 1027
-def connection
-  @connection || ActiveRecord::Tasks::DatabaseTasks.migration_connection
-end
-
-
- -

+ See on GitHub + + + +

@@ -915,73 +915,73 @@

- -
- - -
-
# File activerecord/lib/active_record/migration.rb, line 1048
-def copy(destination, sources, options = {})
-  copied = []
+          
+            
+ + Source code + - FileUtils.mkdir_p(destination) unless File.exist?(destination) - schema_migration = SchemaMigration::NullSchemaMigration.new - internal_metadata = InternalMetadata::NullInternalMetadata.new +
# File activerecord/lib/active_record/migration.rb, line 1048
+    def copy(destination, sources, options = {})
+      copied = []
 
-  destination_migrations = ActiveRecord::MigrationContext.new(destination, schema_migration, internal_metadata).migrations
-  last = destination_migrations.last
-  sources.each do |scope, path|
-    source_migrations = ActiveRecord::MigrationContext.new(path, schema_migration, internal_metadata).migrations
+      FileUtils.mkdir_p(destination) unless File.exist?(destination)
+      schema_migration = SchemaMigration::NullSchemaMigration.new
+      internal_metadata = InternalMetadata::NullInternalMetadata.new
 
-    source_migrations.each do |migration|
-      source = File.binread(migration.filename)
-      inserted_comment = "# This migration comes from #{scope} (originally #{migration.version})\n"
-      magic_comments = +""
-      loop do
-        # If we have a magic comment in the original migration,
-        # insert our comment after the first newline(end of the magic comment line)
-        # so the magic keep working.
-        # Note that magic comments must be at the first line(except sh-bang).
-        source.sub!(/\A(?:#.*\b(?:en)?coding:\s*\S+|#\s*frozen_string_literal:\s*(?:true|false)).*\n/) do |magic_comment|
-          magic_comments << magic_comment; ""
-        end || break
-      end
+      destination_migrations = ActiveRecord::MigrationContext.new(destination, schema_migration, internal_metadata).migrations
+      last = destination_migrations.last
+      sources.each do |scope, path|
+        source_migrations = ActiveRecord::MigrationContext.new(path, schema_migration, internal_metadata).migrations
 
-      if !magic_comments.empty? && source.start_with?("\n")
-        magic_comments << "\n"
-        source = source[1..-1]
-      end
+        source_migrations.each do |migration|
+          source = File.binread(migration.filename)
+          inserted_comment = "# This migration comes from #{scope} (originally #{migration.version})\n"
+          magic_comments = +""
+          loop do
+            # If we have a magic comment in the original migration,
+            # insert our comment after the first newline(end of the magic comment line)
+            # so the magic keep working.
+            # Note that magic comments must be at the first line(except sh-bang).
+            source.sub!(/\A(?:#.*\b(?:en)?coding:\s*\S+|#\s*frozen_string_literal:\s*(?:true|false)).*\n/) do |magic_comment|
+              magic_comments << magic_comment; ""
+            end || break
+          end
 
-      source = "#{magic_comments}#{inserted_comment}#{source}"
+          if !magic_comments.empty? && source.start_with?("\n")
+            magic_comments << "\n"
+            source = source[1..-1]
+          end
 
-      if duplicate = destination_migrations.detect { |m| m.name == migration.name }
-        if options[:on_skip] && duplicate.scope != scope.to_s
-          options[:on_skip].call(scope, migration)
-        end
-        next
-      end
+          source = "#{magic_comments}#{inserted_comment}#{source}"
 
-      migration.version = next_migration_number(last ? last.version + 1 : 0).to_i
-      new_path = File.join(destination, "#{migration.version}_#{migration.name.underscore}.#{scope}.rb")
-      old_path, migration.filename = migration.filename, new_path
-      last = migration
+          if duplicate = destination_migrations.detect { |m| m.name == migration.name }
+            if options[:on_skip] && duplicate.scope != scope.to_s
+              options[:on_skip].call(scope, migration)
+            end
+            next
+          end
 
-      File.binwrite(migration.filename, source)
-      copied << migration
-      options[:on_copy].call(scope, migration, old_path) if options[:on_copy]
-      destination_migrations << migration
-    end
-  end
+          migration.version = next_migration_number(last ? last.version + 1 : 0).to_i
+          new_path = File.join(destination, "#{migration.version}_#{migration.name.underscore}.#{scope}.rb")
+          old_path, migration.filename = migration.filename, new_path
+          last = migration
 
-  copied
-end
-
-
- -

+ File.binwrite(migration.filename, source) + copied << migration + options[:on_copy].call(scope, migration, old_path) if options[:on_copy] + destination_migrations << migration + end + end + + copied + end + + See on GitHub + + + +

@@ -1001,24 +1001,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/migration.rb, line 948
+    def down
+      self.class.delegate = self
+      return unless self.class.respond_to?(:down)
+      self.class.down
+    end
- -
-
# File activerecord/lib/active_record/migration.rb, line 948
-def down
-  self.class.delegate = self
-  return unless self.class.respond_to?(:down)
-  self.class.down
-end
-
-
- -

+ See on GitHub + + + +

@@ -1038,34 +1038,34 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/migration.rb, line 976
+    def exec_migration(conn, direction)
+      @connection = conn
+      if respond_to?(:change)
+        if direction == :down
+          revert { change }
+        else
+          change
+        end
+      else
+        public_send(direction)
+      end
+    ensure
+      @connection = nil
+      @execution_strategy = nil
+    end
- -
-
# File activerecord/lib/active_record/migration.rb, line 976
-def exec_migration(conn, direction)
-  @connection = conn
-  if respond_to?(:change)
-    if direction == :down
-      revert { change }
-    else
-      change
-    end
-  else
-    public_send(direction)
-  end
-ensure
-  @connection = nil
-  @execution_strategy = nil
-end
-
-
- -

+ See on GitHub + + + +

@@ -1085,22 +1085,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/migration.rb, line 798
+    def execution_strategy
+      @execution_strategy ||= ActiveRecord.migration_strategy.new(self)
+    end
- -
-
# File activerecord/lib/active_record/migration.rb, line 798
-def execution_strategy
-  @execution_strategy ||= ActiveRecord.migration_strategy.new(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1120,34 +1120,34 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/migration.rb, line 1031
+    def method_missing(method, *arguments, &block)
+      say_with_time "#{method}(#{format_arguments(arguments)})" do
+        unless connection.respond_to? :revert
+          unless arguments.empty? || [:execute, :enable_extension, :disable_extension].include?(method)
+            arguments[0] = proper_table_name(arguments.first, table_name_options)
+            if method == :rename_table ||
+              (method == :remove_foreign_key && !arguments.second.is_a?(Hash))
+              arguments[1] = proper_table_name(arguments.second, table_name_options)
+            end
+          end
+        end
+        return super unless execution_strategy.respond_to?(method)
+        execution_strategy.send(method, *arguments, &block)
+      end
+    end
- -
-
# File activerecord/lib/active_record/migration.rb, line 1031
-def method_missing(method, *arguments, &block)
-  say_with_time "#{method}(#{format_arguments(arguments)})" do
-    unless connection.respond_to? :revert
-      unless arguments.empty? || [:execute, :enable_extension, :disable_extension].include?(method)
-        arguments[0] = proper_table_name(arguments.first, table_name_options)
-        if method == :rename_table ||
-          (method == :remove_foreign_key && !arguments.second.is_a?(Hash))
-          arguments[1] = proper_table_name(arguments.second, table_name_options)
-        end
-      end
-    end
-    return super unless execution_strategy.respond_to?(method)
-    execution_strategy.send(method, *arguments, &block)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1167,39 +1167,39 @@

- -
- - -
-
# File activerecord/lib/active_record/migration.rb, line 955
-def migrate(direction)
-  return unless respond_to?(direction)
+          
+            
+ + Source code + - case direction - when :up then announce "migrating" - when :down then announce "reverting" - end +
# File activerecord/lib/active_record/migration.rb, line 955
+    def migrate(direction)
+      return unless respond_to?(direction)
 
-  time = nil
-  ActiveRecord::Tasks::DatabaseTasks.migration_connection.pool.with_connection do |conn|
-    time = Benchmark.measure do
-      exec_migration(conn, direction)
-    end
-  end
+      case direction
+      when :up   then announce "migrating"
+      when :down then announce "reverting"
+      end
 
-  case direction
-  when :up   then announce "migrated (%.4fs)" % time.real; write
-  when :down then announce "reverted (%.4fs)" % time.real; write
-  end
-end
-
-
- -

+ time = nil + ActiveRecord::Tasks::DatabaseTasks.migration_connection.pool.with_connection do |conn| + time = Benchmark.measure do + exec_migration(conn, direction) + end + end + + case direction + when :up then announce "migrated (%.4fs)" % time.real; write + when :down then announce "reverted (%.4fs)" % time.real; write + end + end + + See on GitHub + + + +

@@ -1219,26 +1219,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/migration.rb, line 1115
+    def next_migration_number(number)
+      if ActiveRecord.timestamped_migrations
+        [Time.now.utc.strftime("%Y%m%d%H%M%S"), "%.14d" % number].max
+      else
+        "%.3d" % number.to_i
+      end
+    end
- -
-
# File activerecord/lib/active_record/migration.rb, line 1115
-def next_migration_number(number)
-  if ActiveRecord.timestamped_migrations
-    [Time.now.utc.strftime("%Y%m%d%H%M%S"), "%.14d" % number].max
-  else
-    "%.3d" % number.to_i
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1258,26 +1258,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/migration.rb, line 1106
+    def proper_table_name(name, options = {})
+      if name.respond_to? :table_name
+        name.table_name
+      else
+        "#{options[:table_name_prefix]}#{name}#{options[:table_name_suffix]}"
+      end
+    end
- -
-
# File activerecord/lib/active_record/migration.rb, line 1106
-def proper_table_name(name, options = {})
-  if name.respond_to? :table_name
-    name.table_name
-  else
-    "#{options[:table_name_prefix]}#{name}#{options[:table_name_suffix]}"
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1318,23 +1318,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/migration.rb, line 900
+    def reversible
+      helper = ReversibleBlockHelper.new(reverting?)
+      execute_block { yield helper }
+    end
- -
-
# File activerecord/lib/active_record/migration.rb, line 900
-def reversible
-  helper = ReversibleBlockHelper.new(reverting?)
-  execute_block { yield helper }
-end
-
-
- -

+ See on GitHub + + + +

@@ -1388,35 +1388,35 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/migration.rb, line 843
+    def revert(*migration_classes, &block)
+      run(*migration_classes.reverse, revert: true) unless migration_classes.empty?
+      if block_given?
+        if connection.respond_to? :revert
+          connection.revert(&block)
+        else
+          recorder = command_recorder
+          @connection = recorder
+          suppress_messages do
+            connection.revert(&block)
+          end
+          @connection = recorder.delegate
+          recorder.replay(self)
+        end
+      end
+    end
- -
-
# File activerecord/lib/active_record/migration.rb, line 843
-def revert(*migration_classes, &block)
-  run(*migration_classes.reverse, revert: true) unless migration_classes.empty?
-  if block_given?
-    if connection.respond_to? :revert
-      connection.revert(&block)
-    else
-      recorder = command_recorder
-      @connection = recorder
-      suppress_messages do
-        connection.revert(&block)
-      end
-      @connection = recorder.delegate
-      recorder.replay(self)
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1436,22 +1436,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/migration.rb, line 860
+    def reverting?
+      connection.respond_to?(:reverting) && connection.reverting
+    end
- -
-
# File activerecord/lib/active_record/migration.rb, line 860
-def reverting?
-  connection.respond_to?(:reverting) && connection.reverting
-end
-
-
- -

+ See on GitHub + + + +

@@ -1476,32 +1476,32 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/migration.rb, line 928
+    def run(*migration_classes)
+      opts = migration_classes.extract_options!
+      dir = opts[:direction] || :up
+      dir = (dir == :down ? :up : :down) if opts[:revert]
+      if reverting?
+        # If in revert and going :up, say, we want to execute :down without reverting, so
+        revert { run(*migration_classes, direction: dir, revert: true) }
+      else
+        migration_classes.each do |migration_class|
+          migration_class.new.exec_migration(connection, dir)
+        end
+      end
+    end
- -
-
# File activerecord/lib/active_record/migration.rb, line 928
-def run(*migration_classes)
-  opts = migration_classes.extract_options!
-  dir = opts[:direction] || :up
-  dir = (dir == :down ? :up : :down) if opts[:revert]
-  if reverting?
-    # If in revert and going :up, say, we want to execute :down without reverting, so
-    revert { run(*migration_classes, direction: dir, revert: true) }
-  else
-    migration_classes.each do |migration_class|
-      migration_class.new.exec_migration(connection, dir)
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1521,22 +1521,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/migration.rb, line 1004
+    def say(message, subitem = false)
+      write "#{subitem ? "   ->" : "--"} #{message}"
+    end
- -
-
# File activerecord/lib/active_record/migration.rb, line 1004
-def say(message, subitem = false)
-  write "#{subitem ? "   ->" : "--"} #{message}"
-end
-
-
- -

+ See on GitHub + + + +

@@ -1556,27 +1556,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/migration.rb, line 1010
+    def say_with_time(message)
+      say(message)
+      result = nil
+      time = Benchmark.measure { result = yield }
+      say "%.4fs" % time.real, :subitem
+      say("#{result} rows", :subitem) if result.is_a?(Integer)
+      result
+    end
- -
-
# File activerecord/lib/active_record/migration.rb, line 1010
-def say_with_time(message)
-  say(message)
-  result = nil
-  time = Benchmark.measure { result = yield }
-  say "%.4fs" % time.real, :subitem
-  say("#{result} rows", :subitem) if result.is_a?(Integer)
-  result
-end
-
-
- -

+ See on GitHub + + + +

@@ -1596,25 +1596,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/migration.rb, line 1020
+    def suppress_messages
+      save, self.verbose = verbose, false
+      yield
+    ensure
+      self.verbose = save
+    end
- -
-
# File activerecord/lib/active_record/migration.rb, line 1020
-def suppress_messages
-  save, self.verbose = verbose, false
-  yield
-ensure
-  self.verbose = save
-end
-
-
- -

+ See on GitHub + + + +

@@ -1634,24 +1634,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/migration.rb, line 942
+    def up
+      self.class.delegate = self
+      return unless self.class.respond_to?(:up)
+      self.class.up
+    end
- -
-
# File activerecord/lib/active_record/migration.rb, line 942
-def up
-  self.class.delegate = self
-  return unless self.class.respond_to?(:up)
-  self.class.up
-end
-
-
- -

+ See on GitHub + + + +

@@ -1683,22 +1683,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/migration.rb, line 919
+    def up_only(&block)
+      execute_block(&block) unless reverting?
+    end
- -
-
# File activerecord/lib/active_record/migration.rb, line 919
-def up_only(&block)
-  execute_block(&block) unless reverting?
-end
-
-
- -

+ See on GitHub + + + +

@@ -1718,22 +1718,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/migration.rb, line 992
+    def write(text = "")
+      puts(text) if verbose
+    end
- -
-
# File activerecord/lib/active_record/migration.rb, line 992
-def write(text = "")
-  puts(text) if verbose
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Migration/CheckPending.html b/src/classes/ActiveRecord/Migration/CheckPending.html index 11b75c477f..05bf0ba700 100644 --- a/src/classes/ActiveRecord/Migration/CheckPending.html +++ b/src/classes/ActiveRecord/Migration/CheckPending.html @@ -90,25 +90,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/migration.rb, line 631
+      def initialize(app, file_watcher: ActiveSupport::FileUpdateChecker)
+        @app = app
+        @needs_check = true
+        @mutex = Mutex.new
+        @file_watcher = file_watcher
+      end
- -
-
# File activerecord/lib/active_record/migration.rb, line 631
-def initialize(app, file_watcher: ActiveSupport::FileUpdateChecker)
-  @app = app
-  @needs_check = true
-  @mutex = Mutex.new
-  @file_watcher = file_watcher
-end
-
-
- - + See on GitHub + + + + @@ -132,36 +132,36 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/migration.rb, line 638
+      def call(env)
+        @mutex.synchronize do
+          @watcher ||= build_watcher do
+            @needs_check = true
+            ActiveRecord::Migration.check_pending_migrations
+            @needs_check = false
+          end
+
+          if @needs_check
+            @watcher.execute
+          else
+            @watcher.execute_if_updated
+          end
+        end
+
+        @app.call(env)
+      end
- -
-
# File activerecord/lib/active_record/migration.rb, line 638
-def call(env)
-  @mutex.synchronize do
-    @watcher ||= build_watcher do
-      @needs_check = true
-      ActiveRecord::Migration.check_pending_migrations
-      @needs_check = false
-    end
-
-    if @needs_check
-      @watcher.execute
-    else
-      @watcher.execute_if_updated
-    end
-  end
-
-  @app.call(env)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Migration/CommandRecorder.html b/src/classes/ActiveRecord/Migration/CommandRecorder.html index f56924dea1..411323a5f4 100644 --- a/src/classes/ActiveRecord/Migration/CommandRecorder.html +++ b/src/classes/ActiveRecord/Migration/CommandRecorder.html @@ -233,24 +233,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/migration/command_recorder.rb, line 63
+      def initialize(delegate = nil)
+        @commands = []
+        @delegate = delegate
+        @reverting = false
+      end
- -
-
# File activerecord/lib/active_record/migration/command_recorder.rb, line 63
-def initialize(delegate = nil)
-  @commands = []
-  @delegate = delegate
-  @reverting = false
-end
-
-
- - + See on GitHub + + + + @@ -286,29 +286,29 @@

- -
- - -
-
# File activerecord/lib/active_record/migration/command_recorder.rb, line 110
-      def inverse_of(command, args, &block)
-        method = :"invert_#{command}"
-        raise IrreversibleMigration, <<~MSG unless respond_to?(method, true)
-          This migration uses #{command}, which is not automatically reversible.
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/migration/command_recorder.rb, line 110
+      def inverse_of(command, args, &block)
+        method = :"invert_#{command}"
+        raise IrreversibleMigration, <<~MSG unless respond_to?(method, true)
+          This migration uses #{command}, which is not automatically reversible.
           To make the migration reversible you can either:
           1. Define #up and #down methods in place of the #change method.
           2. Use the #reversible method to define reversible behavior.
-        MSG
-        send(method, args, &block)
-      end
-
-
- - + MSG + send(method, args, &block) + end + + See on GitHub + + + +

@@ -331,26 +331,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/migration/command_recorder.rb, line 90
+      def record(*command, &block)
+        if @reverting
+          @commands << inverse_of(*command, &block)
+        else
+          @commands << (command << block)
+        end
+      end
- -
-
# File activerecord/lib/active_record/migration/command_recorder.rb, line 90
-def record(*command, &block)
-  if @reverting
-    @commands << inverse_of(*command, &block)
-  else
-    @commands << (command << block)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -370,24 +370,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/migration/command_recorder.rb, line 144
+      def replay(migration)
+        commands.each do |cmd, args, block|
+          migration.send(cmd, *args, &block)
+        end
+      end
- -
-
# File activerecord/lib/active_record/migration/command_recorder.rb, line 144
-def replay(migration)
-  commands.each do |cmd, args, block|
-    migration.send(cmd, *args, &block)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -411,28 +411,28 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/migration/command_recorder.rb, line 76
+      def revert
+        @reverting = !@reverting
+        previous = @commands
+        @commands = []
+        yield
+      ensure
+        @commands = previous.concat(@commands.reverse)
+        @reverting = !@reverting
+      end
- -
-
# File activerecord/lib/active_record/migration/command_recorder.rb, line 76
-def revert
-  @reverting = !@reverting
-  previous = @commands
-  @commands = []
-  yield
-ensure
-  @commands = previous.concat(@commands.reverse)
-  @reverting = !@reverting
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Migration/Compatibility/V6_0/SQLite3.html b/src/classes/ActiveRecord/Migration/Compatibility/V6_0/SQLite3.html deleted file mode 100644 index 43519a6b87..0000000000 --- a/src/classes/ActiveRecord/Migration/Compatibility/V6_0/SQLite3.html +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: ActiveRecord::Migration::Compatibility::V6_0::SQLite3 -layout: default ---- -
- -
-
- - - - - - - - - -

Namespace

- - -

Module

- - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveRecord/Migration/Compatibility/V6_0/SQLite3/TableDefinition.html b/src/classes/ActiveRecord/Migration/Compatibility/V6_0/SQLite3/TableDefinition.html deleted file mode 100644 index 0b808676c3..0000000000 --- a/src/classes/ActiveRecord/Migration/Compatibility/V6_0/SQLite3/TableDefinition.html +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: ActiveRecord::Migration::Compatibility::V6_0::SQLite3::TableDefinition -layout: default ---- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveRecord/MigrationContext.html b/src/classes/ActiveRecord/MigrationContext.html index a5d4e37b88..53f234f9a1 100644 --- a/src/classes/ActiveRecord/MigrationContext.html +++ b/src/classes/ActiveRecord/MigrationContext.html @@ -124,46 +124,46 @@

- -
- - -
-
# File activerecord/lib/active_record/migration.rb, line 1201
-    def initialize(migrations_paths, schema_migration = nil, internal_metadata = nil)
-      if schema_migration == SchemaMigration
-        ActiveRecord.deprecator.warn(<<-MSG.squish)
-          SchemaMigration no longer inherits from ActiveRecord::Base. If you want
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/migration.rb, line 1201
+    def initialize(migrations_paths, schema_migration = nil, internal_metadata = nil)
+      if schema_migration == SchemaMigration
+        ActiveRecord.deprecator.warn(<<-MSG.squish)
+          SchemaMigration no longer inherits from ActiveRecord::Base. If you want
           to use the default connection, remove this argument. If you want to use a
-          specific connection, instantiate MigrationContext with the connection's schema
+          specific connection, instantiate MigrationContext with the connection's schema
           migration, for example `MigrationContext.new(path, Dog.connection.schema_migration)`.
-        MSG
+        MSG
 
-        schema_migration = nil
-      end
+        schema_migration = nil
+      end
 
-      if internal_metadata == InternalMetadata
-        ActiveRecord.deprecator.warn(<<-MSG.squish)
-          SchemaMigration no longer inherits from ActiveRecord::Base. If you want
+      if internal_metadata == InternalMetadata
+        ActiveRecord.deprecator.warn(<<-MSG.squish)
+          SchemaMigration no longer inherits from ActiveRecord::Base. If you want
           to use the default connection, remove this argument. If you want to use a
-          specific connection, instantiate MigrationContext with the connection's internal
+          specific connection, instantiate MigrationContext with the connection's internal
           metadata, for example `MigrationContext.new(path, nil, Dog.connection.internal_metadata)`.
-        MSG
+        MSG
 
-        internal_metadata = nil
-      end
+        internal_metadata = nil
+      end
 
-      @migrations_paths = migrations_paths
-      @schema_migration = schema_migration || SchemaMigration.new(connection)
-      @internal_metadata = internal_metadata || InternalMetadata.new(connection)
-    end
-
-
- - + @migrations_paths = migrations_paths + @schema_migration = schema_migration || SchemaMigration.new(connection) + @internal_metadata = internal_metadata || InternalMetadata.new(connection) + end + + See on GitHub + + + + @@ -195,31 +195,31 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/migration.rb, line 1242
+    def migrate(target_version = nil, &block)
+      case
+      when target_version.nil?
+        up(target_version, &block)
+      when current_version == 0 && target_version == 0
+        []
+      when current_version > target_version
+        down(target_version, &block)
+      else
+        up(target_version, &block)
+      end
+    end
- -
-
# File activerecord/lib/active_record/migration.rb, line 1242
-def migrate(target_version = nil, &block)
-  case
-  when target_version.nil?
-    up(target_version, &block)
-  when current_version == 0 && target_version == 0
-    []
-  when current_version > target_version
-    down(target_version, &block)
-  else
-    up(target_version, &block)
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/MismatchedForeignKey.html b/src/classes/ActiveRecord/MismatchedForeignKey.html index f2e8fd61e0..bff6e85ce2 100644 --- a/src/classes/ActiveRecord/MismatchedForeignKey.html +++ b/src/classes/ActiveRecord/MismatchedForeignKey.html @@ -90,54 +90,54 @@

- -
- - -
-
# File activerecord/lib/active_record/errors.rb, line 218
-    def initialize(
-      message: nil,
-      sql: nil,
-      binds: nil,
-      table: nil,
-      foreign_key: nil,
-      target_table: nil,
-      primary_key: nil,
-      primary_key_column: nil,
-      query_parser: nil,
-      connection_pool: nil
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/errors.rb, line 218
+    def initialize(
+      message: nil,
+      sql: nil,
+      binds: nil,
+      table: nil,
+      foreign_key: nil,
+      target_table: nil,
+      primary_key: nil,
+      primary_key_column: nil,
+      query_parser: nil,
+      connection_pool: nil
     )
-      @original_message = message
-      @query_parser = query_parser
+      @original_message = message
+      @query_parser = query_parser
 
-      if table
-        type = primary_key_column.bigint? ? :bigint : primary_key_column.type
-        msg = <<~EOM.squish
-          Column `#{foreign_key}` on table `#{table}` does not match column `#{primary_key}` on `#{target_table}`,
+      if table
+        type = primary_key_column.bigint? ? :bigint : primary_key_column.type
+        msg = <<~EOM.squish
+          Column `#{foreign_key}` on table `#{table}` does not match column `#{primary_key}` on `#{target_table}`,
           which has type `#{primary_key_column.sql_type}`.
           To resolve this issue, change the type of the `#{foreign_key}` column on `#{table}` to be :#{type}.
           (For example `t.#{type} :#{foreign_key}`).
-        EOM
-      else
-        msg = <<~EOM.squish
-          There is a mismatch between the foreign key and primary key column types.
+        EOM
+      else
+        msg = <<~EOM.squish
+          There is a mismatch between the foreign key and primary key column types.
           Verify that the foreign key column type and the primary key of the associated table match types.
-        EOM
-      end
-      if message
-        msg << "\nOriginal message: #{message}"
-      end
-
-      super(msg, sql: sql, binds: binds, connection_pool: connection_pool)
-    end
-
-
- - + EOM + end + if message + msg << "\nOriginal message: #{message}" + end + + super(msg, sql: sql, binds: binds, connection_pool: connection_pool) + end + + See on GitHub + + + + @@ -161,34 +161,34 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/errors.rb, line 254
+    def set_query(sql, binds)
+      if @query_parser && !@sql
+        self.class.new(
+          message: @original_message,
+          sql: sql,
+          binds: binds,
+          connection_pool: @connection_pool,
+          **@query_parser.call(sql)
+        ).tap do |exception|
+          exception.set_backtrace backtrace
+        end
+      else
+        super
+      end
+    end
- -
-
# File activerecord/lib/active_record/errors.rb, line 254
-def set_query(sql, binds)
-  if @query_parser && !@sql
-    self.class.new(
-      message: @original_message,
-      sql: sql,
-      binds: binds,
-      connection_pool: @connection_pool,
-      **@query_parser.call(sql)
-    ).tap do |exception|
-      exception.set_backtrace backtrace
-    end
-  else
-    super
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ModelSchema.html b/src/classes/ActiveRecord/ModelSchema.html index 60f4503c73..72a436570d 100644 --- a/src/classes/ActiveRecord/ModelSchema.html +++ b/src/classes/ActiveRecord/ModelSchema.html @@ -156,20 +156,10 @@

- -
- - -
-
# File activerecord/lib/active_record/model_schema.rb, line 129
-    
-
-
- - + + See on GitHub + +

@@ -190,20 +180,10 @@

- -
- - -
-
# File activerecord/lib/active_record/model_schema.rb, line 113
-    
-
-
- -

+ + See on GitHub + +

@@ -224,20 +204,10 @@

- -
- - -
-
# File activerecord/lib/active_record/model_schema.rb, line 120
-    
-
-
- -

+ + See on GitHub + +

@@ -263,20 +233,10 @@

- -
- - -
-
# File activerecord/lib/active_record/model_schema.rb, line 137
-    
-
-
- -

+ + See on GitHub + +

@@ -297,44 +257,44 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/model_schema.rb, line 157
+    included do
+      class_attribute :primary_key_prefix_type, instance_writer: false
+      class_attribute :table_name_prefix, instance_writer: false, default: ""
+      class_attribute :table_name_suffix, instance_writer: false, default: ""
+      class_attribute :schema_migrations_table_name, instance_accessor: false, default: "schema_migrations"
+      class_attribute :internal_metadata_table_name, instance_accessor: false, default: "ar_internal_metadata"
+      class_attribute :pluralize_table_names, instance_writer: false, default: true
+      class_attribute :implicit_order_column, instance_accessor: false
+      class_attribute :immutable_strings_by_default, instance_accessor: false
+
+      class_attribute :inheritance_column, instance_accessor: false, default: "type"
+      singleton_class.class_eval do
+        alias_method :_inheritance_column=, :inheritance_column=
+        private :_inheritance_column=
+        alias_method :inheritance_column=, :real_inheritance_column=
+      end
+
+      self.protected_environments = ["production"]
+
+      self.ignored_columns = [].freeze
+
+      delegate :type_for_attribute, :column_for_attribute, to: :class
+
+      initialize_load_schema_monitor
+    end
- -
-
# File activerecord/lib/active_record/model_schema.rb, line 157
-included do
-  class_attribute :primary_key_prefix_type, instance_writer: false
-  class_attribute :table_name_prefix, instance_writer: false, default: ""
-  class_attribute :table_name_suffix, instance_writer: false, default: ""
-  class_attribute :schema_migrations_table_name, instance_accessor: false, default: "schema_migrations"
-  class_attribute :internal_metadata_table_name, instance_accessor: false, default: "ar_internal_metadata"
-  class_attribute :pluralize_table_names, instance_writer: false, default: true
-  class_attribute :implicit_order_column, instance_accessor: false
-  class_attribute :immutable_strings_by_default, instance_accessor: false
-
-  class_attribute :inheritance_column, instance_accessor: false, default: "type"
-  singleton_class.class_eval do
-    alias_method :_inheritance_column=, :inheritance_column=
-    private :_inheritance_column=
-    alias_method :inheritance_column=, :real_inheritance_column=
-  end
-
-  self.protected_environments = ["production"]
-
-  self.ignored_columns = [].freeze
-
-  delegate :type_for_attribute, :column_for_attribute, to: :class
-
-  initialize_load_schema_monitor
-end
-
-
- -

+ See on GitHub + + + +

@@ -355,20 +315,10 @@

- -
- - -
-
# File activerecord/lib/active_record/model_schema.rb, line 85
-    
-
-
- -

+ + See on GitHub + +

@@ -389,20 +339,10 @@

- -
- - -
-
# File activerecord/lib/active_record/model_schema.rb, line 91
-    
-
-
- -

+ + See on GitHub + +

@@ -423,20 +363,10 @@

- -
- - -
-
# File activerecord/lib/active_record/model_schema.rb, line 97
-    
-
-
- -

+ + See on GitHub + +

@@ -457,20 +387,10 @@

- -
- - -
-
# File activerecord/lib/active_record/model_schema.rb, line 105
-    
-
-
- -

+ + See on GitHub + +

@@ -491,20 +411,10 @@

- -
- - -
-
# File activerecord/lib/active_record/model_schema.rb, line 17
-    
-
-
- -

+ + See on GitHub + +

@@ -525,20 +435,10 @@

- -
- - -
-
# File activerecord/lib/active_record/model_schema.rb, line 27
-    
-
-
- -

+ + See on GitHub + +

@@ -559,20 +459,10 @@

- -
- - -
-
# File activerecord/lib/active_record/model_schema.rb, line 73
-    
-
-
- -

+ + See on GitHub + +

@@ -593,20 +483,10 @@

- -
- - -
-
# File activerecord/lib/active_record/model_schema.rb, line 79
-    
-
-
- -

+ + See on GitHub + +

@@ -627,20 +507,10 @@

- -
- - -
-
# File activerecord/lib/active_record/model_schema.rb, line 37
-    
-
-
- -

+ + See on GitHub + +

@@ -663,20 +533,10 @@

- -
- - -
-
# File activerecord/lib/active_record/model_schema.rb, line 43
-    
-
-
- -

+ + See on GitHub + +

@@ -697,20 +557,10 @@

- -
- - -
-
# File activerecord/lib/active_record/model_schema.rb, line 56
-    
-
-
- -

+ + See on GitHub + +

@@ -733,20 +583,10 @@

- -
- - -
-
# File activerecord/lib/active_record/model_schema.rb, line 62
-    
-
-
- -

+ + See on GitHub + + @@ -771,20 +611,10 @@

- -
- - -
-
# File activerecord/lib/active_record/model_schema.rb, line 10
-    
-
-
- - + + See on GitHub + + diff --git a/src/classes/ActiveRecord/ModelSchema/ClassMethods.html b/src/classes/ActiveRecord/ModelSchema/ClassMethods.html index 39f60697bd..cc8fc23298 100644 --- a/src/classes/ActiveRecord/ModelSchema/ClassMethods.html +++ b/src/classes/ActiveRecord/ModelSchema/ClassMethods.html @@ -155,23 +155,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/model_schema.rb, line 491
+      def column_defaults
+        load_schema
+        @column_defaults ||= _default_attributes.deep_dup.to_hash.freeze
+      end
- -
-
# File activerecord/lib/active_record/model_schema.rb, line 491
-def column_defaults
-  load_schema
-  @column_defaults ||= _default_attributes.deep_dup.to_hash.freeze
-end
-
-
- - + See on GitHub + + + +

@@ -202,25 +202,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/model_schema.rb, line 482
+      def column_for_attribute(name)
+        name = name.to_s
+        columns_hash.fetch(name) do
+          ConnectionAdapters::NullColumn.new(name)
+        end
+      end
- -
-
# File activerecord/lib/active_record/model_schema.rb, line 482
-def column_for_attribute(name)
-  name = name.to_s
-  columns_hash.fetch(name) do
-    ConnectionAdapters::NullColumn.new(name)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -240,22 +240,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/model_schema.rb, line 502
+      def column_names
+        @column_names ||= columns.map(&:name).freeze
+      end
- -
-
# File activerecord/lib/active_record/model_schema.rb, line 502
-def column_names
-  @column_names ||= columns.map(&:name).freeze
-end
-
-
- -

+ See on GitHub + + + +

@@ -275,23 +275,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/model_schema.rb, line 427
+      def columns
+        load_schema
+        @columns ||= columns_hash.values.freeze
+      end
- -
-
# File activerecord/lib/active_record/model_schema.rb, line 427
-def columns
-  load_schema
-  @columns ||= columns_hash.values.freeze
-end
-
-
- -

+ See on GitHub + + + +

@@ -311,26 +311,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/model_schema.rb, line 513
+      def content_columns
+        @content_columns ||= columns.reject do |c|
+          c.name == primary_key ||
+          c.name == inheritance_column ||
+          c.name.end_with?("_id", "_count")
+        end.freeze
+      end
- -
-
# File activerecord/lib/active_record/model_schema.rb, line 513
-def content_columns
-  @content_columns ||= columns.reject do |c|
-    c.name == primary_key ||
-    c.name == inheritance_column ||
-    c.name.end_with?("_id", "_count")
-  end.freeze
-end
-
-
- -

+ See on GitHub + + + +

@@ -350,22 +350,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/model_schema.rb, line 325
+      def ignored_columns
+        @ignored_columns || superclass.ignored_columns
+      end
- -
-
# File activerecord/lib/active_record/model_schema.rb, line 325
-def ignored_columns
-  @ignored_columns || superclass.ignored_columns
-end
-
-
- -

+ See on GitHub + + + +

@@ -410,23 +410,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/model_schema.rb, line 360
+      def ignored_columns=(columns)
+        reload_schema_from_cache
+        @ignored_columns = columns.map(&:to_s).freeze
+      end
- -
-
# File activerecord/lib/active_record/model_schema.rb, line 360
-def ignored_columns=(columns)
-  reload_schema_from_cache
-  @ignored_columns = columns.map(&:to_s).freeze
-end
-
-
- -

+ See on GitHub + + + +

@@ -446,22 +446,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/model_schema.rb, line 405
+      def next_sequence_value
+        connection.next_sequence_value(sequence_name)
+      end
- -
-
# File activerecord/lib/active_record/model_schema.rb, line 405
-def next_sequence_value
-  connection.next_sequence_value(sequence_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -481,22 +481,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/model_schema.rb, line 399
+      def prefetch_primary_key?
+        connection.prefetch_primary_key?(table_name)
+      end
- -
-
# File activerecord/lib/active_record/model_schema.rb, line 399
-def prefetch_primary_key?
-  connection.prefetch_primary_key?(table_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -516,26 +516,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/model_schema.rb, line 306
+      def protected_environments
+        if defined?(@protected_environments)
+          @protected_environments
+        else
+          superclass.protected_environments
+        end
+      end
- -
-
# File activerecord/lib/active_record/model_schema.rb, line 306
-def protected_environments
-  if defined?(@protected_environments)
-    @protected_environments
-  else
-    superclass.protected_environments
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -555,22 +555,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/model_schema.rb, line 315
+      def protected_environments=(environments)
+        @protected_environments = environments.map(&:to_s)
+      end
- -
-
# File activerecord/lib/active_record/model_schema.rb, line 315
-def protected_environments=(environments)
-  @protected_environments = environments.map(&:to_s)
-end
-
-
- -

+ See on GitHub + + + +

@@ -590,22 +590,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/model_schema.rb, line 281
+      def quoted_table_name
+        @quoted_table_name ||= connection.quote_table_name(table_name)
+      end
- -
-
# File activerecord/lib/active_record/model_schema.rb, line 281
-def quoted_table_name
-  @quoted_table_name ||= connection.quote_table_name(table_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -648,27 +648,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/model_schema.rb, line 547
+      def reset_column_information
+        connection.clear_cache!
+        ([self] + descendants).each(&:undefine_attribute_methods)
+        connection.schema_cache.clear_data_source_cache!(table_name)
+
+        reload_schema_from_cache
+        initialize_find_by_cache
+      end
- -
-
# File activerecord/lib/active_record/model_schema.rb, line 547
-def reset_column_information
-  connection.clear_cache!
-  ([self] + descendants).each(&:undefine_attribute_methods)
-  connection.schema_cache.clear_data_source_cache!(table_name)
-
-  reload_schema_from_cache
-  initialize_find_by_cache
-end
-
-
- -

+ See on GitHub + + + +

@@ -688,26 +688,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/model_schema.rb, line 365
+      def sequence_name
+        if base_class?
+          @sequence_name ||= reset_sequence_name
+        else
+          (@sequence_name ||= nil) || base_class.sequence_name
+        end
+      end
- -
-
# File activerecord/lib/active_record/model_schema.rb, line 365
-def sequence_name
-  if base_class?
-    @sequence_name ||= reset_sequence_name
-  else
-    (@sequence_name ||= nil) || base_class.sequence_name
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -736,23 +736,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/model_schema.rb, line 392
+      def sequence_name=(value)
+        @sequence_name          = value.to_s
+        @explicit_sequence_name = true
+      end
- -
-
# File activerecord/lib/active_record/model_schema.rb, line 392
-def sequence_name=(value)
-  @sequence_name          = value.to_s
-  @explicit_sequence_name = true
-end
-
-
- -

+ See on GitHub + + + +

@@ -772,22 +772,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/model_schema.rb, line 410
+      def table_exists?
+        connection.schema_cache.data_source_exists?(table_name)
+      end
- -
-
# File activerecord/lib/active_record/model_schema.rb, line 410
-def table_exists?
-  connection.schema_cache.data_source_exists?(table_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -857,23 +857,23 @@

Examples

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/model_schema.rb, line 255
+      def table_name
+        reset_table_name unless defined?(@table_name)
+        @table_name
+      end
- -
-
# File activerecord/lib/active_record/model_schema.rb, line 255
-def table_name
-  reset_table_name unless defined?(@table_name)
-  @table_name
-end
-
-
- -
+ See on GitHub + + + +

@@ -898,33 +898,33 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/model_schema.rb, line 265
+      def table_name=(value)
+        value = value && value.to_s
+
+        if defined?(@table_name)
+          return if value == @table_name
+          reset_column_information if connected?
+        end
+
+        @table_name        = value
+        @quoted_table_name = nil
+        @arel_table        = nil
+        @sequence_name     = nil unless defined?(@explicit_sequence_name) && @explicit_sequence_name
+        @predicate_builder = nil
+      end
- -
-
# File activerecord/lib/active_record/model_schema.rb, line 265
-def table_name=(value)
-  value = value && value.to_s
-
-  if defined?(@table_name)
-    return if value == @table_name
-    reset_column_information if connected?
-  end
-
-  @table_name        = value
-  @quoted_table_name = nil
-  @arel_table        = nil
-  @sequence_name     = nil unless defined?(@explicit_sequence_name) && @explicit_sequence_name
-  @predicate_builder = nil
-end
-
-
- -

+ See on GitHub + + + +

@@ -948,29 +948,29 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/model_schema.rb, line 458
+      def type_for_attribute(attr_name, &block)
+        attr_name = attr_name.to_s
+        attr_name = attribute_aliases[attr_name] || attr_name
+
+        if block
+          attribute_types.fetch(attr_name, &block)
+        else
+          attribute_types[attr_name]
+        end
+      end
- -
-
# File activerecord/lib/active_record/model_schema.rb, line 458
-def type_for_attribute(attr_name, &block)
-  attr_name = attr_name.to_s
-  attr_name = attribute_aliases[attr_name] || attr_name
-
-  if block
-    attribute_types.fetch(attr_name, &block)
-  else
-    attribute_types[attr_name]
-  end
-end
-
-
- -

+ See on GitHub + + + +

Instance Protected methods

@@ -993,22 +993,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/model_schema.rb, line 571
+        def initialize_load_schema_monitor
+          @load_schema_monitor = Monitor.new
+        end
- -
-
# File activerecord/lib/active_record/model_schema.rb, line 571
-def initialize_load_schema_monitor
-  @load_schema_monitor = Monitor.new
-end
-
-
- - + See on GitHub + + + +

@@ -1028,40 +1028,40 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/model_schema.rb, line 575
+        def reload_schema_from_cache(recursive = true)
+          @_returning_columns_for_insert = nil
+          @arel_table = nil
+          @column_names = nil
+          @symbol_column_to_string_name_hash = nil
+          @attribute_types = nil
+          @content_columns = nil
+          @default_attributes = nil
+          @column_defaults = nil
+          @attributes_builder = nil
+          @columns = nil
+          @columns_hash = nil
+          @schema_loaded = false
+          @attribute_names = nil
+          @yaml_encoder = nil
+          if recursive
+            subclasses.each do |descendant|
+              descendant.send(:reload_schema_from_cache)
+            end
+          end
+        end
- -
-
# File activerecord/lib/active_record/model_schema.rb, line 575
-def reload_schema_from_cache(recursive = true)
-  @_returning_columns_for_insert = nil
-  @arel_table = nil
-  @column_names = nil
-  @symbol_column_to_string_name_hash = nil
-  @attribute_types = nil
-  @content_columns = nil
-  @default_attributes = nil
-  @column_defaults = nil
-  @attributes_builder = nil
-  @columns = nil
-  @columns_hash = nil
-  @schema_loaded = false
-  @attribute_names = nil
-  @yaml_encoder = nil
-  if recursive
-    subclasses.each do |descendant|
-      descendant.send(:reload_schema_from_cache)
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/MultiparameterAssignmentErrors.html b/src/classes/ActiveRecord/MultiparameterAssignmentErrors.html index b58f072e36..f16facab55 100644 --- a/src/classes/ActiveRecord/MultiparameterAssignmentErrors.html +++ b/src/classes/ActiveRecord/MultiparameterAssignmentErrors.html @@ -100,22 +100,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/errors.rb, line 438
+    def initialize(errors = nil)
+      @errors = errors
+    end
- -
-
# File activerecord/lib/active_record/errors.rb, line 438
-def initialize(errors = nil)
-  @errors = errors
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/NestedAttributes/ClassMethods.html b/src/classes/ActiveRecord/NestedAttributes/ClassMethods.html index a0db07ea9a..cda9ad65e2 100644 --- a/src/classes/ActiveRecord/NestedAttributes/ClassMethods.html +++ b/src/classes/ActiveRecord/NestedAttributes/ClassMethods.html @@ -380,41 +380,41 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/nested_attributes.rb, line 353
+      def accepts_nested_attributes_for(*attr_names)
+        options = { allow_destroy: false, update_only: false }
+        options.update(attr_names.extract_options!)
+        options.assert_valid_keys(:allow_destroy, :reject_if, :limit, :update_only)
+        options[:reject_if] = REJECT_ALL_BLANK_PROC if options[:reject_if] == :all_blank
+
+        attr_names.each do |association_name|
+          if reflection = _reflect_on_association(association_name)
+            reflection.autosave = true
+            define_autosave_validation_callbacks(reflection)
+
+            nested_attributes_options = self.nested_attributes_options.dup
+            nested_attributes_options[association_name.to_sym] = options
+            self.nested_attributes_options = nested_attributes_options
+
+            type = (reflection.collection? ? :collection : :one_to_one)
+            generate_association_writer(association_name, type)
+          else
+            raise ArgumentError, "No association found for name `#{association_name}'. Has it been defined yet?"
+          end
+        end
+      end
- -
-
# File activerecord/lib/active_record/nested_attributes.rb, line 353
-def accepts_nested_attributes_for(*attr_names)
-  options = { allow_destroy: false, update_only: false }
-  options.update(attr_names.extract_options!)
-  options.assert_valid_keys(:allow_destroy, :reject_if, :limit, :update_only)
-  options[:reject_if] = REJECT_ALL_BLANK_PROC if options[:reject_if] == :all_blank
-
-  attr_names.each do |association_name|
-    if reflection = _reflect_on_association(association_name)
-      reflection.autosave = true
-      define_autosave_validation_callbacks(reflection)
-
-      nested_attributes_options = self.nested_attributes_options.dup
-      nested_attributes_options[association_name.to_sym] = options
-      self.nested_attributes_options = nested_attributes_options
-
-      type = (reflection.collection? ? :collection : :one_to_one)
-      generate_association_writer(association_name, type)
-    else
-      raise ArgumentError, "No association found for name `#{association_name}'. Has it been defined yet?"
-    end
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/NoDatabaseError.html b/src/classes/ActiveRecord/NoDatabaseError.html index 31de6f9fc0..15b6a51cc0 100644 --- a/src/classes/ActiveRecord/NoDatabaseError.html +++ b/src/classes/ActiveRecord/NoDatabaseError.html @@ -104,18 +104,16 @@

- -
- - -
-
# File activerecord/lib/active_record/errors.rb, line 319
-      def db_error(db_name)
-        NoDatabaseError.new(<<~MSG)
-          We could not find your database: #{db_name}. Available database configurations can be found in config/database.yml file.
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/errors.rb, line 319
+      def db_error(db_name)
+        NoDatabaseError.new(<<~MSG)
+          We could not find your database: #{db_name}. Available database configurations can be found in config/database.yml file.
 
           To resolve this error:
 
@@ -123,12 +121,14 @@ 

- Has the database name changed? Check your database.yml config has the correct database name. To create your database, run:\n\n bin/rails db:create - MSG - end

-
-
- - + MSG + end + + See on GitHub + + + +

@@ -148,22 +148,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/errors.rb, line 314
+    def initialize(message = nil, connection_pool: nil)
+      super(message || "Database not found", connection_pool: connection_pool)
+    end
- -
-
# File activerecord/lib/active_record/errors.rb, line 314
-def initialize(message = nil, connection_pool: nil)
-  super(message || "Database not found", connection_pool: connection_pool)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/NoTouching.html b/src/classes/ActiveRecord/NoTouching.html index 79be9955e6..170d2c3bcb 100644 --- a/src/classes/ActiveRecord/NoTouching.html +++ b/src/classes/ActiveRecord/NoTouching.html @@ -100,22 +100,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/no_touching.rb, line 53
+    def no_touching?
+      NoTouching.applied_to?(self.class)
+    end
- -
-
# File activerecord/lib/active_record/no_touching.rb, line 53
-def no_touching?
-  NoTouching.applied_to?(self.class)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/NoTouching/ClassMethods.html b/src/classes/ActiveRecord/NoTouching/ClassMethods.html index a2886dff2a..c64b0cda3e 100644 --- a/src/classes/ActiveRecord/NoTouching/ClassMethods.html +++ b/src/classes/ActiveRecord/NoTouching/ClassMethods.html @@ -88,22 +88,22 @@

Examples

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/no_touching.rb, line 23
+      def no_touching(&block)
+        NoTouching.apply_to(self, &block)
+      end
- -
-
# File activerecord/lib/active_record/no_touching.rb, line 23
-def no_touching(&block)
-  NoTouching.apply_to(self, &block)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Normalization.html b/src/classes/ActiveRecord/Normalization.html index 74b7a89d66..f171c0011a 100644 --- a/src/classes/ActiveRecord/Normalization.html +++ b/src/classes/ActiveRecord/Normalization.html @@ -101,23 +101,23 @@

Examples

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/normalization.rb, line 26
+    def normalize_attribute(name)
+      # Treat the value as a new, unnormalized value.
+      self[name] = self[name]
+    end
- -
-
# File activerecord/lib/active_record/normalization.rb, line 26
-def normalize_attribute(name)
-  # Treat the value as a new, unnormalized value.
-  self[name] = self[name]
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Normalization/ClassMethods.html b/src/classes/ActiveRecord/Normalization/ClassMethods.html index 6533e89dd6..f8b68dc0d7 100644 --- a/src/classes/ActiveRecord/Normalization/ClassMethods.html +++ b/src/classes/ActiveRecord/Normalization/ClassMethods.html @@ -89,22 +89,22 @@

Examples

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/normalization.rb, line 100
+      def normalize_value_for(name, value)
+        type_for_attribute(name).cast(value)
+      end
- -
-
# File activerecord/lib/active_record/normalization.rb, line 100
-def normalize_value_for(name, value)
-  type_for_attribute(name).cast(value)
-end
-
-
- - + See on GitHub + + + +

@@ -160,28 +160,28 @@

Examples

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/normalization.rb, line 80
+      def normalizes(*names, with:, apply_to_nil: false)
+        names.each do |name|
+          attribute(name) do |cast_type|
+            NormalizedValueType.new(cast_type: cast_type, normalizer: with, normalize_nil: apply_to_nil)
+          end
+        end
+
+        self.normalized_attributes += names.map(&:to_sym)
+      end
- -
-
# File activerecord/lib/active_record/normalization.rb, line 80
-def normalizes(*names, with:, apply_to_nil: false)
-  names.each do |name|
-    attribute(name) do |cast_type|
-      NormalizedValueType.new(cast_type: cast_type, normalizer: with, normalize_nil: apply_to_nil)
-    end
-  end
-
-  self.normalized_attributes += names.map(&:to_sym)
-end
-
-
- -
+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Persistence.html b/src/classes/ActiveRecord/Persistence.html index 378777f242..3bba4e8aa7 100644 --- a/src/classes/ActiveRecord/Persistence.html +++ b/src/classes/ActiveRecord/Persistence.html @@ -198,33 +198,33 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 814
+    def becomes(klass)
+      became = klass.allocate
+
+      became.send(:initialize) do |becoming|
+        @attributes.reverse_merge!(becoming.instance_variable_get(:@attributes))
+        becoming.instance_variable_set(:@attributes, @attributes)
+        becoming.instance_variable_set(:@mutations_from_database, @mutations_from_database ||= nil)
+        becoming.instance_variable_set(:@new_record, new_record?)
+        becoming.instance_variable_set(:@destroyed, destroyed?)
+        becoming.errors.copy!(errors)
+      end
+
+      became
+    end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 814
-def becomes(klass)
-  became = klass.allocate
-
-  became.send(:initialize) do |becoming|
-    @attributes.reverse_merge!(becoming.instance_variable_get(:@attributes))
-    becoming.instance_variable_set(:@attributes, @attributes)
-    becoming.instance_variable_set(:@mutations_from_database, @mutations_from_database ||= nil)
-    becoming.instance_variable_set(:@new_record, new_record?)
-    becoming.instance_variable_set(:@destroyed, destroyed?)
-    becoming.errors.copy!(errors)
-  end
-
-  became
-end
-
-
- - + See on GitHub + + + +

@@ -246,28 +246,28 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 835
+    def becomes!(klass)
+      became = becomes(klass)
+      sti_type = nil
+      if !klass.descends_from_active_record?
+        sti_type = klass.sti_name
+      end
+      became.public_send("#{klass.inheritance_column}=", sti_type)
+      became
+    end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 835
-def becomes!(klass)
-  became = becomes(klass)
-  sti_type = nil
-  if !klass.descends_from_active_record?
-    sti_type = klass.sti_name
-  end
-  became.public_send("#{klass.inheritance_column}=", sti_type)
-  became
-end
-
-
- -

+ See on GitHub + + + +

@@ -287,22 +287,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 982
+    def decrement(attribute, by = 1)
+      increment(attribute, -by)
+    end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 982
-def decrement(attribute, by = 1)
-  increment(attribute, -by)
-end
-
-
- -

+ See on GitHub + + + +

@@ -322,22 +322,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 992
+    def decrement!(attribute, by = 1, touch: nil)
+      increment!(attribute, -by, touch: touch)
+    end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 992
-def decrement!(attribute, by = 1, touch: nil)
-  increment!(attribute, -by, touch: touch)
-end
-
-
- -

+ See on GitHub + + + +

@@ -363,25 +363,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 766
+    def delete
+      _delete_row if persisted?
+      @destroyed = true
+      @previously_new_record = false
+      freeze
+    end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 766
-def delete
-  _delete_row if persisted?
-  @destroyed = true
-  @previously_new_record = false
-  freeze
-end
-
-
- -

+ See on GitHub + + + +

@@ -403,27 +403,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 780
+    def destroy
+      _raise_readonly_record_error if readonly?
+      destroy_associations
+      @_trigger_destroy_callback ||= persisted? && destroy_row > 0
+      @destroyed = true
+      @previously_new_record = false
+      freeze
+    end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 780
-def destroy
-  _raise_readonly_record_error if readonly?
-  destroy_associations
-  @_trigger_destroy_callback ||= persisted? && destroy_row > 0
-  @destroyed = true
-  @previously_new_record = false
-  freeze
-end
-
-
- -

+ See on GitHub + + + +

@@ -445,22 +445,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 796
+    def destroy!
+      destroy || _raise_record_not_destroyed
+    end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 796
-def destroy!
-  destroy || _raise_record_not_destroyed
-end
-
-
- -

+ See on GitHub + + + +

@@ -480,22 +480,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 682
+    def destroyed?
+      @destroyed
+    end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 682
-def destroyed?
-  @destroyed
-end
-
-
- -

+ See on GitHub + + + +

@@ -515,24 +515,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 959
+    def increment(attribute, by = 1)
+      self[attribute] ||= 0
+      self[attribute] += by
+      self
+    end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 959
-def increment(attribute, by = 1)
-  self[attribute] ||= 0
-  self[attribute] += by
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -552,26 +552,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 971
+    def increment!(attribute, by = 1, touch: nil)
+      increment(attribute, by)
+      change = public_send(attribute) - (public_send(:"#{attribute}_in_database") || 0)
+      self.class.update_counters(id, attribute => change, touch: touch)
+      public_send(:"clear_#{attribute}_change")
+      self
+    end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 971
-def increment!(attribute, by = 1, touch: nil)
-  increment(attribute, by)
-  change = public_send(attribute) - (public_send(:"#{attribute}_in_database") || 0)
-  self.class.update_counters(id, attribute => change, touch: touch)
-  public_send(:"clear_#{attribute}_change")
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -591,22 +591,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 665
+    def new_record?
+      @new_record
+    end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 665
-def new_record?
-  @new_record
-end
-
-
- -

+ See on GitHub + + + +

@@ -626,22 +626,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 688
+    def persisted?
+      !(@new_record || @destroyed)
+    end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 688
-def persisted?
-  !(@new_record || @destroyed)
-end
-
-
- -

+ See on GitHub + + + +

@@ -661,22 +661,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 672
+    def previously_new_record?
+      @previously_new_record
+    end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 672
-def previously_new_record?
-  @previously_new_record
-end
-
-
- -

+ See on GitHub + + + +

@@ -696,22 +696,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 677
+    def previously_persisted?
+      !new_record? && destroyed?
+    end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 677
-def previously_persisted?
-  !new_record? && destroyed?
-end
-
-
- -

+ See on GitHub + + + +

@@ -775,34 +775,34 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 1069
+    def reload(options = nil)
+      self.class.connection.clear_query_cache
+
+      fresh_object = if apply_scoping?(options)
+        _find_record((options || {}).merge(all_queries: true))
+      else
+        self.class.unscoped { _find_record(options) }
+      end
+
+      @association_cache = fresh_object.instance_variable_get(:@association_cache)
+      @attributes = fresh_object.instance_variable_get(:@attributes)
+      @new_record = false
+      @previously_new_record = false
+      self
+    end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 1069
-def reload(options = nil)
-  self.class.connection.clear_query_cache
-
-  fresh_object = if apply_scoping?(options)
-    _find_record((options || {}).merge(all_queries: true))
-  else
-    self.class.unscoped { _find_record(options) }
-  end
-
-  @association_cache = fresh_object.instance_variable_get(:@association_cache)
-  @attributes = fresh_object.instance_variable_get(:@attributes)
-  @new_record = false
-  @previously_new_record = false
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -833,24 +833,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 717
+    def save(**options, &block)
+      create_or_update(**options, &block)
+    rescue ActiveRecord::RecordInvalid
+      false
+    end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 717
-def save(**options, &block)
-  create_or_update(**options, &block)
-rescue ActiveRecord::RecordInvalid
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -883,22 +883,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 750
+    def save!(**options, &block)
+      create_or_update(**options, &block) || raise(RecordNotSaved.new("Failed to save the record", self))
+    end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 750
-def save!(**options, &block)
-  create_or_update(**options, &block) || raise(RecordNotSaved.new("Failed to save the record", self))
-end
-
-
- -

+ See on GitHub + + + +

@@ -926,23 +926,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 1008
+    def toggle(attribute)
+      self[attribute] = !public_send("#{attribute}?")
+      self
+    end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 1008
-def toggle(attribute)
-  self[attribute] = !public_send("#{attribute}?")
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -962,22 +962,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 1017
+    def toggle!(attribute)
+      toggle(attribute).update_attribute(attribute, self[attribute])
+    end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 1017
-def toggle!(attribute)
-  toggle(attribute).update_attribute(attribute, self[attribute])
-end
-
-
- -

+ See on GitHub + + + +

@@ -1025,38 +1025,38 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 1119
+    def touch(*names, time: nil)
+      _raise_record_not_touched_error unless persisted?
+      _raise_readonly_record_error if readonly?
+
+      attribute_names = timestamp_attributes_for_update_in_model
+      attribute_names = (attribute_names | names).map! do |name|
+        name = name.to_s
+        name = self.class.attribute_aliases[name] || name
+        verify_readonly_attribute(name)
+        name
+      end
+
+      unless attribute_names.empty?
+        affected_rows = _touch_row(attribute_names, time)
+        @_trigger_update_callback = affected_rows == 1
+      else
+        true
+      end
+    end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 1119
-def touch(*names, time: nil)
-  _raise_record_not_touched_error unless persisted?
-  _raise_readonly_record_error if readonly?
-
-  attribute_names = timestamp_attributes_for_update_in_model
-  attribute_names = (attribute_names | names).map! do |name|
-    name = name.to_s
-    name = self.class.attribute_aliases[name] || name
-    verify_readonly_attribute(name)
-    name
-  end
-
-  unless attribute_names.empty?
-    affected_rows = _touch_row(attribute_names, time)
-    @_trigger_update_callback = affected_rows == 1
-  else
-    true
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1076,27 +1076,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 890
+    def update(attributes)
+      # The following transaction covers any possible database side-effects of the
+      # attributes assignment. For example, setting the IDs of a child collection.
+      with_transaction_returning_status do
+        assign_attributes(attributes)
+        save
+      end
+    end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 890
-def update(attributes)
-  # The following transaction covers any possible database side-effects of the
-  # attributes assignment. For example, setting the IDs of a child collection.
-  with_transaction_returning_status do
-    assign_attributes(attributes)
-    save
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1116,27 +1116,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 901
+    def update!(attributes)
+      # The following transaction covers any possible database side-effects of the
+      # attributes assignment. For example, setting the IDs of a child collection.
+      with_transaction_returning_status do
+        assign_attributes(attributes)
+        save!
+      end
+    end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 901
-def update!(attributes)
-  # The following transaction covers any possible database side-effects of the
-  # attributes assignment. For example, setting the IDs of a child collection.
-  with_transaction_returning_status do
-    assign_attributes(attributes)
-    save!
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1169,26 +1169,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 857
+    def update_attribute(name, value)
+      name = name.to_s
+      verify_readonly_attribute(name)
+      public_send("#{name}=", value)
+
+      save(validate: false)
+    end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 857
-def update_attribute(name, value)
-  name = name.to_s
-  verify_readonly_attribute(name)
-  public_send("#{name}=", value)
-
-  save(validate: false)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1221,26 +1221,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 879
+    def update_attribute!(name, value)
+      name = name.to_s
+      verify_readonly_attribute(name)
+      public_send("#{name}=", value)
+
+      save!(validate: false)
+    end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 879
-def update_attribute!(name, value)
-  name = name.to_s
-  verify_readonly_attribute(name)
-  public_send("#{name}=", value)
-
-  save!(validate: false)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1260,22 +1260,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 911
+    def update_column(name, value)
+      update_columns(name => value)
+    end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 911
-def update_column(name, value)
-  update_columns(name => value)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1311,43 +1311,43 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 931
+    def update_columns(attributes)
+      raise ActiveRecordError, "cannot update a new record" if new_record?
+      raise ActiveRecordError, "cannot update a destroyed record" if destroyed?
+      _raise_readonly_record_error if readonly?
+
+      attributes = attributes.transform_keys do |key|
+        name = key.to_s
+        name = self.class.attribute_aliases[name] || name
+        verify_readonly_attribute(name) || name
+      end
+
+      update_constraints = _query_constraints_hash
+      attributes = attributes.each_with_object({}) do |(k, v), h|
+        h[k] = @attributes.write_cast_value(k, v)
+        clear_attribute_change(k)
+      end
+
+      affected_rows = self.class._update_record(
+        attributes,
+        update_constraints
+      )
+
+      affected_rows == 1
+    end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 931
-def update_columns(attributes)
-  raise ActiveRecordError, "cannot update a new record" if new_record?
-  raise ActiveRecordError, "cannot update a destroyed record" if destroyed?
-  _raise_readonly_record_error if readonly?
-
-  attributes = attributes.transform_keys do |key|
-    name = key.to_s
-    name = self.class.attribute_aliases[name] || name
-    verify_readonly_attribute(name) || name
-  end
-
-  update_constraints = _query_constraints_hash
-  attributes = attributes.each_with_object({}) do |(k, v), h|
-    h[k] = @attributes.write_cast_value(k, v)
-    clear_attribute_change(k)
-  end
-
-  affected_rows = self.class._update_record(
-    attributes,
-    update_constraints
-  )
-
-  affected_rows == 1
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Persistence/ClassMethods.html b/src/classes/ActiveRecord/Persistence/ClassMethods.html index fdb5c28b4f..70e42140ad 100644 --- a/src/classes/ActiveRecord/Persistence/ClassMethods.html +++ b/src/classes/ActiveRecord/Persistence/ClassMethods.html @@ -152,26 +152,26 @@

Examples

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 82
+      def build(attributes = nil, &block)
+        if attributes.is_a?(Array)
+          attributes.collect { |attr| build(attr, &block) }
+        else
+          new(attributes, &block)
+        end
+      end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 82
-def build(attributes = nil, &block)
-  if attributes.is_a?(Array)
-    attributes.collect { |attr| build(attr, &block) }
-  else
-    new(attributes, &block)
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -212,28 +212,28 @@

Examples

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 33
+      def create(attributes = nil, &block)
+        if attributes.is_a?(Array)
+          attributes.collect { |attr| create(attr, &block) }
+        else
+          object = new(attributes, &block)
+          object.save
+          object
+        end
+      end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 33
-def create(attributes = nil, &block)
-  if attributes.is_a?(Array)
-    attributes.collect { |attr| create(attr, &block) }
-  else
-    object = new(attributes, &block)
-    object.save
-    object
-  end
-end
-
-
- -
+ See on GitHub + + + +

@@ -255,28 +255,28 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 50
+      def create!(attributes = nil, &block)
+        if attributes.is_a?(Array)
+          attributes.collect { |attr| create!(attr, &block) }
+        else
+          object = new(attributes, &block)
+          object.save!
+          object
+        end
+      end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 50
-def create!(attributes = nil, &block)
-  if attributes.is_a?(Array)
-    attributes.collect { |attr| create!(attr, &block) }
-  else
-    object = new(attributes, &block)
-    object.save!
-    object
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -309,22 +309,22 @@

Examples

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 565
+      def delete(id_or_array)
+        delete_by(primary_key => id_or_array)
+      end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 565
-def delete(id_or_array)
-  delete_by(primary_key => id_or_array)
-end
-
-
- -
+ See on GitHub + + + +

@@ -361,32 +361,32 @@

Examples

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 533
+      def destroy(id)
+        multiple_ids = if composite_primary_key?
+          id.first.is_a?(Array)
+        else
+          id.is_a?(Array)
+        end
+
+        if multiple_ids
+          find(id).each(&:destroy)
+        else
+          find(id).destroy
+        end
+      end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 533
-def destroy(id)
-  multiple_ids = if composite_primary_key?
-    id.first.is_a?(Array)
-  else
-    id.is_a?(Array)
-  end
-
-  if multiple_ids
-    find(id).each(&:destroy)
-  else
-    find(id).destroy
-  end
-end
-
-
- -
+ See on GitHub + + + +

@@ -408,22 +408,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 96
+      def insert(attributes, returning: nil, unique_by: nil, record_timestamps: nil)
+        insert_all([ attributes ], returning: returning, unique_by: unique_by, record_timestamps: record_timestamps)
+      end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 96
-def insert(attributes, returning: nil, unique_by: nil, record_timestamps: nil)
-  insert_all([ attributes ], returning: returning, unique_by: unique_by, record_timestamps: record_timestamps)
-end
-
-
- -

+ See on GitHub + + + +

@@ -445,22 +445,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 185
+      def insert!(attributes, returning: nil, record_timestamps: nil)
+        insert_all!([ attributes ], returning: returning, record_timestamps: record_timestamps)
+      end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 185
-def insert!(attributes, returning: nil, record_timestamps: nil)
-  insert_all!([ attributes ], returning: returning, record_timestamps: record_timestamps)
-end
-
-
- -

+ See on GitHub + + + +

@@ -538,22 +538,22 @@

Example

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 175
+      def insert_all(attributes, returning: nil, unique_by: nil, record_timestamps: nil)
+        InsertAll.new(self, attributes, on_duplicate: :skip, returning: returning, unique_by: unique_by, record_timestamps: record_timestamps).execute
+      end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 175
-def insert_all(attributes, returning: nil, unique_by: nil, record_timestamps: nil)
-  InsertAll.new(self, attributes, on_duplicate: :skip, returning: returning, unique_by: unique_by, record_timestamps: record_timestamps).execute
-end
-
-
- -
+ See on GitHub + + + +

@@ -614,22 +614,22 @@

Examples

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 242
+      def insert_all!(attributes, returning: nil, record_timestamps: nil)
+        InsertAll.new(self, attributes, on_duplicate: :raise, returning: returning, record_timestamps: record_timestamps).execute
+      end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 242
-def insert_all!(attributes, returning: nil, record_timestamps: nil)
-  InsertAll.new(self, attributes, on_duplicate: :raise, returning: returning, record_timestamps: record_timestamps).execute
-end
-
-
- -
+ See on GitHub + + + +

@@ -653,23 +653,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 376
+      def instantiate(attributes, column_types = {}, &block)
+        klass = discriminate_class_for_record(attributes)
+        instantiate_instance_of(klass, attributes, column_types, &block)
+      end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 376
-def instantiate(attributes, column_types = {}, &block)
-  klass = discriminate_class_for_record(attributes)
-  instantiate_instance_of(klass, attributes, column_types, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -718,25 +718,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 488
+      def query_constraints(*columns_list)
+        raise ArgumentError, "You must specify at least one column to be used in querying" if columns_list.empty?
+
+        @query_constraints_list = columns_list.map(&:to_s)
+        @has_query_constraints = @query_constraints_list
+      end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 488
-def query_constraints(*columns_list)
-  raise ArgumentError, "You must specify at least one column to be used in querying" if columns_list.empty?
-
-  @query_constraints_list = columns_list.map(&:to_s)
-  @has_query_constraints = @query_constraints_list
-end
-
-
- -

+ See on GitHub + + + +

@@ -779,42 +779,42 @@

Examples

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 408
+      def update(id = :all, attributes)
+        if id.is_a?(Array)
+          if id.any?(ActiveRecord::Base)
+            raise ArgumentError,
+              "You are passing an array of ActiveRecord::Base instances to `update`. " \
+              "Please pass the ids of the objects by calling `pluck(:id)` or `map(&:id)`."
+          end
+          id.map { |one_id| find(one_id) }.each_with_index { |object, idx|
+            object.update(attributes[idx])
+          }
+        elsif id == :all
+          all.each { |record| record.update(attributes) }
+        else
+          if ActiveRecord::Base === id
+            raise ArgumentError,
+              "You are passing an instance of ActiveRecord::Base to `update`. " \
+              "Please pass the id of the object by calling `.id`."
+          end
+          object = find(id)
+          object.update(attributes)
+          object
+        end
+      end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 408
-def update(id = :all, attributes)
-  if id.is_a?(Array)
-    if id.any?(ActiveRecord::Base)
-      raise ArgumentError,
-        "You are passing an array of ActiveRecord::Base instances to `update`. " \
-        "Please pass the ids of the objects by calling `pluck(:id)` or `map(&:id)`."
-    end
-    id.map { |one_id| find(one_id) }.each_with_index { |object, idx|
-      object.update(attributes[idx])
-    }
-  elsif id == :all
-    all.each { |record| record.update(attributes) }
-  else
-    if ActiveRecord::Base === id
-      raise ArgumentError,
-        "You are passing an instance of ActiveRecord::Base to `update`. " \
-        "Please pass the id of the object by calling `.id`."
-    end
-    object = find(id)
-    object.update(attributes)
-    object
-  end
-end
-
-
- -
+ See on GitHub + + + +

@@ -834,42 +834,42 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 434
+      def update!(id = :all, attributes)
+        if id.is_a?(Array)
+          if id.any?(ActiveRecord::Base)
+            raise ArgumentError,
+              "You are passing an array of ActiveRecord::Base instances to `update!`. " \
+              "Please pass the ids of the objects by calling `pluck(:id)` or `map(&:id)`."
+          end
+          id.map { |one_id| find(one_id) }.each_with_index { |object, idx|
+            object.update!(attributes[idx])
+          }
+        elsif id == :all
+          all.each { |record| record.update!(attributes) }
+        else
+          if ActiveRecord::Base === id
+            raise ArgumentError,
+              "You are passing an instance of ActiveRecord::Base to `update!`. " \
+              "Please pass the id of the object by calling `.id`."
+          end
+          object = find(id)
+          object.update!(attributes)
+          object
+        end
+      end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 434
-def update!(id = :all, attributes)
-  if id.is_a?(Array)
-    if id.any?(ActiveRecord::Base)
-      raise ArgumentError,
-        "You are passing an array of ActiveRecord::Base instances to `update!`. " \
-        "Please pass the ids of the objects by calling `pluck(:id)` or `map(&:id)`."
-    end
-    id.map { |one_id| find(one_id) }.each_with_index { |object, idx|
-      object.update!(attributes[idx])
-    }
-  elsif id == :all
-    all.each { |record| record.update!(attributes) }
-  else
-    if ActiveRecord::Base === id
-      raise ArgumentError,
-        "You are passing an instance of ActiveRecord::Base to `update!`. " \
-        "Please pass the id of the object by calling `.id`."
-    end
-    object = find(id)
-    object.update!(attributes)
-    object
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -891,22 +891,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 252
+      def upsert(attributes, **kwargs)
+        upsert_all([ attributes ], **kwargs)
+      end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 252
-def upsert(attributes, **kwargs)
-  upsert_all([ attributes ], **kwargs)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1015,22 +1015,22 @@

Examples

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/persistence.rb, line 362
+      def upsert_all(attributes, on_duplicate: :update, update_only: nil, returning: nil, unique_by: nil, record_timestamps: nil)
+        InsertAll.new(self, attributes, on_duplicate: on_duplicate, update_only: update_only, returning: returning, unique_by: unique_by, record_timestamps: record_timestamps).execute
+      end
- -
-
# File activerecord/lib/active_record/persistence.rb, line 362
-def upsert_all(attributes, on_duplicate: :update, update_only: nil, returning: nil, unique_by: nil, record_timestamps: nil)
-  InsertAll.new(self, attributes, on_duplicate: on_duplicate, update_only: update_only, returning: returning, unique_by: unique_by, record_timestamps: record_timestamps).execute
-end
-
-
- -
+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/PredicateBuilder.html b/src/classes/ActiveRecord/PredicateBuilder.html deleted file mode 100644 index 80fe8242fd..0000000000 --- a/src/classes/ActiveRecord/PredicateBuilder.html +++ /dev/null @@ -1,103 +0,0 @@ ---- -title: ActiveRecord::PredicateBuilder -layout: default ---- - diff --git a/src/classes/ActiveRecord/PredicateBuilder/BasicObjectHandler.html b/src/classes/ActiveRecord/PredicateBuilder/BasicObjectHandler.html deleted file mode 100644 index 51ee2e36a3..0000000000 --- a/src/classes/ActiveRecord/PredicateBuilder/BasicObjectHandler.html +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: ActiveRecord::PredicateBuilder::BaseHandler -layout: default ---- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveRecord/PredicateBuilder/RangeHandler.html b/src/classes/ActiveRecord/PredicateBuilder/RangeHandler.html deleted file mode 100644 index 9460843fb5..0000000000 --- a/src/classes/ActiveRecord/PredicateBuilder/RangeHandler.html +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: ActiveRecord::PredicateBuilder::RangeHandler -layout: default ---- -
- -
-
- - - - - - - - - -

Namespace

- - - - -

Class

- - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveRecord/PredicateBuilder/RangeHandler/RangeWithBinds.html b/src/classes/ActiveRecord/PredicateBuilder/RangeHandler/RangeWithBinds.html deleted file mode 100644 index 66e0601216..0000000000 --- a/src/classes/ActiveRecord/PredicateBuilder/RangeHandler/RangeWithBinds.html +++ /dev/null @@ -1,107 +0,0 @@ ---- -title: ActiveRecord::PredicateBuilder::RangeHandler::RangeWithBinds -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - - -

Instance Public methods

- -
-

- - exclude_end?() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activerecord/lib/active_record/relation/predicate_builder/range_handler.rb, line 7
-def exclude_end?
-  false
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveRecord/Promise.html b/src/classes/ActiveRecord/Promise.html index b6d72af3b9..57acae676e 100644 --- a/src/classes/ActiveRecord/Promise.html +++ b/src/classes/ActiveRecord/Promise.html @@ -93,22 +93,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/promise.rb, line 13
+    def pending?
+      @future_result.pending?
+    end
- -
-
# File activerecord/lib/active_record/promise.rb, line 13
-def pending?
-  @future_result.pending?
-end
-
-
- - + See on GitHub + + + +

@@ -132,22 +132,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/promise.rb, line 36
+    def then(&block)
+      Promise.new(@future_result, @block ? @block >> block : block)
+    end
- -
-
# File activerecord/lib/active_record/promise.rb, line 36
-def then(&block)
-  Promise.new(@future_result, @block ? @block >> block : block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -167,29 +167,29 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/promise.rb, line 20
+    def value
+      return @value if defined? @value
+
+      result = @future_result.result
+      @value = if @block
+        @block.call(result)
+      else
+        result
+      end
+    end
- -
-
# File activerecord/lib/active_record/promise.rb, line 20
-def value
-  return @value if defined? @value
-
-  result = @future_result.result
-  @value = if @block
-    @block.call(result)
-  else
-    result
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/QueryCache.html b/src/classes/ActiveRecord/QueryCache.html index baa3e77a07..b643d55135 100644 --- a/src/classes/ActiveRecord/QueryCache.html +++ b/src/classes/ActiveRecord/QueryCache.html @@ -107,26 +107,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/query_cache.rb, line 32
+    def self.complete(pools)
+      pools.each { |pool| pool.disable_query_cache! }
+
+      ActiveRecord::Base.connection_handler.each_connection_pool do |pool|
+        pool.release_connection if pool.active_connection? && !pool.connection.transaction_open?
+      end
+    end
- -
-
# File activerecord/lib/active_record/query_cache.rb, line 32
-def self.complete(pools)
-  pools.each { |pool| pool.disable_query_cache! }
-
-  ActiveRecord::Base.connection_handler.each_connection_pool do |pool|
-    pool.release_connection if pool.active_connection? && !pool.connection.transaction_open?
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -146,22 +146,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/query_cache.rb, line 40
+    def self.install_executor_hooks(executor = ActiveSupport::Executor)
+      executor.register_hook(self)
+    end
- -
-
# File activerecord/lib/active_record/query_cache.rb, line 40
-def self.install_executor_hooks(executor = ActiveSupport::Executor)
-  executor.register_hook(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -181,22 +181,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/query_cache.rb, line 28
+    def self.run
+      ActiveRecord::Base.connection_handler.each_connection_pool.reject { |p| p.query_cache_enabled }.each { |p| p.enable_query_cache! }
+    end
- -
-
# File activerecord/lib/active_record/query_cache.rb, line 28
-def self.run
-  ActiveRecord::Base.connection_handler.each_connection_pool.reject { |p| p.query_cache_enabled }.each { |p| p.enable_query_cache! }
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/QueryCache/ClassMethods.html b/src/classes/ActiveRecord/QueryCache/ClassMethods.html index 7e4e08e12a..4a4fd1d95d 100644 --- a/src/classes/ActiveRecord/QueryCache/ClassMethods.html +++ b/src/classes/ActiveRecord/QueryCache/ClassMethods.html @@ -79,26 +79,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/query_cache.rb, line 9
+      def cache(&block)
+        if connected? || !configurations.empty?
+          connection.cache(&block)
+        else
+          yield
+        end
+      end
- -
-
# File activerecord/lib/active_record/query_cache.rb, line 9
-def cache(&block)
-  if connected? || !configurations.empty?
-    connection.cache(&block)
-  else
-    yield
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -118,26 +118,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/query_cache.rb, line 19
+      def uncached(&block)
+        if connected? || !configurations.empty?
+          connection.uncached(&block)
+        else
+          yield
+        end
+      end
- -
-
# File activerecord/lib/active_record/query_cache.rb, line 19
-def uncached(&block)
-  if connected? || !configurations.empty?
-    connection.uncached(&block)
-  else
-    yield
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/QueryLogs.html b/src/classes/ActiveRecord/QueryLogs.html index f5f14815f7..5ba6315511 100644 --- a/src/classes/ActiveRecord/QueryLogs.html +++ b/src/classes/ActiveRecord/QueryLogs.html @@ -152,30 +152,30 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/query_logs.rb, line 99
+      def update_formatter(format)
+        self.tags_formatter =
+          case format
+          when :legacy
+            LegacyFormatter.new
+          when :sqlcommenter
+            SQLCommenter.new
+          else
+            raise ArgumentError, "Formatter is unsupported: #{formatter}"
+          end
+      end
- -
-
# File activerecord/lib/active_record/query_logs.rb, line 99
-def update_formatter(format)
-  self.tags_formatter =
-    case format
-    when :legacy
-      LegacyFormatter.new
-    when :sqlcommenter
-      SQLCommenter.new
-    else
-      raise ArgumentError, "Formatter is unsupported: #{formatter}"
-    end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/QueryMethods.html b/src/classes/ActiveRecord/QueryMethods.html index 88031d6792..2114eb3f3b 100644 --- a/src/classes/ActiveRecord/QueryMethods.html +++ b/src/classes/ActiveRecord/QueryMethods.html @@ -299,26 +299,26 @@

- -
- - -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 1034
-def and(other)
-  if other.is_a?(Relation)
-    spawn.and!(other)
-  else
-    raise ArgumentError, "You have passed #{other.class.name} object to #and. Pass an ActiveRecord::Relation object instead."
-  end
-end
-
-
- - + +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 1034
+    def and(other)
+      if other.is_a?(Relation)
+        spawn.and!(other)
+      else
+        raise ArgumentError, "You have passed #{other.class.name} object to #and. Pass an ActiveRecord::Relation object instead."
+      end
+    end
+ + See on GitHub + +
+ +

@@ -349,23 +349,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 1428
+    def annotate(*args)
+      check_if_method_has_arguments!(__callee__, args)
+      spawn.annotate!(*args)
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 1428
-def annotate(*args)
-  check_if_method_has_arguments!(__callee__, args)
-  spawn.annotate!(*args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -398,22 +398,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 1245
+    def create_with(value)
+      spawn.create_with!(value)
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 1245
-def create_with(value)
-  spawn.create_with!(value)
-end
-
-
- -

+ See on GitHub + + + +

@@ -443,22 +443,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 1309
+    def distinct(value = true)
+      spawn.distinct!(value)
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 1309
-def distinct(value = true)
-  spawn.distinct!(value)
-end
-
-
- -

+ See on GitHub + + + +

@@ -501,23 +501,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 267
+    def eager_load(*args)
+      check_if_method_has_arguments!(__callee__, args)
+      spawn.eager_load!(*args)
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 267
-def eager_load(*args)
-  check_if_method_has_arguments!(__callee__, args)
-  spawn.eager_load!(*args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -560,29 +560,29 @@

- -
- - -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 1470
-def excluding(*records)
-  records.flatten!(1)
-  records.compact!
+          
+            
+ + Source code + - unless records.all?(klass) - raise ArgumentError, "You must only pass a single or collection of #{klass.name} objects to ##{__callee__}." - end +
# File activerecord/lib/active_record/relation/query_methods.rb, line 1470
+    def excluding(*records)
+      records.flatten!(1)
+      records.compact!
 
-  spawn.excluding!(records)
-end
-
-
- -

+ unless records.all?(klass) + raise ArgumentError, "You must only pass a single or collection of #{klass.name} objects to ##{__callee__}." + end + + spawn.excluding!(records) + end + + See on GitHub + + + +

@@ -640,26 +640,26 @@

Using a Block

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 1355
+    def extending(*modules, &block)
+      if modules.any? || block
+        spawn.extending!(*modules, &block)
+      else
+        self
+      end
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 1355
-def extending(*modules, &block)
-  if modules.any? || block
-    spawn.extending!(*modules, &block)
-  else
-    self
-  end
-end
-
-
- -
+ See on GitHub + + + +

@@ -688,22 +688,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 318
+    def extract_associated(association)
+      preload(association).collect(&association)
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 318
-def extract_associated(association)
-  preload(association).collect(&association)
-end
-
-
- -

+ See on GitHub + + + +

@@ -757,22 +757,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 1290
+    def from(value, subquery_name = nil)
+      spawn.from!(value, subquery_name)
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 1290
-def from(value, subquery_name = nil)
-  spawn.from!(value, subquery_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -814,23 +814,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 512
+    def group(*args)
+      check_if_method_has_arguments!(__callee__, args)
+      spawn.group!(*args)
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 512
-def group(*args)
-  check_if_method_has_arguments!(__callee__, args)
-  spawn.group!(*args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -853,22 +853,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 1096
+    def having(opts, *rest)
+      opts.blank? ? self : spawn.having!(opts, *rest)
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 1096
-def having(opts, *rest)
-  opts.blank? ? self : spawn.having!(opts, *rest)
-end
-
-
- -

+ See on GitHub + + + +

@@ -898,40 +898,40 @@

- -
- - -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 620
-def in_order_of(column, values)
-  klass.disallow_raw_sql!([column], permit: connection.column_name_with_order_matcher)
-  return spawn.none! if values.empty?
+          
+            
+ + Source code + - references = column_references([column]) - self.references_values |= references unless references.empty? +
# File activerecord/lib/active_record/relation/query_methods.rb, line 620
+    def in_order_of(column, values)
+      klass.disallow_raw_sql!([column], permit: connection.column_name_with_order_matcher)
+      return spawn.none! if values.empty?
 
-  values = values.map { |value| type_caster.type_cast_for_database(column, value) }
-  arel_column = column.is_a?(Arel::Nodes::SqlLiteral) ? column : order_column(column.to_s)
+      references = column_references([column])
+      self.references_values |= references unless references.empty?
 
-  where_clause =
-    if values.include?(nil)
-      arel_column.in(values.compact).or(arel_column.eq(nil))
-    else
-      arel_column.in(values)
-    end
+      values = values.map { |value| type_caster.type_cast_for_database(column, value) }
+      arel_column = column.is_a?(Arel::Nodes::SqlLiteral) ? column : order_column(column.to_s)
 
-  spawn
-    .order!(build_case_for_value_position(arel_column, values))
-    .where!(where_clause)
-end
-
-
- -

+ where_clause = + if values.include?(nil) + arel_column.in(values.compact).or(arel_column.eq(nil)) + else + arel_column.in(values) + end + + spawn + .order!(build_case_for_value_position(arel_column, values)) + .where!(where_clause) + end + + See on GitHub + + + +

@@ -1005,23 +1005,23 @@

Conditions

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 231
+    def includes(*args)
+      check_if_method_has_arguments!(__callee__, args)
+      spawn.includes!(*args)
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 231
-def includes(*args)
-  check_if_method_has_arguments!(__callee__, args)
-  spawn.includes!(*args)
-end
-
-
- -
+ See on GitHub + + + +

@@ -1070,22 +1070,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 1000
+    def invert_where
+      spawn.invert_where!
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 1000
-def invert_where
-  spawn.invert_where!
-end
-
-
- -

+ See on GitHub + + + +

@@ -1135,23 +1135,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 767
+    def joins(*args)
+      check_if_method_has_arguments!(__callee__, args)
+      spawn.joins!(*args)
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 767
-def joins(*args)
-  check_if_method_has_arguments!(__callee__, args)
-  spawn.joins!(*args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1175,7 +1175,8 @@

-

+ +

@@ -1203,23 +1204,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 782
+    def left_outer_joins(*args)
+      check_if_method_has_arguments!(__callee__, args)
+      spawn.left_outer_joins!(*args)
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 782
-def left_outer_joins(*args)
-  check_if_method_has_arguments!(__callee__, args)
-  spawn.left_outer_joins!(*args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1244,22 +1245,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 1110
+    def limit(value)
+      spawn.limit!(value)
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 1110
-def limit(value)
-  spawn.limit!(value)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1279,22 +1280,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 1137
+    def lock(locks = true)
+      spawn.lock!(locks)
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 1137
-def lock(locks = true)
-  spawn.lock!(locks)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1337,22 +1338,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 1180
+    def none
+      spawn.none!
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 1180
-def none
-  spawn.none!
-end
-
-
- -

+ See on GitHub + + + +

@@ -1380,22 +1381,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 1126
+    def offset(value)
+      spawn.offset!(value)
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 1126
-def offset(value)
-  spawn.offset!(value)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1427,23 +1428,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 1384
+    def optimizer_hints(*args)
+      check_if_method_has_arguments!(__callee__, args)
+      spawn.optimizer_hints!(*args)
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 1384
-def optimizer_hints(*args)
-  check_if_method_has_arguments!(__callee__, args)
-  spawn.optimizer_hints!(*args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1469,30 +1470,30 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 1066
+    def or(other)
+      if other.is_a?(Relation)
+        if @none
+          other.spawn
+        else
+          spawn.or!(other)
+        end
+      else
+        raise ArgumentError, "You have passed #{other.class.name} object to #or. Pass an ActiveRecord::Relation object instead."
+      end
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 1066
-def or(other)
-  if other.is_a?(Relation)
-    if @none
-      other.spawn
-    else
-      spawn.or!(other)
-    end
-  else
-    raise ArgumentError, "You have passed #{other.class.name} object to #or. Pass an ActiveRecord::Relation object instead."
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1564,25 +1565,25 @@

Arel< - -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 595
+    def order(*args)
+      check_if_method_has_arguments!(__callee__, args) do
+        sanitize_order_arguments(args)
+      end
+      spawn.order!(*args)
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 595
-def order(*args)
-  check_if_method_has_arguments!(__callee__, args) do
-    sanitize_order_arguments(args)
-  end
-  spawn.order!(*args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1622,23 +1623,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 299
+    def preload(*args)
+      check_if_method_has_arguments!(__callee__, args)
+      spawn.preload!(*args)
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 299
-def preload(*args)
-  check_if_method_has_arguments!(__callee__, args)
-  spawn.preload!(*args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1670,22 +1671,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 1208
+    def readonly(value = true)
+      spawn.readonly!(value)
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 1208
-def readonly(value = true)
-  spawn.readonly!(value)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1712,23 +1713,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 332
+    def references(*table_names)
+      check_if_method_has_arguments!(__callee__, table_names)
+      spawn.references!(*table_names)
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 332
-def references(*table_names)
-  check_if_method_has_arguments!(__callee__, table_names)
-  spawn.references!(*table_names)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1757,23 +1758,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 532
+    def regroup(*args)
+      check_if_method_has_arguments!(__callee__, args)
+      spawn.regroup!(*args)
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 532
-def regroup(*args)
-  check_if_method_has_arguments!(__callee__, args)
-  spawn.regroup!(*args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1803,25 +1804,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 651
+    def reorder(*args)
+      check_if_method_has_arguments!(__callee__, args) do
+        sanitize_order_arguments(args)
+      end
+      spawn.reorder!(*args)
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 651
-def reorder(*args)
-  check_if_method_has_arguments!(__callee__, args) do
-    sanitize_order_arguments(args)
-  end
-  spawn.reorder!(*args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1850,24 +1851,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 480
+    def reselect(*args)
+      check_if_method_has_arguments!(__callee__, args)
+      args = process_select_args(args)
+      spawn.reselect!(*args)
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 480
-def reselect(*args)
-  check_if_method_has_arguments!(__callee__, args)
-  args = process_select_args(args)
-  spawn.reselect!(*args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1890,22 +1891,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 1397
+    def reverse_order
+      spawn.reverse_order!
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 1397
-def reverse_order
-  spawn.reverse_order!
-end
-
-
- -

+ See on GitHub + + + +

@@ -1937,29 +1938,29 @@

- -
- - -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 960
-def rewhere(conditions)
-  return unscope(:where) if conditions.nil?
+          
+            
+ + Source code + - scope = spawn - where_clause = scope.build_where_clause(conditions) +
# File activerecord/lib/active_record/relation/query_methods.rb, line 960
+    def rewhere(conditions)
+      return unscope(:where) if conditions.nil?
 
-  scope.unscope!(where: where_clause.extract_attributes)
-  scope.where_clause += where_clause
-  scope
-end
-
-
- -

+ scope = spawn + where_clause = scope.build_where_clause(conditions) + + scope.unscope!(where: where_clause.extract_attributes) + scope.where_clause += where_clause + scope + end + + See on GitHub + + + +

@@ -2027,33 +2028,33 @@

- -
- - -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 390
-def select(*fields)
-  if block_given?
-    if fields.any?
-      raise ArgumentError, "`select' with block doesn't take arguments."
-    end
+          
+            
+ + Source code + - return super() - end +
# File activerecord/lib/active_record/relation/query_methods.rb, line 390
+    def select(*fields)
+      if block_given?
+        if fields.any?
+          raise ArgumentError, "`select' with block doesn't take arguments."
+        end
 
-  check_if_method_has_arguments!(__callee__, fields, "Call `select' with at least one field.")
+        return super()
+      end
 
-  fields = process_select_args(fields)
-  spawn._select!(*fields)
-end
-
-
- -

+ check_if_method_has_arguments!(__callee__, fields, "Call `select' with at least one field.") + + fields = process_select_args(fields) + spawn._select!(*fields) + end + + See on GitHub + + + +

@@ -2078,22 +2079,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 1223
+    def strict_loading(value = true)
+      spawn.strict_loading!(value)
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 1223
-def strict_loading(value = true)
-  spawn.strict_loading!(value)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2120,22 +2121,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 1020
+    def structurally_compatible?(other)
+      structurally_incompatible_values_for(other).empty?
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 1020
-def structurally_compatible?(other)
-  structurally_incompatible_values_for(other).empty?
-end
-
-
- -

+ See on GitHub + + + +

@@ -2155,25 +2156,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 1440
+    def uniq!(name)
+      if values = @values[name]
+        values.uniq! if values.is_a?(Array) && !values.empty?
+      end
+      self
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 1440
-def uniq!(name)
-  if values = @values[name]
-    values.uniq! if values.is_a?(Array) && !values.empty?
-  end
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -2222,23 +2223,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 705
+    def unscope(*args)
+      check_if_method_has_arguments!(__callee__, args)
+      spawn.unscope!(*args)
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 705
-def unscope(*args)
-  check_if_method_has_arguments!(__callee__, args)
-  spawn.unscope!(*args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2384,28 +2385,28 @@

Blank Condition

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 932
+    def where(*args)
+      if args.empty?
+        WhereChain.new(spawn)
+      elsif args.length == 1 && args.first.blank?
+        self
+      else
+        spawn.where!(*args)
+      end
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 932
-def where(*args)
-  if args.empty?
-    WhereChain.new(spawn)
-  elsif args.length == 1 && args.first.blank?
-    self
-  else
-    spawn.where!(*args)
-  end
-end
-
-
- -
+ See on GitHub + + + +

@@ -2474,23 +2475,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 459
+    def with(*args)
+      check_if_method_has_arguments!(__callee__, args)
+      spawn.with!(*args)
+    end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 459
-def with(*args)
-  check_if_method_has_arguments!(__callee__, args)
-  spawn.with!(*args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2514,7 +2515,8 @@

-

+ +

Instance Protected methods

@@ -2537,23 +2539,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 1539
+      def async!
+        @async = true
+        self
+      end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 1539
-def async!
-  @async = true
-  self
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/QueryMethods/WhereChain.html b/src/classes/ActiveRecord/QueryMethods/WhereChain.html index 7d2d10e86b..cdc05c2c4f 100644 --- a/src/classes/ActiveRecord/QueryMethods/WhereChain.html +++ b/src/classes/ActiveRecord/QueryMethods/WhereChain.html @@ -112,32 +112,32 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 75
+      def associated(*associations)
+        associations.each do |association|
+          reflection = scope_association_reflection(association)
+          @scope.joins!(association)
+          if reflection.options[:class_name]
+            self.not(association => { reflection.association_primary_key => nil })
+          else
+            self.not(reflection.table_name => { reflection.association_primary_key => nil })
+          end
+        end
+
+        @scope
+      end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 75
-def associated(*associations)
-  associations.each do |association|
-    reflection = scope_association_reflection(association)
-    @scope.joins!(association)
-    if reflection.options[:class_name]
-      self.not(association => { reflection.association_primary_key => nil })
-    else
-      self.not(reflection.table_name => { reflection.association_primary_key => nil })
-    end
-  end
-
-  @scope
-end
-
-
- - + See on GitHub + + + +

@@ -174,32 +174,32 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 107
+      def missing(*associations)
+        associations.each do |association|
+          reflection = scope_association_reflection(association)
+          @scope.left_outer_joins!(association)
+          if reflection.options[:class_name]
+            @scope.where!(association => { reflection.association_primary_key => nil })
+          else
+            @scope.where!(reflection.table_name => { reflection.association_primary_key => nil })
+          end
+        end
+
+        @scope
+      end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 107
-def missing(*associations)
-  associations.each do |association|
-    reflection = scope_association_reflection(association)
-    @scope.left_outer_joins!(association)
-    if reflection.options[:class_name]
-      @scope.where!(association => { reflection.association_primary_key => nil })
-    else
-      @scope.where!(reflection.table_name => { reflection.association_primary_key => nil })
-    end
-  end
-
-  @scope
-end
-
-
- -

+ See on GitHub + + + +

@@ -248,26 +248,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/query_methods.rb, line 49
+      def not(opts, *rest)
+        where_clause = @scope.send(:build_where_clause, opts, rest)
+
+        @scope.where_clause += where_clause.invert
+
+        @scope
+      end
- -
-
# File activerecord/lib/active_record/relation/query_methods.rb, line 49
-def not(opts, *rest)
-  where_clause = @scope.send(:build_where_clause, opts, rest)
-
-  @scope.where_clause += where_clause.invert
-
-  @scope
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Querying.html b/src/classes/ActiveRecord/Querying.html index fc0be6882e..c31810e3ae 100644 --- a/src/classes/ActiveRecord/Querying.html +++ b/src/classes/ActiveRecord/Querying.html @@ -87,22 +87,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/querying.rb, line 106
+    def async_count_by_sql(sql)
+      connection.select_value(sanitize_sql(sql), "#{name} Count", async: true).then(&:to_i)
+    end
- -
-
# File activerecord/lib/active_record/querying.rb, line 106
-def async_count_by_sql(sql)
-  connection.select_value(sanitize_sql(sql), "#{name} Count", async: true).then(&:to_i)
-end
-
-
- - + See on GitHub + + + +

@@ -122,24 +122,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/querying.rb, line 55
+    def async_find_by_sql(sql, binds = [], preparable: nil, &block)
+      _query_by_sql(sql, binds, preparable: preparable, async: true).then do |result|
+        _load_from_sql(result, &block)
+      end
+    end
- -
-
# File activerecord/lib/active_record/querying.rb, line 55
-def async_find_by_sql(sql, binds = [], preparable: nil, &block)
-  _query_by_sql(sql, binds, preparable: preparable, async: true).then do |result|
-    _load_from_sql(result, &block)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -168,22 +168,22 @@

Parameters

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/querying.rb, line 101
+    def count_by_sql(sql)
+      connection.select_value(sanitize_sql(sql), "#{name} Count").to_i
+    end
- -
-
# File activerecord/lib/active_record/querying.rb, line 101
-def count_by_sql(sql)
-  connection.select_value(sanitize_sql(sql), "#{name} Count").to_i
-end
-
-
- -
+ See on GitHub + + + +

@@ -220,22 +220,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/querying.rb, line 50
+    def find_by_sql(sql, binds = [], preparable: nil, &block)
+      _load_from_sql(_query_by_sql(sql, binds, preparable: preparable), &block)
+    end
- -
-
# File activerecord/lib/active_record/querying.rb, line 50
-def find_by_sql(sql, binds = [], preparable: nil, &block)
-  _load_from_sql(_query_by_sql(sql, binds, preparable: preparable), &block)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/ReadonlyAttributes/ClassMethods.html b/src/classes/ActiveRecord/ReadonlyAttributes/ClassMethods.html index f51d3a063f..8cb2e4f386 100644 --- a/src/classes/ActiveRecord/ReadonlyAttributes/ClassMethods.html +++ b/src/classes/ActiveRecord/ReadonlyAttributes/ClassMethods.html @@ -92,26 +92,26 @@

Examples

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/readonly_attributes.rb, line 30
+      def attr_readonly(*attributes)
+        self._attr_readonly |= attributes.map(&:to_s)
+
+        if ActiveRecord.raise_on_assign_to_attr_readonly
+          include(HasReadonlyAttributes)
+        end
+      end
- -
-
# File activerecord/lib/active_record/readonly_attributes.rb, line 30
-def attr_readonly(*attributes)
-  self._attr_readonly |= attributes.map(&:to_s)
-
-  if ActiveRecord.raise_on_assign_to_attr_readonly
-    include(HasReadonlyAttributes)
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -131,22 +131,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/readonly_attributes.rb, line 39
+      def readonly_attributes
+        _attr_readonly
+      end
- -
-
# File activerecord/lib/active_record/readonly_attributes.rb, line 39
-def readonly_attributes
-  _attr_readonly
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/RecordInvalid.html b/src/classes/ActiveRecord/RecordInvalid.html index bdb74c8e56..7e6d9c14fc 100644 --- a/src/classes/ActiveRecord/RecordInvalid.html +++ b/src/classes/ActiveRecord/RecordInvalid.html @@ -109,30 +109,30 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/validations.rb, line 18
+    def initialize(record = nil)
+      if record
+        @record = record
+        errors = @record.errors.full_messages.join(", ")
+        message = I18n.t(:"#{@record.class.i18n_scope}.errors.messages.record_invalid", errors: errors, default: :"errors.messages.record_invalid")
+      else
+        message = "Record invalid"
+      end
+
+      super(message)
+    end
- -
-
# File activerecord/lib/active_record/validations.rb, line 18
-def initialize(record = nil)
-  if record
-    @record = record
-    errors = @record.errors.full_messages.join(", ")
-    message = I18n.t(:"#{@record.class.i18n_scope}.errors.messages.record_invalid", errors: errors, default: :"errors.messages.record_invalid")
-  else
-    message = "Record invalid"
-  end
-
-  super(message)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/RecordNotDestroyed.html b/src/classes/ActiveRecord/RecordNotDestroyed.html index 5a1fc1a10c..056db61899 100644 --- a/src/classes/ActiveRecord/RecordNotDestroyed.html +++ b/src/classes/ActiveRecord/RecordNotDestroyed.html @@ -107,23 +107,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/errors.rb, line 164
+    def initialize(message = nil, record = nil)
+      @record = record
+      super(message)
+    end
- -
-
# File activerecord/lib/active_record/errors.rb, line 164
-def initialize(message = nil, record = nil)
-  @record = record
-  super(message)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/RecordNotFound.html b/src/classes/ActiveRecord/RecordNotFound.html index 7f61b7142a..f48891b5e7 100644 --- a/src/classes/ActiveRecord/RecordNotFound.html +++ b/src/classes/ActiveRecord/RecordNotFound.html @@ -116,26 +116,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/errors.rb, line 130
+    def initialize(message = nil, model = nil, primary_key = nil, id = nil)
+      @primary_key = primary_key
+      @model = model
+      @id = id
+
+      super(message)
+    end
- -
-
# File activerecord/lib/active_record/errors.rb, line 130
-def initialize(message = nil, model = nil, primary_key = nil, id = nil)
-  @primary_key = primary_key
-  @model = model
-  @id = id
-
-  super(message)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/RecordNotSaved.html b/src/classes/ActiveRecord/RecordNotSaved.html index 742a12246c..71fed2458f 100644 --- a/src/classes/ActiveRecord/RecordNotSaved.html +++ b/src/classes/ActiveRecord/RecordNotSaved.html @@ -100,23 +100,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/errors.rb, line 145
+    def initialize(message = nil, record = nil)
+      @record = record
+      super(message)
+    end
- -
-
# File activerecord/lib/active_record/errors.rb, line 145
-def initialize(message = nil, record = nil)
-  @record = record
-  super(message)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Reflection/ClassMethods.html b/src/classes/ActiveRecord/Reflection/ClassMethods.html index 33ce05ac3c..6a7ca45aed 100644 --- a/src/classes/ActiveRecord/Reflection/ClassMethods.html +++ b/src/classes/ActiveRecord/Reflection/ClassMethods.html @@ -108,22 +108,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/reflection.rb, line 69
+      def reflect_on_aggregation(aggregation)
+        aggregate_reflections[aggregation.to_s]
+      end
- -
-
# File activerecord/lib/active_record/reflection.rb, line 69
-def reflect_on_aggregation(aggregation)
-  aggregate_reflections[aggregation.to_s]
-end
-
-
- - + See on GitHub + + + +

@@ -143,22 +143,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/reflection.rb, line 61
+      def reflect_on_all_aggregations
+        aggregate_reflections.values
+      end
- -
-
# File activerecord/lib/active_record/reflection.rb, line 61
-def reflect_on_all_aggregations
-  aggregate_reflections.values
-end
-
-
- -

+ See on GitHub + + + +

@@ -184,24 +184,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/reflection.rb, line 106
+      def reflect_on_all_associations(macro = nil)
+        association_reflections = reflections.values
+        association_reflections.select! { |reflection| reflection.macro == macro } if macro
+        association_reflections
+      end
- -
-
# File activerecord/lib/active_record/reflection.rb, line 106
-def reflect_on_all_associations(macro = nil)
-  association_reflections = reflections.values
-  association_reflections.select! { |reflection| reflection.macro == macro } if macro
-  association_reflections
-end
-
-
- -

+ See on GitHub + + + +

@@ -221,22 +221,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/reflection.rb, line 126
+      def reflect_on_all_autosave_associations
+        reflections.values.select { |reflection| reflection.options[:autosave] }
+      end
- -
-
# File activerecord/lib/active_record/reflection.rb, line 126
-def reflect_on_all_autosave_associations
-  reflections.values.select { |reflection| reflection.options[:autosave] }
-end
-
-
- -

+ See on GitHub + + + +

@@ -260,22 +260,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/reflection.rb, line 117
+      def reflect_on_association(association)
+        reflections[association.to_s]
+      end
- -
-
# File activerecord/lib/active_record/reflection.rb, line 117
-def reflect_on_association(association)
-  reflections[association.to_s]
-end
-
-
- -

+ See on GitHub + + + +

@@ -298,37 +298,37 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/reflection.rb, line 77
+      def reflections
+        @__reflections ||= begin
+          ref = {}
+
+          _reflections.each do |name, reflection|
+            parent_reflection = reflection.parent_reflection
+
+            if parent_reflection
+              parent_name = parent_reflection.name
+              ref[parent_name.to_s] = parent_reflection
+            else
+              ref[name] = reflection
+            end
+          end
+
+          ref
+        end
+      end
- -
-
# File activerecord/lib/active_record/reflection.rb, line 77
-def reflections
-  @__reflections ||= begin
-    ref = {}
-
-    _reflections.each do |name, reflection|
-      parent_reflection = reflection.parent_reflection
-
-      if parent_reflection
-        parent_name = parent_reflection.name
-        ref[parent_name.to_s] = parent_reflection
-      else
-        ref[name] = reflection
-      end
-    end
-
-    ref
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Reflection/MacroReflection.html b/src/classes/ActiveRecord/Reflection/MacroReflection.html index 9514f6837d..0be44b8ea0 100644 --- a/src/classes/ActiveRecord/Reflection/MacroReflection.html +++ b/src/classes/ActiveRecord/Reflection/MacroReflection.html @@ -148,29 +148,29 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/reflection.rb, line 376
+      def initialize(name, scope, options, active_record)
+        super()
+        @name          = name
+        @scope         = scope
+        @options       = options
+        @active_record = active_record
+        @klass         = options[:anonymous_class]
+        @plural_name   = active_record.pluralize_table_names ?
+                            name.to_s.pluralize : name.to_s
+      end
- -
-
# File activerecord/lib/active_record/reflection.rb, line 376
-def initialize(name, scope, options, active_record)
-  super()
-  @name          = name
-  @scope         = scope
-  @options       = options
-  @active_record = active_record
-  @klass         = options[:anonymous_class]
-  @plural_name   = active_record.pluralize_table_names ?
-                      name.to_s.pluralize : name.to_s
-end
-
-
- - + See on GitHub + + + + @@ -194,26 +194,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/reflection.rb, line 420
+      def ==(other_aggregation)
+        super ||
+          other_aggregation.kind_of?(self.class) &&
+          name == other_aggregation.name &&
+          !other_aggregation.options.nil? &&
+          active_record == other_aggregation.active_record
+      end
- -
-
# File activerecord/lib/active_record/reflection.rb, line 420
-def ==(other_aggregation)
-  super ||
-    other_aggregation.kind_of?(self.class) &&
-    name == other_aggregation.name &&
-    !other_aggregation.options.nil? &&
-    active_record == other_aggregation.active_record
-end
-
-
- - + See on GitHub + + + +

@@ -233,26 +233,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/reflection.rb, line 387
+      def autosave=(autosave)
+        @options[:autosave] = autosave
+        parent_reflection = self.parent_reflection
+        if parent_reflection
+          parent_reflection.autosave = autosave
+        end
+      end
- -
-
# File activerecord/lib/active_record/reflection.rb, line 387
-def autosave=(autosave)
-  @options[:autosave] = autosave
-  parent_reflection = self.parent_reflection
-  if parent_reflection
-    parent_reflection.autosave = autosave
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -272,22 +272,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/reflection.rb, line 414
+      def compute_class(name)
+        name.constantize
+      end
- -
-
# File activerecord/lib/active_record/reflection.rb, line 414
-def compute_class(name)
-  name.constantize
-end
-
-
- -

+ See on GitHub + + + +

@@ -319,22 +319,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/reflection.rb, line 410
+      def klass
+        @klass ||= compute_class(class_name)
+      end
- -
-
# File activerecord/lib/active_record/reflection.rb, line 410
-def klass
-  @klass ||= compute_class(class_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -354,22 +354,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/reflection.rb, line 428
+      def scope_for(relation, owner = nil)
+        relation.instance_exec(owner, &scope) || relation
+      end
- -
-
# File activerecord/lib/active_record/reflection.rb, line 428
-def scope_for(relation, owner = nil)
-  relation.instance_exec(owner, &scope) || relation
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Relation.html b/src/classes/ActiveRecord/Relation.html index f1f64145bc..0b06694e50 100644 --- a/src/classes/ActiveRecord/Relation.html +++ b/src/classes/ActiveRecord/Relation.html @@ -445,31 +445,31 @@

- -
- - -
-
# File activerecord/lib/active_record/relation.rb, line 28
-def initialize(klass, table: klass.arel_table, predicate_builder: klass.predicate_builder, values: {})
-  @klass  = klass
-  @table  = table
-  @values = values
-  @loaded = false
-  @predicate_builder = predicate_builder
-  @delegate_to_klass = false
-  @future_result = nil
-  @records = nil
-  @async = false
-  @none = false
-end
-
-
- - + +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 28
+    def initialize(klass, table: klass.arel_table, predicate_builder: klass.predicate_builder, values: {})
+      @klass  = klass
+      @table  = table
+      @values = values
+      @loaded = false
+      @predicate_builder = predicate_builder
+      @delegate_to_klass = false
+      @future_result = nil
+      @records = nil
+      @async = false
+      @none = false
+    end
+ + See on GitHub + +
+ + @@ -493,29 +493,29 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 798
+    def ==(other)
+      case other
+      when Associations::CollectionProxy, AssociationRelation
+        self == other.records
+      when Relation
+        other.to_sql == to_sql
+      when Array
+        records == other
+      end
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 798
-def ==(other)
-  case other
-  when Associations::CollectionProxy, AssociationRelation
-    self == other.records
-  when Relation
-    other.to_sql == to_sql
-  when Array
-    records == other
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -535,25 +535,25 @@

- -
- - -
-
# File activerecord/lib/active_record/relation.rb, line 302
-def any?(*args)
-  return false if @none
+          
+            
+ + Source code + - return super if args.present? || block_given? - !empty? -end
-
-
- -

+
# File activerecord/lib/active_record/relation.rb, line 302
+    def any?(*args)
+      return false if @none
+
+      return super if args.present? || block_given?
+      !empty?
+    end
+ + See on GitHub + + + +

@@ -573,22 +573,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 819
+    def blank?
+      records.blank?
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 819
-def blank?
-  records.blank?
-end
-
-
- -

+ See on GitHub + + + +

@@ -612,7 +612,8 @@

-

+ +

@@ -648,23 +649,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 344
+    def cache_key(timestamp_column = "updated_at")
+      @cache_keys ||= {}
+      @cache_keys[timestamp_column] ||= klass.collection_cache_key(self, timestamp_column)
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 344
-def cache_key(timestamp_column = "updated_at")
-  @cache_keys ||= {}
-  @cache_keys[timestamp_column] ||= klass.collection_cache_key(self, timestamp_column)
-end
-
-
- -

+ See on GitHub + + + +

@@ -684,26 +685,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 423
+    def cache_key_with_version
+      if version = cache_version
+        "#{cache_key}-#{version}"
+      else
+        cache_key
+      end
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 423
-def cache_key_with_version
-  if version = cache_version
-    "#{cache_key}-#{version}"
-  else
-    cache_key
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -728,25 +729,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 371
+    def cache_version(timestamp_column = :updated_at)
+      if collection_cache_versioning
+        @cache_versions ||= {}
+        @cache_versions[timestamp_column] ||= compute_cache_version(timestamp_column)
+      end
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 371
-def cache_version(timestamp_column = :updated_at)
-  if collection_cache_versioning
-    @cache_versions ||= {}
-    @cache_versions[timestamp_column] ||= compute_cache_version(timestamp_column)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -783,27 +784,27 @@

Examples

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 98
+    def create(attributes = nil, &block)
+      if attributes.is_a?(Array)
+        attributes.collect { |attr| create(attr, &block) }
+      else
+        block = current_scope_restoring_block(&block)
+        scoping { _create(attributes, &block) }
+      end
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 98
-def create(attributes = nil, &block)
-  if attributes.is_a?(Array)
-    attributes.collect { |attr| create(attr, &block) }
-  else
-    block = current_scope_restoring_block(&block)
-    scoping { _create(attributes, &block) }
-  end
-end
-
-
- -
+ See on GitHub + + + +

@@ -825,27 +826,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 113
+    def create!(attributes = nil, &block)
+      if attributes.is_a?(Array)
+        attributes.collect { |attr| create!(attr, &block) }
+      else
+        block = current_scope_restoring_block(&block)
+        scoping { _create!(attributes, &block) }
+      end
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 113
-def create!(attributes = nil, &block)
-  if attributes.is_a?(Array)
-    attributes.collect { |attr| create!(attr, &block) }
-  else
-    block = current_scope_restoring_block(&block)
-    scoping { _create!(attributes, &block) }
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -882,28 +883,28 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 215
+    def create_or_find_by(attributes, &block)
+      transaction(requires_new: true) { create(attributes, &block) }
+    rescue ActiveRecord::RecordNotUnique
+      if connection.transaction_open?
+        where(attributes).lock.find_by!(attributes)
+      else
+        find_by!(attributes)
+      end
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 215
-def create_or_find_by(attributes, &block)
-  transaction(requires_new: true) { create(attributes, &block) }
-rescue ActiveRecord::RecordNotUnique
-  if connection.transaction_open?
-    where(attributes).lock.find_by!(attributes)
-  else
-    find_by!(attributes)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -923,28 +924,28 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 228
+    def create_or_find_by!(attributes, &block)
+      transaction(requires_new: true) { create!(attributes, &block) }
+    rescue ActiveRecord::RecordNotUnique
+      if connection.transaction_open?
+        where(attributes).lock.find_by!(attributes)
+      else
+        find_by!(attributes)
+      end
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 228
-def create_or_find_by!(attributes, &block)
-  transaction(requires_new: true) { create!(attributes, &block) }
-rescue ActiveRecord::RecordNotUnique
-  if connection.transaction_open?
-    where(attributes).lock.find_by!(attributes)
-  else
-    find_by!(attributes)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -975,39 +976,39 @@

- -
- - -
-
# File activerecord/lib/active_record/relation.rb, line 631
-def delete_all
-  return 0 if @none
+          
+            
+ + Source code + - invalid_methods = INVALID_METHODS_FOR_DELETE_ALL.select do |method| - value = @values[method] - method == :distinct ? value : value&.any? - end - if invalid_methods.any? - raise ActiveRecordError.new("delete_all doesn't support #{invalid_methods.join(', ')}") - end +
# File activerecord/lib/active_record/relation.rb, line 631
+    def delete_all
+      return 0 if @none
 
-  arel = eager_loading? ? apply_join_dependency.arel : build_arel
-  arel.source.left = table
+      invalid_methods = INVALID_METHODS_FOR_DELETE_ALL.select do |method|
+        value = @values[method]
+        method == :distinct ? value : value&.any?
+      end
+      if invalid_methods.any?
+        raise ActiveRecordError.new("delete_all doesn't support #{invalid_methods.join(', ')}")
+      end
 
-  group_values_arel_columns = arel_columns(group_values.uniq)
-  having_clause_ast = having_clause.ast unless having_clause.empty?
-  stmt = arel.compile_delete(table[primary_key], having_clause_ast, group_values_arel_columns)
+      arel = eager_loading? ? apply_join_dependency.arel : build_arel
+      arel.source.left = table
 
-  klass.connection.delete(stmt, "#{klass} Delete All").tap { reset }
-end
-
-
- -

+ group_values_arel_columns = arel_columns(group_values.uniq) + having_clause_ast = having_clause.ast unless having_clause.empty? + stmt = arel.compile_delete(table[primary_key], having_clause_ast, group_values_arel_columns) + + klass.connection.delete(stmt, "#{klass} Delete All").tap { reset } + end + + See on GitHub + + + +

@@ -1034,22 +1035,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 674
+    def delete_by(*args)
+      where(*args).delete_all
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 674
-def delete_by(*args)
-  where(*args).delete_all
-end
-
-
- -

+ See on GitHub + + + +

@@ -1076,22 +1077,22 @@

Examples

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 609
+    def destroy_all
+      records.each(&:destroy).tap { reset }
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 609
-def destroy_all
-  records.each(&:destroy).tap { reset }
-end
-
-
- -
+ See on GitHub + + + +

@@ -1118,22 +1119,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 661
+    def destroy_by(*args)
+      where(*args).destroy_all
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 661
-def destroy_by(*args)
-  where(*args).destroy_all
-end
-
-
- -

+ See on GitHub + + + +

@@ -1153,24 +1154,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 783
+    def eager_loading?
+      @should_eager_load ||=
+        eager_load_values.any? ||
+        includes_values.any? && (joined_includes_values.any? || references_eager_loaded_tables?)
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 783
-def eager_loading?
-  @should_eager_load ||=
-    eager_load_values.any? ||
-    includes_values.any? && (joined_includes_values.any? || references_eager_loaded_tables?)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1190,28 +1191,28 @@

- -
- - -
-
# File activerecord/lib/active_record/relation.rb, line 283
-def empty?
-  return true if @none
+          
+            
+ + Source code + - if loaded? - records.empty? - else - !exists? - end -end
-
-
- -

+
# File activerecord/lib/active_record/relation.rb, line 283
+    def empty?
+      return true if @none
+
+      if loaded?
+        records.empty?
+      else
+        !exists?
+      end
+    end
+ + See on GitHub + + + +

@@ -1231,22 +1232,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 269
+    def encode_with(coder)
+      coder.represent_seq(nil, records)
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 269
-def encode_with(coder)
-  coder.represent_seq(nil, records)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1270,22 +1271,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 253
+    def explain(*options)
+      exec_explain(collecting_queries_for_explain { exec_queries }, options)
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 253
-def explain(*options)
-  exec_explain(collecting_queries_for_explain { exec_queries }, options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1336,22 +1337,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 175
+    def find_or_create_by(attributes, &block)
+      find_by(attributes) || create_or_find_by(attributes, &block)
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 175
-def find_or_create_by(attributes, &block)
-  find_by(attributes) || create_or_find_by(attributes, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1371,22 +1372,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 182
+    def find_or_create_by!(attributes, &block)
+      find_by(attributes) || create_or_find_by!(attributes, &block)
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 182
-def find_or_create_by!(attributes, &block)
-  find_by(attributes) || create_or_find_by!(attributes, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1406,22 +1407,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 240
+    def find_or_initialize_by(attributes, &block)
+      find_by(attributes) || new(attributes, &block)
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 240
-def find_or_initialize_by(attributes, &block)
-  find_by(attributes) || new(attributes, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1441,23 +1442,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 41
+    def initialize_copy(other)
+      @values = @values.dup
+      reset
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 41
-def initialize_copy(other)
-  @values = @values.dup
-  reset
-end
-
-
- -

+ See on GitHub + + + +

@@ -1477,27 +1478,27 @@

- -
- - -
-
# File activerecord/lib/active_record/relation.rb, line 831
-def inspect
-  subject = loaded? ? records : annotate("loading for inspect")
-  entries = subject.take([limit_value, 11].compact.min).map!(&:inspect)
+          
+            
+ + Source code + - entries[10] = "..." if entries.size == 11 +
# File activerecord/lib/active_record/relation.rb, line 831
+    def inspect
+      subject = loaded? ? records : annotate("loading for inspect")
+      entries = subject.take([limit_value, 11].compact.min).map!(&:inspect)
 
-  "#<#{self.class.name} [#{entries.join(', ')}]>"
-end
-
-
- -

+ entries[10] = "..." if entries.size == 11 + + "#<#{self.class.name} [#{entries.join(', ')}]>" + end + + See on GitHub + + + +

@@ -1517,22 +1518,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 793
+    def joined_includes_values
+      includes_values & joins_values
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 793
-def joined_includes_values
-  includes_values & joins_values
-end
-
-
- -

+ See on GitHub + + + +

@@ -1555,27 +1556,27 @@

- -
- - -
-
# File activerecord/lib/active_record/relation.rb, line 725
-def load(&block)
-  if !loaded? || scheduled?
-    @records = exec_queries(&block)
-    @loaded = true
-  end
+          
+            
+ + Source code + - self -end
-
-
- -

+
# File activerecord/lib/active_record/relation.rb, line 725
+    def load(&block)
+      if !loaded? || scheduled?
+        @records = exec_queries(&block)
+        @loaded = true
+      end
+
+      self
+    end
+ + See on GitHub + + + +

@@ -1609,35 +1610,35 @@

- -
- - -
-
# File activerecord/lib/active_record/relation.rb, line 696
-def load_async
-  return load if !connection.async_enabled?
+          
+            
+ + Source code + - unless loaded? - result = exec_main_query(async: connection.current_transaction.closed?) +
# File activerecord/lib/active_record/relation.rb, line 696
+    def load_async
+      return load if !connection.async_enabled?
 
-    if result.is_a?(Array)
-      @records = result
-    else
-      @future_result = result
-    end
-    @loaded = true
-  end
+      unless loaded?
+        result = exec_main_query(async: connection.current_transaction.closed?)
 
-  self
-end
-
-
- -

+ if result.is_a?(Array) + @records = result + else + @future_result = result + end + @loaded = true + end + + self + end + + See on GitHub + + + +

@@ -1657,26 +1658,26 @@

- -
- - -
-
# File activerecord/lib/active_record/relation.rb, line 319
-def many?
-  return false if @none
+          
+            
+ + Source code + - return super if block_given? - return records.many? if loaded? - limited_count > 1 -end
-
-
- -

+
# File activerecord/lib/active_record/relation.rb, line 319
+    def many?
+      return false if @none
+
+      return super if block_given?
+      return records.many? if loaded?
+      limited_count > 1
+    end
+ + See on GitHub + + + +

@@ -1712,27 +1713,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 69
+    def new(attributes = nil, &block)
+      if attributes.is_a?(Array)
+        attributes.collect { |attr| new(attr, &block) }
+      else
+        block = current_scope_restoring_block(&block)
+        scoping { _new(attributes, &block) }
+      end
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 69
-def new(attributes = nil, &block)
-  if attributes.is_a?(Array)
-    attributes.collect { |attr| new(attr, &block) }
-  else
-    block = current_scope_restoring_block(&block)
-    scoping { _new(attributes, &block) }
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1752,25 +1753,25 @@

- -
- - -
-
# File activerecord/lib/active_record/relation.rb, line 294
-def none?(*args)
-  return true if @none
+          
+            
+ + Source code + - return super if args.present? || block_given? - empty? -end
-
-
- -

+
# File activerecord/lib/active_record/relation.rb, line 294
+    def none?(*args)
+      return true if @none
+
+      return super if args.present? || block_given?
+      empty?
+    end
+ + See on GitHub + + + +

@@ -1790,26 +1791,26 @@

- -
- - -
-
# File activerecord/lib/active_record/relation.rb, line 310
-def one?(*args)
-  return false if @none
+          
+            
+ + Source code + - return super if args.present? || block_given? - return records.one? if loaded? - limited_count == 1 -end
-
-
- -

+
# File activerecord/lib/active_record/relation.rb, line 310
+    def one?(*args)
+      return false if @none
+
+      return super if args.present? || block_given?
+      return records.one? if loaded?
+      limited_count == 1
+    end
+ + See on GitHub + + + +

@@ -1829,27 +1830,27 @@

- -
- - -
-
# File activerecord/lib/active_record/relation.rb, line 809
-def pretty_print(pp)
-  subject = loaded? ? records : annotate("loading for pp")
-  entries = subject.take([limit_value, 11].compact.min)
+          
+            
+ + Source code + - entries[10] = "..." if entries.size == 11 +
# File activerecord/lib/active_record/relation.rb, line 809
+    def pretty_print(pp)
+      subject = loaded? ? records : annotate("loading for pp")
+      entries = subject.take([limit_value, 11].compact.min)
 
-  pp.pp(entries)
-end
-
-
- -

+ entries[10] = "..." if entries.size == 11 + + pp.pp(entries) + end + + See on GitHub + + + +

@@ -1869,23 +1870,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 735
+    def reload
+      reset
+      load
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 735
-def reload
-  reset
-  load
-end
-
-
- -

+ See on GitHub + + + +

@@ -1905,30 +1906,30 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 740
+    def reset
+      @future_result&.cancel
+      @future_result = nil
+      @delegate_to_klass = false
+      @to_sql = @arel = @loaded = @should_eager_load = nil
+      @offsets = @take = nil
+      @cache_keys = nil
+      @cache_versions = nil
+      @records = nil
+      self
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 740
-def reset
-  @future_result&.cancel
-  @future_result = nil
-  @delegate_to_klass = false
-  @to_sql = @arel = @loaded = @should_eager_load = nil
-  @offsets = @take = nil
-  @cache_keys = nil
-  @cache_versions = nil
-  @records = nil
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -1948,22 +1949,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 715
+    def scheduled?
+      !!@future_result
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 715
-def scheduled?
-  !!@future_result
-end
-
-
- -

+ See on GitHub + + + +

@@ -1983,24 +1984,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 776
+    def scope_for_create
+      hash = where_clause.to_h(klass.table_name, equality_only: true)
+      create_with_value.each { |k, v| hash[k.to_s] = v } unless create_with_value.empty?
+      hash
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 776
-def scope_for_create
-  hash = where_clause.to_h(klass.table_name, equality_only: true)
-  create_with_value.each { |k, v| hash[k.to_s] = v } unless create_with_value.empty?
-  hash
-end
-
-
- -

+ See on GitHub + + + +

@@ -2030,29 +2031,29 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 445
+    def scoping(all_queries: nil, &block)
+      registry = klass.scope_registry
+      if global_scope?(registry) && all_queries == false
+        raise ArgumentError, "Scoping is set to apply to all queries and cannot be unset in a nested block."
+      elsif already_in_scope?(registry)
+        yield
+      else
+        _scoping(self, registry, all_queries, &block)
+      end
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 445
-def scoping(all_queries: nil, &block)
-  registry = klass.scope_registry
-  if global_scope?(registry) && all_queries == false
-    raise ArgumentError, "Scoping is set to apply to all queries and cannot be unset in a nested block."
-  elsif already_in_scope?(registry)
-    yield
-  else
-    _scoping(self, registry, all_queries, &block)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -2072,26 +2073,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 274
+    def size
+      if loaded?
+        records.length
+      else
+        count(:all)
+      end
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 274
-def size
-  if loaded?
-    records.length
-  else
-    count(:all)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -2115,7 +2116,8 @@

-

+ +

@@ -2139,22 +2141,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 258
+    def to_ary
+      records.dup
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 258
-def to_ary
-  records.dup
-end
-
-
- -

+ See on GitHub + + + +

@@ -2178,30 +2180,30 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 756
+    def to_sql
+      @to_sql ||= if eager_loading?
+        apply_join_dependency do |relation, join_dependency|
+          relation = join_dependency.apply_column_aliases(relation)
+          relation.to_sql
+        end
+      else
+        conn = klass.connection
+        conn.unprepared_statement { conn.to_sql(arel) }
+      end
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 756
-def to_sql
-  @to_sql ||= if eager_loading?
-    apply_join_dependency do |relation, join_dependency|
-      relation = join_dependency.apply_column_aliases(relation)
-      relation.to_sql
-    end
-  else
-    conn = klass.connection
-    conn.unprepared_statement { conn.to_sql(arel) }
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -2240,22 +2242,22 @@

Examples

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 589
+    def touch_all(*names, time: nil)
+      update_all klass.touch_attributes_with_time(*names, time: time)
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 589
-def touch_all(*names, time: nil)
-  update_all klass.touch_attributes_with_time(*names, time: time)
-end
-
-
- -
+ See on GitHub + + + +

@@ -2300,44 +2302,44 @@

Examples

- -
- - -
-
# File activerecord/lib/active_record/relation.rb, line 492
-def update_all(updates)
-  raise ArgumentError, "Empty list of attributes to change" if updates.blank?
+          
+            
+ + Source code + - return 0 if @none +
# File activerecord/lib/active_record/relation.rb, line 492
+    def update_all(updates)
+      raise ArgumentError, "Empty list of attributes to change" if updates.blank?
 
-  if updates.is_a?(Hash)
-    if klass.locking_enabled? &&
-        !updates.key?(klass.locking_column) &&
-        !updates.key?(klass.locking_column.to_sym)
-      attr = table[klass.locking_column]
-      updates[attr.name] = _increment_attribute(attr)
-    end
-    values = _substitute_values(updates)
-  else
-    values = Arel.sql(klass.sanitize_sql_for_assignment(updates, table.name))
-  end
+      return 0 if @none
 
-  arel = eager_loading? ? apply_join_dependency.arel : build_arel
-  arel.source.left = table
+      if updates.is_a?(Hash)
+        if klass.locking_enabled? &&
+            !updates.key?(klass.locking_column) &&
+            !updates.key?(klass.locking_column.to_sym)
+          attr = table[klass.locking_column]
+          updates[attr.name] = _increment_attribute(attr)
+        end
+        values = _substitute_values(updates)
+      else
+        values = Arel.sql(klass.sanitize_sql_for_assignment(updates, table.name))
+      end
 
-  group_values_arel_columns = arel_columns(group_values.uniq)
-  having_clause_ast = having_clause.ast unless having_clause.empty?
-  stmt = arel.compile_update(values, table[primary_key], having_clause_ast, group_values_arel_columns)
-  klass.connection.update(stmt, "#{klass} Update All").tap { reset }
-end
-
-
- -
+ arel = eager_loading? ? apply_join_dependency.arel : build_arel + arel.source.left = table + + group_values_arel_columns = arel_columns(group_values.uniq) + having_clause_ast = having_clause.ast unless having_clause.empty? + stmt = arel.compile_update(values, table[primary_key], having_clause_ast, group_values_arel_columns) + klass.connection.update(stmt, "#{klass} Update All").tap { reset } + end + + See on GitHub + + + +

@@ -2372,38 +2374,38 @@

Examples

- -
- - -
-
# File activerecord/lib/active_record/relation.rb, line 546
-def update_counters(counters)
-  touch = counters.delete(:touch)
+          
+            
+ + Source code + - updates = {} - counters.each do |counter_name, value| - attr = table[counter_name] - updates[attr.name] = _increment_attribute(attr, value) - end +
# File activerecord/lib/active_record/relation.rb, line 546
+    def update_counters(counters)
+      touch = counters.delete(:touch)
 
-  if touch
-    names = touch if touch != true
-    names = Array.wrap(names)
-    options = names.extract_options!
-    touch_updates = klass.touch_attributes_with_time(*names, **options)
-    updates.merge!(touch_updates) unless touch_updates.empty?
-  end
+      updates = {}
+      counters.each do |counter_name, value|
+        attr = table[counter_name]
+        updates[attr.name] = _increment_attribute(attr, value)
+      end
 
-  update_all updates
-end
-
-
- -
+ if touch + names = touch if touch != true + names = Array.wrap(names) + options = names.extract_options! + touch_updates = klass.touch_attributes_with_time(*names, **options) + updates.merge!(touch_updates) unless touch_updates.empty? + end + + update_all updates + end + + See on GitHub + + + +

@@ -2423,22 +2425,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 823
+    def values
+      @values.dup
+    end
- -
-
# File activerecord/lib/active_record/relation.rb, line 823
-def values
-  @values.dup
-end
-
-
- -

+ See on GitHub + + + +

Instance Protected methods

@@ -2461,23 +2463,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation.rb, line 872
+      def load_records(records)
+        @records = records.freeze
+        @loaded = true
+      end
- -
-
# File activerecord/lib/active_record/relation.rb, line 872
-def load_records(records)
-  @records = records.freeze
-  @loaded = true
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Relation/RecordFetchWarning.html b/src/classes/ActiveRecord/Relation/RecordFetchWarning.html index de40c6b4da..48516a58aa 100644 --- a/src/classes/ActiveRecord/Relation/RecordFetchWarning.html +++ b/src/classes/ActiveRecord/Relation/RecordFetchWarning.html @@ -77,30 +77,30 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/record_fetch_warning.rb, line 16
+      def exec_queries
+        QueryRegistry.reset
+
+        super.tap do |records|
+          if logger && ActiveRecord.warn_on_records_fetched_greater_than
+            if records.length > ActiveRecord.warn_on_records_fetched_greater_than
+              logger.warn "Query fetched #{records.size} #{@klass} records: #{QueryRegistry.queries.join(";")}"
+            end
+          end
+        end
+      end
- -
-
# File activerecord/lib/active_record/relation/record_fetch_warning.rb, line 16
-def exec_queries
-  QueryRegistry.reset
-
-  super.tap do |records|
-    if logger && ActiveRecord.warn_on_records_fetched_greater_than
-      if records.length > ActiveRecord.warn_on_records_fetched_greater_than
-        logger.warn "Query fetched #{records.size} #{@klass} records: #{QueryRegistry.queries.join(";")}"
-      end
-    end
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Result.html b/src/classes/ActiveRecord/Result.html index 64194f43fd..667696d2b3 100644 --- a/src/classes/ActiveRecord/Result.html +++ b/src/classes/ActiveRecord/Result.html @@ -195,25 +195,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/result.rb, line 49
+    def initialize(columns, rows, column_types = {})
+      @columns      = columns
+      @rows         = rows
+      @hash_rows    = nil
+      @column_types = column_types
+    end
- -
-
# File activerecord/lib/active_record/result.rb, line 49
-def initialize(columns, rows, column_types = {})
-  @columns      = columns
-  @rows         = rows
-  @hash_rows    = nil
-  @column_types = column_types
-end
-
-
- - + See on GitHub + + + + @@ -237,22 +237,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/result.rb, line 90
+    def [](idx)
+      hash_rows[idx]
+    end
- -
-
# File activerecord/lib/active_record/result.rb, line 90
-def [](idx)
-  hash_rows[idx]
-end
-
-
- - + See on GitHub + + + +

@@ -274,26 +274,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/result.rb, line 70
+    def each(&block)
+      if block_given?
+        hash_rows.each(&block)
+      else
+        hash_rows.to_enum { @rows.size }
+      end
+    end
- -
-
# File activerecord/lib/active_record/result.rb, line 70
-def each(&block)
-  if block_given?
-    hash_rows.each(&block)
-  else
-    hash_rows.to_enum { @rows.size }
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -313,22 +313,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/result.rb, line 79
+    def empty?
+      rows.empty?
+    end
- -
-
# File activerecord/lib/active_record/result.rb, line 79
-def empty?
-  rows.empty?
-end
-
-
- -

+ See on GitHub + + + +

@@ -348,22 +348,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/result.rb, line 57
+    def includes_column?(name)
+      @columns.include? name
+    end
- -
-
# File activerecord/lib/active_record/result.rb, line 57
-def includes_column?(name)
-  @columns.include? name
-end
-
-
- -

+ See on GitHub + + + +

@@ -383,25 +383,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/result.rb, line 133
+    def initialize_copy(other)
+      @columns      = columns.dup
+      @rows         = rows.dup
+      @column_types = column_types.dup
+      @hash_rows    = nil
+    end
- -
-
# File activerecord/lib/active_record/result.rb, line 133
-def initialize_copy(other)
-  @columns      = columns.dup
-  @rows         = rows.dup
-  @column_types = column_types.dup
-  @hash_rows    = nil
-end
-
-
- -

+ See on GitHub + + + +

@@ -421,22 +421,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/result.rb, line 95
+    def last(n = nil)
+      n ? hash_rows.last(n) : hash_rows.last
+    end
- -
-
# File activerecord/lib/active_record/result.rb, line 95
-def last(n = nil)
-  n ? hash_rows.last(n) : hash_rows.last
-end
-
-
- -

+ See on GitHub + + + +

@@ -456,22 +456,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/result.rb, line 62
+    def length
+      @rows.length
+    end
- -
-
# File activerecord/lib/active_record/result.rb, line 62
-def length
-  @rows.length
-end
-
-
- -

+ See on GitHub + + + +

@@ -495,7 +495,8 @@

-

+ +

@@ -519,22 +520,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/result.rb, line 84
+    def to_ary
+      hash_rows
+    end
- -
-
# File activerecord/lib/active_record/result.rb, line 84
-def to_ary
-  hash_rows
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/SQLWarning.html b/src/classes/ActiveRecord/SQLWarning.html index 2ac43cf1f2..629e008b23 100644 --- a/src/classes/ActiveRecord/SQLWarning.html +++ b/src/classes/ActiveRecord/SQLWarning.html @@ -116,25 +116,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/errors.rb, line 288
+    def initialize(message = nil, code = nil, level = nil, sql = nil, connection_pool = nil)
+      super(message, connection_pool: connection_pool)
+      @code = code
+      @level = level
+      @sql = sql
+    end
- -
-
# File activerecord/lib/active_record/errors.rb, line 288
-def initialize(message = nil, code = nil, level = nil, sql = nil, connection_pool = nil)
-  super(message, connection_pool: connection_pool)
-  @code = code
-  @level = level
-  @sql = sql
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Sanitization/ClassMethods.html b/src/classes/ActiveRecord/Sanitization/ClassMethods.html index 6679eee7a2..3e73ba65ce 100644 --- a/src/classes/ActiveRecord/Sanitization/ClassMethods.html +++ b/src/classes/ActiveRecord/Sanitization/ClassMethods.html @@ -103,7 +103,8 @@

- + +

@@ -142,31 +143,31 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/sanitization.rb, line 163
+      def sanitize_sql_array(ary)
+        statement, *values = ary
+        if values.first.is_a?(Hash) && /:\w+/.match?(statement)
+          replace_named_bind_variables(statement, values.first)
+        elsif statement.include?("?")
+          replace_bind_variables(statement, values)
+        elsif statement.blank?
+          statement
+        else
+          statement % values.collect { |value| connection.quote_string(value.to_s) }
+        end
+      end
- -
-
# File activerecord/lib/active_record/sanitization.rb, line 163
-def sanitize_sql_array(ary)
-  statement, *values = ary
-  if values.first.is_a?(Hash) && /:\w+/.match?(statement)
-    replace_named_bind_variables(statement, values.first)
-  elsif statement.include?("?")
-    replace_bind_variables(statement, values)
-  elsif statement.blank?
-    statement
-  else
-    statement % values.collect { |value| connection.quote_string(value.to_s) }
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -208,26 +209,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/sanitization.rb, line 68
+      def sanitize_sql_for_assignment(assignments, default_table_name = table_name)
+        case assignments
+        when Array; sanitize_sql_array(assignments)
+        when Hash;  sanitize_sql_hash_for_assignment(assignments, default_table_name)
+        else        assignments
+        end
+      end
- -
-
# File activerecord/lib/active_record/sanitization.rb, line 68
-def sanitize_sql_for_assignment(assignments, default_table_name = table_name)
-  case assignments
-  when Array; sanitize_sql_array(assignments)
-  when Hash;  sanitize_sql_hash_for_assignment(assignments, default_table_name)
-  else        assignments
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -273,27 +274,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/sanitization.rb, line 33
+      def sanitize_sql_for_conditions(condition)
+        return nil if condition.blank?
+
+        case condition
+        when Array; sanitize_sql_array(condition)
+        else        condition
+        end
+      end
- -
-
# File activerecord/lib/active_record/sanitization.rb, line 33
-def sanitize_sql_for_conditions(condition)
-  return nil if condition.blank?
-
-  case condition
-  when Array; sanitize_sql_array(condition)
-  else        condition
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -320,37 +321,37 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/sanitization.rb, line 84
+      def sanitize_sql_for_order(condition)
+        if condition.is_a?(Array) && condition.first.to_s.include?("?")
+          disallow_raw_sql!(
+            [condition.first],
+            permit: connection.column_name_with_order_matcher
+          )
+
+          # Ensure we aren't dealing with a subclass of String that might
+          # override methods we use (e.g. Arel::Nodes::SqlLiteral).
+          if condition.first.kind_of?(String) && !condition.first.instance_of?(String)
+            condition = [String.new(condition.first), *condition[1..-1]]
+          end
+
+          Arel.sql(sanitize_sql_array(condition))
+        else
+          condition
+        end
+      end
- -
-
# File activerecord/lib/active_record/sanitization.rb, line 84
-def sanitize_sql_for_order(condition)
-  if condition.is_a?(Array) && condition.first.to_s.include?("?")
-    disallow_raw_sql!(
-      [condition.first],
-      permit: connection.column_name_with_order_matcher
-    )
-
-    # Ensure we aren't dealing with a subclass of String that might
-    # override methods we use (e.g. Arel::Nodes::SqlLiteral).
-    if condition.first.kind_of?(String) && !condition.first.instance_of?(String)
-      condition = [String.new(condition.first), *condition[1..-1]]
-    end
-
-    Arel.sql(sanitize_sql_array(condition))
-  else
-    condition
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -374,27 +375,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/sanitization.rb, line 107
+      def sanitize_sql_hash_for_assignment(attrs, table)
+        c = connection
+        attrs.map do |attr, value|
+          type = type_for_attribute(attr)
+          value = type.serialize(type.cast(value))
+          "#{c.quote_table_name_for_assignment(table, attr)} = #{c.quote(value)}"
+        end.join(", ")
+      end
- -
-
# File activerecord/lib/active_record/sanitization.rb, line 107
-def sanitize_sql_hash_for_assignment(attrs, table)
-  c = connection
-  attrs.map do |attr, value|
-    type = type_for_attribute(attr)
-    value = type.serialize(type.cast(value))
-    "#{c.quote_table_name_for_assignment(table, attr)} = #{c.quote(value)}"
-  end.join(", ")
-end
-
-
- -

+ See on GitHub + + + +

@@ -427,26 +428,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/sanitization.rb, line 131
+      def sanitize_sql_like(string, escape_character = "\\")
+        if string.include?(escape_character) && escape_character != "%" && escape_character != "_"
+          string = string.gsub(escape_character, '\0\0')
+        end
+
+        string.gsub(/(?=[%_])/, escape_character)
+      end
- -
-
# File activerecord/lib/active_record/sanitization.rb, line 131
-def sanitize_sql_like(string, escape_character = "\\")
-  if string.include?(escape_character) && escape_character != "%" && escape_character != "_"
-    string = string.gsub(escape_character, '\0\0')
-  end
-
-  string.gsub(/(?=[%_])/, escape_character)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Schema.html b/src/classes/ActiveRecord/Schema.html index bf182eba14..256b6ef8e4 100644 --- a/src/classes/ActiveRecord/Schema.html +++ b/src/classes/ActiveRecord/Schema.html @@ -137,25 +137,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/schema.rb, line 68
+    def self.[](version)
+      @class_for_version ||= {}
+      @class_for_version[version] ||= Class.new(Migration::Compatibility.find(version)) do
+        include Definition
+      end
+    end
- -
-
# File activerecord/lib/active_record/schema.rb, line 68
-def self.[](version)
-  @class_for_version ||= {}
-  @class_for_version[version] ||= Class.new(Migration::Compatibility.find(version)) do
-    include Definition
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Schema/Definition/ClassMethods.html b/src/classes/ActiveRecord/Schema/Definition/ClassMethods.html index 1291186236..0d37ceae03 100644 --- a/src/classes/ActiveRecord/Schema/Definition/ClassMethods.html +++ b/src/classes/ActiveRecord/Schema/Definition/ClassMethods.html @@ -82,22 +82,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/schema.rb, line 49
+        def define(info = {}, &block)
+          new.define(info, &block)
+        end
- -
-
# File activerecord/lib/active_record/schema.rb, line 49
-def define(info = {}, &block)
-  new.define(info, &block)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Scoping/Default/ClassMethods.html b/src/classes/ActiveRecord/Scoping/Default/ClassMethods.html index 44d952a685..4fa123833d 100644 --- a/src/classes/ActiveRecord/Scoping/Default/ClassMethods.html +++ b/src/classes/ActiveRecord/Scoping/Default/ClassMethods.html @@ -83,26 +83,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/scoping/default.rb, line 62
+        def default_scopes?(all_queries: false)
+          if all_queries
+            self.default_scopes.any?(&:all_queries)
+          else
+            self.default_scopes.any?
+          end
+        end
- -
-
# File activerecord/lib/active_record/scoping/default.rb, line 62
-def default_scopes?(all_queries: false)
-  if all_queries
-    self.default_scopes.any?(&:all_queries)
-  else
-    self.default_scopes.any?
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -148,22 +148,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/scoping/default.rb, line 50
+        def unscoped(&block)
+          block_given? ? relation.scoping(&block) : relation
+        end
- -
-
# File activerecord/lib/active_record/scoping/default.rb, line 50
-def unscoped(&block)
-  block_given? ? relation.scoping(&block) : relation
-end
-
-
- -

+ See on GitHub + + + +

Instance Private methods

@@ -237,34 +237,34 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/scoping/default.rb, line 129
+          def default_scope(scope = nil, all_queries: nil, &block) # :doc:
+            scope = block if block_given?
+
+            if scope.is_a?(Relation) || !scope.respond_to?(:call)
+              raise ArgumentError,
+                "Support for calling #default_scope without a block is removed. For example instead " \
+                "of `default_scope where(color: 'red')`, please use " \
+                "`default_scope { where(color: 'red') }`. (Alternatively you can just redefine " \
+                "self.default_scope.)"
+            end
+
+            default_scope = DefaultScope.new(scope, all_queries)
+
+            self.default_scopes += [default_scope]
+          end
- -
-
# File activerecord/lib/active_record/scoping/default.rb, line 129
-def default_scope(scope = nil, all_queries: nil, &block) # :doc:
-  scope = block if block_given?
-
-  if scope.is_a?(Relation) || !scope.respond_to?(:call)
-    raise ArgumentError,
-      "Support for calling #default_scope without a block is removed. For example instead " \
-      "of `default_scope where(color: 'red')`, please use " \
-      "`default_scope { where(color: 'red') }`. (Alternatively you can just redefine " \
-      "self.default_scope.)"
-  end
-
-  default_scope = DefaultScope.new(scope, all_queries)
-
-  self.default_scopes += [default_scope]
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Scoping/Named/ClassMethods.html b/src/classes/ActiveRecord/Scoping/Named/ClassMethods.html index c1d584b83d..04285b8693 100644 --- a/src/classes/ActiveRecord/Scoping/Named/ClassMethods.html +++ b/src/classes/ActiveRecord/Scoping/Named/ClassMethods.html @@ -94,32 +94,32 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/scoping/named.rb, line 22
+        def all(all_queries: nil)
+          scope = current_scope
+
+          if scope
+            if self == scope.klass
+              scope.clone
+            else
+              relation.merge!(scope)
+            end
+          else
+            default_scoped(all_queries: all_queries)
+          end
+        end
- -
-
# File activerecord/lib/active_record/scoping/named.rb, line 22
-def all(all_queries: nil)
-  scope = current_scope
-
-  if scope
-    if self == scope.klass
-      scope.clone
-    else
-      relation.merge!(scope)
-    end
-  else
-    default_scoped(all_queries: all_queries)
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -139,22 +139,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/scoping/named.rb, line 45
+        def default_scoped(scope = relation, all_queries: nil)
+          build_default_scope(scope, all_queries: all_queries) || scope
+        end
- -
-
# File activerecord/lib/active_record/scoping/named.rb, line 45
-def default_scoped(scope = relation, all_queries: nil)
-  build_default_scope(scope, all_queries: all_queries) || scope
-end
-
-
- -

+ See on GitHub + + + +

@@ -249,55 +249,55 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/scoping/named.rb, line 154
+        def scope(name, body, &block)
+          unless body.respond_to?(:call)
+            raise ArgumentError, "The scope body needs to be callable."
+          end
+
+          if dangerous_class_method?(name)
+            raise ArgumentError, "You tried to define a scope named \"#{name}\" " \
+              "on the model \"#{self.name}\", but Active Record already defined " \
+              "a class method with the same name."
+          end
+
+          if method_defined_within?(name, Relation)
+            raise ArgumentError, "You tried to define a scope named \"#{name}\" " \
+              "on the model \"#{self.name}\", but ActiveRecord::Relation already defined " \
+              "an instance method with the same name."
+          end
+
+          extension = Module.new(&block) if block
+
+          if body.respond_to?(:to_proc)
+            singleton_class.define_method(name) do |*args|
+              scope = all._exec_scope(*args, &body)
+              scope = scope.extending(extension) if extension
+              scope
+            end
+          else
+            singleton_class.define_method(name) do |*args|
+              scope = body.call(*args) || all
+              scope = scope.extending(extension) if extension
+              scope
+            end
+          end
+          singleton_class.send(:ruby2_keywords, name)
+
+          generate_relation_method(name)
+        end
- -
-
# File activerecord/lib/active_record/scoping/named.rb, line 154
-def scope(name, body, &block)
-  unless body.respond_to?(:call)
-    raise ArgumentError, "The scope body needs to be callable."
-  end
-
-  if dangerous_class_method?(name)
-    raise ArgumentError, "You tried to define a scope named \"#{name}\" " \
-      "on the model \"#{self.name}\", but Active Record already defined " \
-      "a class method with the same name."
-  end
-
-  if method_defined_within?(name, Relation)
-    raise ArgumentError, "You tried to define a scope named \"#{name}\" " \
-      "on the model \"#{self.name}\", but ActiveRecord::Relation already defined " \
-      "an instance method with the same name."
-  end
-
-  extension = Module.new(&block) if block
-
-  if body.respond_to?(:to_proc)
-    singleton_class.define_method(name) do |*args|
-      scope = all._exec_scope(*args, &body)
-      scope = scope.extending(extension) if extension
-      scope
-    end
-  else
-    singleton_class.define_method(name) do |*args|
-      scope = body.call(*args) || all
-      scope = scope.extending(extension) if extension
-      scope
-    end
-  end
-  singleton_class.send(:ruby2_keywords, name)
-
-  generate_relation_method(name)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/SecurePassword/ClassMethods.html b/src/classes/ActiveRecord/SecurePassword/ClassMethods.html index 797f0f4f92..846d56eeca 100644 --- a/src/classes/ActiveRecord/SecurePassword/ClassMethods.html +++ b/src/classes/ActiveRecord/SecurePassword/ClassMethods.html @@ -98,36 +98,36 @@

Examples

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/secure_password.rb, line 41
+      def authenticate_by(attributes)
+        passwords, identifiers = attributes.to_h.partition do |name, value|
+          !has_attribute?(name) && has_attribute?("#{name}_digest")
+        end.map(&:to_h)
+
+        raise ArgumentError, "One or more password arguments are required" if passwords.empty?
+        raise ArgumentError, "One or more finder arguments are required" if identifiers.empty?
+
+        return if passwords.any? { |name, value| value.nil? || value.empty? }
+
+        if record = find_by(identifiers)
+          record if passwords.count { |name, value| record.public_send(:"authenticate_#{name}", value) } == passwords.size
+        else
+          new(passwords)
+          nil
+        end
+      end
- -
-
# File activerecord/lib/active_record/secure_password.rb, line 41
-def authenticate_by(attributes)
-  passwords, identifiers = attributes.to_h.partition do |name, value|
-    !has_attribute?(name) && has_attribute?("#{name}_digest")
-  end.map(&:to_h)
-
-  raise ArgumentError, "One or more password arguments are required" if passwords.empty?
-  raise ArgumentError, "One or more finder arguments are required" if identifiers.empty?
-
-  return if passwords.any? { |name, value| value.nil? || value.empty? }
-
-  if record = find_by(identifiers)
-    record if passwords.count { |name, value| record.public_send(:"authenticate_#{name}", value) } == passwords.size
-  else
-    new(passwords)
-    nil
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/SecureToken/ClassMethods.html b/src/classes/ActiveRecord/SecureToken/ClassMethods.html index d6ca5bdfe0..be7a0eb519 100644 --- a/src/classes/ActiveRecord/SecureToken/ClassMethods.html +++ b/src/classes/ActiveRecord/SecureToken/ClassMethods.html @@ -79,22 +79,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/secure_token.rb, line 61
+      def generate_unique_secure_token(length: MINIMUM_TOKEN_LENGTH)
+        SecureRandom.base58(length)
+      end
- -
-
# File activerecord/lib/active_record/secure_token.rb, line 61
-def generate_unique_secure_token(length: MINIMUM_TOKEN_LENGTH)
-  SecureRandom.base58(length)
-end
-
-
- - + See on GitHub + + + +

@@ -141,33 +141,33 @@

Options

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/secure_token.rb, line 46
+      def has_secure_token(attribute = :token, length: MINIMUM_TOKEN_LENGTH, on: ActiveRecord.generate_secure_token_on)
+        if length < MINIMUM_TOKEN_LENGTH
+          raise MinimumLengthError, "Token requires a minimum length of #{MINIMUM_TOKEN_LENGTH} characters."
+        end
+
+        # Load securerandom only when has_secure_token is used.
+        require "active_support/core_ext/securerandom"
+        define_method("regenerate_#{attribute}") { update! attribute => self.class.generate_unique_secure_token(length: length) }
+        set_callback on, on == :initialize ? :after : :before do
+          if new_record? && !query_attribute(attribute)
+            write_attribute(attribute, self.class.generate_unique_secure_token(length: length))
+          end
+        end
+      end
- -
-
# File activerecord/lib/active_record/secure_token.rb, line 46
-def has_secure_token(attribute = :token, length: MINIMUM_TOKEN_LENGTH, on: ActiveRecord.generate_secure_token_on)
-  if length < MINIMUM_TOKEN_LENGTH
-    raise MinimumLengthError, "Token requires a minimum length of #{MINIMUM_TOKEN_LENGTH} characters."
-  end
-
-  # Load securerandom only when has_secure_token is used.
-  require "active_support/core_ext/securerandom"
-  define_method("regenerate_#{attribute}") { update! attribute => self.class.generate_unique_secure_token(length: length) }
-  set_callback on, on == :initialize ? :after : :before do
-    if new_record? && !query_attribute(attribute)
-      write_attribute(attribute, self.class.generate_unique_secure_token(length: length))
-    end
-  end
-end
-
-
- -
+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Serialization.html b/src/classes/ActiveRecord/Serialization.html index 9b6dfc6db4..17fcd095cb 100644 --- a/src/classes/ActiveRecord/Serialization.html +++ b/src/classes/ActiveRecord/Serialization.html @@ -95,29 +95,29 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/serialization.rb, line 13
+    def serializable_hash(options = nil)
+      if self.class._has_attribute?(self.class.inheritance_column)
+        options = options ? options.dup : {}
+
+        options[:except] = Array(options[:except]).map(&:to_s)
+        options[:except] |= Array(self.class.inheritance_column)
+      end
+
+      super(options)
+    end
- -
-
# File activerecord/lib/active_record/serialization.rb, line 13
-def serializable_hash(options = nil)
-  if self.class._has_attribute?(self.class.inheritance_column)
-    options = options ? options.dup : {}
-
-    options[:except] = Array(options[:except]).map(&:to_s)
-    options[:except] |= Array(self.class.inheritance_column)
-  end
-
-  super(options)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/SignedId.html b/src/classes/ActiveRecord/SignedId.html index 2bf24a138e..1cd8721f56 100644 --- a/src/classes/ActiveRecord/SignedId.html +++ b/src/classes/ActiveRecord/SignedId.html @@ -97,21 +97,21 @@

- -
- - -
-
# File activerecord/lib/active_record/signed_id.rb, line 13
-class_attribute :signed_id_verifier_secret, instance_writer: false
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/signed_id.rb, line 13
+      class_attribute :signed_id_verifier_secret, instance_writer: false
 
-
-
- - + + See on GitHub + + + + @@ -142,24 +142,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/signed_id.rb, line 112
+    def signed_id(expires_in: nil, expires_at: nil, purpose: nil)
+      raise ArgumentError, "Cannot get a signed_id for a new record" if new_record?
+
+      self.class.signed_id_verifier.generate id, expires_in: expires_in, expires_at: expires_at, purpose: self.class.combine_signed_id_purposes(purpose)
+    end
- -
-
# File activerecord/lib/active_record/signed_id.rb, line 112
-def signed_id(expires_in: nil, expires_at: nil, purpose: nil)
-  raise ArgumentError, "Cannot get a signed_id for a new record" if new_record?
-
-  self.class.signed_id_verifier.generate id, expires_in: expires_in, expires_at: expires_at, purpose: self.class.combine_signed_id_purposes(purpose)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/SignedId/ClassMethods.html b/src/classes/ActiveRecord/SignedId/ClassMethods.html index ab80a85e38..f0eb21876e 100644 --- a/src/classes/ActiveRecord/SignedId/ClassMethods.html +++ b/src/classes/ActiveRecord/SignedId/ClassMethods.html @@ -104,26 +104,26 @@

Examples

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/signed_id.rb, line 42
+      def find_signed(signed_id, purpose: nil)
+        raise UnknownPrimaryKey.new(self) if primary_key.nil?
+
+        if id = signed_id_verifier.verified(signed_id, purpose: combine_signed_id_purposes(purpose))
+          find_by primary_key => id
+        end
+      end
- -
-
# File activerecord/lib/active_record/signed_id.rb, line 42
-def find_signed(signed_id, purpose: nil)
-  raise UnknownPrimaryKey.new(self) if primary_key.nil?
-
-  if id = signed_id_verifier.verified(signed_id, purpose: combine_signed_id_purposes(purpose))
-    find_by primary_key => id
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -152,24 +152,24 @@

Examples

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/signed_id.rb, line 62
+      def find_signed!(signed_id, purpose: nil)
+        if id = signed_id_verifier.verify(signed_id, purpose: combine_signed_id_purposes(purpose))
+          find(id)
+        end
+      end
- -
-
# File activerecord/lib/active_record/signed_id.rb, line 62
-def find_signed!(signed_id, purpose: nil)
-  if id = signed_id_verifier.verify(signed_id, purpose: combine_signed_id_purposes(purpose))
-    find(id)
-  end
-end
-
-
- -
+ See on GitHub + + + +

@@ -189,31 +189,31 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/signed_id.rb, line 71
+      def signed_id_verifier
+        @signed_id_verifier ||= begin
+          secret = signed_id_verifier_secret
+          secret = secret.call if secret.respond_to?(:call)
+
+          if secret.nil?
+            raise ArgumentError, "You must set ActiveRecord::Base.signed_id_verifier_secret to use signed ids"
+          else
+            ActiveSupport::MessageVerifier.new secret, digest: "SHA256", serializer: JSON
+          end
+        end
+      end
- -
-
# File activerecord/lib/active_record/signed_id.rb, line 71
-def signed_id_verifier
-  @signed_id_verifier ||= begin
-    secret = signed_id_verifier_secret
-    secret = secret.call if secret.respond_to?(:call)
-
-    if secret.nil?
-      raise ArgumentError, "You must set ActiveRecord::Base.signed_id_verifier_secret to use signed ids"
-    else
-      ActiveSupport::MessageVerifier.new secret, digest: "SHA256", serializer: JSON
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -233,22 +233,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/signed_id.rb, line 87
+      def signed_id_verifier=(verifier)
+        @signed_id_verifier = verifier
+      end
- -
-
# File activerecord/lib/active_record/signed_id.rb, line 87
-def signed_id_verifier=(verifier)
-  @signed_id_verifier = verifier
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/SoleRecordExceeded.html b/src/classes/ActiveRecord/SoleRecordExceeded.html index 4e6272db21..5aba31c27e 100644 --- a/src/classes/ActiveRecord/SoleRecordExceeded.html +++ b/src/classes/ActiveRecord/SoleRecordExceeded.html @@ -100,23 +100,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/errors.rb, line 174
+    def initialize(record = nil)
+      @record = record
+      super "Wanted only one #{record&.name || "record"}"
+    end
- -
-
# File activerecord/lib/active_record/errors.rb, line 174
-def initialize(record = nil)
-  @record = record
-  super "Wanted only one #{record&.name || "record"}"
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/SpawnMethods.html b/src/classes/ActiveRecord/SpawnMethods.html index 976adecadf..829f7a9a8f 100644 --- a/src/classes/ActiveRecord/SpawnMethods.html +++ b/src/classes/ActiveRecord/SpawnMethods.html @@ -87,22 +87,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/spawn_methods.rb, line 75
+    def except(*skips)
+      relation_with values.except(*skips)
+    end
- -
-
# File activerecord/lib/active_record/relation/spawn_methods.rb, line 75
-def except(*skips)
-  relation_with values.except(*skips)
-end
-
-
- - + See on GitHub + + + +

@@ -141,28 +141,28 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/spawn_methods.rb, line 33
+    def merge(other, *rest)
+      if other.is_a?(Array)
+        records & other
+      elsif other
+        spawn.merge!(other, *rest)
+      else
+        raise ArgumentError, "invalid argument: #{other.inspect}."
+      end
+    end
- -
-
# File activerecord/lib/active_record/relation/spawn_methods.rb, line 33
-def merge(other, *rest)
-  if other.is_a?(Array)
-    records & other
-  elsif other
-    spawn.merge!(other, *rest)
-  else
-    raise ArgumentError, "invalid argument: #{other.inspect}."
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -186,22 +186,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/relation/spawn_methods.rb, line 83
+    def only(*onlies)
+      relation_with values.slice(*onlies)
+    end
- -
-
# File activerecord/lib/active_record/relation/spawn_methods.rb, line 83
-def only(*onlies)
-  relation_with values.slice(*onlies)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/StaleObjectError.html b/src/classes/ActiveRecord/StaleObjectError.html index 51e517cf52..a0e409e51b 100644 --- a/src/classes/ActiveRecord/StaleObjectError.html +++ b/src/classes/ActiveRecord/StaleObjectError.html @@ -110,28 +110,28 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/errors.rb, line 352
+    def initialize(record = nil, attempted_action = nil)
+      if record && attempted_action
+        @record = record
+        @attempted_action = attempted_action
+        super("Attempted to #{attempted_action} a stale object: #{record.class.name}.")
+      else
+        super("Stale object error.")
+      end
+    end
- -
-
# File activerecord/lib/active_record/errors.rb, line 352
-def initialize(record = nil, attempted_action = nil)
-  if record && attempted_action
-    @record = record
-    @attempted_action = attempted_action
-    super("Attempted to #{attempted_action} a stale object: #{record.class.name}.")
-  else
-    super("Stale object error.")
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/StatementCache/PartialQueryCollector.html b/src/classes/ActiveRecord/StatementCache/PartialQueryCollector.html index 8356225d28..7c21f75531 100644 --- a/src/classes/ActiveRecord/StatementCache/PartialQueryCollector.html +++ b/src/classes/ActiveRecord/StatementCache/PartialQueryCollector.html @@ -110,23 +110,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/statement_cache.rb, line 67
+      def initialize
+        @parts = []
+        @binds = []
+      end
- -
-
# File activerecord/lib/active_record/statement_cache.rb, line 67
-def initialize
-  @parts = []
-  @binds = []
-end
-
-
- - + See on GitHub + + + + @@ -150,23 +150,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/statement_cache.rb, line 72
+      def <<(str)
+        @parts << str
+        self
+      end
- -
-
# File activerecord/lib/active_record/statement_cache.rb, line 72
-def <<(str)
-  @parts << str
-  self
-end
-
-
- - + See on GitHub + + + +

@@ -186,24 +186,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/statement_cache.rb, line 77
+      def add_bind(obj)
+        @binds << obj
+        @parts << Substitute.new
+        self
+      end
- -
-
# File activerecord/lib/active_record/statement_cache.rb, line 77
-def add_bind(obj)
-  @binds << obj
-  @parts << Substitute.new
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -223,27 +223,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/statement_cache.rb, line 83
+      def add_binds(binds, proc_for_binds = nil)
+        @binds.concat proc_for_binds ? binds.map(&proc_for_binds) : binds
+        binds.size.times do |i|
+          @parts << ", " unless i == 0
+          @parts << Substitute.new
+        end
+        self
+      end
- -
-
# File activerecord/lib/active_record/statement_cache.rb, line 83
-def add_binds(binds, proc_for_binds = nil)
-  @binds.concat proc_for_binds ? binds.map(&proc_for_binds) : binds
-  binds.size.times do |i|
-    @parts << ", " unless i == 0
-    @parts << Substitute.new
-  end
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -263,22 +263,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/statement_cache.rb, line 92
+      def value
+        [@parts, @binds]
+      end
- -
-
# File activerecord/lib/active_record/statement_cache.rb, line 92
-def value
-  [@parts, @binds]
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/StatementInvalid.html b/src/classes/ActiveRecord/StatementInvalid.html index 05d1f0e3f5..4e25b36612 100644 --- a/src/classes/ActiveRecord/StatementInvalid.html +++ b/src/classes/ActiveRecord/StatementInvalid.html @@ -114,24 +114,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/errors.rb, line 184
+    def initialize(message = nil, sql: nil, binds: nil, connection_pool: nil)
+      super(message || $!&.message, connection_pool: connection_pool)
+      @sql = sql
+      @binds = binds
+    end
- -
-
# File activerecord/lib/active_record/errors.rb, line 184
-def initialize(message = nil, sql: nil, binds: nil, connection_pool: nil)
-  super(message || $!&.message, connection_pool: connection_pool)
-  @sql = sql
-  @binds = binds
-end
-
-
- - + See on GitHub + + + + @@ -155,27 +155,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/errors.rb, line 192
+    def set_query(sql, binds)
+      unless @sql
+        @sql = sql
+        @binds = binds
+      end
+
+      self
+    end
- -
-
# File activerecord/lib/active_record/errors.rb, line 192
-def set_query(sql, binds)
-  unless @sql
-    @sql = sql
-    @binds = binds
-  end
-
-  self
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Store.html b/src/classes/ActiveRecord/Store.html index de77482ed3..0b472794e9 100644 --- a/src/classes/ActiveRecord/Store.html +++ b/src/classes/ActiveRecord/Store.html @@ -191,23 +191,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/store.rb, line 209
+      def read_store_attribute(store_attribute, key) # :doc:
+        accessor = store_accessor_for(store_attribute)
+        accessor.read(self, store_attribute, key)
+      end
- -
-
# File activerecord/lib/active_record/store.rb, line 209
-def read_store_attribute(store_attribute, key) # :doc:
-  accessor = store_accessor_for(store_attribute)
-  accessor.read(self, store_attribute, key)
-end
-
-
- - + See on GitHub + + + +

@@ -227,23 +227,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/store.rb, line 214
+      def write_store_attribute(store_attribute, key, value) # :doc:
+        accessor = store_accessor_for(store_attribute)
+        accessor.write(self, store_attribute, key, value)
+      end
- -
-
# File activerecord/lib/active_record/store.rb, line 214
-def write_store_attribute(store_attribute, key, value) # :doc:
-  accessor = store_accessor_for(store_attribute)
-  accessor.write(self, store_attribute, key, value)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Store/ClassMethods.html b/src/classes/ActiveRecord/Store/ClassMethods.html index a77796743d..dfad980906 100644 --- a/src/classes/ActiveRecord/Store/ClassMethods.html +++ b/src/classes/ActiveRecord/Store/ClassMethods.html @@ -83,24 +83,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/store.rb, line 106
+      def store(store_attribute, options = {})
+        coder = build_column_serializer(store_attribute, options[:coder], Object, options[:yaml])
+        serialize store_attribute, coder: IndifferentCoder.new(store_attribute, coder)
+        store_accessor(store_attribute, options[:accessors], **options.slice(:prefix, :suffix)) if options.has_key? :accessors
+      end
- -
-
# File activerecord/lib/active_record/store.rb, line 106
-def store(store_attribute, options = {})
-  coder = build_column_serializer(store_attribute, options[:coder], Object, options[:yaml])
-  serialize store_attribute, coder: IndifferentCoder.new(store_attribute, coder)
-  store_accessor(store_attribute, options[:accessors], **options.slice(:prefix, :suffix)) if options.has_key? :accessors
-end
-
-
- - + See on GitHub + + + +

@@ -120,97 +120,97 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/store.rb, line 112
+      def store_accessor(store_attribute, *keys, prefix: nil, suffix: nil)
+        keys = keys.flatten
+
+        accessor_prefix =
+          case prefix
+          when String, Symbol
+            "#{prefix}_"
+          when TrueClass
+            "#{store_attribute}_"
+          else
+            ""
+          end
+        accessor_suffix =
+          case suffix
+          when String, Symbol
+            "_#{suffix}"
+          when TrueClass
+            "_#{store_attribute}"
+          else
+            ""
+          end
+
+        _store_accessors_module.module_eval do
+          keys.each do |key|
+            accessor_key = "#{accessor_prefix}#{key}#{accessor_suffix}"
+
+            define_method("#{accessor_key}=") do |value|
+              write_store_attribute(store_attribute, key, value)
+            end
+
+            define_method(accessor_key) do
+              read_store_attribute(store_attribute, key)
+            end
+
+            define_method("#{accessor_key}_changed?") do
+              return false unless attribute_changed?(store_attribute)
+              prev_store, new_store = changes[store_attribute]
+              prev_store&.dig(key) != new_store&.dig(key)
+            end
+
+            define_method("#{accessor_key}_change") do
+              return unless attribute_changed?(store_attribute)
+              prev_store, new_store = changes[store_attribute]
+              [prev_store&.dig(key), new_store&.dig(key)]
+            end
+
+            define_method("#{accessor_key}_was") do
+              return unless attribute_changed?(store_attribute)
+              prev_store, _new_store = changes[store_attribute]
+              prev_store&.dig(key)
+            end
+
+            define_method("saved_change_to_#{accessor_key}?") do
+              return false unless saved_change_to_attribute?(store_attribute)
+              prev_store, new_store = saved_changes[store_attribute]
+              prev_store&.dig(key) != new_store&.dig(key)
+            end
+
+            define_method("saved_change_to_#{accessor_key}") do
+              return unless saved_change_to_attribute?(store_attribute)
+              prev_store, new_store = saved_changes[store_attribute]
+              [prev_store&.dig(key), new_store&.dig(key)]
+            end
+
+            define_method("#{accessor_key}_before_last_save") do
+              return unless saved_change_to_attribute?(store_attribute)
+              prev_store, _new_store = saved_changes[store_attribute]
+              prev_store&.dig(key)
+            end
+          end
+        end
+
+        # assign new store attribute and create new hash to ensure that each class in the hierarchy
+        # has its own hash of stored attributes.
+        self.local_stored_attributes ||= {}
+        self.local_stored_attributes[store_attribute] ||= []
+        self.local_stored_attributes[store_attribute] |= keys
+      end
- -
-
# File activerecord/lib/active_record/store.rb, line 112
-def store_accessor(store_attribute, *keys, prefix: nil, suffix: nil)
-  keys = keys.flatten
-
-  accessor_prefix =
-    case prefix
-    when String, Symbol
-      "#{prefix}_"
-    when TrueClass
-      "#{store_attribute}_"
-    else
-      ""
-    end
-  accessor_suffix =
-    case suffix
-    when String, Symbol
-      "_#{suffix}"
-    when TrueClass
-      "_#{store_attribute}"
-    else
-      ""
-    end
-
-  _store_accessors_module.module_eval do
-    keys.each do |key|
-      accessor_key = "#{accessor_prefix}#{key}#{accessor_suffix}"
-
-      define_method("#{accessor_key}=") do |value|
-        write_store_attribute(store_attribute, key, value)
-      end
-
-      define_method(accessor_key) do
-        read_store_attribute(store_attribute, key)
-      end
-
-      define_method("#{accessor_key}_changed?") do
-        return false unless attribute_changed?(store_attribute)
-        prev_store, new_store = changes[store_attribute]
-        prev_store&.dig(key) != new_store&.dig(key)
-      end
-
-      define_method("#{accessor_key}_change") do
-        return unless attribute_changed?(store_attribute)
-        prev_store, new_store = changes[store_attribute]
-        [prev_store&.dig(key), new_store&.dig(key)]
-      end
-
-      define_method("#{accessor_key}_was") do
-        return unless attribute_changed?(store_attribute)
-        prev_store, _new_store = changes[store_attribute]
-        prev_store&.dig(key)
-      end
-
-      define_method("saved_change_to_#{accessor_key}?") do
-        return false unless saved_change_to_attribute?(store_attribute)
-        prev_store, new_store = saved_changes[store_attribute]
-        prev_store&.dig(key) != new_store&.dig(key)
-      end
-
-      define_method("saved_change_to_#{accessor_key}") do
-        return unless saved_change_to_attribute?(store_attribute)
-        prev_store, new_store = saved_changes[store_attribute]
-        [prev_store&.dig(key), new_store&.dig(key)]
-      end
-
-      define_method("#{accessor_key}_before_last_save") do
-        return unless saved_change_to_attribute?(store_attribute)
-        prev_store, _new_store = saved_changes[store_attribute]
-        prev_store&.dig(key)
-      end
-    end
-  end
-
-  # assign new store attribute and create new hash to ensure that each class in the hierarchy
-  # has its own hash of stored attributes.
-  self.local_stored_attributes ||= {}
-  self.local_stored_attributes[store_attribute] ||= []
-  self.local_stored_attributes[store_attribute] |= keys
-end
-
-
- -

+ See on GitHub + + + +

@@ -230,26 +230,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/store.rb, line 199
+      def stored_attributes
+        parent = superclass.respond_to?(:stored_attributes) ? superclass.stored_attributes : {}
+        if local_stored_attributes
+          parent.merge!(local_stored_attributes) { |k, a, b| a | b }
+        end
+        parent
+      end
- -
-
# File activerecord/lib/active_record/store.rb, line 199
-def stored_attributes
-  parent = superclass.respond_to?(:stored_attributes) ? superclass.stored_attributes : {}
-  if local_stored_attributes
-    parent.merge!(local_stored_attributes) { |k, a, b| a | b }
-  end
-  parent
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Suppressor/ClassMethods.html b/src/classes/ActiveRecord/Suppressor/ClassMethods.html index 8cf929395a..3f0f7dd77b 100644 --- a/src/classes/ActiveRecord/Suppressor/ClassMethods.html +++ b/src/classes/ActiveRecord/Suppressor/ClassMethods.html @@ -75,26 +75,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/suppressor.rb, line 42
+      def suppress(&block)
+        previous_state = Suppressor.registry[name]
+        Suppressor.registry[name] = true
+        yield
+      ensure
+        Suppressor.registry[name] = previous_state
+      end
- -
-
# File activerecord/lib/active_record/suppressor.rb, line 42
-def suppress(&block)
-  previous_state = Suppressor.registry[name]
-  Suppressor.registry[name] = true
-  yield
-ensure
-  Suppressor.registry[name] = previous_state
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Tasks/DatabaseTasks.html b/src/classes/ActiveRecord/Tasks/DatabaseTasks.html index a931cd1637..21fd547b02 100644 --- a/src/classes/ActiveRecord/Tasks/DatabaseTasks.html +++ b/src/classes/ActiveRecord/Tasks/DatabaseTasks.html @@ -355,21 +355,21 @@

- -
- - -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 50
-mattr_accessor :structure_dump_flags, instance_accessor: false
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 50
+      mattr_accessor :structure_dump_flags, instance_accessor: false
 
-
-
- - + + See on GitHub + + + +

@@ -389,21 +389,21 @@

- -
- - -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 56
-mattr_accessor :structure_load_flags, instance_accessor: false
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 56
+      mattr_accessor :structure_load_flags, instance_accessor: false
 
-
-
- -

+ + See on GitHub + + + + @@ -427,28 +427,28 @@

- -
- - -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 440
-def cache_dump_filename(db_config_name, schema_cache_path: nil)
-  filename = if ActiveRecord::Base.configurations.primary?(db_config_name)
-    "schema_cache.yml"
-  else
-    "#{db_config_name}_schema_cache.yml"
-  end
+          
+            
+ + Source code + - schema_cache_path || ENV["SCHEMA_CACHE"] || File.join(ActiveRecord::Tasks::DatabaseTasks.db_dir, filename) -end
-
-
- - +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 440
+      def cache_dump_filename(db_config_name, schema_cache_path: nil)
+        filename = if ActiveRecord::Base.configurations.primary?(db_config_name)
+          "schema_cache.yml"
+        else
+          "#{db_config_name}_schema_cache.yml"
+        end
+
+        schema_cache_path || ENV["SCHEMA_CACHE"] || File.join(ActiveRecord::Tasks::DatabaseTasks.db_dir, filename)
+      end
+ + See on GitHub + + + +

@@ -468,23 +468,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 305
+      def charset(configuration, *arguments)
+        db_config = resolve_configuration(configuration)
+        database_adapter_for(db_config, *arguments).charset
+      end
- -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 305
-def charset(configuration, *arguments)
-  db_config = resolve_configuration(configuration)
-  database_adapter_for(db_config, *arguments).charset
-end
-
-
- -

+ See on GitHub + + + +

@@ -504,23 +504,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 300
+      def charset_current(env_name = env, db_name = name)
+        db_config = configs_for(env_name: env_name, name: db_name)
+        charset(db_config)
+      end
- -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 300
-def charset_current(env_name = env, db_name = name)
-  db_config = configs_for(env_name: env_name, name: db_name)
-  charset(db_config)
-end
-
-
- -

+ See on GitHub + + + +

@@ -540,26 +540,26 @@

- -
- - -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 65
-def check_protected_environments!(environment = env)
-  return if ENV["DISABLE_DATABASE_ENVIRONMENT_CHECK"]
+          
+            
+ + Source code + - configs_for(env_name: environment).each do |db_config| - check_current_protected_environment!(db_config) - end -end
-
-
- -

+
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 65
+      def check_protected_environments!(environment = env)
+        return if ENV["DISABLE_DATABASE_ENVIRONMENT_CHECK"]
+
+        configs_for(env_name: environment).each do |db_config|
+          check_current_protected_environment!(db_config)
+        end
+      end
+ + See on GitHub + + + +

@@ -579,26 +579,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 458
+      def check_schema_file(filename)
+        unless File.exist?(filename)
+          message = +%{#{filename} doesn't exist yet. Run `bin/rails db:migrate` to create it, then try again.}
+          message << %{ If you do not intend to use a database, you should instead alter #{Rails.root}/config/application.rb to limit the frameworks that will be loaded.} if defined?(::Rails.root)
+          Kernel.abort message
+        end
+      end
- -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 458
-def check_schema_file(filename)
-  unless File.exist?(filename)
-    message = +%{#{filename} doesn't exist yet. Run `bin/rails db:migrate` to create it, then try again.}
-    message << %{ If you do not intend to use a database, you should instead alter #{Rails.root}/config/application.rb to limit the frameworks that will be loaded.} if defined?(::Rails.root)
-    Kernel.abort message
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -618,24 +618,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 290
+      def check_target_version
+        if target_version && !Migration.valid_version_format?(ENV["VERSION"])
+          raise "Invalid format of target version: `VERSION=#{ENV['VERSION']}`"
+        end
+      end
- -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 290
-def check_target_version
-  if target_version && !Migration.valid_version_format?(ENV["VERSION"])
-    raise "Invalid format of target version: `VERSION=#{ENV['VERSION']}`"
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -655,22 +655,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 484
+      def clear_schema_cache(filename)
+        FileUtils.rm_f filename, verbose: false
+      end
- -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 484
-def clear_schema_cache(filename)
-  FileUtils.rm_f filename, verbose: false
-end
-
-
- -

+ See on GitHub + + + +

@@ -690,23 +690,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 315
+      def collation(configuration, *arguments)
+        db_config = resolve_configuration(configuration)
+        database_adapter_for(db_config, *arguments).collation
+      end
- -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 315
-def collation(configuration, *arguments)
-  db_config = resolve_configuration(configuration)
-  database_adapter_for(db_config, *arguments).collation
-end
-
-
- -

+ See on GitHub + + + +

@@ -726,23 +726,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 310
+      def collation_current(env_name = env, db_name = name)
+        db_config = configs_for(env_name: env_name, name: db_name)
+        collation(db_config)
+      end
- -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 310
-def collation_current(env_name = env, db_name = name)
-  db_config = configs_for(env_name: env_name, name: db_name)
-  collation(db_config)
-end
-
-
- -

+ See on GitHub + + + +

@@ -762,30 +762,30 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 115
+      def create(configuration, *arguments)
+        db_config = resolve_configuration(configuration)
+        database_adapter_for(db_config, *arguments).create
+        $stdout.puts "Created database '#{db_config.database}'" if verbose?
+      rescue DatabaseAlreadyExists
+        $stderr.puts "Database '#{db_config.database}' already exists" if verbose?
+      rescue Exception => error
+        $stderr.puts error
+        $stderr.puts "Couldn't create '#{db_config.database}' database. Please check your configuration."
+        raise
+      end
- -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 115
-def create(configuration, *arguments)
-  db_config = resolve_configuration(configuration)
-  database_adapter_for(db_config, *arguments).create
-  $stdout.puts "Created database '#{db_config.database}'" if verbose?
-rescue DatabaseAlreadyExists
-  $stderr.puts "Database '#{db_config.database}' already exists" if verbose?
-rescue Exception => error
-  $stderr.puts error
-  $stderr.puts "Couldn't create '#{db_config.database}' database. Please check your configuration."
-  raise
-end
-
-
- -

+ See on GitHub + + + +

@@ -805,26 +805,26 @@

- -
- - -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 127
-def create_all
-  db_config = migration_connection.pool.db_config
+          
+            
+ + Source code + - each_local_configuration { |db_config| create(db_config) } +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 127
+      def create_all
+        db_config = migration_connection.pool.db_config
 
-  migration_class.establish_connection(db_config)
-end
-
-
- -

+ each_local_configuration { |db_config| create(db_config) } + + migration_class.establish_connection(db_config) + end + + See on GitHub + + + +

@@ -844,24 +844,24 @@

- -
- - -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 170
-def create_current(environment = env, name = nil)
-  each_current_configuration(environment, name) { |db_config| create(db_config) }
+          
+            
+ + Source code + - migration_class.establish_connection(environment.to_sym) -end
-
-
- -

+
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 170
+      def create_current(environment = env, name = nil)
+        each_current_configuration(environment, name) { |db_config| create(db_config) }
+
+        migration_class.establish_connection(environment.to_sym)
+      end
+ + See on GitHub + + + +

@@ -881,22 +881,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 83
+      def db_dir
+        @db_dir ||= Rails.application.config.paths["db"].first
+      end
- -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 83
-def db_dir
-  @db_dir ||= Rails.application.config.paths["db"].first
-end
-
-
- -

+ See on GitHub + + + +

@@ -916,30 +916,30 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 204
+      def drop(configuration, *arguments)
+        db_config = resolve_configuration(configuration)
+        database_adapter_for(db_config, *arguments).drop
+        $stdout.puts "Dropped database '#{db_config.database}'" if verbose?
+      rescue ActiveRecord::NoDatabaseError
+        $stderr.puts "Database '#{db_config.database}' does not exist"
+      rescue Exception => error
+        $stderr.puts error
+        $stderr.puts "Couldn't drop database '#{db_config.database}'"
+        raise
+      end
- -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 204
-def drop(configuration, *arguments)
-  db_config = resolve_configuration(configuration)
-  database_adapter_for(db_config, *arguments).drop
-  $stdout.puts "Dropped database '#{db_config.database}'" if verbose?
-rescue ActiveRecord::NoDatabaseError
-  $stderr.puts "Database '#{db_config.database}' does not exist"
-rescue Exception => error
-  $stderr.puts error
-  $stderr.puts "Couldn't drop database '#{db_config.database}'"
-  raise
-end
-
-
- -

+ See on GitHub + + + +

@@ -959,22 +959,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 216
+      def drop_all
+        each_local_configuration { |db_config| drop(db_config) }
+      end
- -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 216
-def drop_all
-  each_local_configuration { |db_config| drop(db_config) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -994,22 +994,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 220
+      def drop_current(environment = env)
+        each_current_configuration(environment) { |db_config| drop(db_config) }
+      end
- -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 220
-def drop_current(environment = env)
-  each_current_configuration(environment) { |db_config| drop(db_config) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -1034,22 +1034,22 @@

Examples

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 480
+      def dump_schema_cache(conn, filename)
+        conn.schema_cache.dump_to(filename)
+      end
- -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 480
-def dump_schema_cache(conn, filename)
-  conn.schema_cache.dump_to(filename)
-end
-
-
- -
+ See on GitHub + + + +

@@ -1069,22 +1069,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 103
+      def env
+        @env ||= Rails.env
+      end
- -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 103
-def env
-  @env ||= Rails.env
-end
-
-
- -

+ See on GitHub + + + +

@@ -1104,26 +1104,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 91
+      def fixtures_path
+        @fixtures_path ||= if ENV["FIXTURES_PATH"]
+          File.join(root, ENV["FIXTURES_PATH"])
+        else
+          File.join(root, "test", "fixtures")
+        end
+      end
- -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 91
-def fixtures_path
-  @fixtures_path ||= if ENV["FIXTURES_PATH"]
-    File.join(root, ENV["FIXTURES_PATH"])
-  else
-    File.join(root, "test", "fixtures")
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1143,26 +1143,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 450
+      def load_schema_current(format = ActiveRecord.schema_format, file = nil, environment = env)
+        each_current_configuration(environment) do |db_config|
+          with_temporary_connection(db_config) do
+            load_schema(db_config, format, file)
+          end
+        end
+      end
- -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 450
-def load_schema_current(format = ActiveRecord.schema_format, file = nil, environment = env)
-  each_current_configuration(environment) do |db_config|
-    with_temporary_connection(db_config) do
-      load_schema(db_config, format, file)
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1182,28 +1182,28 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 466
+      def load_seed
+        if seed_loader
+          seed_loader.load_seed
+        else
+          raise "You tried to load seed data, but no seed loader is specified. Please specify seed " \
+                "loader with ActiveRecord::Tasks::DatabaseTasks.seed_loader = your_seed_loader\n" \
+                "Seed loader should respond to load_seed method"
+        end
+      end
- -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 466
-def load_seed
-  if seed_loader
-    seed_loader.load_seed
-  else
-    raise "You tried to load seed data, but no seed loader is specified. Please specify seed " \
-          "loader with ActiveRecord::Tasks::DatabaseTasks.seed_loader = your_seed_loader\n" \
-          "Seed loader should respond to load_seed method"
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1223,39 +1223,39 @@

- -
- - -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 237
-def migrate(version = nil)
-  scope = ENV["SCOPE"]
-  verbose_was, Migration.verbose = Migration.verbose, verbose?
+          
+            
+ + Source code + - check_target_version +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 237
+      def migrate(version = nil)
+        scope = ENV["SCOPE"]
+        verbose_was, Migration.verbose = Migration.verbose, verbose?
 
-  migration_connection.migration_context.migrate(target_version) do |migration|
-    if version.blank?
-      scope.blank? || scope == migration.scope
-    else
-      migration.version == version
-    end
-  end.tap do |migrations_ran|
-    Migration.write("No migrations ran. (using #{scope} scope)") if scope.present? && migrations_ran.empty?
-  end
+        check_target_version
 
-  migration_connection.schema_cache.clear!
-ensure
-  Migration.verbose = verbose_was
-end
-
-
- -

+ migration_connection.migration_context.migrate(target_version) do |migration| + if version.blank? + scope.blank? || scope == migration.scope + else + migration.version == version + end + end.tap do |migrations_ran| + Migration.write("No migrations ran. (using #{scope} scope)") if scope.present? && migrations_ran.empty? + end + + migration_connection.schema_cache.clear! + ensure + Migration.verbose = verbose_was + end + + See on GitHub + + + +

@@ -1275,33 +1275,33 @@

- -
- - -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 275
-def migrate_status
-  unless migration_connection.schema_migration.table_exists?
-    Kernel.abort "Schema migrations table does not exist yet."
-  end
+          
+            
+ + Source code + - # output - puts "\ndatabase: #{migration_connection.pool.db_config.database}\n\n" - puts "#{'Status'.center(8)} #{'Migration ID'.ljust(14)} Migration Name" - puts "-" * 50 - migration_connection.migration_context.migrations_status.each do |status, version, name| - puts "#{status.center(8)} #{version.ljust(14)} #{name}" - end - puts -end
-
-
- -

+
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 275
+      def migrate_status
+        unless migration_connection.schema_migration.table_exists?
+          Kernel.abort "Schema migrations table does not exist yet."
+        end
+
+        # output
+        puts "\ndatabase: #{migration_connection.pool.db_config.database}\n\n"
+        puts "#{'Status'.center(8)}  #{'Migration ID'.ljust(14)}  Migration Name"
+        puts "-" * 50
+        migration_connection.migration_context.migrations_status.each do |status, version, name|
+          puts "#{status.center(8)}  #{version.ljust(14)}  #{name}"
+        end
+        puts
+      end
+ + See on GitHub + + + +

@@ -1321,22 +1321,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 87
+      def migrations_paths
+        @migrations_paths ||= Rails.application.paths["db/migrate"].to_a
+      end
- -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 87
-def migrations_paths
-  @migrations_paths ||= Rails.application.paths["db/migrate"].to_a
-end
-
-
- -

+ See on GitHub + + + +

@@ -1356,22 +1356,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 107
+      def name
+        @name ||= "primary"
+      end
- -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 107
-def name
-  @name ||= "primary"
-end
-
-
- -

+ See on GitHub + + + +

@@ -1391,46 +1391,46 @@

- -
- - -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 176
-def prepare_all
-  seed = false
+          
+            
+ + Source code + - each_current_configuration(env) do |db_config| - with_temporary_pool(db_config) do - begin - database_initialized = migration_connection.schema_migration.table_exists? - rescue ActiveRecord::NoDatabaseError - create(db_config) - retry - end +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 176
+      def prepare_all
+        seed = false
 
-      unless database_initialized
-        if File.exist?(schema_dump_path(db_config))
-          load_schema(db_config, ActiveRecord.schema_format, nil)
-        end
+        each_current_configuration(env) do |db_config|
+          with_temporary_pool(db_config) do
+            begin
+              database_initialized = migration_connection.schema_migration.table_exists?
+            rescue ActiveRecord::NoDatabaseError
+              create(db_config)
+              retry
+            end
 
-        seed = true
-      end
+            unless database_initialized
+              if File.exist?(schema_dump_path(db_config))
+                load_schema(db_config, ActiveRecord.schema_format, nil)
+              end
 
-      migrate
-      dump_schema(db_config) if ActiveRecord.dump_schema_after_migration
-    end
-  end
+              seed = true
+            end
 
-  load_seed if seed
-end
-
-
- -

+ migrate + dump_schema(db_config) if ActiveRecord.dump_schema_after_migration + end + end + + load_seed if seed + end + + See on GitHub + + + +

@@ -1450,23 +1450,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 320
+      def purge(configuration)
+        db_config = resolve_configuration(configuration)
+        database_adapter_for(db_config).purge
+      end
- -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 320
-def purge(configuration)
-  db_config = resolve_configuration(configuration)
-  database_adapter_for(db_config).purge
-end
-
-
- -

+ See on GitHub + + + +

@@ -1486,22 +1486,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 325
+      def purge_all
+        each_local_configuration { |db_config| purge(db_config) }
+      end
- -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 325
-def purge_all
-  each_local_configuration { |db_config| purge(db_config) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -1521,24 +1521,24 @@

- -
- - -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 329
-def purge_current(environment = env)
-  each_current_configuration(environment) { |db_config| purge(db_config) }
+          
+            
+ + Source code + - migration_class.establish_connection(environment.to_sym) -end
-
-
- -

+
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 329
+      def purge_current(environment = env)
+        each_current_configuration(environment) { |db_config| purge(db_config) }
+
+        migration_class.establish_connection(environment.to_sym)
+      end
+ + See on GitHub + + + +

@@ -1558,23 +1558,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 73
+      def register_task(pattern, task)
+        @tasks ||= {}
+        @tasks[pattern] = task
+      end
- -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 73
-def register_task(pattern, task)
-  @tasks ||= {}
-  @tasks[pattern] = task
-end
-
-
- -

+ See on GitHub + + + +

@@ -1594,22 +1594,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 99
+      def root
+        @root ||= Rails.root
+      end
- -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 99
-def root
-  @root ||= Rails.root
-end
-
-
- -

+ See on GitHub + + + +

@@ -1629,31 +1629,31 @@

- -
- - -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 427
-def schema_dump_path(db_config, format = ActiveRecord.schema_format)
-  return ENV["SCHEMA"] if ENV["SCHEMA"]
+          
+            
+ + Source code + - filename = db_config.schema_dump(format) - return unless filename +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 427
+      def schema_dump_path(db_config, format = ActiveRecord.schema_format)
+        return ENV["SCHEMA"] if ENV["SCHEMA"]
 
-  if File.dirname(filename) == ActiveRecord::Tasks::DatabaseTasks.db_dir
-    filename
-  else
-    File.join(ActiveRecord::Tasks::DatabaseTasks.db_dir, filename)
-  end
-end
-
-
- -

+ filename = db_config.schema_dump(format) + return unless filename + + if File.dirname(filename) == ActiveRecord::Tasks::DatabaseTasks.db_dir + filename + else + File.join(ActiveRecord::Tasks::DatabaseTasks.db_dir, filename) + end + end + + See on GitHub + + + +

@@ -1673,33 +1673,33 @@

- -
- - -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 370
-def schema_up_to_date?(configuration, format = ActiveRecord.schema_format, file = nil)
-  db_config = resolve_configuration(configuration)
+          
+            
+ + Source code + - file ||= schema_dump_path(db_config) +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 370
+      def schema_up_to_date?(configuration, format = ActiveRecord.schema_format, file = nil)
+        db_config = resolve_configuration(configuration)
 
-  return true unless file && File.exist?(file)
+        file ||= schema_dump_path(db_config)
 
-  with_temporary_connection(db_config) do |connection|
-    return false unless connection.internal_metadata.enabled?
-    return false unless connection.internal_metadata.table_exists?
+        return true unless file && File.exist?(file)
 
-    connection.internal_metadata[:schema_sha1] == schema_sha1(file)
-  end
-end
-
-
- -

+ with_temporary_connection(db_config) do |connection| + return false unless connection.internal_metadata.enabled? + return false unless connection.internal_metadata.table_exists? + + connection.internal_metadata[:schema_sha1] == schema_sha1(file) + end + end + + See on GitHub + + + +

@@ -1719,22 +1719,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 111
+      def seed_loader
+        @seed_loader ||= Rails.application
+      end
- -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 111
-def seed_loader
-  @seed_loader ||= Rails.application
-end
-
-
- -

+ See on GitHub + + + +

@@ -1754,25 +1754,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 335
+      def structure_dump(configuration, *arguments)
+        db_config = resolve_configuration(configuration)
+        filename = arguments.delete_at(0)
+        flags = structure_dump_flags_for(db_config.adapter)
+        database_adapter_for(db_config, *arguments).structure_dump(filename, flags)
+      end
- -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 335
-def structure_dump(configuration, *arguments)
-  db_config = resolve_configuration(configuration)
-  filename = arguments.delete_at(0)
-  flags = structure_dump_flags_for(db_config.adapter)
-  database_adapter_for(db_config, *arguments).structure_dump(filename, flags)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1792,25 +1792,25 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 342
+      def structure_load(configuration, *arguments)
+        db_config = resolve_configuration(configuration)
+        filename = arguments.delete_at(0)
+        flags = structure_load_flags_for(db_config.adapter)
+        database_adapter_for(db_config, *arguments).structure_load(filename, flags)
+      end
- -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 342
-def structure_load(configuration, *arguments)
-  db_config = resolve_configuration(configuration)
-  filename = arguments.delete_at(0)
-  flags = structure_load_flags_for(db_config.adapter)
-  database_adapter_for(db_config, *arguments).structure_load(filename, flags)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1830,22 +1830,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 296
+      def target_version
+        ENV["VERSION"].to_i if ENV["VERSION"] && !ENV["VERSION"].empty?
+      end
- -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 296
-def target_version
-  ENV["VERSION"].to_i if ENV["VERSION"] && !ENV["VERSION"].empty?
-end
-
-
- -

+ See on GitHub + + + +

@@ -1865,24 +1865,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 231
+      def truncate_all(environment = env)
+        configs_for(env_name: environment).each do |db_config|
+          truncate_tables(db_config)
+        end
+      end
- -
-
# File activerecord/lib/active_record/tasks/database_tasks.rb, line 231
-def truncate_all(environment = env)
-  configs_for(env_name: environment).each do |db_config|
-    truncate_tables(db_config)
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/TestFixtures.html b/src/classes/ActiveRecord/TestFixtures.html index 6975337bc5..16ceb19616 100644 --- a/src/classes/ActiveRecord/TestFixtures.html +++ b/src/classes/ActiveRecord/TestFixtures.html @@ -107,20 +107,10 @@

- -
- - -
-
# File activerecord/lib/active_record/test_fixtures.rb, line 21
-      
-
-
- - + + See on GitHub + +

@@ -140,21 +130,21 @@

- -
- - -
-
# File activerecord/lib/active_record/test_fixtures.rb, line 30
-class_attribute :fixture_paths, instance_writer: false, default: []
+          
+            
+ + Source code + + +
# File activerecord/lib/active_record/test_fixtures.rb, line 30
+      class_attribute :fixture_paths, instance_writer: false, default: []
 
-
-
- -

+ + See on GitHub + + + + @@ -178,24 +168,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/test_fixtures.rb, line 205
+    def enlist_fixture_connections
+      setup_shared_connection_pool
+
+      ActiveRecord::Base.connection_handler.connection_pool_list(:writing).map(&:connection)
+    end
- -
-
# File activerecord/lib/active_record/test_fixtures.rb, line 205
-def enlist_fixture_connections
-  setup_shared_connection_pool
-
-  ActiveRecord::Base.connection_handler.connection_pool_list(:writing).map(&:connection)
-end
-
-
- - + See on GitHub + + + +

@@ -215,23 +205,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/test_fixtures.rb, line 121
+    def run_in_transaction?
+      use_transactional_tests &&
+        !self.class.uses_transaction?(name)
+    end
- -
-
# File activerecord/lib/active_record/test_fixtures.rb, line 121
-def run_in_transaction?
-  use_transactional_tests &&
-    !self.class.uses_transaction?(name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -251,80 +241,80 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/test_fixtures.rb, line 126
+    def setup_fixtures(config = ActiveRecord::Base)
+      if pre_loaded_fixtures && !use_transactional_tests
+        raise RuntimeError, "pre_loaded_fixtures requires use_transactional_tests"
+      end
+
+      @fixture_cache = {}
+      @fixture_connections = []
+      @@already_loaded_fixtures ||= {}
+      @connection_subscriber = nil
+      @saved_pool_configs = Hash.new { |hash, key| hash[key] = {} }
+
+      # Load fixtures once and begin transaction.
+      if run_in_transaction?
+        if @@already_loaded_fixtures[self.class]
+          @loaded_fixtures = @@already_loaded_fixtures[self.class]
+        else
+          @loaded_fixtures = load_fixtures(config)
+          @@already_loaded_fixtures[self.class] = @loaded_fixtures
+        end
+
+        # Begin transactions for connections already established
+        @fixture_connections = enlist_fixture_connections
+        @fixture_connections.each do |connection|
+          connection.begin_transaction joinable: false, _lazy: false
+          connection.pool.lock_thread = true if lock_threads
+        end
+
+        # When connections are established in the future, begin a transaction too
+        @connection_subscriber = ActiveSupport::Notifications.subscribe("!connection.active_record") do |_, _, _, _, payload|
+          connection_name = payload[:connection_name] if payload.key?(:connection_name)
+          shard = payload[:shard] if payload.key?(:shard)
+
+          if connection_name
+            begin
+              connection = ActiveRecord::Base.connection_handler.retrieve_connection(connection_name, shard: shard)
+            rescue ConnectionNotEstablished
+              connection = nil
+            end
+
+            if connection
+              setup_shared_connection_pool
+
+              if !@fixture_connections.include?(connection)
+                connection.begin_transaction joinable: false, _lazy: false
+                connection.pool.lock_thread = true if lock_threads
+                @fixture_connections << connection
+              end
+            end
+          end
+        end
+
+      # Load fixtures for every test.
+      else
+        ActiveRecord::FixtureSet.reset_cache
+        @@already_loaded_fixtures[self.class] = nil
+        @loaded_fixtures = load_fixtures(config)
+      end
+
+      # Instantiate fixtures for every test if requested.
+      instantiate_fixtures if use_instantiated_fixtures
+    end
- -
-
# File activerecord/lib/active_record/test_fixtures.rb, line 126
-def setup_fixtures(config = ActiveRecord::Base)
-  if pre_loaded_fixtures && !use_transactional_tests
-    raise RuntimeError, "pre_loaded_fixtures requires use_transactional_tests"
-  end
-
-  @fixture_cache = {}
-  @fixture_connections = []
-  @@already_loaded_fixtures ||= {}
-  @connection_subscriber = nil
-  @saved_pool_configs = Hash.new { |hash, key| hash[key] = {} }
-
-  # Load fixtures once and begin transaction.
-  if run_in_transaction?
-    if @@already_loaded_fixtures[self.class]
-      @loaded_fixtures = @@already_loaded_fixtures[self.class]
-    else
-      @loaded_fixtures = load_fixtures(config)
-      @@already_loaded_fixtures[self.class] = @loaded_fixtures
-    end
-
-    # Begin transactions for connections already established
-    @fixture_connections = enlist_fixture_connections
-    @fixture_connections.each do |connection|
-      connection.begin_transaction joinable: false, _lazy: false
-      connection.pool.lock_thread = true if lock_threads
-    end
-
-    # When connections are established in the future, begin a transaction too
-    @connection_subscriber = ActiveSupport::Notifications.subscribe("!connection.active_record") do |_, _, _, _, payload|
-      connection_name = payload[:connection_name] if payload.key?(:connection_name)
-      shard = payload[:shard] if payload.key?(:shard)
-
-      if connection_name
-        begin
-          connection = ActiveRecord::Base.connection_handler.retrieve_connection(connection_name, shard: shard)
-        rescue ConnectionNotEstablished
-          connection = nil
-        end
-
-        if connection
-          setup_shared_connection_pool
-
-          if !@fixture_connections.include?(connection)
-            connection.begin_transaction joinable: false, _lazy: false
-            connection.pool.lock_thread = true if lock_threads
-            @fixture_connections << connection
-          end
-        end
-      end
-    end
-
-  # Load fixtures for every test.
-  else
-    ActiveRecord::FixtureSet.reset_cache
-    @@already_loaded_fixtures[self.class] = nil
-    @loaded_fixtures = load_fixtures(config)
-  end
-
-  # Instantiate fixtures for every test if requested.
-  instantiate_fixtures if use_instantiated_fixtures
-end
-
-
- -

+ See on GitHub + + + +

@@ -344,35 +334,35 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/test_fixtures.rb, line 188
+    def teardown_fixtures
+      # Rollback changes if a transaction is active.
+      if run_in_transaction?
+        ActiveSupport::Notifications.unsubscribe(@connection_subscriber) if @connection_subscriber
+        @fixture_connections.each do |connection|
+          connection.rollback_transaction if connection.transaction_open?
+          connection.pool.lock_thread = false
+        end
+        @fixture_connections.clear
+        teardown_shared_connection_pool
+      else
+        ActiveRecord::FixtureSet.reset_cache
+      end
+
+      ActiveRecord::Base.connection_handler.clear_active_connections!(:all)
+    end
- -
-
# File activerecord/lib/active_record/test_fixtures.rb, line 188
-def teardown_fixtures
-  # Rollback changes if a transaction is active.
-  if run_in_transaction?
-    ActiveSupport::Notifications.unsubscribe(@connection_subscriber) if @connection_subscriber
-    @fixture_connections.each do |connection|
-      connection.rollback_transaction if connection.transaction_open?
-      connection.pool.lock_thread = false
-    end
-    @fixture_connections.clear
-    teardown_shared_connection_pool
-  else
-    ActiveRecord::FixtureSet.reset_cache
-  end
-
-  ActiveRecord::Base.connection_handler.clear_active_connections!(:all)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/TestFixtures/ClassMethods.html b/src/classes/ActiveRecord/TestFixtures/ClassMethods.html index 022c0a5f24..26e6265465 100644 --- a/src/classes/ActiveRecord/TestFixtures/ClassMethods.html +++ b/src/classes/ActiveRecord/TestFixtures/ClassMethods.html @@ -91,34 +91,34 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/test_fixtures.rb, line 69
+      def fixtures(*fixture_set_names)
+        if fixture_set_names.first == :all
+          raise StandardError, "No fixture path found. Please set `#{self}.fixture_paths`." if fixture_paths.blank?
+          fixture_set_names = fixture_paths.flat_map do |path|
+            names = Dir[::File.join(path, "{**,*}/*.{yml}")].uniq
+            names.reject! { |f| f.start_with?(file_fixture_path.to_s) } if defined?(file_fixture_path) && file_fixture_path
+            names.map! { |f| f[path.to_s.size..-5].delete_prefix("/") }
+          end.uniq
+        else
+          fixture_set_names = fixture_set_names.flatten.map(&:to_s)
+        end
+
+        self.fixture_table_names |= fixture_set_names
+        setup_fixture_accessors(fixture_set_names)
+      end
- -
-
# File activerecord/lib/active_record/test_fixtures.rb, line 69
-def fixtures(*fixture_set_names)
-  if fixture_set_names.first == :all
-    raise StandardError, "No fixture path found. Please set `#{self}.fixture_paths`." if fixture_paths.blank?
-    fixture_set_names = fixture_paths.flat_map do |path|
-      names = Dir[::File.join(path, "{**,*}/*.{yml}")].uniq
-      names.reject! { |f| f.start_with?(file_fixture_path.to_s) } if defined?(file_fixture_path) && file_fixture_path
-      names.map! { |f| f[path.to_s.size..-5].delete_prefix("/") }
-    end.uniq
-  else
-    fixture_set_names = fixture_set_names.flatten.map(&:to_s)
-  end
-
-  self.fixture_table_names |= fixture_set_names
-  setup_fixture_accessors(fixture_set_names)
-end
-
-
- - + See on GitHub + + + +

@@ -146,22 +146,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/test_fixtures.rb, line 51
+      def set_fixture_class(class_names = {})
+        self.fixture_class_names = fixture_class_names.merge(class_names.stringify_keys)
+      end
- -
-
# File activerecord/lib/active_record/test_fixtures.rb, line 51
-def set_fixture_class(class_names = {})
-  self.fixture_class_names = fixture_class_names.merge(class_names.stringify_keys)
-end
-
-
- -

+ See on GitHub + + + +

@@ -181,31 +181,31 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/test_fixtures.rb, line 85
+      def setup_fixture_accessors(fixture_set_names = nil)
+        fixture_set_names = Array(fixture_set_names || fixture_table_names)
+        unless fixture_set_names.empty?
+          self.fixture_sets = fixture_sets.dup
+          fixture_set_names.each do |fs_name|
+            key = fs_name.to_s.include?("/") ? -fs_name.to_s.tr("/", "_") : fs_name
+            key = -key.to_s if key.is_a?(Symbol)
+            fs_name = -fs_name.to_s if fs_name.is_a?(Symbol)
+            fixture_sets[key] = fs_name
+          end
+        end
+      end
- -
-
# File activerecord/lib/active_record/test_fixtures.rb, line 85
-def setup_fixture_accessors(fixture_set_names = nil)
-  fixture_set_names = Array(fixture_set_names || fixture_table_names)
-  unless fixture_set_names.empty?
-    self.fixture_sets = fixture_sets.dup
-    fixture_set_names.each do |fs_name|
-      key = fs_name.to_s.include?("/") ? -fs_name.to_s.tr("/", "_") : fs_name
-      key = -key.to_s if key.is_a?(Symbol)
-      fs_name = -fs_name.to_s if fs_name.is_a?(Symbol)
-      fixture_sets[key] = fs_name
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -225,23 +225,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/test_fixtures.rb, line 101
+      def uses_transaction(*methods)
+        @uses_transaction = [] unless defined?(@uses_transaction)
+        @uses_transaction.concat methods.map(&:to_s)
+      end
- -
-
# File activerecord/lib/active_record/test_fixtures.rb, line 101
-def uses_transaction(*methods)
-  @uses_transaction = [] unless defined?(@uses_transaction)
-  @uses_transaction.concat methods.map(&:to_s)
-end
-
-
- -

+ See on GitHub + + + +

@@ -261,23 +261,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/test_fixtures.rb, line 106
+      def uses_transaction?(method)
+        @uses_transaction = [] unless defined?(@uses_transaction)
+        @uses_transaction.include?(method.to_s)
+      end
- -
-
# File activerecord/lib/active_record/test_fixtures.rb, line 106
-def uses_transaction?(method)
-  @uses_transaction = [] unless defined?(@uses_transaction)
-  @uses_transaction.include?(method.to_s)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/TokenFor.html b/src/classes/ActiveRecord/TokenFor.html index 12cab95c6d..8b510213ce 100644 --- a/src/classes/ActiveRecord/TokenFor.html +++ b/src/classes/ActiveRecord/TokenFor.html @@ -90,22 +90,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/token_for.rb, line 109
+    def generate_token_for(purpose)
+      self.class.token_definitions.fetch(purpose).generate_token(self)
+    end
- -
-
# File activerecord/lib/active_record/token_for.rb, line 109
-def generate_token_for(purpose)
-  self.class.token_definitions.fetch(purpose).generate_token(self)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/TokenFor/ClassMethods.html b/src/classes/ActiveRecord/TokenFor/ClassMethods.html index 533d4f5ff5..714b9203c0 100644 --- a/src/classes/ActiveRecord/TokenFor/ClassMethods.html +++ b/src/classes/ActiveRecord/TokenFor/ClassMethods.html @@ -83,23 +83,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/token_for.rb, line 90
+      def find_by_token_for(purpose, token)
+        raise UnknownPrimaryKey.new(self) unless primary_key
+        token_definitions.fetch(purpose).resolve_token(token) { |id| find_by(primary_key => id) }
+      end
- -
-
# File activerecord/lib/active_record/token_for.rb, line 90
-def find_by_token_for(purpose, token)
-  raise UnknownPrimaryKey.new(self) unless primary_key
-  token_definitions.fetch(purpose).resolve_token(token) { |id| find_by(primary_key => id) }
-end
-
-
- - + See on GitHub + + + +

@@ -119,23 +119,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/token_for.rb, line 99
+      def find_by_token_for!(purpose, token)
+        token_definitions.fetch(purpose).resolve_token(token) { |id| find(id) } ||
+          (raise ActiveSupport::MessageVerifier::InvalidSignature)
+      end
- -
-
# File activerecord/lib/active_record/token_for.rb, line 99
-def find_by_token_for!(purpose, token)
-  token_definitions.fetch(purpose).resolve_token(token) { |id| find(id) } ||
-    (raise ActiveSupport::MessageVerifier::InvalidSignature)
-end
-
-
- -

+ See on GitHub + + + +

@@ -185,22 +185,22 @@

Examples

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/token_for.rb, line 84
+      def generates_token_for(purpose, expires_in: nil, &block)
+        self.token_definitions = token_definitions.merge(purpose => TokenDefinition.new(self, purpose, expires_in, block))
+      end
- -
-
# File activerecord/lib/active_record/token_for.rb, line 84
-def generates_token_for(purpose, expires_in: nil, &block)
-  self.token_definitions = token_definitions.merge(purpose => TokenDefinition.new(self, purpose, expires_in, block))
-end
-
-
- -
+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/TouchLater.html b/src/classes/ActiveRecord/TouchLater.html deleted file mode 100644 index 393c5f4cc7..0000000000 --- a/src/classes/ActiveRecord/TouchLater.html +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: ActiveRecord::TouchLater -layout: default ---- -
- -
-
- -
- -

Active Record Touch Later

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveRecord/Transactions/ClassMethods.html b/src/classes/ActiveRecord/Transactions/ClassMethods.html index 09d61b8c16..586d75624a 100644 --- a/src/classes/ActiveRecord/Transactions/ClassMethods.html +++ b/src/classes/ActiveRecord/Transactions/ClassMethods.html @@ -248,23 +248,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/transactions.rb, line 232
+      def after_commit(*args, &block)
+        set_options_for_callbacks!(args, prepend_option)
+        set_callback(:commit, :after, *args, &block)
+      end
- -
-
# File activerecord/lib/active_record/transactions.rb, line 232
-def after_commit(*args, &block)
-  set_options_for_callbacks!(args, prepend_option)
-  set_callback(:commit, :after, *args, &block)
-end
-
-
- - + See on GitHub + + + +

@@ -284,23 +284,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/transactions.rb, line 244
+      def after_create_commit(*args, &block)
+        set_options_for_callbacks!(args, on: :create, **prepend_option)
+        set_callback(:commit, :after, *args, &block)
+      end
- -
-
# File activerecord/lib/active_record/transactions.rb, line 244
-def after_create_commit(*args, &block)
-  set_options_for_callbacks!(args, on: :create, **prepend_option)
-  set_callback(:commit, :after, *args, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -320,23 +320,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/transactions.rb, line 256
+      def after_destroy_commit(*args, &block)
+        set_options_for_callbacks!(args, on: :destroy, **prepend_option)
+        set_callback(:commit, :after, *args, &block)
+      end
- -
-
# File activerecord/lib/active_record/transactions.rb, line 256
-def after_destroy_commit(*args, &block)
-  set_options_for_callbacks!(args, on: :destroy, **prepend_option)
-  set_callback(:commit, :after, *args, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -358,23 +358,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/transactions.rb, line 264
+      def after_rollback(*args, &block)
+        set_options_for_callbacks!(args, prepend_option)
+        set_callback(:rollback, :after, *args, &block)
+      end
- -
-
# File activerecord/lib/active_record/transactions.rb, line 264
-def after_rollback(*args, &block)
-  set_options_for_callbacks!(args, prepend_option)
-  set_callback(:rollback, :after, *args, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -394,23 +394,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/transactions.rb, line 238
+      def after_save_commit(*args, &block)
+        set_options_for_callbacks!(args, on: [ :create, :update ], **prepend_option)
+        set_callback(:commit, :after, *args, &block)
+      end
- -
-
# File activerecord/lib/active_record/transactions.rb, line 238
-def after_save_commit(*args, &block)
-  set_options_for_callbacks!(args, on: [ :create, :update ], **prepend_option)
-  set_callback(:commit, :after, *args, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -430,23 +430,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/transactions.rb, line 250
+      def after_update_commit(*args, &block)
+        set_options_for_callbacks!(args, on: :update, **prepend_option)
+        set_callback(:commit, :after, *args, &block)
+      end
- -
-
# File activerecord/lib/active_record/transactions.rb, line 250
-def after_update_commit(*args, &block)
-  set_options_for_callbacks!(args, on: :update, **prepend_option)
-  set_callback(:commit, :after, *args, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -466,22 +466,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/transactions.rb, line 211
+      def transaction(**options, &block)
+        connection.transaction(**options, &block)
+      end
- -
-
# File activerecord/lib/active_record/transactions.rb, line 211
-def transaction(**options, &block)
-  connection.transaction(**options, &block)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Type.html b/src/classes/ActiveRecord/Type.html index f1669d31ea..8f34993e20 100644 --- a/src/classes/ActiveRecord/Type.html +++ b/src/classes/ActiveRecord/Type.html @@ -417,22 +417,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/type.rb, line 37
+      def register(type_name, klass = nil, **options, &block)
+        registry.register(type_name, klass, **options, &block)
+      end
- -
-
# File activerecord/lib/active_record/type.rb, line 37
-def register(type_name, klass = nil, **options, &block)
-  registry.register(type_name, klass, **options, &block)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Type/AdapterSpecificRegistry.html b/src/classes/ActiveRecord/Type/AdapterSpecificRegistry.html deleted file mode 100644 index 9405740b4d..0000000000 --- a/src/classes/ActiveRecord/Type/AdapterSpecificRegistry.html +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: ActiveRecord::Type::AdapterSpecificRegistry -layout: default ---- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveRecord/Type/DecorationRegistration.html b/src/classes/ActiveRecord/Type/DecorationRegistration.html deleted file mode 100644 index 9de3bbce8f..0000000000 --- a/src/classes/ActiveRecord/Type/DecorationRegistration.html +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: ActiveRecord::Type::DecorationRegistration -layout: default ---- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveRecord/Type/Internal/Timezone.html b/src/classes/ActiveRecord/Type/Internal/Timezone.html index 723e54d046..d9605e8639 100644 --- a/src/classes/ActiveRecord/Type/Internal/Timezone.html +++ b/src/classes/ActiveRecord/Type/Internal/Timezone.html @@ -82,23 +82,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/type/internal/timezone.rb, line 7
+        def initialize(timezone: nil, **kwargs)
+          super(**kwargs)
+          @timezone = timezone
+        end
- -
-
# File activerecord/lib/active_record/type/internal/timezone.rb, line 7
-def initialize(timezone: nil, **kwargs)
-  super(**kwargs)
-  @timezone = timezone
-end
-
-
- - + See on GitHub + + + + @@ -122,22 +122,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/type/internal/timezone.rb, line 16
+        def default_timezone
+          @timezone || ActiveRecord.default_timezone
+        end
- -
-
# File activerecord/lib/active_record/type/internal/timezone.rb, line 16
-def default_timezone
-  @timezone || ActiveRecord.default_timezone
-end
-
-
- - + See on GitHub + + + +

@@ -157,22 +157,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/type/internal/timezone.rb, line 12
+        def is_utc?
+          default_timezone == :utc
+        end
- -
-
# File activerecord/lib/active_record/type/internal/timezone.rb, line 12
-def is_utc?
-  default_timezone == :utc
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Type/Json.html b/src/classes/ActiveRecord/Type/Json.html index 26b8ac111a..be86f500a6 100644 --- a/src/classes/ActiveRecord/Type/Json.html +++ b/src/classes/ActiveRecord/Type/Json.html @@ -111,22 +111,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/type/json.rb, line 25
+      def accessor
+        ActiveRecord::Store::StringKeyedHashAccessor
+      end
- -
-
# File activerecord/lib/active_record/type/json.rb, line 25
-def accessor
-  ActiveRecord::Store::StringKeyedHashAccessor
-end
-
-
- - + See on GitHub + + + +

@@ -146,22 +146,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/type/json.rb, line 21
+      def changed_in_place?(raw_old_value, new_value)
+        deserialize(raw_old_value) != new_value
+      end
- -
-
# File activerecord/lib/active_record/type/json.rb, line 21
-def changed_in_place?(raw_old_value, new_value)
-  deserialize(raw_old_value) != new_value
-end
-
-
- -

+ See on GitHub + + + +

@@ -181,23 +181,23 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/type/json.rb, line 12
+      def deserialize(value)
+        return value unless value.is_a?(::String)
+        ActiveSupport::JSON.decode(value) rescue nil
+      end
- -
-
# File activerecord/lib/active_record/type/json.rb, line 12
-def deserialize(value)
-  return value unless value.is_a?(::String)
-  ActiveSupport::JSON.decode(value) rescue nil
-end
-
-
- -

+ See on GitHub + + + +

@@ -217,22 +217,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/type/json.rb, line 17
+      def serialize(value)
+        ActiveSupport::JSON.encode(value) unless value.nil?
+      end
- -
-
# File activerecord/lib/active_record/type/json.rb, line 17
-def serialize(value)
-  ActiveSupport::JSON.encode(value) unless value.nil?
-end
-
-
- -

+ See on GitHub + + + +

@@ -252,22 +252,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/type/json.rb, line 8
+      def type
+        :json
+      end
- -
-
# File activerecord/lib/active_record/type/json.rb, line 8
-def type
-  :json
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Type/Registration.html b/src/classes/ActiveRecord/Type/Registration.html deleted file mode 100644 index e0dbcecf6c..0000000000 --- a/src/classes/ActiveRecord/Type/Registration.html +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: ActiveRecord::Type::Registration -layout: default ---- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveRecord/Type/Time.html b/src/classes/ActiveRecord/Type/Time.html index f494e215df..2bd0a52e66 100644 --- a/src/classes/ActiveRecord/Type/Time.html +++ b/src/classes/ActiveRecord/Type/Time.html @@ -95,27 +95,27 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/type/time.rb, line 11
+      def serialize(value)
+        case value = super
+        when ::Time
+          Value.new(value)
+        else
+          value
+        end
+      end
- -
-
# File activerecord/lib/active_record/type/time.rb, line 11
-def serialize(value)
-  case value = super
-  when ::Time
-    Value.new(value)
-  else
-    value
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/TypeConflictError.html b/src/classes/ActiveRecord/TypeConflictError.html deleted file mode 100644 index 64c1fd37b2..0000000000 --- a/src/classes/ActiveRecord/TypeConflictError.html +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: ActiveRecord::TypeConflictError -layout: default ---- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveRecord/UnknownPrimaryKey.html b/src/classes/ActiveRecord/UnknownPrimaryKey.html index 726937ab28..eb812d0fa7 100644 --- a/src/classes/ActiveRecord/UnknownPrimaryKey.html +++ b/src/classes/ActiveRecord/UnknownPrimaryKey.html @@ -100,29 +100,29 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/errors.rb, line 447
+    def initialize(model = nil, description = nil)
+      if model
+        message = "Unknown primary key for table #{model.table_name} in model #{model}."
+        message += "\n#{description}" if description
+        @model = model
+        super(message)
+      else
+        super("Unknown primary key.")
+      end
+    end
- -
-
# File activerecord/lib/active_record/errors.rb, line 447
-def initialize(model = nil, description = nil)
-  if model
-    message = "Unknown primary key for table #{model.table_name} in model #{model}."
-    message += "\n#{description}" if description
-    @model = model
-    super(message)
-  else
-    super("Unknown primary key.")
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveRecord/Validations.html b/src/classes/ActiveRecord/Validations.html index 7da252dcb1..57d6eefa4d 100644 --- a/src/classes/ActiveRecord/Validations.html +++ b/src/classes/ActiveRecord/Validations.html @@ -136,22 +136,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/validations.rb, line 48
+    def save(**options)
+      perform_validations(options) ? super : false
+    end
- -
-
# File activerecord/lib/active_record/validations.rb, line 48
-def save(**options)
-  perform_validations(options) ? super : false
-end
-
-
- - + See on GitHub + + + +

@@ -171,22 +171,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/validations.rb, line 54
+    def save!(**options)
+      perform_validations(options) ? super : raise_validation_error
+    end
- -
-
# File activerecord/lib/active_record/validations.rb, line 54
-def save!(**options)
-  perform_validations(options) ? super : raise_validation_error
-end
-
-
- -

+ See on GitHub + + + +

@@ -216,24 +216,24 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/validations.rb, line 70
+    def valid?(context = nil)
+      context ||= default_validation_context
+      output = super(context)
+      errors.empty? && output
+    end
- -
-
# File activerecord/lib/active_record/validations.rb, line 70
-def valid?(context = nil)
-  context ||= default_validation_context
-  output = super(context)
-  errors.empty? && output
-end
-
-
- -

+ See on GitHub + + + +

@@ -257,7 +257,8 @@

-

+ + diff --git a/src/classes/ActiveRecord/Validations/ClassMethods.html b/src/classes/ActiveRecord/Validations/ClassMethods.html index 327bcd4b3f..ff21818d86 100644 --- a/src/classes/ActiveRecord/Validations/ClassMethods.html +++ b/src/classes/ActiveRecord/Validations/ClassMethods.html @@ -111,22 +111,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/validations/absence.rb, line 20
+      def validates_absence_of(*attr_names)
+        validates_with AbsenceValidator, _merge_attributes(attr_names)
+      end
- -
-
# File activerecord/lib/active_record/validations/absence.rb, line 20
-def validates_absence_of(*attr_names)
-  validates_with AbsenceValidator, _merge_attributes(attr_names)
-end
-
-
- - + See on GitHub + + + +

@@ -169,22 +169,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/validations/associated.rb, line 54
+      def validates_associated(*attr_names)
+        validates_with AssociatedValidator, _merge_attributes(attr_names)
+      end
- -
-
# File activerecord/lib/active_record/validations/associated.rb, line 54
-def validates_associated(*attr_names)
-  validates_with AssociatedValidator, _merge_attributes(attr_names)
-end
-
-
- -

+ See on GitHub + + + +

@@ -210,22 +210,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/validations/length.rb, line 19
+      def validates_length_of(*attr_names)
+        validates_with LengthValidator, _merge_attributes(attr_names)
+      end
- -
-
# File activerecord/lib/active_record/validations/length.rb, line 19
-def validates_length_of(*attr_names)
-  validates_with LengthValidator, _merge_attributes(attr_names)
-end
-
-
- -

+ See on GitHub + + + +

@@ -247,22 +247,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/validations/numericality.rb, line 31
+      def validates_numericality_of(*attr_names)
+        validates_with NumericalityValidator, _merge_attributes(attr_names)
+      end
- -
-
# File activerecord/lib/active_record/validations/numericality.rb, line 31
-def validates_numericality_of(*attr_names)
-  validates_with NumericalityValidator, _merge_attributes(attr_names)
-end
-
-
- -

+ See on GitHub + + + +

@@ -296,22 +296,22 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/validations/presence.rb, line 40
+      def validates_presence_of(*attr_names)
+        validates_with PresenceValidator, _merge_attributes(attr_names)
+      end
- -
-
# File activerecord/lib/active_record/validations/presence.rb, line 40
-def validates_presence_of(*attr_names)
-  validates_with PresenceValidator, _merge_attributes(attr_names)
-end
-
-
- -

+ See on GitHub + + + +

@@ -335,7 +335,8 @@

-

+ +

@@ -461,22 +462,22 @@

Concur - -
+ +
+ + Source code + + +
# File activerecord/lib/active_record/validations/uniqueness.rb, line 286
+      def validates_uniqueness_of(*attr_names)
+        validates_with UniquenessValidator, _merge_attributes(attr_names)
+      end
- -
-
# File activerecord/lib/active_record/validations/uniqueness.rb, line 286
-def validates_uniqueness_of(*attr_names)
-  validates_with UniquenessValidator, _merge_attributes(attr_names)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveStorage.html b/src/classes/ActiveStorage.html index 67110ed464..55ea373d65 100644 --- a/src/classes/ActiveStorage.html +++ b/src/classes/ActiveStorage.html @@ -606,22 +606,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/gem_version.rb, line 5
+  def self.gem_version
+    Gem::Version.new VERSION::STRING
+  end
- -
-
# File activestorage/lib/active_storage/gem_version.rb, line 5
-def self.gem_version
-  Gem::Version.new VERSION::STRING
-end
-
-
- - + See on GitHub + + + +

@@ -641,22 +641,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage.rb, line 367
+  def self.replace_on_assign_to_many
+    ActiveStorage.deprecator.warn("config.active_storage.replace_on_assign_to_many is deprecated and has no effect.")
+  end
- -
-
# File activestorage/lib/active_storage.rb, line 367
-def self.replace_on_assign_to_many
-  ActiveStorage.deprecator.warn("config.active_storage.replace_on_assign_to_many is deprecated and has no effect.")
-end
-
-
- -

+ See on GitHub + + + +

@@ -676,22 +676,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage.rb, line 371
+  def self.replace_on_assign_to_many=(value)
+    ActiveStorage.deprecator.warn("config.active_storage.replace_on_assign_to_many is deprecated and has no effect.")
+  end
- -
-
# File activestorage/lib/active_storage.rb, line 371
-def self.replace_on_assign_to_many=(value)
-  ActiveStorage.deprecator.warn("config.active_storage.replace_on_assign_to_many is deprecated and has no effect.")
-end
-
-
- -

+ See on GitHub + + + +

@@ -711,22 +711,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage.rb, line 375
+  def self.silence_invalid_content_types_warning
+    ActiveStorage.deprecator.warn("config.active_storage.silence_invalid_content_types_warning is deprecated and has no effect.")
+  end
- -
-
# File activestorage/lib/active_storage.rb, line 375
-def self.silence_invalid_content_types_warning
-  ActiveStorage.deprecator.warn("config.active_storage.silence_invalid_content_types_warning is deprecated and has no effect.")
-end
-
-
- -

+ See on GitHub + + + +

@@ -746,22 +746,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage.rb, line 379
+  def self.silence_invalid_content_types_warning=(value)
+    ActiveStorage.deprecator.warn("config.active_storage.silence_invalid_content_types_warning is deprecated and has no effect.")
+  end
- -
-
# File activestorage/lib/active_storage.rb, line 379
-def self.silence_invalid_content_types_warning=(value)
-  ActiveStorage.deprecator.warn("config.active_storage.silence_invalid_content_types_warning is deprecated and has no effect.")
-end
-
-
- -

+ See on GitHub + + + +

@@ -781,22 +781,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/version.rb, line 7
+  def self.version
+    gem_version
+  end
- -
-
# File activestorage/lib/active_storage/version.rb, line 7
-def self.version
-  gem_version
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveStorage/AnalyzeJob.html b/src/classes/ActiveStorage/AnalyzeJob.html index b2f78be847..174f833442 100644 --- a/src/classes/ActiveStorage/AnalyzeJob.html +++ b/src/classes/ActiveStorage/AnalyzeJob.html @@ -87,22 +87,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/jobs/active_storage/analyze_job.rb, line 10
+  def perform(blob)
+    blob.analyze
+  end
- -
-
# File activestorage/app/jobs/active_storage/analyze_job.rb, line 10
-def perform(blob)
-  blob.analyze
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Analyzer.html b/src/classes/ActiveStorage/Analyzer.html index c5cd08ad85..bf9422cd40 100644 --- a/src/classes/ActiveStorage/Analyzer.html +++ b/src/classes/ActiveStorage/Analyzer.html @@ -161,22 +161,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/analyzer.rb, line 13
+    def self.accept?(blob)
+      false
+    end
- -
-
# File activestorage/lib/active_storage/analyzer.rb, line 13
-def self.accept?(blob)
-  false
-end
-
-
- - + See on GitHub + + + +

@@ -196,22 +196,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/analyzer.rb, line 19
+    def self.analyze_later?
+      true
+    end
- -
-
# File activestorage/lib/active_storage/analyzer.rb, line 19
-def self.analyze_later?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -231,22 +231,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/analyzer.rb, line 23
+    def initialize(blob)
+      @blob = blob
+    end
- -
-
# File activestorage/lib/active_storage/analyzer.rb, line 23
-def initialize(blob)
-  @blob = blob
-end
-
-
- -

+ See on GitHub + + + + @@ -270,22 +270,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/analyzer.rb, line 28
+    def metadata
+      raise NotImplementedError
+    end
- -
-
# File activestorage/lib/active_storage/analyzer.rb, line 28
-def metadata
-  raise NotImplementedError
-end
-
-
- - + See on GitHub + + + +

Instance Private methods

@@ -308,22 +308,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/analyzer.rb, line 34
+      def download_blob_to_tempfile(&block) # :doc:
+        blob.open tmpdir: tmpdir, &block
+      end
- -
-
# File activestorage/lib/active_storage/analyzer.rb, line 34
-def download_blob_to_tempfile(&block) # :doc:
-  blob.open tmpdir: tmpdir, &block
-end
-
-
- - + See on GitHub + + + +

@@ -343,22 +343,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/analyzer.rb, line 46
+      def instrument(analyzer, &block) # :doc:
+        ActiveSupport::Notifications.instrument("analyze.active_storage", analyzer: analyzer, &block)
+      end
- -
-
# File activestorage/lib/active_storage/analyzer.rb, line 46
-def instrument(analyzer, &block) # :doc:
-  ActiveSupport::Notifications.instrument("analyze.active_storage", analyzer: analyzer, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -378,22 +378,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/analyzer.rb, line 38
+      def logger # :doc:
+        ActiveStorage.logger
+      end
- -
-
# File activestorage/lib/active_storage/analyzer.rb, line 38
-def logger # :doc:
-  ActiveStorage.logger
-end
-
-
- -

+ See on GitHub + + + +

@@ -413,22 +413,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/analyzer.rb, line 42
+      def tmpdir # :doc:
+        Dir.tmpdir
+      end
- -
-
# File activestorage/lib/active_storage/analyzer.rb, line 42
-def tmpdir # :doc:
-  Dir.tmpdir
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Analyzer/AudioAnalyzer.html b/src/classes/ActiveStorage/Analyzer/AudioAnalyzer.html index 73d032ebf1..952abff3bf 100644 --- a/src/classes/ActiveStorage/Analyzer/AudioAnalyzer.html +++ b/src/classes/ActiveStorage/Analyzer/AudioAnalyzer.html @@ -100,22 +100,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/analyzer/audio_analyzer.rb, line 15
+    def self.accept?(blob)
+      blob.audio?
+    end
- -
-
# File activestorage/lib/active_storage/analyzer/audio_analyzer.rb, line 15
-def self.accept?(blob)
-  blob.audio?
-end
-
-
- - + See on GitHub + + + + @@ -139,22 +139,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/analyzer/audio_analyzer.rb, line 19
+    def metadata
+      { duration: duration, bit_rate: bit_rate, sample_rate: sample_rate, tags: tags }.compact
+    end
- -
-
# File activestorage/lib/active_storage/analyzer/audio_analyzer.rb, line 19
-def metadata
-  { duration: duration, bit_rate: bit_rate, sample_rate: sample_rate, tags: tags }.compact
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Analyzer/ImageAnalyzer.html b/src/classes/ActiveStorage/Analyzer/ImageAnalyzer.html index bba45b92b1..608ee246d2 100644 --- a/src/classes/ActiveStorage/Analyzer/ImageAnalyzer.html +++ b/src/classes/ActiveStorage/Analyzer/ImageAnalyzer.html @@ -121,22 +121,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/analyzer/image_analyzer.rb, line 15
+    def self.accept?(blob)
+      blob.image?
+    end
- -
-
# File activestorage/lib/active_storage/analyzer/image_analyzer.rb, line 15
-def self.accept?(blob)
-  blob.image?
-end
-
-
- - + See on GitHub + + + + @@ -160,28 +160,28 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/analyzer/image_analyzer.rb, line 19
+    def metadata
+      read_image do |image|
+        if rotated_image?(image)
+          { width: image.height, height: image.width }
+        else
+          { width: image.width, height: image.height }
+        end
+      end
+    end
- -
-
# File activestorage/lib/active_storage/analyzer/image_analyzer.rb, line 19
-def metadata
-  read_image do |image|
-    if rotated_image?(image)
-      { width: image.height, height: image.width }
-    else
-      { width: image.width, height: image.height }
-    end
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Analyzer/ImageAnalyzer/ImageMagick.html b/src/classes/ActiveStorage/Analyzer/ImageAnalyzer/ImageMagick.html index c89b582598..3795961fdb 100644 --- a/src/classes/ActiveStorage/Analyzer/ImageAnalyzer/ImageMagick.html +++ b/src/classes/ActiveStorage/Analyzer/ImageAnalyzer/ImageMagick.html @@ -86,22 +86,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/analyzer/image_analyzer/image_magick.rb, line 7
+    def self.accept?(blob)
+      super && ActiveStorage.variant_processor == :mini_magick
+    end
- -
-
# File activestorage/lib/active_storage/analyzer/image_analyzer/image_magick.rb, line 7
-def self.accept?(blob)
-  super && ActiveStorage.variant_processor == :mini_magick
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Analyzer/ImageAnalyzer/Vips.html b/src/classes/ActiveStorage/Analyzer/ImageAnalyzer/Vips.html index 0737afbd76..ad7a11b696 100644 --- a/src/classes/ActiveStorage/Analyzer/ImageAnalyzer/Vips.html +++ b/src/classes/ActiveStorage/Analyzer/ImageAnalyzer/Vips.html @@ -104,22 +104,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/analyzer/image_analyzer/vips.rb, line 7
+    def self.accept?(blob)
+      super && ActiveStorage.variant_processor == :vips
+    end
- -
-
# File activestorage/lib/active_storage/analyzer/image_analyzer/vips.rb, line 7
-def self.accept?(blob)
-  super && ActiveStorage.variant_processor == :vips
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Analyzer/VideoAnalyzer.html b/src/classes/ActiveStorage/Analyzer/VideoAnalyzer.html index f5936af5f3..6bf3a12424 100644 --- a/src/classes/ActiveStorage/Analyzer/VideoAnalyzer.html +++ b/src/classes/ActiveStorage/Analyzer/VideoAnalyzer.html @@ -117,22 +117,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/analyzer/video_analyzer.rb, line 25
+    def self.accept?(blob)
+      blob.video?
+    end
- -
-
# File activestorage/lib/active_storage/analyzer/video_analyzer.rb, line 25
-def self.accept?(blob)
-  blob.video?
-end
-
-
- - + See on GitHub + + + + @@ -156,22 +156,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/analyzer/video_analyzer.rb, line 29
+    def metadata
+      { width: width, height: height, duration: duration, angle: angle, display_aspect_ratio: display_aspect_ratio, audio: audio?, video: video? }.compact
+    end
- -
-
# File activestorage/lib/active_storage/analyzer/video_analyzer.rb, line 29
-def metadata
-  { width: width, height: height, duration: duration, angle: angle, display_aspect_ratio: display_aspect_ratio, audio: audio?, video: video? }.compact
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Attached.html b/src/classes/ActiveStorage/Attached.html index 72e1a8d1b9..e0ed8f5967 100644 --- a/src/classes/ActiveStorage/Attached.html +++ b/src/classes/ActiveStorage/Attached.html @@ -158,22 +158,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/attached.rb, line 13
+    def initialize(name, record)
+      @name, @record = name, record
+    end
- -
-
# File activestorage/lib/active_storage/attached.rb, line 13
-def initialize(name, record)
-  @name, @record = name, record
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Attached/Macros.html b/src/classes/ActiveStorage/Attached/Macros.html deleted file mode 100644 index 70cfead3a1..0000000000 --- a/src/classes/ActiveStorage/Attached/Macros.html +++ /dev/null @@ -1,310 +0,0 @@ ---- -title: ActiveStorage::Attached::Macros -layout: default ---- -
- -
-
- -
- -

Provides the class-level DSL for declaring that an Active Record model has attached blobs.

- -
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - - -

Instance Public methods

- -
-

- - has_many_attached(name, dependent: :purge_later) - -

- - -
-

Specifies the relation between multiple attachments and the model.

- -
class Gallery < ActiveRecord::Base
-  has_many_attached :photos
-end
-
- -

There are no columns defined on the model side, Active Storage takes care of the mapping between your records and the attachments.

- -

To avoid N+1 queries, you can include the attached blobs in your query like so:

- -
Gallery.where(user: Current.user).with_attached_photos
-
- -

Under the covers, this relationship is implemented as a has_many association to a ActiveStorage::Attachment record and a has_many-through association to a ActiveStorage::Blob record. These associations are available as photos_attachments and photos_blobs. But you shouldn't need to work with these associations directly in most circumstances.

- -

The system has been designed to having you go through the ActiveStorage::Attached::Many proxy that provides the dynamic proxy to the associations and factory methods, like #attach.

- -

If the :dependent option isn't set, all the attachments will be purged (i.e. destroyed) whenever the record is destroyed.

-
- - - - - - - - -
- - -
-
# File activestorage/lib/active_storage/attached/macros.rb, line 77
-    def has_many_attached(name, dependent: :purge_later)
-      class_eval <<-CODE, __FILE__, __LINE__ + 1
-        def #{name}
-          @active_storage_attached_#{name} ||= ActiveStorage::Attached::Many.new("#{name}", self, dependent: #{dependent == :purge_later ? ":purge_later" : "false"})
-        end
-
-        def #{name}=(attachables)
-          #{name}.attach(attachables)
-        end
-      CODE
-
-      has_many :"#{name}_attachments", -> { where(name: name) }, as: :record, class_name: "ActiveStorage::Attachment", inverse_of: :record, dependent: false do
-        def purge
-          each(&:purge)
-          reset
-        end
-
-        def purge_later
-          each(&:purge_later)
-          reset
-        end
-      end
-      has_many :"#{name}_blobs", through: :"#{name}_attachments", class_name: "ActiveStorage::Blob", source: :blob
-
-      scope :"with_attached_#{name}", -> { includes("#{name}_attachments": :blob) }
-
-      if dependent == :purge_later
-        after_destroy_commit { public_send(name).purge_later }
-      else
-        before_destroy { public_send(name).detach }
-      end
-    end
-
-
- -
- -
-

- - has_one_attached(name, dependent: :purge_later) - -

- - -
-

Specifies the relation between a single attachment and the model.

- -
class User < ActiveRecord::Base
-  has_one_attached :avatar
-end
-
- -

There is no column defined on the model side, Active Storage takes care of the mapping between your records and the attachment.

- -

To avoid N+1 queries, you can include the attached blobs in your query like so:

- -
User.with_attached_avatar
-
- -

Under the covers, this relationship is implemented as a has_one association to a ActiveStorage::Attachment record and a has_one-through association to a ActiveStorage::Blob record. These associations are available as avatar_attachment and avatar_blob. But you shouldn't need to work with these associations directly in most circumstances.

- -

The system has been designed to having you go through the ActiveStorage::Attached::One proxy that provides the dynamic proxy to the associations and factory methods, like attach.

- -

If the :dependent option isn't set, the attachment will be purged (i.e. destroyed) whenever the record is destroyed.

-
- - - - - - - - -
- - -
-
# File activestorage/lib/active_storage/attached/macros.rb, line 30
-    def has_one_attached(name, dependent: :purge_later)
-      class_eval <<-CODE, __FILE__, __LINE__ + 1
-        def #{name}
-          @active_storage_attached_#{name} ||= ActiveStorage::Attached::One.new("#{name}", self, dependent: #{dependent == :purge_later ? ":purge_later" : "false"})
-        end
-
-        def #{name}=(attachable)
-          #{name}.attach(attachable)
-        end
-      CODE
-
-      has_one :"#{name}_attachment", -> { where(name: name) }, class_name: "ActiveStorage::Attachment", as: :record, inverse_of: :record, dependent: false
-      has_one :"#{name}_blob", through: :"#{name}_attachment", class_name: "ActiveStorage::Blob", source: :blob
-
-      scope :"with_attached_#{name}", -> { includes("#{name}_attachment": :blob) }
-
-      if dependent == :purge_later
-        after_destroy_commit { public_send(name).purge_later }
-      else
-        before_destroy { public_send(name).detach }
-      end
-    end
-
-
- -
- -
-

- - purge() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activestorage/lib/active_storage/attached/macros.rb, line 89
-def purge
-  each(&:purge)
-  reset
-end
-
-
- -
- -
-

- - purge_later() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activestorage/lib/active_storage/attached/macros.rb, line 94
-def purge_later
-  each(&:purge_later)
-  reset
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveStorage/Attached/Many.html b/src/classes/ActiveStorage/Attached/Many.html index ca4aa4bfad..8b42193273 100644 --- a/src/classes/ActiveStorage/Attached/Many.html +++ b/src/classes/ActiveStorage/Attached/Many.html @@ -121,26 +121,26 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/attached/many.rb, line 51
+    def attach(*attachables)
+      record.public_send("#{name}=", blobs + attachables.flatten)
+      if record.persisted? && !record.changed?
+        return if !record.save
+      end
+      record.public_send("#{name}")
+    end
- -
-
# File activestorage/lib/active_storage/attached/many.rb, line 51
-def attach(*attachables)
-  record.public_send("#{name}=", blobs + attachables.flatten)
-  if record.persisted? && !record.changed?
-    return if !record.save
-  end
-  record.public_send("#{name}")
-end
-
-
- - + See on GitHub + + + +

@@ -167,22 +167,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/attached/many.rb, line 66
+    def attached?
+      attachments.any?
+    end
- -
-
# File activestorage/lib/active_storage/attached/many.rb, line 66
-def attached?
-  attachments.any?
-end
-
-
- -

+ See on GitHub + + + +

@@ -204,22 +204,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/attached/many.rb, line 32
+    def attachments
+      change.present? ? change.attachments : record.public_send("#{name}_attachments")
+    end
- -
-
# File activestorage/lib/active_storage/attached/many.rb, line 32
-def attachments
-  change.present? ? change.attachments : record.public_send("#{name}_attachments")
-end
-
-
- -

+ See on GitHub + + + +

@@ -239,22 +239,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/attached/many.rb, line 37
+    def blobs
+      change.present? ? change.blobs : record.public_send("#{name}_blobs")
+    end
- -
-
# File activestorage/lib/active_storage/attached/many.rb, line 37
-def blobs
-  change.present? ? change.blobs : record.public_send("#{name}_blobs")
-end
-
-
- -

+ See on GitHub + + + +

@@ -274,21 +274,21 @@

- -
- - -
-
# File activestorage/lib/active_storage/attached/many.rb, line 25
-delegate :detach, to: :detach_many
+          
+            
+ + Source code + + +
# File activestorage/lib/active_storage/attached/many.rb, line 25
+    delegate :detach, to: :detach_many
 
-
-
- -

+ + See on GitHub + + + +

@@ -308,21 +308,21 @@

- -
- - -
-
# File activestorage/lib/active_storage/attached/many.rb, line 13
-delegate :purge, to: :purge_many
+          
+            
+ + Source code + + +
# File activestorage/lib/active_storage/attached/many.rb, line 13
+    delegate :purge, to: :purge_many
 
-
-
- -

+ + See on GitHub + + + +

@@ -342,21 +342,21 @@

- -
- - -
-
# File activestorage/lib/active_storage/attached/many.rb, line 19
-delegate :purge_later, to: :purge_many
+          
+            
+ + Source code + + +
# File activestorage/lib/active_storage/attached/many.rb, line 19
+    delegate :purge_later, to: :purge_many
 
-
-
- -

+ + See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Attached/Model.html b/src/classes/ActiveStorage/Attached/Model.html index de303355b0..2315933c85 100644 --- a/src/classes/ActiveStorage/Attached/Model.html +++ b/src/classes/ActiveStorage/Attached/Model.html @@ -118,20 +118,10 @@

- -
- - -
-
# File activestorage/lib/active_storage/attached/model.rb, line 13
-    
-
-
- - + + See on GitHub + +

@@ -154,20 +144,10 @@

- -
- - -
-
# File activestorage/lib/active_storage/attached/model.rb, line 20
-    
-
-
- -

+ + See on GitHub + +

@@ -190,20 +170,10 @@

- -
- - -
-
# File activestorage/lib/active_storage/attached/model.rb, line 27
-    
-
-
- -

+ + See on GitHub + +

@@ -226,20 +196,10 @@

- -
- - -
-
# File activestorage/lib/active_storage/attached/model.rb, line 34
-    
-
-
- -

+ + See on GitHub + +

@@ -291,66 +251,66 @@

- -
- - -
-
# File activestorage/lib/active_storage/attached/model.rb, line 179
-      def has_many_attached(name, dependent: :purge_later, service: nil, strict_loading: false)
-        validate_service_configuration(name, service)
-
-        generated_association_methods.class_eval <<-CODE, __FILE__, __LINE__ + 1
-          # frozen_string_literal: true
+          
+            
+ + Source code + + +
# File activestorage/lib/active_storage/attached/model.rb, line 179
+      def has_many_attached(name, dependent: :purge_later, service: nil, strict_loading: false)
+        validate_service_configuration(name, service)
+
+        generated_association_methods.class_eval <<-CODE, __FILE__, __LINE__ + 1
+          # frozen_string_literal: true
           def #{name}
             @active_storage_attached ||= {}
-            @active_storage_attached[:#{name}] ||= ActiveStorage::Attached::Many.new("#{name}", self)
+            @active_storage_attached[:#{name}] ||= ActiveStorage::Attached::Many.new("#{name}", self)
           end
 
           def #{name}=(attachables)
             attachables = Array(attachables).compact_blank
-            pending_uploads = attachment_changes["#{name}"].try(:pending_uploads)
+            pending_uploads = attachment_changes["#{name}"].try(:pending_uploads)
 
-            attachment_changes["#{name}"] = if attachables.none?
-              ActiveStorage::Attached::Changes::DeleteMany.new("#{name}", self)
+            attachment_changes["#{name}"] = if attachables.none?
+              ActiveStorage::Attached::Changes::DeleteMany.new("#{name}", self)
             else
-              ActiveStorage::Attached::Changes::CreateMany.new("#{name}", self, attachables, pending_uploads: pending_uploads)
+              ActiveStorage::Attached::Changes::CreateMany.new("#{name}", self, attachables, pending_uploads: pending_uploads)
             end
           end
-        CODE
+        CODE
 
-        has_many :"#{name}_attachments", -> { where(name: name) }, as: :record, class_name: "ActiveStorage::Attachment", inverse_of: :record, dependent: :destroy, strict_loading: strict_loading
-        has_many :"#{name}_blobs", through: :"#{name}_attachments", class_name: "ActiveStorage::Blob", source: :blob, strict_loading: strict_loading
+        has_many :"#{name}_attachments", -> { where(name: name) }, as: :record, class_name: "ActiveStorage::Attachment", inverse_of: :record, dependent: :destroy, strict_loading: strict_loading
+        has_many :"#{name}_blobs", through: :"#{name}_attachments", class_name: "ActiveStorage::Blob", source: :blob, strict_loading: strict_loading
 
-        scope :"with_attached_#{name}", -> {
-          if ActiveStorage.track_variants
-            includes("#{name}_attachments": { blob: { variant_records: { image_attachment: :blob } } })
-          else
-            includes("#{name}_attachments": :blob)
-          end
+        scope :"with_attached_#{name}", -> {
+          if ActiveStorage.track_variants
+            includes("#{name}_attachments": { blob: { variant_records: { image_attachment: :blob } } })
+          else
+            includes("#{name}_attachments": :blob)
+          end
         }
 
-        after_save { attachment_changes[name.to_s]&.save }
+        after_save { attachment_changes[name.to_s]&.save }
 
-        after_commit(on: %i[ create update ]) { attachment_changes.delete(name.to_s).try(:upload) }
+        after_commit(on: %i[ create update ]) { attachment_changes.delete(name.to_s).try(:upload) }
 
-        reflection = ActiveRecord::Reflection.create(
-          :has_many_attached,
-          name,
-          nil,
-          { dependent: dependent, service_name: service },
-          self
+        reflection = ActiveRecord::Reflection.create(
+          :has_many_attached,
+          name,
+          nil,
+          { dependent: dependent, service_name: service },
+          self
         )
-        yield reflection if block_given?
-        ActiveRecord::Reflection.add_attachment_reflection(self, name, reflection)
-      end
-
-
- -

+ yield reflection if block_given? + ActiveRecord::Reflection.add_attachment_reflection(self, name, reflection) + end + + See on GitHub + + + +

@@ -402,64 +362,64 @@

- -
- - -
-
# File activestorage/lib/active_storage/attached/model.rb, line 94
-      def has_one_attached(name, dependent: :purge_later, service: nil, strict_loading: false)
-        validate_service_configuration(name, service)
-
-        generated_association_methods.class_eval <<-CODE, __FILE__, __LINE__ + 1
-          # frozen_string_literal: true
+          
+            
+ + Source code + + +
# File activestorage/lib/active_storage/attached/model.rb, line 94
+      def has_one_attached(name, dependent: :purge_later, service: nil, strict_loading: false)
+        validate_service_configuration(name, service)
+
+        generated_association_methods.class_eval <<-CODE, __FILE__, __LINE__ + 1
+          # frozen_string_literal: true
           def #{name}
             @active_storage_attached ||= {}
-            @active_storage_attached[:#{name}] ||= ActiveStorage::Attached::One.new("#{name}", self)
+            @active_storage_attached[:#{name}] ||= ActiveStorage::Attached::One.new("#{name}", self)
           end
 
           def #{name}=(attachable)
-            attachment_changes["#{name}"] =
-              if attachable.nil? || attachable == ""
-                ActiveStorage::Attached::Changes::DeleteOne.new("#{name}", self)
+            attachment_changes["#{name}"] =
+              if attachable.nil? || attachable == ""
+                ActiveStorage::Attached::Changes::DeleteOne.new("#{name}", self)
               else
-                ActiveStorage::Attached::Changes::CreateOne.new("#{name}", self, attachable)
+                ActiveStorage::Attached::Changes::CreateOne.new("#{name}", self, attachable)
               end
           end
-        CODE
+        CODE
 
-        has_one :"#{name}_attachment", -> { where(name: name) }, class_name: "ActiveStorage::Attachment", as: :record, inverse_of: :record, dependent: :destroy, strict_loading: strict_loading
-        has_one :"#{name}_blob", through: :"#{name}_attachment", class_name: "ActiveStorage::Blob", source: :blob, strict_loading: strict_loading
+        has_one :"#{name}_attachment", -> { where(name: name) }, class_name: "ActiveStorage::Attachment", as: :record, inverse_of: :record, dependent: :destroy, strict_loading: strict_loading
+        has_one :"#{name}_blob", through: :"#{name}_attachment", class_name: "ActiveStorage::Blob", source: :blob, strict_loading: strict_loading
 
-        scope :"with_attached_#{name}", -> {
-          if ActiveStorage.track_variants
-            includes("#{name}_attachment": { blob: { variant_records: { image_attachment: :blob } } })
-          else
-            includes("#{name}_attachment": :blob)
-          end
+        scope :"with_attached_#{name}", -> {
+          if ActiveStorage.track_variants
+            includes("#{name}_attachment": { blob: { variant_records: { image_attachment: :blob } } })
+          else
+            includes("#{name}_attachment": :blob)
+          end
         }
 
-        after_save { attachment_changes[name.to_s]&.save }
+        after_save { attachment_changes[name.to_s]&.save }
 
-        after_commit(on: %i[ create update ]) { attachment_changes.delete(name.to_s).try(:upload) }
+        after_commit(on: %i[ create update ]) { attachment_changes.delete(name.to_s).try(:upload) }
 
-        reflection = ActiveRecord::Reflection.create(
-          :has_one_attached,
-          name,
-          nil,
-          { dependent: dependent, service_name: service },
-          self
+        reflection = ActiveRecord::Reflection.create(
+          :has_one_attached,
+          name,
+          nil,
+          { dependent: dependent, service_name: service },
+          self
         )
-        yield reflection if block_given?
-        ActiveRecord::Reflection.add_attachment_reflection(self, name, reflection)
-      end
-
-
- -

+ yield reflection if block_given? + ActiveRecord::Reflection.add_attachment_reflection(self, name, reflection) + end + + See on GitHub + + + +

@@ -479,24 +439,24 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/attached/model.rb, line 238
+        def validate_global_service_configuration
+          if connected? && ActiveStorage::Blob.table_exists? && Rails.configuration.active_storage.service.nil?
+            raise RuntimeError, "Missing Active Storage service name. Specify Active Storage service name for config.active_storage.service in config/environments/#{Rails.env}.rb"
+          end
+        end
- -
-
# File activestorage/lib/active_storage/attached/model.rb, line 238
-def validate_global_service_configuration
-  if connected? && ActiveStorage::Blob.table_exists? && Rails.configuration.active_storage.service.nil?
-    raise RuntimeError, "Missing Active Storage service name. Specify Active Storage service name for config.active_storage.service in config/environments/#{Rails.env}.rb"
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -516,28 +476,28 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/attached/model.rb, line 228
+        def validate_service_configuration(association_name, service)
+          if service.present?
+            ActiveStorage::Blob.services.fetch(service) do
+              raise ArgumentError, "Cannot configure service :#{service} for #{name}##{association_name}"
+            end
+          else
+            validate_global_service_configuration
+          end
+        end
- -
-
# File activestorage/lib/active_storage/attached/model.rb, line 228
-def validate_service_configuration(association_name, service)
-  if service.present?
-    ActiveStorage::Blob.services.fetch(service) do
-      raise ArgumentError, "Cannot configure service :#{service} for #{name}##{association_name}"
-    end
-  else
-    validate_global_service_configuration
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -567,209 +527,209 @@

- -
- - -
-
# File activestorage/lib/active_storage/attached/model.rb, line 54
-    class_methods do
-      # Specifies the relation between a single attachment and the model.
-      #
-      #   class User < ApplicationRecord
-      #     has_one_attached :avatar
-      #   end
-      #
-      # There is no column defined on the model side, Active Storage takes
-      # care of the mapping between your records and the attachment.
-      #
-      # To avoid N+1 queries, you can include the attached blobs in your query like so:
-      #
-      #   User.with_attached_avatar
-      #
-      # Under the covers, this relationship is implemented as a +has_one+ association to a
-      # ActiveStorage::Attachment record and a +has_one-through+ association to a
-      # ActiveStorage::Blob record. These associations are available as +avatar_attachment+
-      # and +avatar_blob+. But you shouldn't need to work with these associations directly in
-      # most circumstances.
-      #
-      # The system has been designed to having you go through the ActiveStorage::Attached::One
-      # proxy that provides the dynamic proxy to the associations and factory methods, like +attach+.
-      #
-      # If the +:dependent+ option isn't set, the attachment will be purged
-      # (i.e. destroyed) whenever the record is destroyed.
-      #
-      # If you need the attachment to use a service which differs from the globally configured one,
-      # pass the +:service+ option. For instance:
-      #
-      #   class User < ActiveRecord::Base
-      #     has_one_attached :avatar, service: :s3
-      #   end
-      #
-      # If you need to enable +strict_loading+ to prevent lazy loading of attachment,
-      # pass the +:strict_loading+ option. You can do:
-      #
-      #   class User < ApplicationRecord
-      #     has_one_attached :avatar, strict_loading: true
-      #   end
-      #
-      def has_one_attached(name, dependent: :purge_later, service: nil, strict_loading: false)
-        validate_service_configuration(name, service)
-
-        generated_association_methods.class_eval <<-CODE, __FILE__, __LINE__ + 1
-          # frozen_string_literal: true
+          
+            
+ + Source code + + +
# File activestorage/lib/active_storage/attached/model.rb, line 54
+    class_methods do
+      # Specifies the relation between a single attachment and the model.
+      #
+      #   class User < ApplicationRecord
+      #     has_one_attached :avatar
+      #   end
+      #
+      # There is no column defined on the model side, Active Storage takes
+      # care of the mapping between your records and the attachment.
+      #
+      # To avoid N+1 queries, you can include the attached blobs in your query like so:
+      #
+      #   User.with_attached_avatar
+      #
+      # Under the covers, this relationship is implemented as a +has_one+ association to a
+      # ActiveStorage::Attachment record and a +has_one-through+ association to a
+      # ActiveStorage::Blob record. These associations are available as +avatar_attachment+
+      # and +avatar_blob+. But you shouldn't need to work with these associations directly in
+      # most circumstances.
+      #
+      # The system has been designed to having you go through the ActiveStorage::Attached::One
+      # proxy that provides the dynamic proxy to the associations and factory methods, like +attach+.
+      #
+      # If the +:dependent+ option isn't set, the attachment will be purged
+      # (i.e. destroyed) whenever the record is destroyed.
+      #
+      # If you need the attachment to use a service which differs from the globally configured one,
+      # pass the +:service+ option. For instance:
+      #
+      #   class User < ActiveRecord::Base
+      #     has_one_attached :avatar, service: :s3
+      #   end
+      #
+      # If you need to enable +strict_loading+ to prevent lazy loading of attachment,
+      # pass the +:strict_loading+ option. You can do:
+      #
+      #   class User < ApplicationRecord
+      #     has_one_attached :avatar, strict_loading: true
+      #   end
+      #
+      def has_one_attached(name, dependent: :purge_later, service: nil, strict_loading: false)
+        validate_service_configuration(name, service)
+
+        generated_association_methods.class_eval <<-CODE, __FILE__, __LINE__ + 1
+          # frozen_string_literal: true
           def #{name}
             @active_storage_attached ||= {}
-            @active_storage_attached[:#{name}] ||= ActiveStorage::Attached::One.new("#{name}", self)
+            @active_storage_attached[:#{name}] ||= ActiveStorage::Attached::One.new("#{name}", self)
           end
 
           def #{name}=(attachable)
-            attachment_changes["#{name}"] =
-              if attachable.nil? || attachable == ""
-                ActiveStorage::Attached::Changes::DeleteOne.new("#{name}", self)
+            attachment_changes["#{name}"] =
+              if attachable.nil? || attachable == ""
+                ActiveStorage::Attached::Changes::DeleteOne.new("#{name}", self)
               else
-                ActiveStorage::Attached::Changes::CreateOne.new("#{name}", self, attachable)
+                ActiveStorage::Attached::Changes::CreateOne.new("#{name}", self, attachable)
               end
           end
-        CODE
+        CODE
 
-        has_one :"#{name}_attachment", -> { where(name: name) }, class_name: "ActiveStorage::Attachment", as: :record, inverse_of: :record, dependent: :destroy, strict_loading: strict_loading
-        has_one :"#{name}_blob", through: :"#{name}_attachment", class_name: "ActiveStorage::Blob", source: :blob, strict_loading: strict_loading
+        has_one :"#{name}_attachment", -> { where(name: name) }, class_name: "ActiveStorage::Attachment", as: :record, inverse_of: :record, dependent: :destroy, strict_loading: strict_loading
+        has_one :"#{name}_blob", through: :"#{name}_attachment", class_name: "ActiveStorage::Blob", source: :blob, strict_loading: strict_loading
 
-        scope :"with_attached_#{name}", -> {
-          if ActiveStorage.track_variants
-            includes("#{name}_attachment": { blob: { variant_records: { image_attachment: :blob } } })
-          else
-            includes("#{name}_attachment": :blob)
-          end
+        scope :"with_attached_#{name}", -> {
+          if ActiveStorage.track_variants
+            includes("#{name}_attachment": { blob: { variant_records: { image_attachment: :blob } } })
+          else
+            includes("#{name}_attachment": :blob)
+          end
         }
 
-        after_save { attachment_changes[name.to_s]&.save }
+        after_save { attachment_changes[name.to_s]&.save }
 
-        after_commit(on: %i[ create update ]) { attachment_changes.delete(name.to_s).try(:upload) }
+        after_commit(on: %i[ create update ]) { attachment_changes.delete(name.to_s).try(:upload) }
 
-        reflection = ActiveRecord::Reflection.create(
-          :has_one_attached,
-          name,
-          nil,
-          { dependent: dependent, service_name: service },
-          self
+        reflection = ActiveRecord::Reflection.create(
+          :has_one_attached,
+          name,
+          nil,
+          { dependent: dependent, service_name: service },
+          self
         )
-        yield reflection if block_given?
-        ActiveRecord::Reflection.add_attachment_reflection(self, name, reflection)
-      end
-
-      # Specifies the relation between multiple attachments and the model.
-      #
-      #   class Gallery < ApplicationRecord
-      #     has_many_attached :photos
-      #   end
-      #
-      # There are no columns defined on the model side, Active Storage takes
-      # care of the mapping between your records and the attachments.
-      #
-      # To avoid N+1 queries, you can include the attached blobs in your query like so:
-      #
-      #   Gallery.where(user: Current.user).with_attached_photos
-      #
-      # Under the covers, this relationship is implemented as a +has_many+ association to a
-      # ActiveStorage::Attachment record and a +has_many-through+ association to a
-      # ActiveStorage::Blob record. These associations are available as +photos_attachments+
-      # and +photos_blobs+. But you shouldn't need to work with these associations directly in
-      # most circumstances.
-      #
-      # The system has been designed to having you go through the ActiveStorage::Attached::Many
-      # proxy that provides the dynamic proxy to the associations and factory methods, like +#attach+.
-      #
-      # If the +:dependent+ option isn't set, all the attachments will be purged
-      # (i.e. destroyed) whenever the record is destroyed.
-      #
-      # If you need the attachment to use a service which differs from the globally configured one,
-      # pass the +:service+ option. For instance:
-      #
-      #   class Gallery < ActiveRecord::Base
-      #     has_many_attached :photos, service: :s3
-      #   end
-      #
-      # If you need to enable +strict_loading+ to prevent lazy loading of attachments,
-      # pass the +:strict_loading+ option. You can do:
-      #
-      #   class Gallery < ApplicationRecord
-      #     has_many_attached :photos, strict_loading: true
-      #   end
-      #
-      def has_many_attached(name, dependent: :purge_later, service: nil, strict_loading: false)
-        validate_service_configuration(name, service)
-
-        generated_association_methods.class_eval <<-CODE, __FILE__, __LINE__ + 1
-          # frozen_string_literal: true
+        yield reflection if block_given?
+        ActiveRecord::Reflection.add_attachment_reflection(self, name, reflection)
+      end
+
+      # Specifies the relation between multiple attachments and the model.
+      #
+      #   class Gallery < ApplicationRecord
+      #     has_many_attached :photos
+      #   end
+      #
+      # There are no columns defined on the model side, Active Storage takes
+      # care of the mapping between your records and the attachments.
+      #
+      # To avoid N+1 queries, you can include the attached blobs in your query like so:
+      #
+      #   Gallery.where(user: Current.user).with_attached_photos
+      #
+      # Under the covers, this relationship is implemented as a +has_many+ association to a
+      # ActiveStorage::Attachment record and a +has_many-through+ association to a
+      # ActiveStorage::Blob record. These associations are available as +photos_attachments+
+      # and +photos_blobs+. But you shouldn't need to work with these associations directly in
+      # most circumstances.
+      #
+      # The system has been designed to having you go through the ActiveStorage::Attached::Many
+      # proxy that provides the dynamic proxy to the associations and factory methods, like +#attach+.
+      #
+      # If the +:dependent+ option isn't set, all the attachments will be purged
+      # (i.e. destroyed) whenever the record is destroyed.
+      #
+      # If you need the attachment to use a service which differs from the globally configured one,
+      # pass the +:service+ option. For instance:
+      #
+      #   class Gallery < ActiveRecord::Base
+      #     has_many_attached :photos, service: :s3
+      #   end
+      #
+      # If you need to enable +strict_loading+ to prevent lazy loading of attachments,
+      # pass the +:strict_loading+ option. You can do:
+      #
+      #   class Gallery < ApplicationRecord
+      #     has_many_attached :photos, strict_loading: true
+      #   end
+      #
+      def has_many_attached(name, dependent: :purge_later, service: nil, strict_loading: false)
+        validate_service_configuration(name, service)
+
+        generated_association_methods.class_eval <<-CODE, __FILE__, __LINE__ + 1
+          # frozen_string_literal: true
           def #{name}
             @active_storage_attached ||= {}
-            @active_storage_attached[:#{name}] ||= ActiveStorage::Attached::Many.new("#{name}", self)
+            @active_storage_attached[:#{name}] ||= ActiveStorage::Attached::Many.new("#{name}", self)
           end
 
           def #{name}=(attachables)
             attachables = Array(attachables).compact_blank
-            pending_uploads = attachment_changes["#{name}"].try(:pending_uploads)
+            pending_uploads = attachment_changes["#{name}"].try(:pending_uploads)
 
-            attachment_changes["#{name}"] = if attachables.none?
-              ActiveStorage::Attached::Changes::DeleteMany.new("#{name}", self)
+            attachment_changes["#{name}"] = if attachables.none?
+              ActiveStorage::Attached::Changes::DeleteMany.new("#{name}", self)
             else
-              ActiveStorage::Attached::Changes::CreateMany.new("#{name}", self, attachables, pending_uploads: pending_uploads)
+              ActiveStorage::Attached::Changes::CreateMany.new("#{name}", self, attachables, pending_uploads: pending_uploads)
             end
           end
-        CODE
+        CODE
 
-        has_many :"#{name}_attachments", -> { where(name: name) }, as: :record, class_name: "ActiveStorage::Attachment", inverse_of: :record, dependent: :destroy, strict_loading: strict_loading
-        has_many :"#{name}_blobs", through: :"#{name}_attachments", class_name: "ActiveStorage::Blob", source: :blob, strict_loading: strict_loading
+        has_many :"#{name}_attachments", -> { where(name: name) }, as: :record, class_name: "ActiveStorage::Attachment", inverse_of: :record, dependent: :destroy, strict_loading: strict_loading
+        has_many :"#{name}_blobs", through: :"#{name}_attachments", class_name: "ActiveStorage::Blob", source: :blob, strict_loading: strict_loading
 
-        scope :"with_attached_#{name}", -> {
-          if ActiveStorage.track_variants
-            includes("#{name}_attachments": { blob: { variant_records: { image_attachment: :blob } } })
-          else
-            includes("#{name}_attachments": :blob)
-          end
+        scope :"with_attached_#{name}", -> {
+          if ActiveStorage.track_variants
+            includes("#{name}_attachments": { blob: { variant_records: { image_attachment: :blob } } })
+          else
+            includes("#{name}_attachments": :blob)
+          end
         }
 
-        after_save { attachment_changes[name.to_s]&.save }
+        after_save { attachment_changes[name.to_s]&.save }
 
-        after_commit(on: %i[ create update ]) { attachment_changes.delete(name.to_s).try(:upload) }
+        after_commit(on: %i[ create update ]) { attachment_changes.delete(name.to_s).try(:upload) }
 
-        reflection = ActiveRecord::Reflection.create(
-          :has_many_attached,
-          name,
-          nil,
-          { dependent: dependent, service_name: service },
-          self
+        reflection = ActiveRecord::Reflection.create(
+          :has_many_attached,
+          name,
+          nil,
+          { dependent: dependent, service_name: service },
+          self
         )
-        yield reflection if block_given?
-        ActiveRecord::Reflection.add_attachment_reflection(self, name, reflection)
-      end
-
-      private
-        def validate_service_configuration(association_name, service)
-          if service.present?
-            ActiveStorage::Blob.services.fetch(service) do
-              raise ArgumentError, "Cannot configure service :#{service} for #{name}##{association_name}"
-            end
-          else
-            validate_global_service_configuration
-          end
-        end
-
-        def validate_global_service_configuration
-          if connected? && ActiveStorage::Blob.table_exists? && Rails.configuration.active_storage.service.nil?
-            raise RuntimeError, "Missing Active Storage service name. Specify Active Storage service name for config.active_storage.service in config/environments/#{Rails.env}.rb"
-          end
-        end
-    end
-
-
- -

+ yield reflection if block_given? + ActiveRecord::Reflection.add_attachment_reflection(self, name, reflection) + end + + private + def validate_service_configuration(association_name, service) + if service.present? + ActiveStorage::Blob.services.fetch(service) do + raise ArgumentError, "Cannot configure service :#{service} for #{name}##{association_name}" + end + else + validate_global_service_configuration + end + end + + def validate_global_service_configuration + if connected? && ActiveStorage::Blob.table_exists? && Rails.configuration.active_storage.service.nil? + raise RuntimeError, "Missing Active Storage service name. Specify Active Storage service name for config.active_storage.service in config/environments/#{Rails.env}.rb" + end + end + end + + See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Attached/One.html b/src/classes/ActiveStorage/Attached/One.html index 601cd7a515..b0f65f472f 100644 --- a/src/classes/ActiveStorage/Attached/One.html +++ b/src/classes/ActiveStorage/Attached/One.html @@ -121,26 +121,26 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/attached/one.rb, line 58
+    def attach(attachable)
+      record.public_send("#{name}=", attachable)
+      if record.persisted? && !record.changed?
+        return if !record.save
+      end
+      record.public_send("#{name}")
+    end
- -
-
# File activestorage/lib/active_storage/attached/one.rb, line 58
-def attach(attachable)
-  record.public_send("#{name}=", attachable)
-  if record.persisted? && !record.changed?
-    return if !record.save
-  end
-  record.public_send("#{name}")
-end
-
-
- - + See on GitHub + + + +

@@ -167,22 +167,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/attached/one.rb, line 73
+    def attached?
+      attachment.present?
+    end
- -
-
# File activestorage/lib/active_storage/attached/one.rb, line 73
-def attached?
-  attachment.present?
-end
-
-
- -

+ See on GitHub + + + +

@@ -204,22 +204,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/attached/one.rb, line 33
+    def attachment
+      change.present? ? change.attachment : record.public_send("#{name}_attachment")
+    end
- -
-
# File activestorage/lib/active_storage/attached/one.rb, line 33
-def attachment
-  change.present? ? change.attachment : record.public_send("#{name}_attachment")
-end
-
-
- -

+ See on GitHub + + + +

@@ -246,22 +246,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/attached/one.rb, line 44
+    def blank?
+      !attached?
+    end
- -
-
# File activestorage/lib/active_storage/attached/one.rb, line 44
-def blank?
-  !attached?
-end
-
-
- -

+ See on GitHub + + + +

@@ -281,21 +281,21 @@

- -
- - -
-
# File activestorage/lib/active_storage/attached/one.rb, line 25
-delegate :detach, to: :detach_one
+          
+            
+ + Source code + + +
# File activestorage/lib/active_storage/attached/one.rb, line 25
+    delegate :detach, to: :detach_one
 
-
-
- -

+ + See on GitHub + + + +

@@ -315,21 +315,21 @@

- -
- - -
-
# File activestorage/lib/active_storage/attached/one.rb, line 13
-delegate :purge, to: :purge_one
+          
+            
+ + Source code + + +
# File activestorage/lib/active_storage/attached/one.rb, line 13
+    delegate :purge, to: :purge_one
 
-
-
- -

+ + See on GitHub + + + +

@@ -349,21 +349,21 @@

- -
- - -
-
# File activestorage/lib/active_storage/attached/one.rb, line 19
-delegate :purge_later, to: :purge_one
+          
+            
+ + Source code + + +
# File activestorage/lib/active_storage/attached/one.rb, line 19
+    delegate :purge_later, to: :purge_one
 
-
-
- -

+ + See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Attachment.html b/src/classes/ActiveStorage/Attachment.html index 69ddf4f1a4..686a3d9bb1 100644 --- a/src/classes/ActiveStorage/Attachment.html +++ b/src/classes/ActiveStorage/Attachment.html @@ -130,21 +130,21 @@

- -
- - -
-
# File activestorage/app/models/active_storage/attachment.rb, line 47
-scope :with_all_variant_records, -> { includes(blob: { variant_records: { image_attachment: :blob } }) }
+          
+            
+ + Source code + + +
# File activestorage/app/models/active_storage/attachment.rb, line 47
+  scope :with_all_variant_records, -> { includes(blob: { variant_records: { image_attachment: :blob } }) }
 
-
-
- - + + See on GitHub + + + + @@ -168,21 +168,21 @@

- -
- - -
-
# File activestorage/app/models/active_storage/attachment.rb, line 33
-belongs_to :blob, class_name: "ActiveStorage::Blob", autosave: true
+          
+            
+ + Source code + + +
# File activestorage/app/models/active_storage/attachment.rb, line 33
+  belongs_to :blob, class_name: "ActiveStorage::Blob", autosave: true
 
-
-
- - + + See on GitHub + + + +

@@ -214,23 +214,23 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/attachment.rb, line 100
+  def preview(transformations)
+    transformations = transformations_by_name(transformations)
+    blob.preview(transformations)
+  end
- -
-
# File activestorage/app/models/active_storage/attachment.rb, line 100
-def preview(transformations)
-  transformations = transformations_by_name(transformations)
-  blob.preview(transformations)
-end
-
-
- -

+ See on GitHub + + + +

@@ -250,26 +250,26 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/attachment.rb, line 50
+  def purge
+    transaction do
+      delete
+      record.touch if record&.persisted?
+    end
+    blob&.purge
+  end
- -
-
# File activestorage/app/models/active_storage/attachment.rb, line 50
-def purge
-  transaction do
-    delete
-    record.touch if record&.persisted?
-  end
-  blob&.purge
-end
-
-
- -

+ See on GitHub + + + +

@@ -289,26 +289,26 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/attachment.rb, line 59
+  def purge_later
+    transaction do
+      delete
+      record.touch if record&.persisted?
+    end
+    blob&.purge_later
+  end
- -
-
# File activestorage/app/models/active_storage/attachment.rb, line 59
-def purge_later
-  transaction do
-    delete
-    record.touch if record&.persisted?
-  end
-  blob&.purge_later
-end
-
-
- -

+ See on GitHub + + + +

@@ -328,21 +328,21 @@

- -
- - -
-
# File activestorage/app/models/active_storage/attachment.rb, line 27
-belongs_to :record, polymorphic: true, touch: true
+          
+            
+ + Source code + + +
# File activestorage/app/models/active_storage/attachment.rb, line 27
+  belongs_to :record, polymorphic: true, touch: true
 
-
-
- -

+ + See on GitHub + + + +

@@ -374,23 +374,23 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/attachment.rb, line 119
+  def representation(transformations)
+    transformations = transformations_by_name(transformations)
+    blob.representation(transformations)
+  end
- -
-
# File activestorage/app/models/active_storage/attachment.rb, line 119
-def representation(transformations)
-  transformations = transformations_by_name(transformations)
-  blob.representation(transformations)
-end
-
-
- -

+ See on GitHub + + + +

@@ -422,23 +422,23 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/attachment.rb, line 81
+  def variant(transformations)
+    transformations = transformations_by_name(transformations)
+    blob.variant(transformations)
+  end
- -
-
# File activestorage/app/models/active_storage/attachment.rb, line 81
-def variant(transformations)
-  transformations = transformations_by_name(transformations)
-  blob.variant(transformations)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Blob.html b/src/classes/ActiveStorage/Blob.html index 45fc4928a1..2ba5890890 100644 --- a/src/classes/ActiveStorage/Blob.html +++ b/src/classes/ActiveStorage/Blob.html @@ -276,29 +276,29 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob.rb, line 148
+    def compose(blobs, filename:, content_type: nil, metadata: nil)
+      raise ActiveRecord::RecordNotSaved, "All blobs must be persisted." if blobs.any?(&:new_record?)
+
+      content_type ||= blobs.pluck(:content_type).compact.first
+
+      new(filename: filename, content_type: content_type, metadata: metadata, byte_size: blobs.sum(&:byte_size)).tap do |combined_blob|
+        combined_blob.compose(blobs.pluck(:key))
+        combined_blob.save!
+      end
+    end
- -
-
# File activestorage/app/models/active_storage/blob.rb, line 148
-def compose(blobs, filename:, content_type: nil, metadata: nil)
-  raise ActiveRecord::RecordNotSaved, "All blobs must be persisted." if blobs.any?(&:new_record?)
-
-  content_type ||= blobs.pluck(:content_type).compact.first
-
-  new(filename: filename, content_type: content_type, metadata: metadata, byte_size: blobs.sum(&:byte_size)).tap do |combined_blob|
-    combined_blob.compose(blobs.pluck(:key))
-    combined_blob.save!
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -318,24 +318,24 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob.rb, line 102
+    def create_and_upload!(key: nil, io:, filename:, content_type: nil, metadata: nil, service_name: nil, identify: true, record: nil)
+      create_after_unfurling!(key: key, io: io, filename: filename, content_type: content_type, metadata: metadata, service_name: service_name, identify: identify).tap do |blob|
+        blob.upload_without_unfurling(io)
+      end
+    end
- -
-
# File activestorage/app/models/active_storage/blob.rb, line 102
-def create_and_upload!(key: nil, io:, filename:, content_type: nil, metadata: nil, service_name: nil, identify: true, record: nil)
-  create_after_unfurling!(key: key, io: io, filename: filename, content_type: content_type, metadata: metadata, service_name: service_name, identify: identify).tap do |blob|
-    blob.upload_without_unfurling(io)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -355,22 +355,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob.rb, line 113
+    def create_before_direct_upload!(key: nil, filename:, byte_size:, checksum:, content_type: nil, metadata: nil, service_name: nil, record: nil)
+      create! key: key, filename: filename, byte_size: byte_size, checksum: checksum, content_type: content_type, metadata: metadata, service_name: service_name
+    end
- -
-
# File activestorage/app/models/active_storage/blob.rb, line 113
-def create_before_direct_upload!(key: nil, filename:, byte_size:, checksum:, content_type: nil, metadata: nil, service_name: nil, record: nil)
-  create! key: key, filename: filename, byte_size: byte_size, checksum: checksum, content_type: content_type, metadata: metadata, service_name: service_name
-end
-
-
- -

+ See on GitHub + + + +

@@ -392,22 +392,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob.rb, line 75
+    def find_signed(id, record: nil, purpose: :blob_id)
+      super(id, purpose: purpose)
+    end
- -
-
# File activestorage/app/models/active_storage/blob.rb, line 75
-def find_signed(id, record: nil, purpose: :blob_id)
-  super(id, purpose: purpose)
-end
-
-
- -

+ See on GitHub + + + +

@@ -427,22 +427,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob.rb, line 83
+    def find_signed!(id, record: nil, purpose: :blob_id)
+      super(id, purpose: purpose)
+    end
- -
-
# File activestorage/app/models/active_storage/blob.rb, line 83
-def find_signed!(id, record: nil, purpose: :blob_id)
-  super(id, purpose: purpose)
-end
-
-
- -

+ See on GitHub + + + +

@@ -462,22 +462,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob.rb, line 122
+    def generate_unique_secure_token(length: MINIMUM_TOKEN_LENGTH)
+      SecureRandom.base36(length)
+    end
- -
-
# File activestorage/app/models/active_storage/blob.rb, line 122
-def generate_unique_secure_token(length: MINIMUM_TOKEN_LENGTH)
-  SecureRandom.base36(length)
-end
-
-
- -

+ See on GitHub + + + +

@@ -497,21 +497,21 @@

- -
- - -
-
# File activestorage/app/models/active_storage/blob.rb, line 44
-scope :unattached, -> { where.missing(:attachments) }
+          
+            
+ + Source code + + +
# File activestorage/app/models/active_storage/blob.rb, line 44
+  scope :unattached, -> { where.missing(:attachments) }
 
-
-
- -

+ + See on GitHub + + + + @@ -535,21 +535,21 @@

- -
- - -
-
# File activestorage/app/models/active_storage/blob.rb, line 38
-has_many :attachments
+          
+            
+ + Source code + + +
# File activestorage/app/models/active_storage/blob.rb, line 38
+  has_many :attachments
 
-
-
- - + + See on GitHub + + + +

@@ -569,22 +569,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob.rb, line 195
+  def audio?
+    content_type.start_with?("audio")
+  end
- -
-
# File activestorage/app/models/active_storage/blob.rb, line 195
-def audio?
-  content_type.start_with?("audio")
-end
-
-
- -

+ See on GitHub + + + +

@@ -604,22 +604,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob.rb, line 181
+  def custom_metadata
+    self[:metadata][:custom] || {}
+  end
- -
-
# File activestorage/app/models/active_storage/blob.rb, line 181
-def custom_metadata
-  self[:metadata][:custom] || {}
-end
-
-
- -

+ See on GitHub + + + +

@@ -639,22 +639,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob.rb, line 185
+  def custom_metadata=(metadata)
+    self[:metadata] = self[:metadata].merge(custom: metadata)
+  end
- -
-
# File activestorage/app/models/active_storage/blob.rb, line 185
-def custom_metadata=(metadata)
-  self[:metadata] = self[:metadata].merge(custom: metadata)
-end
-
-
- -

+ See on GitHub + + + +

@@ -674,23 +674,23 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob.rb, line 315
+  def delete
+    service.delete(key)
+    service.delete_prefixed("variants/#{key}/") if image?
+  end
- -
-
# File activestorage/app/models/active_storage/blob.rb, line 315
-def delete
-  service.delete(key)
-  service.delete_prefixed("variants/#{key}/") if image?
-end
-
-
- -

+ See on GitHub + + + +

@@ -710,22 +710,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob.rb, line 275
+  def download(&block)
+    service.download key, &block
+  end
- -
-
# File activestorage/app/models/active_storage/blob.rb, line 275
-def download(&block)
-  service.download key, &block
-end
-
-
- -

+ See on GitHub + + + +

@@ -745,22 +745,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob.rb, line 280
+  def download_chunk(range)
+    service.download_chunk key, range
+  end
- -
-
# File activestorage/app/models/active_storage/blob.rb, line 280
-def download_chunk(range)
-  service.download_chunk key, range
-end
-
-
- -

+ See on GitHub + + + +

@@ -780,22 +780,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob.rb, line 177
+  def filename
+    ActiveStorage::Filename.new(self[:filename])
+  end
- -
-
# File activestorage/app/models/active_storage/blob.rb, line 177
-def filename
-  ActiveStorage::Filename.new(self[:filename])
-end
-
-
- -

+ See on GitHub + + + +

@@ -815,22 +815,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob.rb, line 190
+  def image?
+    content_type.start_with?("image")
+  end
- -
-
# File activestorage/app/models/active_storage/blob.rb, line 190
-def image?
-  content_type.start_with?("image")
-end
-
-
- -

+ See on GitHub + + + +

@@ -850,23 +850,23 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob.rb, line 169
+  def key
+    # We can't wait until the record is first saved to have a key for it
+    self[:key] ||= self.class.generate_unique_secure_token(length: MINIMUM_TOKEN_LENGTH)
+  end
- -
-
# File activestorage/app/models/active_storage/blob.rb, line 169
-def key
-  # We can't wait until the record is first saved to have a key for it
-  self[:key] ||= self.class.generate_unique_secure_token(length: MINIMUM_TOKEN_LENGTH)
-end
-
-
- -

+ See on GitHub + + + +

@@ -899,29 +899,29 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob.rb, line 297
+  def open(tmpdir: nil, &block)
+    service.open(
+      key,
+      checksum: checksum,
+      verify: !composed,
+      name: [ "ActiveStorage-#{id}-", filename.extension_with_delimiter ],
+      tmpdir: tmpdir,
+      &block
+    )
+  end
- -
-
# File activestorage/app/models/active_storage/blob.rb, line 297
-def open(tmpdir: nil, &block)
-  service.open(
-    key,
-    checksum: checksum,
-    verify: !composed,
-    name: [ "ActiveStorage-#{id}-", filename.extension_with_delimiter ],
-    tmpdir: tmpdir,
-    &block
-  )
-end
-
-
- -

+ See on GitHub + + + +

@@ -941,24 +941,24 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob.rb, line 323
+  def purge
+    destroy
+    delete if previously_persisted?
+  rescue ActiveRecord::InvalidForeignKey
+  end
- -
-
# File activestorage/app/models/active_storage/blob.rb, line 323
-def purge
-  destroy
-  delete if previously_persisted?
-rescue ActiveRecord::InvalidForeignKey
-end
-
-
- -

+ See on GitHub + + + +

@@ -978,22 +978,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob.rb, line 331
+  def purge_later
+    ActiveStorage::PurgeJob.perform_later(self)
+  end
- -
-
# File activestorage/app/models/active_storage/blob.rb, line 331
-def purge_later
-  ActiveStorage::PurgeJob.perform_later(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1013,22 +1013,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob.rb, line 336
+  def service
+    services.fetch(service_name)
+  end
- -
-
# File activestorage/app/models/active_storage/blob.rb, line 336
-def service
-  services.fetch(service_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1048,22 +1048,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob.rb, line 225
+  def service_headers_for_direct_upload
+    service.headers_for_direct_upload key, filename: filename, content_type: content_type, content_length: byte_size, checksum: checksum, custom_metadata: custom_metadata
+  end
- -
-
# File activestorage/app/models/active_storage/blob.rb, line 225
-def service_headers_for_direct_upload
-  service.headers_for_direct_upload key, filename: filename, content_type: content_type, content_length: byte_size, checksum: checksum, custom_metadata: custom_metadata
-end
-
-
- -

+ See on GitHub + + + +

@@ -1083,22 +1083,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob.rb, line 220
+  def service_url_for_direct_upload(expires_in: ActiveStorage.service_urls_expire_in)
+    service.url_for_direct_upload key, expires_in: expires_in, content_type: content_type, content_length: byte_size, checksum: checksum, custom_metadata: custom_metadata
+  end
- -
-
# File activestorage/app/models/active_storage/blob.rb, line 220
-def service_url_for_direct_upload(expires_in: ActiveStorage.service_urls_expire_in)
-  service.url_for_direct_upload key, expires_in: expires_in, content_type: content_type, content_length: byte_size, checksum: checksum, custom_metadata: custom_metadata
-end
-
-
- -

+ See on GitHub + + + +

@@ -1118,22 +1118,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob.rb, line 161
+  def signed_id(purpose: :blob_id, expires_in: nil, expires_at: nil)
+    super
+  end
- -
-
# File activestorage/app/models/active_storage/blob.rb, line 161
-def signed_id(purpose: :blob_id, expires_in: nil, expires_at: nil)
-  super
-end
-
-
- -

+ See on GitHub + + + +

@@ -1153,22 +1153,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob.rb, line 205
+  def text?
+    content_type.start_with?("text")
+  end
- -
-
# File activestorage/app/models/active_storage/blob.rb, line 205
-def text?
-  content_type.start_with?("text")
-end
-
-
- -

+ See on GitHub + + + +

@@ -1192,23 +1192,23 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob.rb, line 252
+  def upload(io, identify: true)
+    unfurl io, identify: identify
+    upload_without_unfurling io
+  end
- -
-
# File activestorage/app/models/active_storage/blob.rb, line 252
-def upload(io, identify: true)
-  unfurl io, identify: identify
-  upload_without_unfurling io
-end
-
-
- -

+ See on GitHub + + + +

@@ -1228,23 +1228,23 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob.rb, line 213
+  def url(expires_in: ActiveStorage.service_urls_expire_in, disposition: :inline, filename: nil, **options)
+    service.url key, expires_in: expires_in, filename: ActiveStorage::Filename.wrap(filename || self.filename),
+      content_type: content_type_for_serving, disposition: forced_disposition_for_serving || disposition, **options
+  end
- -
-
# File activestorage/app/models/active_storage/blob.rb, line 213
-def url(expires_in: ActiveStorage.service_urls_expire_in, disposition: :inline, filename: nil, **options)
-  service.url key, expires_in: expires_in, filename: ActiveStorage::Filename.wrap(filename || self.filename),
-    content_type: content_type_for_serving, disposition: forced_disposition_for_serving || disposition, **options
-end
-
-
- -

+ See on GitHub + + + +

@@ -1264,22 +1264,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob.rb, line 200
+  def video?
+    content_type.start_with?("video")
+  end
- -
-
# File activestorage/app/models/active_storage/blob.rb, line 200
-def video?
-  content_type.start_with?("video")
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Blob/Analyzable.html b/src/classes/ActiveStorage/Blob/Analyzable.html index 06919e7d8b..36b0b46bcd 100644 --- a/src/classes/ActiveStorage/Blob/Analyzable.html +++ b/src/classes/ActiveStorage/Blob/Analyzable.html @@ -104,22 +104,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob/analyzable.rb, line 29
+  def analyze
+    update! metadata: metadata.merge(extract_metadata_via_analyzer)
+  end
- -
-
# File activestorage/app/models/active_storage/blob/analyzable.rb, line 29
-def analyze
-  update! metadata: metadata.merge(extract_metadata_via_analyzer)
-end
-
-
- - + See on GitHub + + + +

@@ -141,26 +141,26 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob/analyzable.rb, line 37
+  def analyze_later
+    if analyzer_class.analyze_later?
+      ActiveStorage::AnalyzeJob.perform_later(self)
+    else
+      analyze
+    end
+  end
- -
-
# File activestorage/app/models/active_storage/blob/analyzable.rb, line 37
-def analyze_later
-  if analyzer_class.analyze_later?
-    ActiveStorage::AnalyzeJob.perform_later(self)
-  else
-    analyze
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -180,22 +180,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob/analyzable.rb, line 46
+  def analyzed?
+    analyzed
+  end
- -
-
# File activestorage/app/models/active_storage/blob/analyzable.rb, line 46
-def analyzed?
-  analyzed
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Blob/Identifiable.html b/src/classes/ActiveStorage/Blob/Identifiable.html index 1718928219..c26133cd3a 100644 --- a/src/classes/ActiveStorage/Blob/Identifiable.html +++ b/src/classes/ActiveStorage/Blob/Identifiable.html @@ -89,22 +89,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob/identifiable.rb, line 17
+  def identified?
+    identified
+  end
- -
-
# File activestorage/app/models/active_storage/blob/identifiable.rb, line 17
-def identified?
-  identified
-end
-
-
- - + See on GitHub + + + +

@@ -124,23 +124,23 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob/identifiable.rb, line 5
+  def identify
+    identify_without_saving
+    save!
+  end
- -
-
# File activestorage/app/models/active_storage/blob/identifiable.rb, line 5
-def identify
-  identify_without_saving
-  save!
-end
-
-
- -

+ See on GitHub + + + +

@@ -160,25 +160,25 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob/identifiable.rb, line 10
+  def identify_without_saving
+    unless identified?
+      self.content_type = identify_content_type
+      self.identified = true
+    end
+  end
- -
-
# File activestorage/app/models/active_storage/blob/identifiable.rb, line 10
-def identify_without_saving
-  unless identified?
-    self.content_type = identify_content_type
-    self.identified = true
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Blob/Representable.html b/src/classes/ActiveStorage/Blob/Representable.html index 6fb3e008e9..d493b1e20c 100644 --- a/src/classes/ActiveStorage/Blob/Representable.html +++ b/src/classes/ActiveStorage/Blob/Representable.html @@ -105,26 +105,26 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob/representable.rb, line 63
+  def preview(transformations)
+    if previewable?
+      ActiveStorage::Preview.new(self, transformations)
+    else
+      raise ActiveStorage::UnpreviewableError
+    end
+  end
- -
-
# File activestorage/app/models/active_storage/blob/representable.rb, line 63
-def preview(transformations)
-  if previewable?
-    ActiveStorage::Preview.new(self, transformations)
-  else
-    raise ActiveStorage::UnpreviewableError
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -144,22 +144,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob/representable.rb, line 72
+  def previewable?
+    ActiveStorage.previewers.any? { |klass| klass.accept?(self) }
+  end
- -
-
# File activestorage/app/models/active_storage/blob/representable.rb, line 72
-def previewable?
-  ActiveStorage.previewers.any? { |klass| klass.accept?(self) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -179,22 +179,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob/representable.rb, line 97
+  def representable?
+    variable? || previewable?
+  end
- -
-
# File activestorage/app/models/active_storage/blob/representable.rb, line 97
-def representable?
-  variable? || previewable?
-end
-
-
- -

+ See on GitHub + + + +

@@ -221,29 +221,29 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob/representable.rb, line 85
+  def representation(transformations)
+    case
+    when previewable?
+      preview transformations
+    when variable?
+      variant transformations
+    else
+      raise ActiveStorage::UnrepresentableError
+    end
+  end
- -
-
# File activestorage/app/models/active_storage/blob/representable.rb, line 85
-def representation(transformations)
-  case
-  when previewable?
-    preview transformations
-  when variable?
-    variant transformations
-  else
-    raise ActiveStorage::UnrepresentableError
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -263,22 +263,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob/representable.rb, line 44
+  def variable?
+    ActiveStorage.variable_content_types.include?(content_type)
+  end
- -
-
# File activestorage/app/models/active_storage/blob/representable.rb, line 44
-def variable?
-  ActiveStorage.variable_content_types.include?(content_type)
-end
-
-
- -

+ See on GitHub + + + +

@@ -312,26 +312,26 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/blob/representable.rb, line 34
+  def variant(transformations)
+    if variable?
+      variant_class.new(self, ActiveStorage::Variation.wrap(transformations).default_to(default_variant_transformations))
+    else
+      raise ActiveStorage::InvariableError
+    end
+  end
- -
-
# File activestorage/app/models/active_storage/blob/representable.rb, line 34
-def variant(transformations)
-  if variable?
-    variant_class.new(self, ActiveStorage::Variation.wrap(transformations).default_to(default_variant_transformations))
-  else
-    raise ActiveStorage::InvariableError
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Blobs/ProxyController.html b/src/classes/ActiveStorage/Blobs/ProxyController.html index d6256bcf4f..fdc6010910 100644 --- a/src/classes/ActiveStorage/Blobs/ProxyController.html +++ b/src/classes/ActiveStorage/Blobs/ProxyController.html @@ -111,31 +111,31 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/controllers/active_storage/blobs/proxy_controller.rb, line 14
+  def show
+    if request.headers["Range"].present?
+      send_blob_byte_range_data @blob, request.headers["Range"]
+    else
+      http_cache_forever public: true do
+        response.headers["Accept-Ranges"] = "bytes"
+        response.headers["Content-Length"] = @blob.byte_size.to_s
+
+        send_blob_stream @blob, disposition: params[:disposition]
+      end
+    end
+  end
- -
-
# File activestorage/app/controllers/active_storage/blobs/proxy_controller.rb, line 14
-def show
-  if request.headers["Range"].present?
-    send_blob_byte_range_data @blob, request.headers["Range"]
-  else
-    http_cache_forever public: true do
-      response.headers["Accept-Ranges"] = "bytes"
-      response.headers["Content-Length"] = @blob.byte_size.to_s
-
-      send_blob_stream @blob, disposition: params[:disposition]
-    end
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Blobs/RedirectController.html b/src/classes/ActiveStorage/Blobs/RedirectController.html index d5f4e3acf8..046f0fa019 100644 --- a/src/classes/ActiveStorage/Blobs/RedirectController.html +++ b/src/classes/ActiveStorage/Blobs/RedirectController.html @@ -89,23 +89,23 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/controllers/active_storage/blobs/redirect_controller.rb, line 12
+  def show
+    expires_in ActiveStorage.service_urls_expire_in
+    redirect_to @blob.url(disposition: params[:disposition]), allow_other_host: true
+  end
- -
-
# File activestorage/app/controllers/active_storage/blobs/redirect_controller.rb, line 12
-def show
-  expires_in ActiveStorage.service_urls_expire_in
-  redirect_to @blob.url(disposition: params[:disposition]), allow_other_host: true
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveStorage/BlobsController.html b/src/classes/ActiveStorage/BlobsController.html deleted file mode 100644 index 0df7688be7..0000000000 --- a/src/classes/ActiveStorage/BlobsController.html +++ /dev/null @@ -1,114 +0,0 @@ ---- -title: ActiveStorage::BlobsController -layout: default ---- -
- -
-
- -
- -

Take a signed permanent reference for a blob and turn it into an expiring service URL for download. Note: These URLs are publicly accessible. If you need to enforce access protection beyond the security-through-obscurity factor of the signed blob references, you'll need to implement your own authenticated redirection controller.

- -
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - - -

Instance Public methods

- -
-

- - show() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activestorage/app/controllers/active_storage/blobs_controller.rb, line 10
-def show
-  expires_in ActiveStorage.service_urls_expire_in
-  redirect_to @blob.service_url(disposition: params[:disposition])
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveStorage/DirectUploadsController.html b/src/classes/ActiveStorage/DirectUploadsController.html index 47976bccf3..e8c2d98bb8 100644 --- a/src/classes/ActiveStorage/DirectUploadsController.html +++ b/src/classes/ActiveStorage/DirectUploadsController.html @@ -87,23 +87,23 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/controllers/active_storage/direct_uploads_controller.rb, line 7
+  def create
+    blob = ActiveStorage::Blob.create_before_direct_upload!(**blob_args)
+    render json: direct_upload_json(blob)
+  end
- -
-
# File activestorage/app/controllers/active_storage/direct_uploads_controller.rb, line 7
-def create
-  blob = ActiveStorage::Blob.create_before_direct_upload!(**blob_args)
-  render json: direct_upload_json(blob)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveStorage/DiskController.html b/src/classes/ActiveStorage/DiskController.html index 4a47cb6fd1..e797807ba5 100644 --- a/src/classes/ActiveStorage/DiskController.html +++ b/src/classes/ActiveStorage/DiskController.html @@ -91,28 +91,28 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/controllers/active_storage/disk_controller.rb, line 12
+  def show
+    if key = decode_verified_key
+      serve_file named_disk_service(key[:service_name]).path_for(key[:key]), content_type: key[:content_type], disposition: key[:disposition]
+    else
+      head :not_found
+    end
+  rescue Errno::ENOENT
+    head :not_found
+  end
- -
-
# File activestorage/app/controllers/active_storage/disk_controller.rb, line 12
-def show
-  if key = decode_verified_key
-    serve_file named_disk_service(key[:service_name]).path_for(key[:key]), content_type: key[:content_type], disposition: key[:disposition]
-  else
-    head :not_found
-  end
-rescue Errno::ENOENT
-  head :not_found
-end
-
-
- - + See on GitHub + + + +

@@ -132,33 +132,33 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/controllers/active_storage/disk_controller.rb, line 22
+  def update
+    if token = decode_verified_token
+      if acceptable_content?(token)
+        named_disk_service(token[:service_name]).upload token[:key], request.body, checksum: token[:checksum]
+        head :no_content
+      else
+        head :unprocessable_entity
+      end
+    else
+      head :not_found
+    end
+  rescue ActiveStorage::IntegrityError
+    head :unprocessable_entity
+  end
- -
-
# File activestorage/app/controllers/active_storage/disk_controller.rb, line 22
-def update
-  if token = decode_verified_token
-    if acceptable_content?(token)
-      named_disk_service(token[:service_name]).upload token[:key], request.body, checksum: token[:checksum]
-      head :no_content
-    else
-      head :unprocessable_entity
-    end
-  else
-    head :not_found
-  end
-rescue ActiveStorage::IntegrityError
-  head :unprocessable_entity
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Downloading.html b/src/classes/ActiveStorage/Downloading.html deleted file mode 100644 index edb973cb2d..0000000000 --- a/src/classes/ActiveStorage/Downloading.html +++ /dev/null @@ -1,230 +0,0 @@ ---- -title: ActiveStorage::Downloading -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - included(klass) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activestorage/lib/active_storage/downloading.rb, line 8
-    def self.included(klass)
-      ActiveSupport::Deprecation.warn <<~MESSAGE.squish, caller_locations(2)
-        ActiveStorage::Downloading is deprecated and will be removed in Active Storage 6.1.
-        Use ActiveStorage::Blob#open instead.
-      MESSAGE
-    end
-
-
- -
- - - -

Instance Private methods

- -
-

- - download_blob_to(file) - -

- - -
-

Efficiently downloads blob data into the given file.

-
- - - - - - - - -
- - -
-
# File activestorage/lib/active_storage/downloading.rb, line 35
-def download_blob_to(file) #:doc:
-  file.binmode
-  blob.download { |chunk| file.write(chunk) }
-  file.flush
-  file.rewind
-end
-
-
- -
- -
-

- - download_blob_to_tempfile() - -

- - -
-

Opens a new tempfile in tempdir and copies blob data into it. Yields the tempfile.

-
- - - - - - - - -
- - -
-
# File activestorage/lib/active_storage/downloading.rb, line 17
-def download_blob_to_tempfile #:doc:
-  open_tempfile_for_blob do |file|
-    download_blob_to file
-    yield file
-  end
-end
-
-
- -
- -
-

- - tempdir() - -

- - -
-

Returns the directory in which tempfiles should be opened. Defaults to Dir.tmpdir.

-
- - - - - - - - -
- - -
-
# File activestorage/lib/active_storage/downloading.rb, line 43
-def tempdir #:doc:
-  Dir.tmpdir
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveStorage/Filename.html b/src/classes/ActiveStorage/Filename.html index 4624c60a10..6a70384bef 100644 --- a/src/classes/ActiveStorage/Filename.html +++ b/src/classes/ActiveStorage/Filename.html @@ -140,22 +140,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/filename.rb, line 18
+  def initialize(filename)
+    @filename = filename
+  end
- -
-
# File activestorage/app/models/active_storage/filename.rb, line 18
-def initialize(filename)
-  @filename = filename
-end
-
-
- - + See on GitHub + + + +

@@ -175,22 +175,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/filename.rb, line 13
+    def wrap(filename)
+      filename.kind_of?(self) ? filename : new(filename)
+    end
- -
-
# File activestorage/app/models/active_storage/filename.rb, line 13
-def wrap(filename)
-  filename.kind_of?(self) ? filename : new(filename)
-end
-
-
- -

+ See on GitHub + + + + @@ -214,22 +214,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/filename.rb, line 76
+  def <=>(other)
+    to_s.downcase <=> other.to_s.downcase
+  end
- -
-
# File activestorage/app/models/active_storage/filename.rb, line 76
-def <=>(other)
-  to_s.downcase <=> other.to_s.downcase
-end
-
-
- - + See on GitHub + + + +

@@ -249,22 +249,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/filename.rb, line 68
+  def as_json(*)
+    to_s
+  end
- -
-
# File activestorage/app/models/active_storage/filename.rb, line 68
-def as_json(*)
-  to_s
-end
-
-
- -

+ See on GitHub + + + +

@@ -289,22 +289,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/filename.rb, line 27
+  def base
+    File.basename @filename, extension_with_delimiter
+  end
- -
-
# File activestorage/app/models/active_storage/filename.rb, line 27
-def base
-  File.basename @filename, extension_with_delimiter
-end
-
-
- -

+ See on GitHub + + + +

@@ -328,7 +328,8 @@

-

+ +

@@ -353,22 +354,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/filename.rb, line 37
+  def extension_with_delimiter
+    File.extname @filename
+  end
- -
-
# File activestorage/app/models/active_storage/filename.rb, line 37
-def extension_with_delimiter
-  File.extname @filename
-end
-
-
- -

+ See on GitHub + + + +

@@ -397,22 +398,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/filename.rb, line 47
+  def extension_without_delimiter
+    extension_with_delimiter.from(1).to_s
+  end
- -
-
# File activestorage/app/models/active_storage/filename.rb, line 47
-def extension_without_delimiter
-  extension_with_delimiter.from(1).to_s
-end
-
-
- -

+ See on GitHub + + + +

@@ -438,22 +439,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/filename.rb, line 59
+  def sanitized
+    @filename.encode(Encoding::UTF_8, invalid: :replace, undef: :replace, replace: "�").strip.tr("\u{202E}%$|:;/\t\r\n\\", "-")
+  end
- -
-
# File activestorage/app/models/active_storage/filename.rb, line 59
-def sanitized
-  @filename.encode(Encoding::UTF_8, invalid: :replace, undef: :replace, replace: "�").strip.tr("\u{202E}%$|:;/\t\r\n\\", "-")
-end
-
-
- -

+ See on GitHub + + + +

@@ -473,22 +474,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/filename.rb, line 72
+  def to_json
+    to_s
+  end
- -
-
# File activestorage/app/models/active_storage/filename.rb, line 72
-def to_json
-  to_s
-end
-
-
- -

+ See on GitHub + + + +

@@ -508,22 +509,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/filename.rb, line 64
+  def to_s
+    sanitized.to_s
+  end
- -
-
# File activestorage/app/models/active_storage/filename.rb, line 64
-def to_s
-  sanitized.to_s
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveStorage/FixtureSet.html b/src/classes/ActiveStorage/FixtureSet.html index 8394096f50..456819eb52 100644 --- a/src/classes/ActiveStorage/FixtureSet.html +++ b/src/classes/ActiveStorage/FixtureSet.html @@ -153,22 +153,22 @@

Examples

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/fixture_set.rb, line 62
+    def self.blob(filename:, **attributes)
+      new.prepare Blob.new(filename: filename, key: generate_unique_secure_token), **attributes
+    end
- -
-
# File activestorage/lib/active_storage/fixture_set.rb, line 62
-def self.blob(filename:, **attributes)
-  new.prepare Blob.new(filename: filename, key: generate_unique_secure_token), **attributes
-end
-
-
- - + See on GitHub + + + + @@ -192,27 +192,27 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/fixture_set.rb, line 66
+    def prepare(instance, **attributes)
+      io = file_fixture(instance.filename.to_s).open
+      instance.unfurl(io)
+      instance.assign_attributes(attributes)
+      instance.upload_without_unfurling(io)
+
+      instance.attributes.transform_values { |value| value.is_a?(Hash) ? value.to_json : value }.compact.to_json
+    end
- -
-
# File activestorage/lib/active_storage/fixture_set.rb, line 66
-def prepare(instance, **attributes)
-  io = file_fixture(instance.filename.to_s).open
-  instance.unfurl(io)
-  instance.assign_attributes(attributes)
-  instance.upload_without_unfurling(io)
-
-  instance.attributes.transform_values { |value| value.is_a?(Hash) ? value.to_json : value }.compact.to_json
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveStorage/LogSubscriber.html b/src/classes/ActiveStorage/LogSubscriber.html index fdbec0e9b0..9c31a9f509 100644 --- a/src/classes/ActiveStorage/LogSubscriber.html +++ b/src/classes/ActiveStorage/LogSubscriber.html @@ -117,22 +117,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/log_subscriber.rb, line 53
+    def logger
+      ActiveStorage.logger
+    end
- -
-
# File activestorage/lib/active_storage/log_subscriber.rb, line 53
-def logger
-  ActiveStorage.logger
-end
-
-
- - + See on GitHub + + + +

@@ -152,22 +152,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/log_subscriber.rb, line 21
+    def preview(event)
+      info event, color("Previewed file from key: #{key_in(event)}", BLUE)
+    end
- -
-
# File activestorage/lib/active_storage/log_subscriber.rb, line 21
-def preview(event)
-  info event, color("Previewed file from key: #{key_in(event)}", BLUE)
-end
-
-
- -

+ See on GitHub + + + +

@@ -187,22 +187,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/log_subscriber.rb, line 26
+    def service_delete(event)
+      info event, color("Deleted file from key: #{key_in(event)}", RED)
+    end
- -
-
# File activestorage/lib/active_storage/log_subscriber.rb, line 26
-def service_delete(event)
-  info event, color("Deleted file from key: #{key_in(event)}", RED)
-end
-
-
- -

+ See on GitHub + + + +

@@ -222,22 +222,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/log_subscriber.rb, line 31
+    def service_delete_prefixed(event)
+      info event, color("Deleted files by key prefix: #{event.payload[:prefix]}", RED)
+    end
- -
-
# File activestorage/lib/active_storage/log_subscriber.rb, line 31
-def service_delete_prefixed(event)
-  info event, color("Deleted files by key prefix: #{event.payload[:prefix]}", RED)
-end
-
-
- -

+ See on GitHub + + + +

@@ -261,22 +261,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/log_subscriber.rb, line 14
+    def service_download(event)
+      info event, color("Downloaded file from key: #{key_in(event)}", BLUE)
+    end
- -
-
# File activestorage/lib/active_storage/log_subscriber.rb, line 14
-def service_download(event)
-  info event, color("Downloaded file from key: #{key_in(event)}", BLUE)
-end
-
-
- -

+ See on GitHub + + + +

@@ -296,22 +296,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/log_subscriber.rb, line 36
+    def service_exist(event)
+      debug event, color("Checked if file exists at key: #{key_in(event)} (#{event.payload[:exist] ? "yes" : "no"})", BLUE)
+    end
- -
-
# File activestorage/lib/active_storage/log_subscriber.rb, line 36
-def service_exist(event)
-  debug event, color("Checked if file exists at key: #{key_in(event)} (#{event.payload[:exist] ? "yes" : "no"})", BLUE)
-end
-
-
- -

+ See on GitHub + + + +

@@ -331,24 +331,24 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/log_subscriber.rb, line 46
+    def service_mirror(event)
+      message = "Mirrored file at key: #{key_in(event)}"
+      message += " (checksum: #{event.payload[:checksum]})" if event.payload[:checksum]
+      debug event, color(message, GREEN)
+    end
- -
-
# File activestorage/lib/active_storage/log_subscriber.rb, line 46
-def service_mirror(event)
-  message = "Mirrored file at key: #{key_in(event)}"
-  message += " (checksum: #{event.payload[:checksum]})" if event.payload[:checksum]
-  debug event, color(message, GREEN)
-end
-
-
- -

+ See on GitHub + + + +

@@ -372,7 +372,8 @@

-

+ +

@@ -392,24 +393,24 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/log_subscriber.rb, line 7
+    def service_upload(event)
+      message = "Uploaded file to key: #{key_in(event)}"
+      message += " (checksum: #{event.payload[:checksum]})" if event.payload[:checksum]
+      info event, color(message, GREEN)
+    end
- -
-
# File activestorage/lib/active_storage/log_subscriber.rb, line 7
-def service_upload(event)
-  message = "Uploaded file to key: #{key_in(event)}"
-  message += " (checksum: #{event.payload[:checksum]})" if event.payload[:checksum]
-  info event, color(message, GREEN)
-end
-
-
- -

+ See on GitHub + + + +

@@ -429,22 +430,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/log_subscriber.rb, line 41
+    def service_url(event)
+      debug event, color("Generated URL for file at key: #{key_in(event)} (#{event.payload[:url]})", BLUE)
+    end
- -
-
# File activestorage/lib/active_storage/log_subscriber.rb, line 41
-def service_url(event)
-  debug event, color("Generated URL for file at key: #{key_in(event)} (#{event.payload[:url]})", BLUE)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveStorage/MirrorJob.html b/src/classes/ActiveStorage/MirrorJob.html index 9ebee6387d..e0dc38da8e 100644 --- a/src/classes/ActiveStorage/MirrorJob.html +++ b/src/classes/ActiveStorage/MirrorJob.html @@ -87,22 +87,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/jobs/active_storage/mirror_job.rb, line 12
+  def perform(key, checksum:)
+    ActiveStorage::Blob.service.try(:mirror, key, checksum: checksum)
+  end
- -
-
# File activestorage/app/jobs/active_storage/mirror_job.rb, line 12
-def perform(key, checksum:)
-  ActiveStorage::Blob.service.try(:mirror, key, checksum: checksum)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Preview.html b/src/classes/ActiveStorage/Preview.html index d08d4394a1..adb8fbb862 100644 --- a/src/classes/ActiveStorage/Preview.html +++ b/src/classes/ActiveStorage/Preview.html @@ -161,22 +161,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/preview.rb, line 38
+  def initialize(blob, variation_or_variation_key)
+    @blob, @variation = blob, ActiveStorage::Variation.wrap(variation_or_variation_key)
+  end
- -
-
# File activestorage/app/models/active_storage/preview.rb, line 38
-def initialize(blob, variation_or_variation_key)
-  @blob, @variation = blob, ActiveStorage::Variation.wrap(variation_or_variation_key)
-end
-
-
- - + See on GitHub + + + + @@ -200,26 +200,26 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/preview.rb, line 85
+  def download(&block)
+    if processed?
+      variant.download(&block)
+    else
+      raise UnprocessedError
+    end
+  end
- -
-
# File activestorage/app/models/active_storage/preview.rb, line 85
-def download(&block)
-  if processed?
-    variant.download(&block)
-  else
-    raise UnprocessedError
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -239,22 +239,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/preview.rb, line 54
+  def image
+    blob.preview_image
+  end
- -
-
# File activestorage/app/models/active_storage/preview.rb, line 54
-def image
-  blob.preview_image
-end
-
-
- -

+ See on GitHub + + + +

@@ -274,26 +274,26 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/preview.rb, line 72
+  def key
+    if processed?
+      variant.key
+    else
+      raise UnprocessedError
+    end
+  end
- -
-
# File activestorage/app/models/active_storage/preview.rb, line 72
-def key
-  if processed?
-    variant.key
-  else
-    raise UnprocessedError
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -318,23 +318,23 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/preview.rb, line 48
+  def processed
+    process unless processed?
+    self
+  end
- -
-
# File activestorage/app/models/active_storage/preview.rb, line 48
-def processed
-  process unless processed?
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -356,26 +356,26 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/preview.rb, line 63
+  def url(**options)
+    if processed?
+      variant.url(**options)
+    else
+      raise UnprocessedError
+    end
+  end
- -
-
# File activestorage/app/models/active_storage/preview.rb, line 63
-def url(**options)
-  if processed?
-    variant.url(**options)
-  else
-    raise UnprocessedError
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Previewer.html b/src/classes/ActiveStorage/Previewer.html index 4d1ddd2b3a..4fcc1101de 100644 --- a/src/classes/ActiveStorage/Previewer.html +++ b/src/classes/ActiveStorage/Previewer.html @@ -149,22 +149,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/previewer.rb, line 14
+    def self.accept?(blob)
+      false
+    end
- -
-
# File activestorage/lib/active_storage/previewer.rb, line 14
-def self.accept?(blob)
-  false
-end
-
-
- - + See on GitHub + + + +

@@ -184,22 +184,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/previewer.rb, line 18
+    def initialize(blob)
+      @blob = blob
+    end
- -
-
# File activestorage/lib/active_storage/previewer.rb, line 18
-def initialize(blob)
-  @blob = blob
-end
-
-
- -

+ See on GitHub + + + + @@ -223,22 +223,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/previewer.rb, line 25
+    def preview(**options)
+      raise NotImplementedError
+    end
- -
-
# File activestorage/lib/active_storage/previewer.rb, line 25
-def preview(**options)
-  raise NotImplementedError
-end
-
-
- - + See on GitHub + + + +

Instance Private methods

@@ -261,22 +261,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/previewer.rb, line 31
+      def download_blob_to_tempfile(&block) # :doc:
+        blob.open tmpdir: tmpdir, &block
+      end
- -
-
# File activestorage/lib/active_storage/previewer.rb, line 31
-def download_blob_to_tempfile(&block) # :doc:
-  blob.open tmpdir: tmpdir, &block
-end
-
-
- - + See on GitHub + + + +

@@ -309,28 +309,28 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/previewer.rb, line 49
+      def draw(*argv) # :doc:
+        open_tempfile do |file|
+          instrument :preview, key: blob.key do
+            capture(*argv, to: file)
+          end
+
+          yield file
+        end
+      end
- -
-
# File activestorage/lib/active_storage/previewer.rb, line 49
-def draw(*argv) # :doc:
-  open_tempfile do |file|
-    instrument :preview, key: blob.key do
-      capture(*argv, to: file)
-    end
-
-    yield file
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -350,22 +350,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/previewer.rb, line 93
+      def logger # :doc:
+        ActiveStorage.logger
+      end
- -
-
# File activestorage/lib/active_storage/previewer.rb, line 93
-def logger # :doc:
-  ActiveStorage.logger
-end
-
-
- -

+ See on GitHub + + + +

@@ -385,22 +385,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/previewer.rb, line 97
+      def tmpdir # :doc:
+        Dir.tmpdir
+      end
- -
-
# File activestorage/lib/active_storage/previewer.rb, line 97
-def tmpdir # :doc:
-  Dir.tmpdir
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Previewer/MuPDFPreviewer.html b/src/classes/ActiveStorage/Previewer/MuPDFPreviewer.html index c15c208940..716f776429 100644 --- a/src/classes/ActiveStorage/Previewer/MuPDFPreviewer.html +++ b/src/classes/ActiveStorage/Previewer/MuPDFPreviewer.html @@ -92,22 +92,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/previewer/mupdf_previewer.rb, line 6
+      def accept?(blob)
+        blob.content_type == "application/pdf" && mutool_exists?
+      end
- -
-
# File activestorage/lib/active_storage/previewer/mupdf_previewer.rb, line 6
-def accept?(blob)
-  blob.content_type == "application/pdf" && mutool_exists?
-end
-
-
- - + See on GitHub + + + +

@@ -127,26 +127,26 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/previewer/mupdf_previewer.rb, line 14
+      def mutool_exists?
+        return @mutool_exists if defined?(@mutool_exists) && !@mutool_exists.nil?
+
+        system mutool_path, out: File::NULL, err: File::NULL
+
+        @mutool_exists = $?.exitstatus == 1
+      end
- -
-
# File activestorage/lib/active_storage/previewer/mupdf_previewer.rb, line 14
-def mutool_exists?
-  return @mutool_exists if defined?(@mutool_exists) && !@mutool_exists.nil?
-
-  system mutool_path, out: File::NULL, err: File::NULL
-
-  @mutool_exists = $?.exitstatus == 1
-end
-
-
- -

+ See on GitHub + + + +

@@ -166,22 +166,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/previewer/mupdf_previewer.rb, line 10
+      def mutool_path
+        ActiveStorage.paths[:mutool] || "mutool"
+      end
- -
-
# File activestorage/lib/active_storage/previewer/mupdf_previewer.rb, line 10
-def mutool_path
-  ActiveStorage.paths[:mutool] || "mutool"
-end
-
-
- -

+ See on GitHub + + + + @@ -205,26 +205,26 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/previewer/mupdf_previewer.rb, line 23
+    def preview(**options)
+      download_blob_to_tempfile do |input|
+        draw_first_page_from input do |output|
+          yield io: output, filename: "#{blob.filename.base}.png", content_type: "image/png", **options
+        end
+      end
+    end
- -
-
# File activestorage/lib/active_storage/previewer/mupdf_previewer.rb, line 23
-def preview(**options)
-  download_blob_to_tempfile do |input|
-    draw_first_page_from input do |output|
-      yield io: output, filename: "#{blob.filename.base}.png", content_type: "image/png", **options
-    end
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Previewer/PopplerPDFPreviewer.html b/src/classes/ActiveStorage/Previewer/PopplerPDFPreviewer.html index 7b99743e9c..91ca6c39c1 100644 --- a/src/classes/ActiveStorage/Previewer/PopplerPDFPreviewer.html +++ b/src/classes/ActiveStorage/Previewer/PopplerPDFPreviewer.html @@ -92,22 +92,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb, line 6
+      def accept?(blob)
+        blob.content_type == "application/pdf" && pdftoppm_exists?
+      end
- -
-
# File activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb, line 6
-def accept?(blob)
-  blob.content_type == "application/pdf" && pdftoppm_exists?
-end
-
-
- - + See on GitHub + + + +

@@ -127,24 +127,24 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb, line 14
+      def pdftoppm_exists?
+        return @pdftoppm_exists if defined?(@pdftoppm_exists)
+
+        @pdftoppm_exists = system(pdftoppm_path, "-v", out: File::NULL, err: File::NULL)
+      end
- -
-
# File activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb, line 14
-def pdftoppm_exists?
-  return @pdftoppm_exists if defined?(@pdftoppm_exists)
-
-  @pdftoppm_exists = system(pdftoppm_path, "-v", out: File::NULL, err: File::NULL)
-end
-
-
- -

+ See on GitHub + + + +

@@ -164,22 +164,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb, line 10
+      def pdftoppm_path
+        ActiveStorage.paths[:pdftoppm] || "pdftoppm"
+      end
- -
-
# File activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb, line 10
-def pdftoppm_path
-  ActiveStorage.paths[:pdftoppm] || "pdftoppm"
-end
-
-
- -

+ See on GitHub + + + + @@ -203,26 +203,26 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb, line 21
+    def preview(**options)
+      download_blob_to_tempfile do |input|
+        draw_first_page_from input do |output|
+          yield io: output, filename: "#{blob.filename.base}.png", content_type: "image/png", **options
+        end
+      end
+    end
- -
-
# File activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb, line 21
-def preview(**options)
-  download_blob_to_tempfile do |input|
-    draw_first_page_from input do |output|
-      yield io: output, filename: "#{blob.filename.base}.png", content_type: "image/png", **options
-    end
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Previewer/VideoPreviewer.html b/src/classes/ActiveStorage/Previewer/VideoPreviewer.html index b5dadc4c0f..a1741dc3c3 100644 --- a/src/classes/ActiveStorage/Previewer/VideoPreviewer.html +++ b/src/classes/ActiveStorage/Previewer/VideoPreviewer.html @@ -92,22 +92,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/previewer/video_previewer.rb, line 8
+      def accept?(blob)
+        blob.video? && ffmpeg_exists?
+      end
- -
-
# File activestorage/lib/active_storage/previewer/video_previewer.rb, line 8
-def accept?(blob)
-  blob.video? && ffmpeg_exists?
-end
-
-
- - + See on GitHub + + + +

@@ -127,24 +127,24 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/previewer/video_previewer.rb, line 12
+      def ffmpeg_exists?
+        return @ffmpeg_exists if defined?(@ffmpeg_exists)
+
+        @ffmpeg_exists = system(ffmpeg_path, "-version", out: File::NULL, err: File::NULL)
+      end
- -
-
# File activestorage/lib/active_storage/previewer/video_previewer.rb, line 12
-def ffmpeg_exists?
-  return @ffmpeg_exists if defined?(@ffmpeg_exists)
-
-  @ffmpeg_exists = system(ffmpeg_path, "-version", out: File::NULL, err: File::NULL)
-end
-
-
- -

+ See on GitHub + + + +

@@ -164,22 +164,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/previewer/video_previewer.rb, line 18
+      def ffmpeg_path
+        ActiveStorage.paths[:ffmpeg] || "ffmpeg"
+      end
- -
-
# File activestorage/lib/active_storage/previewer/video_previewer.rb, line 18
-def ffmpeg_path
-  ActiveStorage.paths[:ffmpeg] || "ffmpeg"
-end
-
-
- -

+ See on GitHub + + + + @@ -203,26 +203,26 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/previewer/video_previewer.rb, line 23
+    def preview(**options)
+      download_blob_to_tempfile do |input|
+        draw_relevant_frame_from input do |output|
+          yield io: output, filename: "#{blob.filename.base}.jpg", content_type: "image/jpeg", **options
+        end
+      end
+    end
- -
-
# File activestorage/lib/active_storage/previewer/video_previewer.rb, line 23
-def preview(**options)
-  download_blob_to_tempfile do |input|
-    draw_relevant_frame_from input do |output|
-      yield io: output, filename: "#{blob.filename.base}.jpg", content_type: "image/jpeg", **options
-    end
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveStorage/PurgeJob.html b/src/classes/ActiveStorage/PurgeJob.html index 25769e8d46..32f464999d 100644 --- a/src/classes/ActiveStorage/PurgeJob.html +++ b/src/classes/ActiveStorage/PurgeJob.html @@ -87,22 +87,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/jobs/active_storage/purge_job.rb, line 10
+  def perform(blob)
+    blob.purge
+  end
- -
-
# File activestorage/app/jobs/active_storage/purge_job.rb, line 10
-def perform(blob)
-  blob.purge
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Reflection/ActiveRecordExtensions/ClassMethods.html b/src/classes/ActiveStorage/Reflection/ActiveRecordExtensions/ClassMethods.html index cf886229f9..cf627a31c8 100644 --- a/src/classes/ActiveStorage/Reflection/ActiveRecordExtensions/ClassMethods.html +++ b/src/classes/ActiveStorage/Reflection/ActiveRecordExtensions/ClassMethods.html @@ -79,22 +79,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/reflection.rb, line 59
+        def reflect_on_all_attachments
+          attachment_reflections.values
+        end
- -
-
# File activestorage/lib/active_storage/reflection.rb, line 59
-def reflect_on_all_attachments
-  attachment_reflections.values
-end
-
-
- - + See on GitHub + + + +

@@ -118,22 +118,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/reflection.rb, line 68
+        def reflect_on_attachment(attachment)
+          attachment_reflections[attachment.to_s]
+        end
- -
-
# File activestorage/lib/active_storage/reflection.rb, line 68
-def reflect_on_attachment(attachment)
-  attachment_reflections[attachment.to_s]
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Representations/ProxyController.html b/src/classes/ActiveStorage/Representations/ProxyController.html index 385d804a1e..0973ad69a2 100644 --- a/src/classes/ActiveStorage/Representations/ProxyController.html +++ b/src/classes/ActiveStorage/Representations/ProxyController.html @@ -111,24 +111,24 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/controllers/active_storage/representations/proxy_controller.rb, line 13
+  def show
+    http_cache_forever public: true do
+      send_blob_stream @representation.image, disposition: params[:disposition]
+    end
+  end
- -
-
# File activestorage/app/controllers/active_storage/representations/proxy_controller.rb, line 13
-def show
-  http_cache_forever public: true do
-    send_blob_stream @representation.image, disposition: params[:disposition]
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Representations/RedirectController.html b/src/classes/ActiveStorage/Representations/RedirectController.html index 6aeaf9734f..4f312af0d1 100644 --- a/src/classes/ActiveStorage/Representations/RedirectController.html +++ b/src/classes/ActiveStorage/Representations/RedirectController.html @@ -89,23 +89,23 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/controllers/active_storage/representations/redirect_controller.rb, line 10
+  def show
+    expires_in ActiveStorage.service_urls_expire_in
+    redirect_to @representation.url(disposition: params[:disposition]), allow_other_host: true
+  end
- -
-
# File activestorage/app/controllers/active_storage/representations/redirect_controller.rb, line 10
-def show
-  expires_in ActiveStorage.service_urls_expire_in
-  redirect_to @representation.url(disposition: params[:disposition]), allow_other_host: true
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveStorage/RepresentationsController.html b/src/classes/ActiveStorage/RepresentationsController.html deleted file mode 100644 index 3f1baef833..0000000000 --- a/src/classes/ActiveStorage/RepresentationsController.html +++ /dev/null @@ -1,114 +0,0 @@ ---- -title: ActiveStorage::RepresentationsController -layout: default ---- -
- -
-
- -
- -

Take a signed permanent reference for a blob representation and turn it into an expiring service URL for download. Note: These URLs are publicly accessible. If you need to enforce access protection beyond the security-through-obscurity factor of the signed blob and variation reference, you'll need to implement your own authenticated redirection controller.

- -
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - - -

Instance Public methods

- -
-

- - show() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activestorage/app/controllers/active_storage/representations_controller.rb, line 10
-def show
-  expires_in ActiveStorage.service_urls_expire_in
-  redirect_to @blob.representation(params[:variation_key]).processed.service_url(disposition: params[:disposition])
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveStorage/Service.html b/src/classes/ActiveStorage/Service.html index 0578b91c71..e6bbd00c8b 100644 --- a/src/classes/ActiveStorage/Service.html +++ b/src/classes/ActiveStorage/Service.html @@ -224,22 +224,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service.rb, line 52
+      def configure(service_name, configurations)
+        Configurator.build(service_name, configurations)
+      end
- -
-
# File activestorage/lib/active_storage/service.rb, line 52
-def configure(service_name, configurations)
-  Configurator.build(service_name, configurations)
-end
-
-
- - + See on GitHub + + + + @@ -263,22 +263,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service.rb, line 96
+    def compose(source_keys, destination_key, filename: nil, content_type: nil, disposition: nil, custom_metadata: {})
+      raise NotImplementedError
+    end
- -
-
# File activestorage/lib/active_storage/service.rb, line 96
-def compose(source_keys, destination_key, filename: nil, content_type: nil, disposition: nil, custom_metadata: {})
-  raise NotImplementedError
-end
-
-
- - + See on GitHub + + + +

@@ -298,22 +298,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service.rb, line 101
+    def delete(key)
+      raise NotImplementedError
+    end
- -
-
# File activestorage/lib/active_storage/service.rb, line 101
-def delete(key)
-  raise NotImplementedError
-end
-
-
- -

+ See on GitHub + + + +

@@ -333,22 +333,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service.rb, line 106
+    def delete_prefixed(prefix)
+      raise NotImplementedError
+    end
- -
-
# File activestorage/lib/active_storage/service.rb, line 106
-def delete_prefixed(prefix)
-  raise NotImplementedError
-end
-
-
- -

+ See on GitHub + + + +

@@ -368,22 +368,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service.rb, line 82
+    def download(key)
+      raise NotImplementedError
+    end
- -
-
# File activestorage/lib/active_storage/service.rb, line 82
-def download(key)
-  raise NotImplementedError
-end
-
-
- -

+ See on GitHub + + + +

@@ -403,22 +403,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service.rb, line 87
+    def download_chunk(key, range)
+      raise NotImplementedError
+    end
- -
-
# File activestorage/lib/active_storage/service.rb, line 87
-def download_chunk(key, range)
-  raise NotImplementedError
-end
-
-
- -

+ See on GitHub + + + +

@@ -438,22 +438,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service.rb, line 111
+    def exist?(key)
+      raise NotImplementedError
+    end
- -
-
# File activestorage/lib/active_storage/service.rb, line 111
-def exist?(key)
-  raise NotImplementedError
-end
-
-
- -

+ See on GitHub + + + +

@@ -473,22 +473,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service.rb, line 143
+    def headers_for_direct_upload(key, filename:, content_type:, content_length:, checksum:, custom_metadata: {})
+      {}
+    end
- -
-
# File activestorage/lib/active_storage/service.rb, line 143
-def headers_for_direct_upload(key, filename:, content_type:, content_length:, checksum:, custom_metadata: {})
-  {}
-end
-
-
- -

+ See on GitHub + + + +

@@ -508,22 +508,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service.rb, line 91
+    def open(*args, **options, &block)
+      ActiveStorage::Downloader.new(self).open(*args, **options, &block)
+    end
- -
-
# File activestorage/lib/active_storage/service.rb, line 91
-def open(*args, **options, &block)
-  ActiveStorage::Downloader.new(self).open(*args, **options, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -543,22 +543,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service.rb, line 147
+    def public?
+      @public
+    end
- -
-
# File activestorage/lib/active_storage/service.rb, line 147
-def public?
-  @public
-end
-
-
- -

+ See on GitHub + + + +

@@ -578,21 +578,21 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service.rb, line 78
+    def update_metadata(key, **metadata)
+    end
- -
-
# File activestorage/lib/active_storage/service.rb, line 78
-def update_metadata(key, **metadata)
-end
-
-
- -

+ See on GitHub + + + +

@@ -612,22 +612,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service.rb, line 71
+    def upload(key, io, checksum: nil, **options)
+      raise NotImplementedError
+    end
- -
-
# File activestorage/lib/active_storage/service.rb, line 71
-def upload(key, io, checksum: nil, **options)
-  raise NotImplementedError
-end
-
-
- -

+ See on GitHub + + + +

@@ -647,33 +647,33 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service.rb, line 119
+    def url(key, **options)
+      instrument :url, key: key do |payload|
+        generated_url =
+          if public?
+            public_url(key, **options)
+          else
+            private_url(key, **options)
+          end
+
+        payload[:url] = generated_url
+
+        generated_url
+      end
+    end
- -
-
# File activestorage/lib/active_storage/service.rb, line 119
-def url(key, **options)
-  instrument :url, key: key do |payload|
-    generated_url =
-      if public?
-        public_url(key, **options)
-      else
-        private_url(key, **options)
-      end
-
-    payload[:url] = generated_url
-
-    generated_url
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -693,22 +693,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service.rb, line 138
+    def url_for_direct_upload(key, expires_in:, content_type:, content_length:, checksum:, custom_metadata: {})
+      raise NotImplementedError
+    end
- -
-
# File activestorage/lib/active_storage/service.rb, line 138
-def url_for_direct_upload(key, expires_in:, content_type:, content_length:, checksum:, custom_metadata: {})
-  raise NotImplementedError
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Service/AzureStorageService.html b/src/classes/ActiveStorage/Service/AzureStorageService.html index dd4dae7b12..cf28c08d95 100644 --- a/src/classes/ActiveStorage/Service/AzureStorageService.html +++ b/src/classes/ActiveStorage/Service/AzureStorageService.html @@ -154,25 +154,25 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/azure_storage_service.rb, line 17
+    def initialize(storage_account_name:, storage_access_key:, container:, public: false, **options)
+      @client = Azure::Storage::Blob::BlobService.create(storage_account_name: storage_account_name, storage_access_key: storage_access_key, **options)
+      @signer = Azure::Storage::Common::Core::Auth::SharedAccessSignature.new(storage_account_name, storage_access_key)
+      @container = container
+      @public = public
+    end
- -
-
# File activestorage/lib/active_storage/service/azure_storage_service.rb, line 17
-def initialize(storage_account_name:, storage_access_key:, container:, public: false, **options)
-  @client = Azure::Storage::Blob::BlobService.create(storage_account_name: storage_account_name, storage_access_key: storage_access_key, **options)
-  @signer = Azure::Storage::Common::Core::Auth::SharedAccessSignature.new(storage_account_name, storage_access_key)
-  @container = container
-  @public = public
-end
-
-
- - + See on GitHub + + + + @@ -196,36 +196,36 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/azure_storage_service.rb, line 112
+    def compose(source_keys, destination_key, filename: nil, content_type: nil, disposition: nil, custom_metadata: {})
+      content_disposition = content_disposition_with(type: disposition, filename: filename) if disposition && filename
+
+      client.create_append_blob(
+        container,
+        destination_key,
+        content_type: content_type,
+        content_disposition: content_disposition,
+        metadata: custom_metadata,
+      ).tap do |blob|
+        source_keys.each do |source_key|
+          stream(source_key) do |chunk|
+            client.append_blob_block(container, blob.name, chunk)
+          end
+        end
+      end
+    end
- -
-
# File activestorage/lib/active_storage/service/azure_storage_service.rb, line 112
-def compose(source_keys, destination_key, filename: nil, content_type: nil, disposition: nil, custom_metadata: {})
-  content_disposition = content_disposition_with(type: disposition, filename: filename) if disposition && filename
-
-  client.create_append_blob(
-    container,
-    destination_key,
-    content_type: content_type,
-    content_disposition: content_disposition,
-    metadata: custom_metadata,
-  ).tap do |blob|
-    source_keys.each do |source_key|
-      stream(source_key) do |chunk|
-        client.append_blob_block(container, blob.name, chunk)
-      end
-    end
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -245,27 +245,27 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/azure_storage_service.rb, line 58
+    def delete(key)
+      instrument :delete, key: key do
+        client.delete_blob(container, key)
+      rescue Azure::Core::Http::HTTPError => e
+        raise unless e.type == "BlobNotFound"
+        # Ignore files already deleted
+      end
+    end
- -
-
# File activestorage/lib/active_storage/service/azure_storage_service.rb, line 58
-def delete(key)
-  instrument :delete, key: key do
-    client.delete_blob(container, key)
-  rescue Azure::Core::Http::HTTPError => e
-    raise unless e.type == "BlobNotFound"
-    # Ignore files already deleted
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -285,34 +285,34 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/azure_storage_service.rb, line 67
+    def delete_prefixed(prefix)
+      instrument :delete_prefixed, prefix: prefix do
+        marker = nil
+
+        loop do
+          results = client.list_blobs(container, prefix: prefix, marker: marker)
+
+          results.each do |blob|
+            client.delete_blob(container, blob.name)
+          end
+
+          break unless marker = results.continuation_token.presence
+        end
+      end
+    end
- -
-
# File activestorage/lib/active_storage/service/azure_storage_service.rb, line 67
-def delete_prefixed(prefix)
-  instrument :delete_prefixed, prefix: prefix do
-    marker = nil
-
-    loop do
-      results = client.list_blobs(container, prefix: prefix, marker: marker)
-
-      results.each do |blob|
-        client.delete_blob(container, blob.name)
-      end
-
-      break unless marker = results.continuation_token.presence
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -332,33 +332,33 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/azure_storage_service.rb, line 34
+    def download(key, &block)
+      if block_given?
+        instrument :streaming_download, key: key do
+          stream(key, &block)
+        end
+      else
+        instrument :download, key: key do
+          handle_errors do
+            _, io = client.get_blob(container, key)
+            io.force_encoding(Encoding::BINARY)
+          end
+        end
+      end
+    end
- -
-
# File activestorage/lib/active_storage/service/azure_storage_service.rb, line 34
-def download(key, &block)
-  if block_given?
-    instrument :streaming_download, key: key do
-      stream(key, &block)
-    end
-  else
-    instrument :download, key: key do
-      handle_errors do
-        _, io = client.get_blob(container, key)
-        io.force_encoding(Encoding::BINARY)
-      end
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -378,27 +378,27 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/azure_storage_service.rb, line 49
+    def download_chunk(key, range)
+      instrument :download_chunk, key: key, range: range do
+        handle_errors do
+          _, io = client.get_blob(container, key, start_range: range.begin, end_range: range.exclude_end? ? range.end - 1 : range.end)
+          io.force_encoding(Encoding::BINARY)
+        end
+      end
+    end
- -
-
# File activestorage/lib/active_storage/service/azure_storage_service.rb, line 49
-def download_chunk(key, range)
-  instrument :download_chunk, key: key, range: range do
-    handle_errors do
-      _, io = client.get_blob(container, key, start_range: range.begin, end_range: range.exclude_end? ? range.end - 1 : range.end)
-      io.force_encoding(Encoding::BINARY)
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -418,26 +418,26 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/azure_storage_service.rb, line 83
+    def exist?(key)
+      instrument :exist, key: key do |payload|
+        answer = blob_for(key).present?
+        payload[:exist] = answer
+        answer
+      end
+    end
- -
-
# File activestorage/lib/active_storage/service/azure_storage_service.rb, line 83
-def exist?(key)
-  instrument :exist, key: key do |payload|
-    answer = blob_for(key).present?
-    payload[:exist] = answer
-    answer
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -457,24 +457,24 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/azure_storage_service.rb, line 106
+    def headers_for_direct_upload(key, content_type:, checksum:, filename: nil, disposition: nil, custom_metadata: {}, **)
+      content_disposition = content_disposition_with(type: disposition, filename: filename) if filename
+
+      { "Content-Type" => content_type, "Content-MD5" => checksum, "x-ms-blob-content-disposition" => content_disposition, "x-ms-blob-type" => "BlockBlob", **custom_metadata_headers(custom_metadata) }
+    end
- -
-
# File activestorage/lib/active_storage/service/azure_storage_service.rb, line 106
-def headers_for_direct_upload(key, content_type:, checksum:, filename: nil, disposition: nil, custom_metadata: {}, **)
-  content_disposition = content_disposition_with(type: disposition, filename: filename) if filename
-
-  { "Content-Type" => content_type, "Content-MD5" => checksum, "x-ms-blob-content-disposition" => content_disposition, "x-ms-blob-type" => "BlockBlob", **custom_metadata_headers(custom_metadata) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -494,28 +494,28 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/azure_storage_service.rb, line 24
+    def upload(key, io, checksum: nil, filename: nil, content_type: nil, disposition: nil, custom_metadata: {}, **)
+      instrument :upload, key: key, checksum: checksum do
+        handle_errors do
+          content_disposition = content_disposition_with(filename: filename, type: disposition) if disposition && filename
+
+          client.create_block_blob(container, key, IO.try_convert(io) || io, content_md5: checksum, content_type: content_type, content_disposition: content_disposition, metadata: custom_metadata)
+        end
+      end
+    end
- -
-
# File activestorage/lib/active_storage/service/azure_storage_service.rb, line 24
-def upload(key, io, checksum: nil, filename: nil, content_type: nil, disposition: nil, custom_metadata: {}, **)
-  instrument :upload, key: key, checksum: checksum do
-    handle_errors do
-      content_disposition = content_disposition_with(filename: filename, type: disposition) if disposition && filename
-
-      client.create_block_blob(container, key, IO.try_convert(io) || io, content_md5: checksum, content_type: content_type, content_disposition: content_disposition, metadata: custom_metadata)
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -535,33 +535,33 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/azure_storage_service.rb, line 91
+    def url_for_direct_upload(key, expires_in:, content_type:, content_length:, checksum:, custom_metadata: {})
+      instrument :url, key: key do |payload|
+        generated_url = signer.signed_uri(
+          uri_for(key), false,
+          service: "b",
+          permissions: "rw",
+          expiry: format_expiry(expires_in)
+        ).to_s
+
+        payload[:url] = generated_url
+
+        generated_url
+      end
+    end
- -
-
# File activestorage/lib/active_storage/service/azure_storage_service.rb, line 91
-def url_for_direct_upload(key, expires_in:, content_type:, content_length:, checksum:, custom_metadata: {})
-  instrument :url, key: key do |payload|
-    generated_url = signer.signed_uri(
-      uri_for(key), false,
-      service: "b",
-      permissions: "rw",
-      expiry: format_expiry(expires_in)
-    ).to_s
-
-    payload[:url] = generated_url
-
-    generated_url
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Service/DiskService.html b/src/classes/ActiveStorage/Service/DiskService.html index 4d2a54f070..81dfb71937 100644 --- a/src/classes/ActiveStorage/Service/DiskService.html +++ b/src/classes/ActiveStorage/Service/DiskService.html @@ -138,23 +138,23 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/disk_service.rb, line 16
+    def initialize(root:, public: false, **options)
+      @root = root
+      @public = public
+    end
- -
-
# File activestorage/lib/active_storage/service/disk_service.rb, line 16
-def initialize(root:, public: false, **options)
-  @root = root
-  @public = public
-end
-
-
- - + See on GitHub + + + + @@ -178,28 +178,28 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/disk_service.rb, line 105
+    def compose(source_keys, destination_key, **)
+      File.open(make_path_for(destination_key), "w") do |destination_file|
+        source_keys.each do |source_key|
+          File.open(path_for(source_key), "rb") do |source_file|
+            IO.copy_stream(source_file, destination_file)
+          end
+        end
+      end
+    end
- -
-
# File activestorage/lib/active_storage/service/disk_service.rb, line 105
-def compose(source_keys, destination_key, **)
-  File.open(make_path_for(destination_key), "w") do |destination_file|
-    source_keys.each do |source_key|
-      File.open(path_for(source_key), "rb") do |source_file|
-        IO.copy_stream(source_file, destination_file)
-      end
-    end
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -219,26 +219,26 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/disk_service.rb, line 53
+    def delete(key)
+      instrument :delete, key: key do
+        File.delete path_for(key)
+      rescue Errno::ENOENT
+        # Ignore files already deleted
+      end
+    end
- -
-
# File activestorage/lib/active_storage/service/disk_service.rb, line 53
-def delete(key)
-  instrument :delete, key: key do
-    File.delete path_for(key)
-  rescue Errno::ENOENT
-    # Ignore files already deleted
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -258,26 +258,26 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/disk_service.rb, line 61
+    def delete_prefixed(prefix)
+      instrument :delete_prefixed, prefix: prefix do
+        Dir.glob(path_for("#{prefix}*")).each do |path|
+          FileUtils.rm_rf(path)
+        end
+      end
+    end
- -
-
# File activestorage/lib/active_storage/service/disk_service.rb, line 61
-def delete_prefixed(prefix)
-  instrument :delete_prefixed, prefix: prefix do
-    Dir.glob(path_for("#{prefix}*")).each do |path|
-      FileUtils.rm_rf(path)
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -297,32 +297,32 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/disk_service.rb, line 28
+    def download(key, &block)
+      if block_given?
+        instrument :streaming_download, key: key do
+          stream key, &block
+        end
+      else
+        instrument :download, key: key do
+          File.binread path_for(key)
+        rescue Errno::ENOENT
+          raise ActiveStorage::FileNotFoundError
+        end
+      end
+    end
- -
-
# File activestorage/lib/active_storage/service/disk_service.rb, line 28
-def download(key, &block)
-  if block_given?
-    instrument :streaming_download, key: key do
-      stream key, &block
-    end
-  else
-    instrument :download, key: key do
-      File.binread path_for(key)
-    rescue Errno::ENOENT
-      raise ActiveStorage::FileNotFoundError
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -342,29 +342,29 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/disk_service.rb, line 42
+    def download_chunk(key, range)
+      instrument :download_chunk, key: key, range: range do
+        File.open(path_for(key), "rb") do |file|
+          file.seek range.begin
+          file.read range.size
+        end
+      rescue Errno::ENOENT
+        raise ActiveStorage::FileNotFoundError
+      end
+    end
- -
-
# File activestorage/lib/active_storage/service/disk_service.rb, line 42
-def download_chunk(key, range)
-  instrument :download_chunk, key: key, range: range do
-    File.open(path_for(key), "rb") do |file|
-      file.seek range.begin
-      file.read range.size
-    end
-  rescue Errno::ENOENT
-    raise ActiveStorage::FileNotFoundError
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -384,26 +384,26 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/disk_service.rb, line 69
+    def exist?(key)
+      instrument :exist, key: key do |payload|
+        answer = File.exist? path_for(key)
+        payload[:exist] = answer
+        answer
+      end
+    end
- -
-
# File activestorage/lib/active_storage/service/disk_service.rb, line 69
-def exist?(key)
-  instrument :exist, key: key do |payload|
-    answer = File.exist? path_for(key)
-    payload[:exist] = answer
-    answer
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -423,22 +423,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/disk_service.rb, line 97
+    def headers_for_direct_upload(key, content_type:, **)
+      { "Content-Type" => content_type }
+    end
- -
-
# File activestorage/lib/active_storage/service/disk_service.rb, line 97
-def headers_for_direct_upload(key, content_type:, **)
-  { "Content-Type" => content_type }
-end
-
-
- -

+ See on GitHub + + + +

@@ -458,25 +458,25 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/disk_service.rb, line 21
+    def upload(key, io, checksum: nil, **)
+      instrument :upload, key: key, checksum: checksum do
+        IO.copy_stream(io, make_path_for(key))
+        ensure_integrity_of(key, checksum) if checksum
+      end
+    end
- -
-
# File activestorage/lib/active_storage/service/disk_service.rb, line 21
-def upload(key, io, checksum: nil, **)
-  instrument :upload, key: key, checksum: checksum do
-    IO.copy_stream(io, make_path_for(key))
-    ensure_integrity_of(key, checksum) if checksum
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -496,38 +496,38 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/disk_service.rb, line 77
+    def url_for_direct_upload(key, expires_in:, content_type:, content_length:, checksum:, custom_metadata: {})
+      instrument :url, key: key do |payload|
+        verified_token_with_expiration = ActiveStorage.verifier.generate(
+          {
+            key: key,
+            content_type: content_type,
+            content_length: content_length,
+            checksum: checksum,
+            service_name: name
+          },
+          expires_in: expires_in,
+          purpose: :blob_token
+        )
+
+        url_helpers.update_rails_disk_service_url(verified_token_with_expiration, url_options).tap do |generated_url|
+          payload[:url] = generated_url
+        end
+      end
+    end
- -
-
# File activestorage/lib/active_storage/service/disk_service.rb, line 77
-def url_for_direct_upload(key, expires_in:, content_type:, content_length:, checksum:, custom_metadata: {})
-  instrument :url, key: key do |payload|
-    verified_token_with_expiration = ActiveStorage.verifier.generate(
-      {
-        key: key,
-        content_type: content_type,
-        content_length: content_length,
-        checksum: checksum,
-        service_name: name
-      },
-      expires_in: expires_in,
-      purpose: :blob_token
-    )
-
-    url_helpers.update_rails_disk_service_url(verified_token_with_expiration, url_options).tap do |generated_url|
-      payload[:url] = generated_url
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Service/GCSService.html b/src/classes/ActiveStorage/Service/GCSService.html index afcf16d10e..2ab285508e 100644 --- a/src/classes/ActiveStorage/Service/GCSService.html +++ b/src/classes/ActiveStorage/Service/GCSService.html @@ -143,23 +143,23 @@

- -
- - -
-
# File activestorage/lib/active_storage/service/gcs_service.rb, line 16
-def initialize(public: false, **config)
-  @config = config
-  @public = public
-end
-
-
- - + +
+ + Source code + + +
# File activestorage/lib/active_storage/service/gcs_service.rb, line 16
+    def initialize(public: false, **config)
+      @config = config
+      @public = public
+    end
+ + See on GitHub + +
+ + @@ -183,26 +183,26 @@

- -
- - -
-
# File activestorage/lib/active_storage/service/gcs_service.rb, line 139
-def compose(source_keys, destination_key, filename: nil, content_type: nil, disposition: nil, custom_metadata: {})
-  bucket.compose(source_keys, destination_key).update do |file|
-    file.content_type = content_type
-    file.content_disposition = content_disposition_with(type: disposition, filename: filename) if disposition && filename
-    file.metadata = custom_metadata
-  end
-end
-
-
- - + +
+ + Source code + + +
# File activestorage/lib/active_storage/service/gcs_service.rb, line 139
+    def compose(source_keys, destination_key, filename: nil, content_type: nil, disposition: nil, custom_metadata: {})
+      bucket.compose(source_keys, destination_key).update do |file|
+        file.content_type = content_type
+        file.content_disposition = content_disposition_with(type: disposition, filename: filename) if disposition && filename
+        file.metadata = custom_metadata
+      end
+    end
+ + See on GitHub + +
+ +

@@ -222,26 +222,26 @@

- -
- - -
-
# File activestorage/lib/active_storage/service/gcs_service.rb, line 66
-def delete(key)
-  instrument :delete, key: key do
-    file_for(key).delete
-  rescue Google::Cloud::NotFoundError
-    # Ignore files already deleted
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/gcs_service.rb, line 66
+    def delete(key)
+      instrument :delete, key: key do
+        file_for(key).delete
+      rescue Google::Cloud::NotFoundError
+        # Ignore files already deleted
+      end
+    end
+ + See on GitHub + +
+ +

@@ -261,28 +261,28 @@

- -
- - -
-
# File activestorage/lib/active_storage/service/gcs_service.rb, line 74
-def delete_prefixed(prefix)
-  instrument :delete_prefixed, prefix: prefix do
-    bucket.files(prefix: prefix).all do |file|
-      file.delete
-    rescue Google::Cloud::NotFoundError
-      # Ignore concurrently-deleted files
-    end
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/gcs_service.rb, line 74
+    def delete_prefixed(prefix)
+      instrument :delete_prefixed, prefix: prefix do
+        bucket.files(prefix: prefix).all do |file|
+          file.delete
+        rescue Google::Cloud::NotFoundError
+          # Ignore concurrently-deleted files
+        end
+      end
+    end
+ + See on GitHub + +
+ +

@@ -302,32 +302,32 @@

- -
- - -
-
# File activestorage/lib/active_storage/service/gcs_service.rb, line 34
-def download(key, &block)
-  if block_given?
-    instrument :streaming_download, key: key do
-      stream(key, &block)
-    end
-  else
-    instrument :download, key: key do
-      file_for(key).download.string
-    rescue Google::Cloud::NotFoundError
-      raise ActiveStorage::FileNotFoundError
-    end
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/gcs_service.rb, line 34
+    def download(key, &block)
+      if block_given?
+        instrument :streaming_download, key: key do
+          stream(key, &block)
+        end
+      else
+        instrument :download, key: key do
+          file_for(key).download.string
+        rescue Google::Cloud::NotFoundError
+          raise ActiveStorage::FileNotFoundError
+        end
+      end
+    end
+ + See on GitHub + +
+ +

@@ -347,26 +347,26 @@

- -
- - -
-
# File activestorage/lib/active_storage/service/gcs_service.rb, line 58
-def download_chunk(key, range)
-  instrument :download_chunk, key: key, range: range do
-    file_for(key).download(range: range).string
-  rescue Google::Cloud::NotFoundError
-    raise ActiveStorage::FileNotFoundError
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/gcs_service.rb, line 58
+    def download_chunk(key, range)
+      instrument :download_chunk, key: key, range: range do
+        file_for(key).download(range: range).string
+      rescue Google::Cloud::NotFoundError
+        raise ActiveStorage::FileNotFoundError
+      end
+    end
+ + See on GitHub + +
+ +

@@ -386,26 +386,26 @@

- -
- - -
-
# File activestorage/lib/active_storage/service/gcs_service.rb, line 84
-def exist?(key)
-  instrument :exist, key: key do |payload|
-    answer = file_for(key).exists?
-    payload[:exist] = answer
-    answer
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/gcs_service.rb, line 84
+    def exist?(key)
+      instrument :exist, key: key do |payload|
+        answer = file_for(key).exists?
+        payload[:exist] = answer
+        answer
+      end
+    end
+ + See on GitHub + +
+ +

@@ -425,29 +425,29 @@

- -
- - -
-
# File activestorage/lib/active_storage/service/gcs_service.rb, line 128
-def headers_for_direct_upload(key, checksum:, filename: nil, disposition: nil, custom_metadata: {}, **)
-  content_disposition = content_disposition_with(type: disposition, filename: filename) if filename
-
-  headers = { "Content-MD5" => checksum, "Content-Disposition" => content_disposition, **custom_metadata_headers(custom_metadata) }
-  if @config[:cache_control].present?
-    headers["Cache-Control"] = @config[:cache_control]
-  end
-
-  headers
-end
-
-
- -

+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/gcs_service.rb, line 128
+    def headers_for_direct_upload(key, checksum:, filename: nil, disposition: nil, custom_metadata: {}, **)
+      content_disposition = content_disposition_with(type: disposition, filename: filename) if filename
+
+      headers = { "Content-MD5" => checksum, "Content-Disposition" => content_disposition, **custom_metadata_headers(custom_metadata) }
+      if @config[:cache_control].present?
+        headers["Cache-Control"] = @config[:cache_control]
+      end
+
+      headers
+    end
+ + See on GitHub + +
+ +

@@ -467,28 +467,28 @@

- -
- - -
-
# File activestorage/lib/active_storage/service/gcs_service.rb, line 48
-def update_metadata(key, content_type:, disposition: nil, filename: nil, custom_metadata: {})
-  instrument :update_metadata, key: key, content_type: content_type, disposition: disposition do
-    file_for(key).update do |file|
-      file.content_type = content_type
-      file.content_disposition = content_disposition_with(type: disposition, filename: filename) if disposition && filename
-      file.metadata = custom_metadata
-    end
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/gcs_service.rb, line 48
+    def update_metadata(key, content_type:, disposition: nil, filename: nil, custom_metadata: {})
+      instrument :update_metadata, key: key, content_type: content_type, disposition: disposition do
+        file_for(key).update do |file|
+          file.content_type = content_type
+          file.content_disposition = content_disposition_with(type: disposition, filename: filename) if disposition && filename
+          file.metadata = custom_metadata
+        end
+      end
+    end
+ + See on GitHub + +
+ +

@@ -508,31 +508,31 @@

- -
- - -
-
# File activestorage/lib/active_storage/service/gcs_service.rb, line 21
-def upload(key, io, checksum: nil, content_type: nil, disposition: nil, filename: nil, custom_metadata: {})
-  instrument :upload, key: key, checksum: checksum do
-    # GCS's signed URLs don't include params such as response-content-type response-content_disposition
-    # in the signature, which means an attacker can modify them and bypass our effort to force these to
-    # binary and attachment when the file's content type requires it. The only way to force them is to
-    # store them as object's metadata.
-    content_disposition = content_disposition_with(type: disposition, filename: filename) if disposition && filename
-    bucket.create_file(io, key, md5: checksum, cache_control: @config[:cache_control], content_type: content_type, content_disposition: content_disposition, metadata: custom_metadata)
-  rescue Google::Cloud::InvalidArgumentError
-    raise ActiveStorage::IntegrityError
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/gcs_service.rb, line 21
+    def upload(key, io, checksum: nil, content_type: nil, disposition: nil, filename: nil, custom_metadata: {})
+      instrument :upload, key: key, checksum: checksum do
+        # GCS's signed URLs don't include params such as response-content-type response-content_disposition
+        # in the signature, which means an attacker can modify them and bypass our effort to force these to
+        # binary and attachment when the file's content type requires it. The only way to force them is to
+        # store them as object's metadata.
+        content_disposition = content_disposition_with(type: disposition, filename: filename) if disposition && filename
+        bucket.create_file(io, key, md5: checksum, cache_control: @config[:cache_control], content_type: content_type, content_disposition: content_disposition, metadata: custom_metadata)
+      rescue Google::Cloud::InvalidArgumentError
+        raise ActiveStorage::IntegrityError
+      end
+    end
+ + See on GitHub + +
+ +

@@ -552,54 +552,54 @@

- -
- - -
-
# File activestorage/lib/active_storage/service/gcs_service.rb, line 92
-def url_for_direct_upload(key, expires_in:, checksum:, custom_metadata: {}, **)
-  instrument :url, key: key do |payload|
-    headers = {}
-    version = :v2
-
-    if @config[:cache_control].present?
-      headers["Cache-Control"] = @config[:cache_control]
-      # v2 signing doesn't support non `x-goog-` headers. Only switch to v4 signing
-      # if necessary for back-compat; v4 limits the expiration of the URL to 7 days
-      # whereas v2 has no limit
-      version = :v4
-    end
-
-    headers.merge!(custom_metadata_headers(custom_metadata))
-
-    args = {
-      content_md5: checksum,
-      expires: expires_in,
-      headers: headers,
-      method: "PUT",
-      version: version,
-    }
-
-    if @config[:iam]
-      args[:issuer] = issuer
-      args[:signer] = signer
-    end
-
-    generated_url = bucket.signed_url(key, **args)
-
-    payload[:url] = generated_url
-
-    generated_url
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/gcs_service.rb, line 92
+    def url_for_direct_upload(key, expires_in:, checksum:, custom_metadata: {}, **)
+      instrument :url, key: key do |payload|
+        headers = {}
+        version = :v2
+
+        if @config[:cache_control].present?
+          headers["Cache-Control"] = @config[:cache_control]
+          # v2 signing doesn't support non `x-goog-` headers. Only switch to v4 signing
+          # if necessary for back-compat; v4 limits the expiration of the URL to 7 days
+          # whereas v2 has no limit
+          version = :v4
+        end
+
+        headers.merge!(custom_metadata_headers(custom_metadata))
+
+        args = {
+          content_md5: checksum,
+          expires: expires_in,
+          headers: headers,
+          method: "PUT",
+          version: version,
+        }
+
+        if @config[:iam]
+          args[:issuer] = issuer
+          args[:signer] = signer
+        end
+
+        generated_url = bucket.signed_url(key, **args)
+
+        payload[:url] = generated_url
+
+        generated_url
+      end
+    end
+ + See on GitHub + +
+ + diff --git a/src/classes/ActiveStorage/Service/MirrorService.html b/src/classes/ActiveStorage/Service/MirrorService.html index 1c0b0839d0..c78468458b 100644 --- a/src/classes/ActiveStorage/Service/MirrorService.html +++ b/src/classes/ActiveStorage/Service/MirrorService.html @@ -137,22 +137,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/mirror_service.rb, line 31
+    def initialize(primary:, mirrors:)
+      @primary, @mirrors = primary, mirrors
+    end
- -
-
# File activestorage/lib/active_storage/service/mirror_service.rb, line 31
-def initialize(primary:, mirrors:)
-  @primary, @mirrors = primary, mirrors
-end
-
-
- - + See on GitHub + + + + @@ -176,22 +176,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/mirror_service.rb, line 45
+    def delete(key)
+      perform_across_services :delete, key
+    end
- -
-
# File activestorage/lib/active_storage/service/mirror_service.rb, line 45
-def delete(key)
-  perform_across_services :delete, key
-end
-
-
- - + See on GitHub + + + +

@@ -211,22 +211,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/mirror_service.rb, line 50
+    def delete_prefixed(prefix)
+      perform_across_services :delete_prefixed, prefix
+    end
- -
-
# File activestorage/lib/active_storage/service/mirror_service.rb, line 50
-def delete_prefixed(prefix)
-  perform_across_services :delete_prefixed, prefix
-end
-
-
- -

+ See on GitHub + + + +

@@ -246,31 +246,31 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/mirror_service.rb, line 59
+    def mirror(key, checksum:)
+      instrument :mirror, key: key, checksum: checksum do
+        if (mirrors_in_need_of_mirroring = mirrors.select { |service| !service.exist?(key) }).any?
+          primary.open(key, checksum: checksum) do |io|
+            mirrors_in_need_of_mirroring.each do |service|
+              io.rewind
+              service.upload key, io, checksum: checksum
+            end
+          end
+        end
+      end
+    end
- -
-
# File activestorage/lib/active_storage/service/mirror_service.rb, line 59
-def mirror(key, checksum:)
-  instrument :mirror, key: key, checksum: checksum do
-    if (mirrors_in_need_of_mirroring = mirrors.select { |service| !service.exist?(key) }).any?
-      primary.open(key, checksum: checksum) do |io|
-        mirrors_in_need_of_mirroring.each do |service|
-          io.rewind
-          service.upload key, io, checksum: checksum
-        end
-      end
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -290,24 +290,24 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/mirror_service.rb, line 38
+    def upload(key, io, checksum: nil, **options)
+      io.rewind
+      primary.upload key, io, checksum: checksum, **options
+      mirror_later key, checksum: checksum
+    end
- -
-
# File activestorage/lib/active_storage/service/mirror_service.rb, line 38
-def upload(key, io, checksum: nil, **options)
-  io.rewind
-  primary.upload key, io, checksum: checksum, **options
-  mirror_later key, checksum: checksum
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Service/S3Service.html b/src/classes/ActiveStorage/Service/S3Service.html index b3921f8aaf..5b8ce9a527 100644 --- a/src/classes/ActiveStorage/Service/S3Service.html +++ b/src/classes/ActiveStorage/Service/S3Service.html @@ -192,29 +192,29 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/s3_service.rb, line 17
+    def initialize(bucket:, upload: {}, public: false, **options)
+      @client = Aws::S3::Resource.new(**options)
+      @bucket = @client.bucket(bucket)
+
+      @multipart_upload_threshold = upload.delete(:multipart_threshold) || 100.megabytes
+      @public = public
+
+      @upload_options = upload
+      @upload_options[:acl] = "public-read" if public?
+    end
- -
-
# File activestorage/lib/active_storage/service/s3_service.rb, line 17
-def initialize(bucket:, upload: {}, public: false, **options)
-  @client = Aws::S3::Resource.new(**options)
-  @bucket = @client.bucket(bucket)
-
-  @multipart_upload_threshold = upload.delete(:multipart_threshold) || 100.megabytes
-  @public = public
-
-  @upload_options = upload
-  @upload_options[:acl] = "public-read" if public?
-end
-
-
- - + See on GitHub + + + + @@ -238,36 +238,36 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/s3_service.rb, line 100
+    def compose(source_keys, destination_key, filename: nil, content_type: nil, disposition: nil, custom_metadata: {})
+      content_disposition = content_disposition_with(type: disposition, filename: filename) if disposition && filename
+
+      object_for(destination_key).upload_stream(
+        content_type: content_type,
+        content_disposition: content_disposition,
+        part_size: MINIMUM_UPLOAD_PART_SIZE,
+        metadata: custom_metadata,
+        **upload_options
+      ) do |out|
+        source_keys.each do |source_key|
+          stream(source_key) do |chunk|
+            IO.copy_stream(StringIO.new(chunk), out)
+          end
+        end
+      end
+    end
- -
-
# File activestorage/lib/active_storage/service/s3_service.rb, line 100
-def compose(source_keys, destination_key, filename: nil, content_type: nil, disposition: nil, custom_metadata: {})
-  content_disposition = content_disposition_with(type: disposition, filename: filename) if disposition && filename
-
-  object_for(destination_key).upload_stream(
-    content_type: content_type,
-    content_disposition: content_disposition,
-    part_size: MINIMUM_UPLOAD_PART_SIZE,
-    metadata: custom_metadata,
-    **upload_options
-  ) do |out|
-    source_keys.each do |source_key|
-      stream(source_key) do |chunk|
-        IO.copy_stream(StringIO.new(chunk), out)
-      end
-    end
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -287,24 +287,24 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/s3_service.rb, line 62
+    def delete(key)
+      instrument :delete, key: key do
+        object_for(key).delete
+      end
+    end
- -
-
# File activestorage/lib/active_storage/service/s3_service.rb, line 62
-def delete(key)
-  instrument :delete, key: key do
-    object_for(key).delete
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -324,24 +324,24 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/s3_service.rb, line 68
+    def delete_prefixed(prefix)
+      instrument :delete_prefixed, prefix: prefix do
+        bucket.objects(prefix: prefix).batch_delete!
+      end
+    end
- -
-
# File activestorage/lib/active_storage/service/s3_service.rb, line 68
-def delete_prefixed(prefix)
-  instrument :delete_prefixed, prefix: prefix do
-    bucket.objects(prefix: prefix).batch_delete!
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -361,32 +361,32 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/s3_service.rb, line 40
+    def download(key, &block)
+      if block_given?
+        instrument :streaming_download, key: key do
+          stream(key, &block)
+        end
+      else
+        instrument :download, key: key do
+          object_for(key).get.body.string.force_encoding(Encoding::BINARY)
+        rescue Aws::S3::Errors::NoSuchKey
+          raise ActiveStorage::FileNotFoundError
+        end
+      end
+    end
- -
-
# File activestorage/lib/active_storage/service/s3_service.rb, line 40
-def download(key, &block)
-  if block_given?
-    instrument :streaming_download, key: key do
-      stream(key, &block)
-    end
-  else
-    instrument :download, key: key do
-      object_for(key).get.body.string.force_encoding(Encoding::BINARY)
-    rescue Aws::S3::Errors::NoSuchKey
-      raise ActiveStorage::FileNotFoundError
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -406,26 +406,26 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/s3_service.rb, line 54
+    def download_chunk(key, range)
+      instrument :download_chunk, key: key, range: range do
+        object_for(key).get(range: "bytes=#{range.begin}-#{range.exclude_end? ? range.end - 1 : range.end}").body.string.force_encoding(Encoding::BINARY)
+      rescue Aws::S3::Errors::NoSuchKey
+        raise ActiveStorage::FileNotFoundError
+      end
+    end
- -
-
# File activestorage/lib/active_storage/service/s3_service.rb, line 54
-def download_chunk(key, range)
-  instrument :download_chunk, key: key, range: range do
-    object_for(key).get(range: "bytes=#{range.begin}-#{range.exclude_end? ? range.end - 1 : range.end}").body.string.force_encoding(Encoding::BINARY)
-  rescue Aws::S3::Errors::NoSuchKey
-    raise ActiveStorage::FileNotFoundError
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -445,26 +445,26 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/s3_service.rb, line 74
+    def exist?(key)
+      instrument :exist, key: key do |payload|
+        answer = object_for(key).exists?
+        payload[:exist] = answer
+        answer
+      end
+    end
- -
-
# File activestorage/lib/active_storage/service/s3_service.rb, line 74
-def exist?(key)
-  instrument :exist, key: key do |payload|
-    answer = object_for(key).exists?
-    payload[:exist] = answer
-    answer
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -484,24 +484,24 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/s3_service.rb, line 94
+    def headers_for_direct_upload(key, content_type:, checksum:, filename: nil, disposition: nil, custom_metadata: {}, **)
+      content_disposition = content_disposition_with(type: disposition, filename: filename) if filename
+
+      { "Content-Type" => content_type, "Content-MD5" => checksum, "Content-Disposition" => content_disposition, **custom_metadata_headers(custom_metadata) }
+    end
- -
-
# File activestorage/lib/active_storage/service/s3_service.rb, line 94
-def headers_for_direct_upload(key, content_type:, checksum:, filename: nil, disposition: nil, custom_metadata: {}, **)
-  content_disposition = content_disposition_with(type: disposition, filename: filename) if filename
-
-  { "Content-Type" => content_type, "Content-MD5" => checksum, "Content-Disposition" => content_disposition, **custom_metadata_headers(custom_metadata) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -521,30 +521,30 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/s3_service.rb, line 28
+    def upload(key, io, checksum: nil, filename: nil, content_type: nil, disposition: nil, custom_metadata: {}, **)
+      instrument :upload, key: key, checksum: checksum do
+        content_disposition = content_disposition_with(filename: filename, type: disposition) if disposition && filename
+
+        if io.size < multipart_upload_threshold
+          upload_with_single_part key, io, checksum: checksum, content_type: content_type, content_disposition: content_disposition, custom_metadata: custom_metadata
+        else
+          upload_with_multipart key, io, content_type: content_type, content_disposition: content_disposition, custom_metadata: custom_metadata
+        end
+      end
+    end
- -
-
# File activestorage/lib/active_storage/service/s3_service.rb, line 28
-def upload(key, io, checksum: nil, filename: nil, content_type: nil, disposition: nil, custom_metadata: {}, **)
-  instrument :upload, key: key, checksum: checksum do
-    content_disposition = content_disposition_with(filename: filename, type: disposition) if disposition && filename
-
-    if io.size < multipart_upload_threshold
-      upload_with_single_part key, io, checksum: checksum, content_type: content_type, content_disposition: content_disposition, custom_metadata: custom_metadata
-    else
-      upload_with_multipart key, io, content_type: content_type, content_disposition: content_disposition, custom_metadata: custom_metadata
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -564,30 +564,30 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/service/s3_service.rb, line 82
+    def url_for_direct_upload(key, expires_in:, content_type:, content_length:, checksum:, custom_metadata: {})
+      instrument :url, key: key do |payload|
+        generated_url = object_for(key).presigned_url :put, expires_in: expires_in.to_i,
+          content_type: content_type, content_length: content_length, content_md5: checksum,
+          metadata: custom_metadata, whitelist_headers: ["content-length"], **upload_options
+
+        payload[:url] = generated_url
+
+        generated_url
+      end
+    end
- -
-
# File activestorage/lib/active_storage/service/s3_service.rb, line 82
-def url_for_direct_upload(key, expires_in:, content_type:, content_length:, checksum:, custom_metadata: {})
-  instrument :url, key: key do |payload|
-    generated_url = object_for(key).presigned_url :put, expires_in: expires_in.to_i,
-      content_type: content_type, content_length: content_length, content_md5: checksum,
-      metadata: custom_metadata, whitelist_headers: ["content-length"], **upload_options
-
-    payload[:url] = generated_url
-
-    generated_url
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Streaming.html b/src/classes/ActiveStorage/Streaming.html index 0a5ef2a817..7ee9202e7a 100644 --- a/src/classes/ActiveStorage/Streaming.html +++ b/src/classes/ActiveStorage/Streaming.html @@ -115,29 +115,29 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/controllers/concerns/active_storage/streaming.rb, line 56
+    def send_blob_stream(blob, disposition: nil) # :doc:
+      send_stream(
+          filename: blob.filename.sanitized,
+          disposition: blob.forced_disposition_for_serving || disposition || DEFAULT_BLOB_STREAMING_DISPOSITION,
+          type: blob.content_type_for_serving) do |stream|
+        blob.download do |chunk|
+          stream.write chunk
+        end
+      end
+    end
- -
-
# File activestorage/app/controllers/concerns/active_storage/streaming.rb, line 56
-def send_blob_stream(blob, disposition: nil) # :doc:
-  send_stream(
-      filename: blob.filename.sanitized,
-      disposition: blob.forced_disposition_for_serving || disposition || DEFAULT_BLOB_STREAMING_DISPOSITION,
-      type: blob.content_type_for_serving) do |stream|
-    blob.download do |chunk|
-      stream.write chunk
-    end
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveStorage/TransformJob.html b/src/classes/ActiveStorage/TransformJob.html index 6d08a384c9..3d4f3512a3 100644 --- a/src/classes/ActiveStorage/TransformJob.html +++ b/src/classes/ActiveStorage/TransformJob.html @@ -81,22 +81,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/jobs/active_storage/transform_job.rb, line 9
+  def perform(blob, transformations)
+    blob.variant(transformations).processed
+  end
- -
-
# File activestorage/app/jobs/active_storage/transform_job.rb, line 9
-def perform(blob, transformations)
-  blob.variant(transformations).processed
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Transformers/MiniMagickTransformer.html b/src/classes/ActiveStorage/Transformers/MiniMagickTransformer.html deleted file mode 100644 index ae3d3b5966..0000000000 --- a/src/classes/ActiveStorage/Transformers/MiniMagickTransformer.html +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: ActiveStorage::Transformers::MiniMagickTransformer -layout: default ---- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveStorage/Transformers/Transformer.html b/src/classes/ActiveStorage/Transformers/Transformer.html index 2920261d6a..35f12d09ed 100644 --- a/src/classes/ActiveStorage/Transformers/Transformer.html +++ b/src/classes/ActiveStorage/Transformers/Transformer.html @@ -115,22 +115,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/transformers/transformer.rb, line 16
+      def initialize(transformations)
+        @transformations = transformations
+      end
- -
-
# File activestorage/lib/active_storage/transformers/transformer.rb, line 16
-def initialize(transformations)
-  @transformations = transformations
-end
-
-
- - + See on GitHub + + + + @@ -154,28 +154,28 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/transformers/transformer.rb, line 23
+      def transform(file, format:)
+        output = process(file, format: format)
+
+        begin
+          yield output
+        ensure
+          output.close!
+        end
+      end
- -
-
# File activestorage/lib/active_storage/transformers/transformer.rb, line 23
-def transform(file, format:)
-  output = process(file, format: format)
-
-  begin
-    yield output
-  ensure
-    output.close!
-  end
-end
-
-
- - + See on GitHub + + + +

Instance Private methods

@@ -198,22 +198,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/lib/active_storage/transformers/transformer.rb, line 36
+        def process(file, format:) # :doc:
+          raise NotImplementedError
+        end
- -
-
# File activestorage/lib/active_storage/transformers/transformer.rb, line 36
-def process(file, format:) # :doc:
-  raise NotImplementedError
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Variant.html b/src/classes/ActiveStorage/Variant.html index cfeb513c7e..c24b964089 100644 --- a/src/classes/ActiveStorage/Variant.html +++ b/src/classes/ActiveStorage/Variant.html @@ -179,22 +179,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/variant.rb, line 60
+  def initialize(blob, variation_or_variation_key)
+    @blob, @variation = blob, ActiveStorage::Variation.wrap(variation_or_variation_key)
+  end
- -
-
# File activestorage/app/models/active_storage/variant.rb, line 60
-def initialize(blob, variation_or_variation_key)
-  @blob, @variation = blob, ActiveStorage::Variation.wrap(variation_or_variation_key)
-end
-
-
- - + See on GitHub + + + + @@ -218,22 +218,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/variant.rb, line 100
+  def destroy
+    service.delete(key)
+  end
- -
-
# File activestorage/app/models/active_storage/variant.rb, line 100
-def destroy
-  service.delete(key)
-end
-
-
- - + See on GitHub + + + +

@@ -253,22 +253,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/variant.rb, line 86
+  def download(&block)
+    service.download key, &block
+  end
- -
-
# File activestorage/app/models/active_storage/variant.rb, line 86
-def download(&block)
-  service.download key, &block
-end
-
-
- -

+ See on GitHub + + + +

@@ -288,22 +288,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/variant.rb, line 90
+  def filename
+    ActiveStorage::Filename.new "#{blob.filename.base}.#{variation.format.downcase}"
+  end
- -
-
# File activestorage/app/models/active_storage/variant.rb, line 90
-def filename
-  ActiveStorage::Filename.new "#{blob.filename.base}.#{variation.format.downcase}"
-end
-
-
- -

+ See on GitHub + + + +

@@ -323,22 +323,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/variant.rb, line 95
+  def image
+    self
+  end
- -
-
# File activestorage/app/models/active_storage/variant.rb, line 95
-def image
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -358,22 +358,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/variant.rb, line 71
+  def key
+    "variants/#{blob.key}/#{OpenSSL::Digest::SHA256.hexdigest(variation.key)}"
+  end
- -
-
# File activestorage/app/models/active_storage/variant.rb, line 71
-def key
-  "variants/#{blob.key}/#{OpenSSL::Digest::SHA256.hexdigest(variation.key)}"
-end
-
-
- -

+ See on GitHub + + + +

@@ -393,23 +393,23 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/variant.rb, line 65
+  def processed
+    process unless processed?
+    self
+  end
- -
-
# File activestorage/app/models/active_storage/variant.rb, line 65
-def processed
-  process unless processed?
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -431,22 +431,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/variant.rb, line 80
+  def url(expires_in: ActiveStorage.service_urls_expire_in, disposition: :inline)
+    service.url key, expires_in: expires_in, disposition: disposition, filename: filename, content_type: content_type
+  end
- -
-
# File activestorage/app/models/active_storage/variant.rb, line 80
-def url(expires_in: ActiveStorage.service_urls_expire_in, disposition: :inline)
-  service.url key, expires_in: expires_in, disposition: disposition, filename: filename, content_type: content_type
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Variant/Specification.html b/src/classes/ActiveStorage/Variant/Specification.html deleted file mode 100644 index 2d7f662f98..0000000000 --- a/src/classes/ActiveStorage/Variant/Specification.html +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: ActiveStorage::Variant::Specification -layout: default ---- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveStorage/VariantWithRecord.html b/src/classes/ActiveStorage/VariantWithRecord.html index 5cb3ea282c..0912423750 100644 --- a/src/classes/ActiveStorage/VariantWithRecord.html +++ b/src/classes/ActiveStorage/VariantWithRecord.html @@ -126,22 +126,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/variant_with_record.rb, line 12
+  def initialize(blob, variation)
+    @blob, @variation = blob, ActiveStorage::Variation.wrap(variation)
+  end
- -
-
# File activestorage/app/models/active_storage/variant_with_record.rb, line 12
-def initialize(blob, variation)
-  @blob, @variation = blob, ActiveStorage::Variation.wrap(variation)
-end
-
-
- - + See on GitHub + + + + @@ -165,22 +165,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/variant_with_record.rb, line 30
+  def destroy
+    record&.destroy
+  end
- -
-
# File activestorage/app/models/active_storage/variant_with_record.rb, line 30
-def destroy
-  record&.destroy
-end
-
-
- - + See on GitHub + + + +

@@ -200,22 +200,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/variant_with_record.rb, line 25
+  def filename
+    ActiveStorage::Filename.new "#{blob.filename.base}.#{variation.format.downcase}"
+  end
- -
-
# File activestorage/app/models/active_storage/variant_with_record.rb, line 25
-def filename
-  ActiveStorage::Filename.new "#{blob.filename.base}.#{variation.format.downcase}"
-end
-
-
- -

+ See on GitHub + + + +

@@ -235,22 +235,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/variant_with_record.rb, line 21
+  def image
+    record&.image
+  end
- -
-
# File activestorage/app/models/active_storage/variant_with_record.rb, line 21
-def image
-  record&.image
-end
-
-
- -

+ See on GitHub + + + +

@@ -270,23 +270,23 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/variant_with_record.rb, line 16
+  def processed
+    process unless processed?
+    self
+  end
- -
-
# File activestorage/app/models/active_storage/variant_with_record.rb, line 16
-def processed
-  process unless processed?
-  self
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveStorage/Variation.html b/src/classes/ActiveStorage/Variation.html index 7d197ce09d..58852c6e3d 100644 --- a/src/classes/ActiveStorage/Variation.html +++ b/src/classes/ActiveStorage/Variation.html @@ -145,22 +145,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/variation.rb, line 35
+    def decode(key)
+      new ActiveStorage.verifier.verify(key, purpose: :variation)
+    end
- -
-
# File activestorage/app/models/active_storage/variation.rb, line 35
-def decode(key)
-  new ActiveStorage.verifier.verify(key, purpose: :variation)
-end
-
-
- - + See on GitHub + + + +

@@ -180,22 +180,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/variation.rb, line 41
+    def encode(transformations)
+      ActiveStorage.verifier.generate(transformations, purpose: :variation)
+    end
- -
-
# File activestorage/app/models/active_storage/variation.rb, line 41
-def encode(transformations)
-  ActiveStorage.verifier.generate(transformations, purpose: :variation)
-end
-
-
- -

+ See on GitHub + + + +

@@ -215,22 +215,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/variation.rb, line 46
+  def initialize(transformations)
+    @transformations = transformations.deep_symbolize_keys
+  end
- -
-
# File activestorage/app/models/active_storage/variation.rb, line 46
-def initialize(transformations)
-  @transformations = transformations.deep_symbolize_keys
-end
-
-
- -

+ See on GitHub + + + +

@@ -250,29 +250,29 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/variation.rb, line 23
+    def wrap(variator)
+      case variator
+      when self
+        variator
+      when String
+        decode variator
+      else
+        new variator
+      end
+    end
- -
-
# File activestorage/app/models/active_storage/variation.rb, line 23
-def wrap(variator)
-  case variator
-  when self
-    variator
-  when String
-    decode variator
-  else
-    new variator
-  end
-end
-
-
- -

+ See on GitHub + + + + @@ -296,22 +296,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/variation.rb, line 70
+  def content_type
+    Marcel::MimeType.for(extension: format.to_s)
+  end
- -
-
# File activestorage/app/models/active_storage/variation.rb, line 70
-def content_type
-  Marcel::MimeType.for(extension: format.to_s)
-end
-
-
- - + See on GitHub + + + +

@@ -331,22 +331,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/variation.rb, line 50
+  def default_to(defaults)
+    self.class.new transformations.reverse_merge(defaults)
+  end
- -
-
# File activestorage/app/models/active_storage/variation.rb, line 50
-def default_to(defaults)
-  self.class.new transformations.reverse_merge(defaults)
-end
-
-
- -

+ See on GitHub + + + +

@@ -366,22 +366,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/variation.rb, line 79
+  def digest
+    OpenSSL::Digest::SHA1.base64digest Marshal.dump(transformations)
+  end
- -
-
# File activestorage/app/models/active_storage/variation.rb, line 79
-def digest
-  OpenSSL::Digest::SHA1.base64digest Marshal.dump(transformations)
-end
-
-
- -

+ See on GitHub + + + +

@@ -401,26 +401,26 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/variation.rb, line 62
+  def format
+    transformations.fetch(:format, :png).tap do |format|
+      if Marcel::Magic.by_extension(format.to_s).nil?
+        raise ArgumentError, "Invalid variant format (#{format.inspect})"
+      end
+    end
+  end
- -
-
# File activestorage/app/models/active_storage/variation.rb, line 62
-def format
-  transformations.fetch(:format, :png).tap do |format|
-    if Marcel::Magic.by_extension(format.to_s).nil?
-      raise ArgumentError, "Invalid variant format (#{format.inspect})"
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -440,22 +440,22 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/variation.rb, line 75
+  def key
+    self.class.encode(transformations)
+  end
- -
-
# File activestorage/app/models/active_storage/variation.rb, line 75
-def key
-  self.class.encode(transformations)
-end
-
-
- -

+ See on GitHub + + + +

@@ -475,24 +475,24 @@

- -
+ +
+ + Source code + + +
# File activestorage/app/models/active_storage/variation.rb, line 56
+  def transform(file, &block)
+    ActiveSupport::Notifications.instrument("transform.active_storage") do
+      transformer.transform(file, format: format, &block)
+    end
+  end
- -
-
# File activestorage/app/models/active_storage/variation.rb, line 56
-def transform(file, &block)
-  ActiveSupport::Notifications.instrument("transform.active_storage") do
-    transformer.transform(file, format: format, &block)
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport.html b/src/classes/ActiveSupport.html index ea110a74e0..5764336b44 100644 --- a/src/classes/ActiveSupport.html +++ b/src/classes/ActiveSupport.html @@ -708,22 +708,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support.rb, line 104
+  def self.cache_format_version
+    Cache.format_version
+  end
- -
-
# File activesupport/lib/active_support.rb, line 104
-def self.cache_format_version
-  Cache.format_version
-end
-
-
- - + See on GitHub + + + +

@@ -743,22 +743,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support.rb, line 108
+  def self.cache_format_version=(value)
+    Cache.format_version = value
+  end
- -
-
# File activesupport/lib/active_support.rb, line 108
-def self.cache_format_version=(value)
-  Cache.format_version = value
-end
-
-
- -

+ See on GitHub + + + +

@@ -778,24 +778,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support.rb, line 92
+  def self.eager_load!
+    super
+
+    NumberHelper.eager_load!
+  end
- -
-
# File activesupport/lib/active_support.rb, line 92
-def self.eager_load!
-  super
-
-  NumberHelper.eager_load!
-end
-
-
- -

+ See on GitHub + + + +

@@ -815,22 +815,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/gem_version.rb, line 5
+  def self.gem_version
+    Gem::Version.new VERSION::STRING
+  end
- -
-
# File activesupport/lib/active_support/gem_version.rb, line 5
-def self.gem_version
-  Gem::Version.new VERSION::STRING
-end
-
-
- -

+ See on GitHub + + + +

@@ -850,22 +850,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support.rb, line 112
+  def self.to_time_preserves_timezone
+    DateAndTime::Compatibility.preserve_timezone
+  end
- -
-
# File activesupport/lib/active_support.rb, line 112
-def self.to_time_preserves_timezone
-  DateAndTime::Compatibility.preserve_timezone
-end
-
-
- -

+ See on GitHub + + + +

@@ -885,28 +885,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support.rb, line 116
+  def self.to_time_preserves_timezone=(value)
+    unless value
+      ActiveSupport.deprecator.warn(
+        "Support for the pre-Ruby 2.4 behavior of to_time has been deprecated and will be removed in Rails 7.2."
+      )
+    end
+
+    DateAndTime::Compatibility.preserve_timezone = value
+  end
- -
-
# File activesupport/lib/active_support.rb, line 116
-def self.to_time_preserves_timezone=(value)
-  unless value
-    ActiveSupport.deprecator.warn(
-      "Support for the pre-Ruby 2.4 behavior of to_time has been deprecated and will be removed in Rails 7.2."
-    )
-  end
-
-  DateAndTime::Compatibility.preserve_timezone = value
-end
-
-
- -

+ See on GitHub + + + +

@@ -926,22 +926,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support.rb, line 126
+  def self.utc_to_local_returns_utc_offset_times
+    DateAndTime::Compatibility.utc_to_local_returns_utc_offset_times
+  end
- -
-
# File activesupport/lib/active_support.rb, line 126
-def self.utc_to_local_returns_utc_offset_times
-  DateAndTime::Compatibility.utc_to_local_returns_utc_offset_times
-end
-
-
- -

+ See on GitHub + + + +

@@ -961,22 +961,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support.rb, line 130
+  def self.utc_to_local_returns_utc_offset_times=(value)
+    DateAndTime::Compatibility.utc_to_local_returns_utc_offset_times = value
+  end
- -
-
# File activesupport/lib/active_support.rb, line 130
-def self.utc_to_local_returns_utc_offset_times=(value)
-  DateAndTime::Compatibility.utc_to_local_returns_utc_offset_times = value
-end
-
-
- -

+ See on GitHub + + + +

@@ -996,22 +996,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/version.rb, line 7
+  def self.version
+    gem_version
+  end
- -
-
# File activesupport/lib/active_support/version.rb, line 7
-def self.version
-  gem_version
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/ActionableError/ClassMethods.html b/src/classes/ActiveSupport/ActionableError/ClassMethods.html index d7f0300dad..fbeed8fc25 100644 --- a/src/classes/ActiveSupport/ActionableError/ClassMethods.html +++ b/src/classes/ActiveSupport/ActionableError/ClassMethods.html @@ -84,22 +84,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/actionable_error.rb, line 45
+      def action(name, &block)
+        _actions[name] = block
+      end
- -
-
# File activesupport/lib/active_support/actionable_error.rb, line 45
-def action(name, &block)
-  _actions[name] = block
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/ArrayInquirer.html b/src/classes/ActiveSupport/ArrayInquirer.html index a75d7ccd93..80a401719a 100644 --- a/src/classes/ActiveSupport/ArrayInquirer.html +++ b/src/classes/ActiveSupport/ArrayInquirer.html @@ -106,28 +106,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/array_inquirer.rb, line 27
+    def any?(*candidates)
+      if candidates.none?
+        super
+      else
+        candidates.any? do |candidate|
+          include?(candidate.to_sym) || include?(candidate.to_s)
+        end
+      end
+    end
- -
-
# File activesupport/lib/active_support/array_inquirer.rb, line 27
-def any?(*candidates)
-  if candidates.none?
-    super
-  else
-    candidates.any? do |candidate|
-      include?(candidate.to_sym) || include?(candidate.to_s)
-    end
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Autoload.html b/src/classes/ActiveSupport/Autoload.html index ac1db23221..79aab48a99 100644 --- a/src/classes/ActiveSupport/Autoload.html +++ b/src/classes/ActiveSupport/Autoload.html @@ -117,32 +117,32 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/dependencies/autoload.rb, line 42
+    def autoload(const_name, path = @_at_path)
+      unless path
+        full = [name, @_under_path, const_name.to_s].compact.join("::")
+        path = Inflector.underscore(full)
+      end
+
+      if @_eager_autoload
+        @_eagerloaded_constants ||= []
+        @_eagerloaded_constants << const_name
+      end
+
+      super const_name, path
+    end
- -
-
# File activesupport/lib/active_support/dependencies/autoload.rb, line 42
-def autoload(const_name, path = @_at_path)
-  unless path
-    full = [name, @_under_path, const_name.to_s].compact.join("::")
-    path = Inflector.underscore(full)
-  end
-
-  if @_eager_autoload
-    @_eagerloaded_constants ||= []
-    @_eagerloaded_constants << const_name
-  end
-
-  super const_name, path
-end
-
-
- - + See on GitHub + + + +

@@ -162,25 +162,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/dependencies/autoload.rb, line 63
+    def autoload_at(path)
+      @_at_path, old_path = path, @_at_path
+      yield
+    ensure
+      @_at_path = old_path
+    end
- -
-
# File activesupport/lib/active_support/dependencies/autoload.rb, line 63
-def autoload_at(path)
-  @_at_path, old_path = path, @_at_path
-  yield
-ensure
-  @_at_path = old_path
-end
-
-
- -

+ See on GitHub + + + +

@@ -200,25 +200,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/dependencies/autoload.rb, line 56
+    def autoload_under(path)
+      @_under_path, old_path = path, @_under_path
+      yield
+    ensure
+      @_under_path = old_path
+    end
- -
-
# File activesupport/lib/active_support/dependencies/autoload.rb, line 56
-def autoload_under(path)
-  @_under_path, old_path = path, @_under_path
-  yield
-ensure
-  @_under_path = old_path
-end
-
-
- -

+ See on GitHub + + + +

@@ -238,25 +238,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/dependencies/autoload.rb, line 70
+    def eager_autoload
+      old_eager, @_eager_autoload = @_eager_autoload, true
+      yield
+    ensure
+      @_eager_autoload = old_eager
+    end
- -
-
# File activesupport/lib/active_support/dependencies/autoload.rb, line 70
-def eager_autoload
-  old_eager, @_eager_autoload = @_eager_autoload, true
-  yield
-ensure
-  @_eager_autoload = old_eager
-end
-
-
- -

+ See on GitHub + + + +

@@ -276,25 +276,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/dependencies/autoload.rb, line 77
+    def eager_load!
+      if @_eagerloaded_constants
+        @_eagerloaded_constants.each { |const_name| const_get(const_name) }
+        @_eagerloaded_constants = nil
+      end
+    end
- -
-
# File activesupport/lib/active_support/dependencies/autoload.rb, line 77
-def eager_load!
-  if @_eagerloaded_constants
-    @_eagerloaded_constants.each { |const_name| const_get(const_name) }
-    @_eagerloaded_constants = nil
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/BacktraceCleaner.html b/src/classes/ActiveSupport/BacktraceCleaner.html index 31d83854b2..72800ede48 100644 --- a/src/classes/ActiveSupport/BacktraceCleaner.html +++ b/src/classes/ActiveSupport/BacktraceCleaner.html @@ -146,25 +146,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/backtrace_cleaner.rb, line 34
+    def initialize
+      @filters, @silencers = [], []
+      add_gem_filter
+      add_gem_silencer
+      add_stdlib_silencer
+    end
- -
-
# File activesupport/lib/active_support/backtrace_cleaner.rb, line 34
-def initialize
-  @filters, @silencers = [], []
-  add_gem_filter
-  add_gem_silencer
-  add_stdlib_silencer
-end
-
-
- - + See on GitHub + + + + @@ -192,22 +192,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/backtrace_cleaner.rb, line 80
+    def add_filter(&block)
+      @filters << block
+    end
- -
-
# File activesupport/lib/active_support/backtrace_cleaner.rb, line 80
-def add_filter(&block)
-  @filters << block
-end
-
-
- - + See on GitHub + + + +

@@ -231,22 +231,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/backtrace_cleaner.rb, line 89
+    def add_silencer(&block)
+      @silencers << block
+    end
- -
-
# File activesupport/lib/active_support/backtrace_cleaner.rb, line 89
-def add_silencer(&block)
-  @silencers << block
-end
-
-
- -

+ See on GitHub + + + +

@@ -270,31 +270,31 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/backtrace_cleaner.rb, line 43
+    def clean(backtrace, kind = :silent)
+      filtered = filter_backtrace(backtrace)
+
+      case kind
+      when :silent
+        silence(filtered)
+      when :noise
+        noise(filtered)
+      else
+        filtered
+      end
+    end
- -
-
# File activesupport/lib/active_support/backtrace_cleaner.rb, line 43
-def clean(backtrace, kind = :silent)
-  filtered = filter_backtrace(backtrace)
-
-  case kind
-  when :silent
-    silence(filtered)
-  when :noise
-    noise(filtered)
-  else
-    filtered
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -314,34 +314,34 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/backtrace_cleaner.rb, line 59
+    def clean_frame(frame, kind = :silent)
+      frame = frame.to_s
+      @filters.each do |f|
+        frame = f.call(frame.to_s)
+      end
+
+      case kind
+      when :silent
+        frame unless @silencers.any? { |s| s.call(frame) }
+      when :noise
+        frame if @silencers.any? { |s| s.call(frame) }
+      else
+        frame
+      end
+    end
- -
-
# File activesupport/lib/active_support/backtrace_cleaner.rb, line 59
-def clean_frame(frame, kind = :silent)
-  frame = frame.to_s
-  @filters.each do |f|
-    frame = f.call(frame.to_s)
-  end
-
-  case kind
-  when :silent
-    frame unless @silencers.any? { |s| s.call(frame) }
-  when :noise
-    frame if @silencers.any? { |s| s.call(frame) }
-  else
-    frame
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -365,7 +365,8 @@

-

+ +

@@ -385,22 +386,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/backtrace_cleaner.rb, line 103
+    def remove_filters!
+      @filters = []
+    end
- -
-
# File activesupport/lib/active_support/backtrace_cleaner.rb, line 103
-def remove_filters!
-  @filters = []
-end
-
-
- -

+ See on GitHub + + + +

@@ -420,22 +421,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/backtrace_cleaner.rb, line 96
+    def remove_silencers!
+      @silencers = []
+    end
- -
-
# File activesupport/lib/active_support/backtrace_cleaner.rb, line 96
-def remove_silencers!
-  @silencers = []
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Benchmarkable.html b/src/classes/ActiveSupport/Benchmarkable.html index 4185492b9b..a9237df898 100644 --- a/src/classes/ActiveSupport/Benchmarkable.html +++ b/src/classes/ActiveSupport/Benchmarkable.html @@ -102,32 +102,32 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/benchmarkable.rb, line 38
+    def benchmark(message = "Benchmarking", options = {}, &block)
+      if logger
+        options.assert_valid_keys(:level, :silence)
+        options[:level] ||= :info
+
+        result = nil
+        ms = Benchmark.ms { result = options[:silence] ? logger.silence(&block) : yield }
+        logger.public_send(options[:level], "%s (%.1fms)" % [ message, ms ])
+        result
+      else
+        yield
+      end
+    end
- -
-
# File activesupport/lib/active_support/benchmarkable.rb, line 38
-def benchmark(message = "Benchmarking", options = {}, &block)
-  if logger
-    options.assert_valid_keys(:level, :silence)
-    options[:level] ||= :info
-
-    result = nil
-    ms = Benchmark.ms { result = options[:silence] ? logger.silence(&block) : yield }
-    logger.public_send(options[:level], "%s (%.1fms)" % [ message, ms ])
-    result
-  else
-    yield
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/BroadcastLogger.html b/src/classes/ActiveSupport/BroadcastLogger.html index 7121978e19..6a85f5e1ab 100644 --- a/src/classes/ActiveSupport/BroadcastLogger.html +++ b/src/classes/ActiveSupport/BroadcastLogger.html @@ -287,25 +287,25 @@

- -
- - -
-
# File activesupport/lib/active_support/broadcast_logger.rb, line 62
-def initialize(*loggers)
-  @broadcasts = []
-  @progname = "Broadcast"
-
-  broadcast_to(*loggers)
-end
-
-
- - + +
+ + Source code + + +
# File activesupport/lib/active_support/broadcast_logger.rb, line 62
+    def initialize(*loggers)
+      @broadcasts = []
+      @progname = "Broadcast"
+
+      broadcast_to(*loggers)
+    end
+ + See on GitHub + +
+ + @@ -329,22 +329,22 @@

- -
- - -
-
# File activesupport/lib/active_support/broadcast_logger.rb, line 92
-def <<(message)
-  dispatch { |logger| logger.<<(message) }
-end
-
-
- - + +
+ + Source code + + +
# File activesupport/lib/active_support/broadcast_logger.rb, line 92
+    def <<(message)
+      dispatch { |logger| logger.<<(message) }
+    end
+ + See on GitHub + +
+ +

@@ -368,22 +368,22 @@

- -
- - -
-
# File activesupport/lib/active_support/broadcast_logger.rb, line 96
-def add(*args, &block)
-  dispatch { |logger| logger.add(*args, &block) }
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/broadcast_logger.rb, line 96
+    def add(*args, &block)
+      dispatch { |logger| logger.add(*args, &block) }
+    end
+ + See on GitHub + +
+ +

@@ -407,22 +407,22 @@

- -
- - -
-
# File activesupport/lib/active_support/broadcast_logger.rb, line 73
-def broadcast_to(*loggers)
-  @broadcasts.concat(loggers)
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/broadcast_logger.rb, line 73
+    def broadcast_to(*loggers)
+      @broadcasts.concat(loggers)
+    end
+ + See on GitHub + +
+ +

@@ -442,22 +442,22 @@

- -
- - -
-
# File activesupport/lib/active_support/broadcast_logger.rb, line 142
-def close
-  dispatch { |logger| logger.close }
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/broadcast_logger.rb, line 142
+    def close
+      dispatch { |logger| logger.close }
+    end
+ + See on GitHub + +
+ +

@@ -477,22 +477,22 @@

- -
- - -
-
# File activesupport/lib/active_support/broadcast_logger.rb, line 101
-def debug(*args, &block)
-  dispatch { |logger| logger.debug(*args, &block) }
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/broadcast_logger.rb, line 101
+    def debug(*args, &block)
+      dispatch { |logger| logger.debug(*args, &block) }
+    end
+ + See on GitHub + +
+ +

@@ -512,22 +512,22 @@

- -
- - -
-
# File activesupport/lib/active_support/broadcast_logger.rb, line 153
-def debug!
-  dispatch { |logger| logger.debug! }
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/broadcast_logger.rb, line 153
+    def debug!
+      dispatch { |logger| logger.debug! }
+    end
+ + See on GitHub + +
+ +

@@ -547,22 +547,22 @@

- -
- - -
-
# File activesupport/lib/active_support/broadcast_logger.rb, line 148
-def debug?
-  @broadcasts.any? { |logger| logger.debug? }
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/broadcast_logger.rb, line 148
+    def debug?
+      @broadcasts.any? { |logger| logger.debug? }
+    end
+ + See on GitHub + +
+ +

@@ -582,22 +582,22 @@

- -
- - -
-
# File activesupport/lib/active_support/broadcast_logger.rb, line 113
-def error(*args, &block)
-  dispatch { |logger| logger.error(*args, &block) }
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/broadcast_logger.rb, line 113
+    def error(*args, &block)
+      dispatch { |logger| logger.error(*args, &block) }
+    end
+ + See on GitHub + +
+ +

@@ -617,22 +617,22 @@

- -
- - -
-
# File activesupport/lib/active_support/broadcast_logger.rb, line 186
-def error!
-  dispatch { |logger| logger.error! }
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/broadcast_logger.rb, line 186
+    def error!
+      dispatch { |logger| logger.error! }
+    end
+ + See on GitHub + +
+ +

@@ -652,22 +652,22 @@

- -
- - -
-
# File activesupport/lib/active_support/broadcast_logger.rb, line 181
-def error?
-  @broadcasts.any? { |logger| logger.error? }
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/broadcast_logger.rb, line 181
+    def error?
+      @broadcasts.any? { |logger| logger.error? }
+    end
+ + See on GitHub + +
+ +

@@ -687,22 +687,22 @@

- -
- - -
-
# File activesupport/lib/active_support/broadcast_logger.rb, line 117
-def fatal(*args, &block)
-  dispatch { |logger| logger.fatal(*args, &block) }
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/broadcast_logger.rb, line 117
+    def fatal(*args, &block)
+      dispatch { |logger| logger.fatal(*args, &block) }
+    end
+ + See on GitHub + +
+ +

@@ -722,22 +722,22 @@

- -
- - -
-
# File activesupport/lib/active_support/broadcast_logger.rb, line 197
-def fatal!
-  dispatch { |logger| logger.fatal! }
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/broadcast_logger.rb, line 197
+    def fatal!
+      dispatch { |logger| logger.fatal! }
+    end
+ + See on GitHub + +
+ +

@@ -757,22 +757,22 @@

- -
- - -
-
# File activesupport/lib/active_support/broadcast_logger.rb, line 192
-def fatal?
-  @broadcasts.any? { |logger| logger.fatal? }
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/broadcast_logger.rb, line 192
+    def fatal?
+      @broadcasts.any? { |logger| logger.fatal? }
+    end
+ + See on GitHub + +
+ +

@@ -792,24 +792,24 @@

- -
- - -
-
# File activesupport/lib/active_support/broadcast_logger.rb, line 125
-def formatter=(formatter)
-  dispatch { |logger| logger.formatter = formatter }
-
-  @formatter = formatter
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/broadcast_logger.rb, line 125
+    def formatter=(formatter)
+      dispatch { |logger| logger.formatter = formatter }
+
+      @formatter = formatter
+    end
+ + See on GitHub + +
+ +

@@ -829,22 +829,22 @@

- -
- - -
-
# File activesupport/lib/active_support/broadcast_logger.rb, line 105
-def info(*args, &block)
-  dispatch { |logger| logger.info(*args, &block) }
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/broadcast_logger.rb, line 105
+    def info(*args, &block)
+      dispatch { |logger| logger.info(*args, &block) }
+    end
+ + See on GitHub + +
+ +

@@ -864,22 +864,22 @@

- -
- - -
-
# File activesupport/lib/active_support/broadcast_logger.rb, line 164
-def info!
-  dispatch { |logger| logger.info! }
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/broadcast_logger.rb, line 164
+    def info!
+      dispatch { |logger| logger.info! }
+    end
+ + See on GitHub + +
+ +

@@ -899,22 +899,22 @@

- -
- - -
-
# File activesupport/lib/active_support/broadcast_logger.rb, line 159
-def info?
-  @broadcasts.any? { |logger| logger.info? }
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/broadcast_logger.rb, line 159
+    def info?
+      @broadcasts.any? { |logger| logger.info? }
+    end
+ + See on GitHub + +
+ +

@@ -934,22 +934,22 @@

- -
- - -
-
# File activesupport/lib/active_support/broadcast_logger.rb, line 88
-def level
-  @broadcasts.map(&:level).min
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/broadcast_logger.rb, line 88
+    def level
+      @broadcasts.map(&:level).min
+    end
+ + See on GitHub + +
+ +

@@ -973,22 +973,22 @@

- -
- - -
-
# File activesupport/lib/active_support/broadcast_logger.rb, line 131
-def level=(level)
-  dispatch { |logger| logger.level = level }
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/broadcast_logger.rb, line 131
+    def level=(level)
+      dispatch { |logger| logger.level = level }
+    end
+ + See on GitHub + +
+ +

@@ -1008,24 +1008,24 @@

- -
- - -
-
# File activesupport/lib/active_support/broadcast_logger.rb, line 136
-def local_level=(level)
-  dispatch do |logger|
-    logger.local_level = level if logger.respond_to?(:local_level=)
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/broadcast_logger.rb, line 136
+    def local_level=(level)
+      dispatch do |logger|
+        logger.local_level = level if logger.respond_to?(:local_level=)
+      end
+    end
+ + See on GitHub + +
+ +

@@ -1049,7 +1049,8 @@

-

+ +

@@ -1073,7 +1074,8 @@

-

+ +

@@ -1099,22 +1101,22 @@

- -
- - -
-
# File activesupport/lib/active_support/broadcast_logger.rb, line 84
-def stop_broadcasting_to(logger)
-  @broadcasts.delete(logger)
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/broadcast_logger.rb, line 84
+    def stop_broadcasting_to(logger)
+      @broadcasts.delete(logger)
+    end
+ + See on GitHub + +
+ +

@@ -1134,22 +1136,22 @@

- -
- - -
-
# File activesupport/lib/active_support/broadcast_logger.rb, line 121
-def unknown(*args, &block)
-  dispatch { |logger| logger.unknown(*args, &block) }
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/broadcast_logger.rb, line 121
+    def unknown(*args, &block)
+      dispatch { |logger| logger.unknown(*args, &block) }
+    end
+ + See on GitHub + +
+ +

@@ -1169,22 +1171,22 @@

- -
- - -
-
# File activesupport/lib/active_support/broadcast_logger.rb, line 109
-def warn(*args, &block)
-  dispatch { |logger| logger.warn(*args, &block) }
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/broadcast_logger.rb, line 109
+    def warn(*args, &block)
+      dispatch { |logger| logger.warn(*args, &block) }
+    end
+ + See on GitHub + +
+ +

@@ -1204,22 +1206,22 @@

- -
- - -
-
# File activesupport/lib/active_support/broadcast_logger.rb, line 175
-def warn!
-  dispatch { |logger| logger.warn! }
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/broadcast_logger.rb, line 175
+    def warn!
+      dispatch { |logger| logger.warn! }
+    end
+ + See on GitHub + +
+ +

@@ -1239,22 +1241,22 @@

- -
- - -
-
# File activesupport/lib/active_support/broadcast_logger.rb, line 170
-def warn?
-  @broadcasts.any? { |logger| logger.warn? }
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/broadcast_logger.rb, line 170
+    def warn?
+      @broadcasts.any? { |logger| logger.warn? }
+    end
+ + See on GitHub + +
+ + diff --git a/src/classes/ActiveSupport/Cache.html b/src/classes/ActiveSupport/Cache.html index ca9a4a8f39..4ae9c3edc5 100644 --- a/src/classes/ActiveSupport/Cache.html +++ b/src/classes/ActiveSupport/Cache.html @@ -232,29 +232,29 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache.rb, line 117
+      def expand_cache_key(key, namespace = nil)
+        expanded_cache_key = namespace ? +"#{namespace}/" : +""
+
+        if prefix = ENV["RAILS_CACHE_ID"] || ENV["RAILS_APP_VERSION"]
+          expanded_cache_key << "#{prefix}/"
+        end
+
+        expanded_cache_key << retrieve_cache_key(key)
+        expanded_cache_key
+      end
- -
-
# File activesupport/lib/active_support/cache.rb, line 117
-def expand_cache_key(key, namespace = nil)
-  expanded_cache_key = namespace ? +"#{namespace}/" : +""
-
-  if prefix = ENV["RAILS_CACHE_ID"] || ENV["RAILS_APP_VERSION"]
-    expanded_cache_key << "#{prefix}/"
-  end
-
-  expanded_cache_key << retrieve_cache_key(key)
-  expanded_cache_key
-end
-
-
- - + See on GitHub + + + +

@@ -297,38 +297,38 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache.rb, line 85
+      def lookup_store(store = nil, *parameters)
+        case store
+        when Symbol
+          options = parameters.extract_options!
+          # clean this up once Ruby 2.7 support is dropped
+          # see https://github.com/rails/rails/pull/41522#discussion_r581186602
+          if options.empty?
+            retrieve_store_class(store).new(*parameters)
+          else
+            retrieve_store_class(store).new(*parameters, **options)
+          end
+        when Array
+          lookup_store(*store)
+        when nil
+          ActiveSupport::Cache::MemoryStore.new
+        else
+          store
+        end
+      end
- -
-
# File activesupport/lib/active_support/cache.rb, line 85
-def lookup_store(store = nil, *parameters)
-  case store
-  when Symbol
-    options = parameters.extract_options!
-    # clean this up once Ruby 2.7 support is dropped
-    # see https://github.com/rails/rails/pull/41522#discussion_r581186602
-    if options.empty?
-      retrieve_store_class(store).new(*parameters)
-    else
-      retrieve_store_class(store).new(*parameters, **options)
-    end
-  when Array
-    lookup_store(*store)
-  when nil
-    ActiveSupport::Cache::MemoryStore.new
-  else
-    store
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Cache/Coder/LazyEntry.html b/src/classes/ActiveSupport/Cache/Coder/LazyEntry.html index f331352d7d..32ee7d95b2 100644 --- a/src/classes/ActiveSupport/Cache/Coder/LazyEntry.html +++ b/src/classes/ActiveSupport/Cache/Coder/LazyEntry.html @@ -88,25 +88,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/coder.rb, line 99
+          def initialize(serializer, compressor, payload, **options)
+            super(payload, **options)
+            @serializer = serializer
+            @compressor = compressor
+            @resolved = false
+          end
- -
-
# File activesupport/lib/active_support/cache/coder.rb, line 99
-def initialize(serializer, compressor, payload, **options)
-  super(payload, **options)
-  @serializer = serializer
-  @compressor = compressor
-  @resolved = false
-end
-
-
- - + See on GitHub + + + + @@ -130,24 +130,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/coder.rb, line 114
+          def mismatched?(version)
+            super.tap { |mismatched| value if !mismatched }
+          rescue Cache::DeserializationError
+            true
+          end
- -
-
# File activesupport/lib/active_support/cache/coder.rb, line 114
-def mismatched?(version)
-  super.tap { |mismatched| value if !mismatched }
-rescue Cache::DeserializationError
-  true
-end
-
-
- - + See on GitHub + + + +

@@ -167,26 +167,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/coder.rb, line 106
+          def value
+            if !@resolved
+              @value = @serializer.load(@compressor ? @compressor.inflate(@value) : @value)
+              @resolved = true
+            end
+            @value
+          end
- -
-
# File activesupport/lib/active_support/cache/coder.rb, line 106
-def value
-  if !@resolved
-    @value = @serializer.load(@compressor ? @compressor.inflate(@value) : @value)
-    @resolved = true
-  end
-  @value
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Cache/Coder/StringDeserializer.html b/src/classes/ActiveSupport/Cache/Coder/StringDeserializer.html index 203f23c9b0..d9372deabd 100644 --- a/src/classes/ActiveSupport/Cache/Coder/StringDeserializer.html +++ b/src/classes/ActiveSupport/Cache/Coder/StringDeserializer.html @@ -84,22 +84,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/coder.rb, line 87
+          def initialize(encoding)
+            @encoding = encoding
+          end
- -
-
# File activesupport/lib/active_support/cache/coder.rb, line 87
-def initialize(encoding)
-  @encoding = encoding
-end
-
-
- - + See on GitHub + + + + @@ -123,22 +123,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/coder.rb, line 91
+          def load(payload)
+            payload.force_encoding(@encoding)
+          end
- -
-
# File activesupport/lib/active_support/cache/coder.rb, line 91
-def load(payload)
-  payload.force_encoding(@encoding)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Cache/Coders.html b/src/classes/ActiveSupport/Cache/Coders.html deleted file mode 100644 index 7b8ec57cdd..0000000000 --- a/src/classes/ActiveSupport/Cache/Coders.html +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: ActiveSupport::Cache::Coders -layout: default ---- -
- -
-
- - - - - - - - - -

Namespace

- - -

Module

- - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveSupport/Cache/Coders/Loader.html b/src/classes/ActiveSupport/Cache/Coders/Loader.html deleted file mode 100644 index 3f0818867b..0000000000 --- a/src/classes/ActiveSupport/Cache/Coders/Loader.html +++ /dev/null @@ -1,116 +0,0 @@ ---- -title: ActiveSupport::Cache::Coders::Loader -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - - -

Instance Public methods

- -
-

- - load(payload) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/cache.rb, line 854
-def load(payload)
-  if !payload.is_a?(String)
-    ActiveSupport::Cache::Store.logger&.warn %{Payload wasn't a string, was #{payload.class.name} - couldn't unmarshal, so returning nil."}
-
-    return nil
-  elsif payload.start_with?(MARK_70_UNCOMPRESSED)
-    members = Marshal.load(payload.byteslice(1..-1))
-  elsif payload.start_with?(MARK_70_COMPRESSED)
-    members = Marshal.load(Zlib::Inflate.inflate(payload.byteslice(1..-1)))
-  elsif payload.start_with?(MARK_61)
-    return Marshal.load(payload)
-  else
-    ActiveSupport::Cache::Store.logger&.warn %{Invalid cache prefix: #{payload.byteslice(0).inspect}, expected "\\x00" or "\\x01"}
-
-    return nil
-  end
-  Entry.unpack(members)
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveSupport/Cache/Coders/Rails61Coder.html b/src/classes/ActiveSupport/Cache/Coders/Rails61Coder.html deleted file mode 100644 index 124c81db50..0000000000 --- a/src/classes/ActiveSupport/Cache/Coders/Rails61Coder.html +++ /dev/null @@ -1,154 +0,0 @@ ---- -title: ActiveSupport::Cache::Coders::Rails61Coder -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - -

Included Modules

- - - - - - - - - - - - - - - -

Instance Public methods

- -
-

- - dump(entry) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/cache.rb, line 878
-def dump(entry)
-  Marshal.dump(entry)
-end
-
-
- -
- -
-

- - dump_compressed(entry, threshold) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/cache.rb, line 882
-def dump_compressed(entry, threshold)
-  Marshal.dump(entry.compressed(threshold))
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveSupport/Cache/Coders/Rails70Coder.html b/src/classes/ActiveSupport/Cache/Coders/Rails70Coder.html deleted file mode 100644 index d6b39b25ed..0000000000 --- a/src/classes/ActiveSupport/Cache/Coders/Rails70Coder.html +++ /dev/null @@ -1,162 +0,0 @@ ---- -title: ActiveSupport::Cache::Coders::Rails70Coder -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - -

Included Modules

- - - - - - - - - - - - - - - -

Instance Public methods

- -
-

- - dump(entry) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/cache.rb, line 891
-def dump(entry)
-  MARK_70_UNCOMPRESSED + Marshal.dump(entry.pack)
-end
-
-
- -
- -
-

- - dump_compressed(entry, threshold) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/cache.rb, line 895
-def dump_compressed(entry, threshold)
-  payload = Marshal.dump(entry.pack)
-  if payload.bytesize >= threshold
-    compressed_payload = Zlib::Deflate.deflate(payload)
-    if compressed_payload.bytesize < payload.bytesize
-      return MARK_70_COMPRESSED + compressed_payload
-    end
-  end
-
-  MARK_70_UNCOMPRESSED + payload
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveSupport/Cache/ConnectionPoolLike.html b/src/classes/ActiveSupport/Cache/ConnectionPoolLike.html deleted file mode 100644 index 78f88b0209..0000000000 --- a/src/classes/ActiveSupport/Cache/ConnectionPoolLike.html +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: ActiveSupport::Cache::ConnectionPoolLike -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - - -

Instance Public methods

- -
-

- - with() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/cache/redis_cache_store.rb, line 27
-def with
-  yield self
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveSupport/Cache/FileStore.html b/src/classes/ActiveSupport/Cache/FileStore.html index 84f1feb5d9..d3fa118cb3 100644 --- a/src/classes/ActiveSupport/Cache/FileStore.html +++ b/src/classes/ActiveSupport/Cache/FileStore.html @@ -180,23 +180,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/file_store.rb, line 20
+      def initialize(cache_path, **options)
+        super(options)
+        @cache_path = cache_path.to_s
+      end
- -
-
# File activesupport/lib/active_support/cache/file_store.rb, line 20
-def initialize(cache_path, **options)
-  super(options)
-  @cache_path = cache_path.to_s
-end
-
-
- - + See on GitHub + + + +

@@ -216,22 +216,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/file_store.rb, line 26
+      def self.supports_cache_versioning?
+        true
+      end
- -
-
# File activesupport/lib/active_support/cache/file_store.rb, line 26
-def self.supports_cache_versioning?
-  true
-end
-
-
- -

+ See on GitHub + + + + @@ -255,26 +255,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/file_store.rb, line 40
+      def cleanup(options = nil)
+        options = merged_options(options)
+        search_dir(cache_path) do |fname|
+          entry = read_entry(fname, **options)
+          delete_entry(fname, **options) if entry && entry.expired?
+        end
+      end
- -
-
# File activesupport/lib/active_support/cache/file_store.rb, line 40
-def cleanup(options = nil)
-  options = merged_options(options)
-  search_dir(cache_path) do |fname|
-    entry = read_entry(fname, **options)
-    delete_entry(fname, **options) if entry && entry.expired?
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -294,24 +294,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/file_store.rb, line 33
+      def clear(options = nil)
+        root_dirs = (Dir.children(cache_path) - GITKEEP_FILES)
+        FileUtils.rm_r(root_dirs.collect { |f| File.join(cache_path, f) })
+      rescue Errno::ENOENT, Errno::ENOTEMPTY
+      end
- -
-
# File activesupport/lib/active_support/cache/file_store.rb, line 33
-def clear(options = nil)
-  root_dirs = (Dir.children(cache_path) - GITKEEP_FILES)
-  FileUtils.rm_r(root_dirs.collect { |f| File.join(cache_path, f) })
-rescue Errno::ENOENT, Errno::ENOTEMPTY
-end
-
-
- -

+ See on GitHub + + + +

@@ -342,22 +342,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/file_store.rb, line 75
+      def decrement(name, amount = 1, options = nil)
+        modify_value(name, -amount, options)
+      end
- -
-
# File activesupport/lib/active_support/cache/file_store.rb, line 75
-def decrement(name, amount = 1, options = nil)
-  modify_value(name, -amount, options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -377,29 +377,29 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/file_store.rb, line 79
+      def delete_matched(matcher, options = nil)
+        options = merged_options(options)
+        instrument(:delete_matched, matcher.inspect) do
+          matcher = key_matcher(matcher, options)
+          search_dir(cache_path) do |path|
+            key = file_path_key(path)
+            delete_entry(path, **options) if key.match(matcher)
+          end
+        end
+      end
- -
-
# File activesupport/lib/active_support/cache/file_store.rb, line 79
-def delete_matched(matcher, options = nil)
-  options = merged_options(options)
-  instrument(:delete_matched, matcher.inspect) do
-    matcher = key_matcher(matcher, options)
-    search_dir(cache_path) do |path|
-      key = file_path_key(path)
-      delete_entry(path, **options) if key.match(matcher)
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -431,22 +431,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/file_store.rb, line 60
+      def increment(name, amount = 1, options = nil)
+        modify_value(name, amount, options)
+      end
- -
-
# File activesupport/lib/active_support/cache/file_store.rb, line 60
-def increment(name, amount = 1, options = nil)
-  modify_value(name, amount, options)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Cache/MemCacheStore.html b/src/classes/ActiveSupport/Cache/MemCacheStore.html index e02bb983db..5b56677a11 100644 --- a/src/classes/ActiveSupport/Cache/MemCacheStore.html +++ b/src/classes/ActiveSupport/Cache/MemCacheStore.html @@ -185,44 +185,44 @@

- -
- - -
-
# File activesupport/lib/active_support/cache/mem_cache_store.rb, line 118
-      def initialize(*addresses)
-        addresses = addresses.flatten
-        options = addresses.extract_options!
-        if options.key?(:cache_nils)
-          options[:skip_nil] = !options.delete(:cache_nils)
-        end
-        super(options)
-
-        unless [String, Dalli::Client, NilClass].include?(addresses.first.class)
-          raise ArgumentError, "First argument must be an empty array, address, or array of addresses."
-        end
-        if addresses.first.is_a?(Dalli::Client)
-          ActiveSupport.deprecator.warn(<<~MSG)
-            Initializing MemCacheStore with a Dalli::Client is deprecated and will be removed in Rails 7.2.
+          
+            
+ + Source code + + +
# File activesupport/lib/active_support/cache/mem_cache_store.rb, line 118
+      def initialize(*addresses)
+        addresses = addresses.flatten
+        options = addresses.extract_options!
+        if options.key?(:cache_nils)
+          options[:skip_nil] = !options.delete(:cache_nils)
+        end
+        super(options)
+
+        unless [String, Dalli::Client, NilClass].include?(addresses.first.class)
+          raise ArgumentError, "First argument must be an empty array, address, or array of addresses."
+        end
+        if addresses.first.is_a?(Dalli::Client)
+          ActiveSupport.deprecator.warn(<<~MSG)
+            Initializing MemCacheStore with a Dalli::Client is deprecated and will be removed in Rails 7.2.
             Use memcached server addresses instead.
-          MSG
-          @data = addresses.first
-        else
-          @mem_cache_options = options.dup
-          # The value "compress: false" prevents duplicate compression within Dalli.
-          @mem_cache_options[:compress] = false
-          (OVERRIDDEN_OPTIONS - %i(compress)).each { |name| @mem_cache_options.delete(name) }
-          @data = self.class.build_mem_cache(*(addresses + [@mem_cache_options]))
-        end
-      end
-
-
- - + MSG + @data = addresses.first + else + @mem_cache_options = options.dup + # The value "compress: false" prevents duplicate compression within Dalli. + @mem_cache_options[:compress] = false + (OVERRIDDEN_OPTIONS - %i(compress)).each { |name| @mem_cache_options.delete(name) } + @data = self.class.build_mem_cache(*(addresses + [@mem_cache_options])) + end + end + + See on GitHub + + + +

@@ -242,22 +242,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/mem_cache_store.rb, line 38
+      def self.supports_cache_versioning?
+        true
+      end
- -
-
# File activesupport/lib/active_support/cache/mem_cache_store.rb, line 38
-def self.supports_cache_versioning?
-  true
-end
-
-
- -

+ See on GitHub + + + + @@ -281,22 +281,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/mem_cache_store.rb, line 215
+      def clear(options = nil)
+        rescue_error_with(nil) { @data.with { |c| c.flush_all } }
+      end
- -
-
# File activesupport/lib/active_support/cache/mem_cache_store.rb, line 215
-def clear(options = nil)
-  rescue_error_with(nil) { @data.with { |c| c.flush_all } }
-end
-
-
- - + See on GitHub + + + +

@@ -329,27 +329,27 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/mem_cache_store.rb, line 204
+      def decrement(name, amount = 1, options = nil)
+        options = merged_options(options)
+        instrument(:decrement, name, amount: amount) do
+          rescue_error_with nil do
+            @data.with { |c| c.decr(normalize_key(name, options), amount, options[:expires_in], 0) }
+          end
+        end
+      end
- -
-
# File activesupport/lib/active_support/cache/mem_cache_store.rb, line 204
-def decrement(name, amount = 1, options = nil)
-  options = merged_options(options)
-  instrument(:decrement, name, amount: amount) do
-    rescue_error_with nil do
-      @data.with { |c| c.decr(normalize_key(name, options), amount, options[:expires_in], 0) }
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -383,27 +383,27 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/mem_cache_store.rb, line 180
+      def increment(name, amount = 1, options = nil)
+        options = merged_options(options)
+        instrument(:increment, name, amount: amount) do
+          rescue_error_with nil do
+            @data.with { |c| c.incr(normalize_key(name, options), amount, options[:expires_in], amount) }
+          end
+        end
+      end
- -
-
# File activesupport/lib/active_support/cache/mem_cache_store.rb, line 180
-def increment(name, amount = 1, options = nil)
-  options = merged_options(options)
-  instrument(:increment, name, amount: amount) do
-    rescue_error_with nil do
-      @data.with { |c| c.incr(normalize_key(name, options), amount, options[:expires_in], amount) }
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -423,23 +423,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/mem_cache_store.rb, line 144
+      def inspect
+        instance = @data || @mem_cache_options
+        "#<#{self.class} options=#{options.inspect} mem_cache=#{instance.inspect}>"
+      end
- -
-
# File activesupport/lib/active_support/cache/mem_cache_store.rb, line 144
-def inspect
-  instance = @data || @mem_cache_options
-  "#<#{self.class} options=#{options.inspect} mem_cache=#{instance.inspect}>"
-end
-
-
- -

+ See on GitHub + + + +

@@ -459,22 +459,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/mem_cache_store.rb, line 220
+      def stats
+        @data.with { |c| c.stats }
+      end
- -
-
# File activesupport/lib/active_support/cache/mem_cache_store.rb, line 220
-def stats
-  @data.with { |c| c.stats }
-end
-
-
- -

+ See on GitHub + + + +

@@ -502,20 +502,10 @@

Additional Options

- -
- - -
-
# File activesupport/lib/active_support/cache/mem_cache_store.rb, line 150
-      
-
-
- -
+ + See on GitHub + + diff --git a/src/classes/ActiveSupport/Cache/MemCacheStore/Coders.html b/src/classes/ActiveSupport/Cache/MemCacheStore/Coders.html deleted file mode 100644 index 445adf6e66..0000000000 --- a/src/classes/ActiveSupport/Cache/MemCacheStore/Coders.html +++ /dev/null @@ -1,71 +0,0 @@ ---- -title: ActiveSupport::Cache::MemCacheStore::Coders -layout: default ---- -
- -
-
- - - - - - - - - -

Namespace

- - -

Module

- - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveSupport/Cache/MemCacheStore/Coders/Loader.html b/src/classes/ActiveSupport/Cache/MemCacheStore/Coders/Loader.html deleted file mode 100644 index 122504b551..0000000000 --- a/src/classes/ActiveSupport/Cache/MemCacheStore/Coders/Loader.html +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: ActiveSupport::Cache::MemCacheStore::Coders::Loader -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - - -

Instance Public methods

- -
-

- - load(payload) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/cache/mem_cache_store.rb, line 200
-def load(payload)
-  if payload.is_a?(Entry)
-    payload
-  else
-    Cache::Coders::Loader.load(payload)
-  end
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveSupport/Cache/MemCacheStore/Coders/Rails61Coder.html b/src/classes/ActiveSupport/Cache/MemCacheStore/Coders/Rails61Coder.html deleted file mode 100644 index e7e9ded1cb..0000000000 --- a/src/classes/ActiveSupport/Cache/MemCacheStore/Coders/Rails61Coder.html +++ /dev/null @@ -1,154 +0,0 @@ ---- -title: ActiveSupport::Cache::MemCacheStore::Coders::Rails61Coder -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - -

Included Modules

- - - - - - - - - - - - - - - -

Instance Public methods

- -
-

- - dump(entry) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/cache/mem_cache_store.rb, line 213
-def dump(entry)
-  entry
-end
-
-
- -
- -
-

- - dump_compressed(entry, threshold) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/cache/mem_cache_store.rb, line 217
-def dump_compressed(entry, threshold)
-  entry.compressed(threshold)
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveSupport/Cache/MemCacheStore/Coders/Rails70Coder.html b/src/classes/ActiveSupport/Cache/MemCacheStore/Coders/Rails70Coder.html deleted file mode 100644 index d5b23dda0c..0000000000 --- a/src/classes/ActiveSupport/Cache/MemCacheStore/Coders/Rails70Coder.html +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: ActiveSupport::Cache::MemCacheStore::Coders::Rails70Coder -layout: default ---- -
- -
-
- - - - - - - - - - - - - - -

Included Modules

- - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveSupport/Cache/MemCacheStore/DupLocalCache/DupLocalStore.html b/src/classes/ActiveSupport/Cache/MemCacheStore/DupLocalCache/DupLocalStore.html index 6bb5da82a8..7659ec5022 100644 --- a/src/classes/ActiveSupport/Cache/MemCacheStore/DupLocalCache/DupLocalStore.html +++ b/src/classes/ActiveSupport/Cache/MemCacheStore/DupLocalCache/DupLocalStore.html @@ -85,35 +85,35 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/mem_cache_store.rb, line 53
+          def fetch_entry(key)
+            entry = super do
+              new_entry = yield
+              if entry.is_a?(Entry)
+                new_entry.dup_value!
+              end
+              new_entry
+            end
+            entry = entry.dup
+
+            if entry.is_a?(Entry)
+              entry.dup_value!
+            end
+
+            entry
+          end
- -
-
# File activesupport/lib/active_support/cache/mem_cache_store.rb, line 53
-def fetch_entry(key)
-  entry = super do
-    new_entry = yield
-    if entry.is_a?(Entry)
-      new_entry.dup_value!
-    end
-    new_entry
-  end
-  entry = entry.dup
-
-  if entry.is_a?(Entry)
-    entry.dup_value!
-  end
-
-  entry
-end
-
-
- - + See on GitHub + + + +

@@ -133,25 +133,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/mem_cache_store.rb, line 46
+          def write_entry(_key, entry)
+            if entry.is_a?(Entry)
+              entry.dup_value!
+            end
+            super
+          end
- -
-
# File activesupport/lib/active_support/cache/mem_cache_store.rb, line 46
-def write_entry(_key, entry)
-  if entry.is_a?(Entry)
-    entry.dup_value!
-  end
-  super
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Cache/MemoryStore.html b/src/classes/ActiveSupport/Cache/MemoryStore.html index 5a7e5aaedc..86cc4a9358 100644 --- a/src/classes/ActiveSupport/Cache/MemoryStore.html +++ b/src/classes/ActiveSupport/Cache/MemoryStore.html @@ -144,32 +144,32 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/memory_store.rb, line 73
+      def initialize(options = nil)
+        options ||= {}
+        options[:coder] = DupCoder unless options.key?(:coder) || options.key?(:serializer)
+        # Disable compression by default.
+        options[:compress] ||= false
+        super(options)
+        @data = {}
+        @max_size = options[:size] || 32.megabytes
+        @max_prune_time = options[:max_prune_time] || 2
+        @cache_size = 0
+        @monitor = Monitor.new
+        @pruning = false
+      end
- -
-
# File activesupport/lib/active_support/cache/memory_store.rb, line 73
-def initialize(options = nil)
-  options ||= {}
-  options[:coder] = DupCoder unless options.key?(:coder) || options.key?(:serializer)
-  # Disable compression by default.
-  options[:compress] ||= false
-  super(options)
-  @data = {}
-  @max_size = options[:size] || 32.megabytes
-  @max_prune_time = options[:max_prune_time] || 2
-  @cache_size = 0
-  @monitor = Monitor.new
-  @pruning = false
-end
-
-
- - + See on GitHub + + + +

@@ -189,22 +189,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/memory_store.rb, line 88
+      def self.supports_cache_versioning?
+        true
+      end
- -
-
# File activesupport/lib/active_support/cache/memory_store.rb, line 88
-def self.supports_cache_versioning?
-  true
-end
-
-
- -

+ See on GitHub + + + + @@ -228,29 +228,29 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/memory_store.rb, line 101
+      def cleanup(options = nil)
+        options = merged_options(options)
+        _instrument(:cleanup, size: @data.size) do
+          keys = synchronize { @data.keys }
+          keys.each do |key|
+            entry = @data[key]
+            delete_entry(key, **options) if entry && entry.expired?
+          end
+        end
+      end
- -
-
# File activesupport/lib/active_support/cache/memory_store.rb, line 101
-def cleanup(options = nil)
-  options = merged_options(options)
-  _instrument(:cleanup, size: @data.size) do
-    keys = synchronize { @data.keys }
-    keys.each do |key|
-      entry = @data[key]
-      delete_entry(key, **options) if entry && entry.expired?
-    end
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -270,25 +270,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/memory_store.rb, line 93
+      def clear(options = nil)
+        synchronize do
+          @data.clear
+          @cache_size = 0
+        end
+      end
- -
-
# File activesupport/lib/active_support/cache/memory_store.rb, line 93
-def clear(options = nil)
-  synchronize do
-    @data.clear
-    @cache_size = 0
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -319,22 +319,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/memory_store.rb, line 164
+      def decrement(name, amount = 1, options = nil)
+        modify_value(name, -amount, options)
+      end
- -
-
# File activesupport/lib/active_support/cache/memory_store.rb, line 164
-def decrement(name, amount = 1, options = nil)
-  modify_value(name, -amount, options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -354,29 +354,29 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/memory_store.rb, line 169
+      def delete_matched(matcher, options = nil)
+        options = merged_options(options)
+        instrument(:delete_matched, matcher.inspect) do
+          matcher = key_matcher(matcher, options)
+          keys = synchronize { @data.keys }
+          keys.each do |key|
+            delete_entry(key, **options) if key.match(matcher)
+          end
+        end
+      end
- -
-
# File activesupport/lib/active_support/cache/memory_store.rb, line 169
-def delete_matched(matcher, options = nil)
-  options = merged_options(options)
-  instrument(:delete_matched, matcher.inspect) do
-    matcher = key_matcher(matcher, options)
-    keys = synchronize { @data.keys }
-    keys.each do |key|
-      delete_entry(key, **options) if key.match(matcher)
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -408,22 +408,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/memory_store.rb, line 149
+      def increment(name, amount = 1, options = nil)
+        modify_value(name, amount, options)
+      end
- -
-
# File activesupport/lib/active_support/cache/memory_store.rb, line 149
-def increment(name, amount = 1, options = nil)
-  modify_value(name, amount, options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -443,36 +443,36 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/memory_store.rb, line 114
+      def prune(target_size, max_time = nil)
+        return if pruning?
+        @pruning = true
+        begin
+          start_time = Process.clock_gettime(Process::CLOCK_MONOTONIC)
+          cleanup
+          instrument(:prune, target_size, from: @cache_size) do
+            keys = synchronize { @data.keys }
+            keys.each do |key|
+              delete_entry(key, **options)
+              return if @cache_size <= target_size || (max_time && Process.clock_gettime(Process::CLOCK_MONOTONIC) - start_time > max_time)
+            end
+          end
+        ensure
+          @pruning = false
+        end
+      end
- -
-
# File activesupport/lib/active_support/cache/memory_store.rb, line 114
-def prune(target_size, max_time = nil)
-  return if pruning?
-  @pruning = true
-  begin
-    start_time = Process.clock_gettime(Process::CLOCK_MONOTONIC)
-    cleanup
-    instrument(:prune, target_size, from: @cache_size) do
-      keys = synchronize { @data.keys }
-      keys.each do |key|
-        delete_entry(key, **options)
-        return if @cache_size <= target_size || (max_time && Process.clock_gettime(Process::CLOCK_MONOTONIC) - start_time > max_time)
-      end
-    end
-  ensure
-    @pruning = false
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -492,22 +492,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/memory_store.rb, line 133
+      def pruning?
+        @pruning
+      end
- -
-
# File activesupport/lib/active_support/cache/memory_store.rb, line 133
-def pruning?
-  @pruning
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Cache/MemoryStore/DupCoder.html b/src/classes/ActiveSupport/Cache/MemoryStore/DupCoder.html deleted file mode 100644 index 442c25e5aa..0000000000 --- a/src/classes/ActiveSupport/Cache/MemoryStore/DupCoder.html +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: ActiveSupport::Cache::MemoryStore::DEFAULT_CODER -layout: default ---- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveSupport/Cache/NullStore.html b/src/classes/ActiveSupport/Cache/NullStore.html index 78751f8a7b..e188f7ce37 100644 --- a/src/classes/ActiveSupport/Cache/NullStore.html +++ b/src/classes/ActiveSupport/Cache/NullStore.html @@ -110,22 +110,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/null_store.rb, line 18
+      def self.supports_cache_versioning?
+        true
+      end
- -
-
# File activesupport/lib/active_support/cache/null_store.rb, line 18
-def self.supports_cache_versioning?
-  true
-end
-
-
- - + See on GitHub + + + + @@ -149,21 +149,21 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/null_store.rb, line 25
+      def cleanup(options = nil)
+      end
- -
-
# File activesupport/lib/active_support/cache/null_store.rb, line 25
-def cleanup(options = nil)
-end
-
-
- - + See on GitHub + + + +

@@ -183,21 +183,21 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/null_store.rb, line 22
+      def clear(options = nil)
+      end
- -
-
# File activesupport/lib/active_support/cache/null_store.rb, line 22
-def clear(options = nil)
-end
-
-
- -

+ See on GitHub + + + +

@@ -217,21 +217,21 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/null_store.rb, line 31
+      def decrement(name, amount = 1, options = nil)
+      end
- -
-
# File activesupport/lib/active_support/cache/null_store.rb, line 31
-def decrement(name, amount = 1, options = nil)
-end
-
-
- -

+ See on GitHub + + + +

@@ -251,21 +251,21 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/null_store.rb, line 34
+      def delete_matched(matcher, options = nil)
+      end
- -
-
# File activesupport/lib/active_support/cache/null_store.rb, line 34
-def delete_matched(matcher, options = nil)
-end
-
-
- -

+ See on GitHub + + + +

@@ -285,21 +285,21 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/null_store.rb, line 28
+      def increment(name, amount = 1, options = nil)
+      end
- -
-
# File activesupport/lib/active_support/cache/null_store.rb, line 28
-def increment(name, amount = 1, options = nil)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Cache/RedisCacheStore.html b/src/classes/ActiveSupport/Cache/RedisCacheStore.html index 0150ebe410..ef34d59dab 100644 --- a/src/classes/ActiveSupport/Cache/RedisCacheStore.html +++ b/src/classes/ActiveSupport/Cache/RedisCacheStore.html @@ -241,33 +241,33 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/redis_cache_store.rb, line 145
+      def initialize(error_handler: DEFAULT_ERROR_HANDLER, **redis_options)
+        universal_options = redis_options.extract!(*UNIVERSAL_OPTIONS)
+
+        if pool_options = self.class.send(:retrieve_pool_options, redis_options)
+          @redis = ::ConnectionPool.new(pool_options) { self.class.build_redis(**redis_options) }
+        else
+          @redis = self.class.build_redis(**redis_options)
+        end
+
+        @max_key_bytesize = MAX_KEY_BYTESIZE
+        @error_handler = error_handler
+
+        super(universal_options)
+      end
- -
-
# File activesupport/lib/active_support/cache/redis_cache_store.rb, line 145
-def initialize(error_handler: DEFAULT_ERROR_HANDLER, **redis_options)
-  universal_options = redis_options.extract!(*UNIVERSAL_OPTIONS)
-
-  if pool_options = self.class.send(:retrieve_pool_options, redis_options)
-    @redis = ::ConnectionPool.new(pool_options) { self.class.build_redis(**redis_options) }
-  else
-    @redis = self.class.build_redis(**redis_options)
-  end
-
-  @max_key_bytesize = MAX_KEY_BYTESIZE
-  @error_handler = error_handler
-
-  super(universal_options)
-end
-
-
- - + See on GitHub + + + +

@@ -287,22 +287,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/redis_cache_store.rb, line 62
+      def self.supports_cache_versioning?
+        true
+      end
- -
-
# File activesupport/lib/active_support/cache/redis_cache_store.rb, line 62
-def self.supports_cache_versioning?
-  true
-end
-
-
- -

+ See on GitHub + + + + @@ -328,22 +328,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/redis_cache_store.rb, line 272
+      def cleanup(options = nil)
+        super
+      end
- -
-
# File activesupport/lib/active_support/cache/redis_cache_store.rb, line 272
-def cleanup(options = nil)
-  super
-end
-
-
- - + See on GitHub + + + +

@@ -365,28 +365,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/redis_cache_store.rb, line 280
+      def clear(options = nil)
+        failsafe :clear do
+          if namespace = merged_options(options)[:namespace]
+            delete_matched "*", namespace: namespace
+          else
+            redis.then { |c| c.flushdb }
+          end
+        end
+      end
- -
-
# File activesupport/lib/active_support/cache/redis_cache_store.rb, line 280
-def clear(options = nil)
-  failsafe :clear do
-    if namespace = merged_options(options)[:namespace]
-      delete_matched "*", namespace: namespace
-    else
-      redis.then { |c| c.flushdb }
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -421,28 +421,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/redis_cache_store.rb, line 258
+      def decrement(name, amount = 1, options = nil)
+        instrument :decrement, name, amount: amount do
+          failsafe :decrement do
+            options = merged_options(options)
+            key = normalize_key(name, options)
+            change_counter(key, -amount, options)
+          end
+        end
+      end
- -
-
# File activesupport/lib/active_support/cache/redis_cache_store.rb, line 258
-def decrement(name, amount = 1, options = nil)
-  instrument :decrement, name, amount: amount do
-    failsafe :decrement do
-      options = merged_options(options)
-      key = normalize_key(name, options)
-      change_counter(key, -amount, options)
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -477,39 +477,39 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/redis_cache_store.rb, line 194
+      def delete_matched(matcher, options = nil)
+        instrument :delete_matched, matcher do
+          unless String === matcher
+            raise ArgumentError, "Only Redis glob strings are supported: #{matcher.inspect}"
+          end
+          redis.then do |c|
+            pattern = namespace_key(matcher, options)
+            cursor = "0"
+            # Fetch keys in batches using SCAN to avoid blocking the Redis server.
+            nodes = c.respond_to?(:nodes) ? c.nodes : [c]
+
+            nodes.each do |node|
+              begin
+                cursor, keys = node.scan(cursor, match: pattern, count: SCAN_BATCH_SIZE)
+                node.del(*keys) unless keys.empty?
+              end until cursor == "0"
+            end
+          end
+        end
+      end
- -
-
# File activesupport/lib/active_support/cache/redis_cache_store.rb, line 194
-def delete_matched(matcher, options = nil)
-  instrument :delete_matched, matcher do
-    unless String === matcher
-      raise ArgumentError, "Only Redis glob strings are supported: #{matcher.inspect}"
-    end
-    redis.then do |c|
-      pattern = namespace_key(matcher, options)
-      cursor = "0"
-      # Fetch keys in batches using SCAN to avoid blocking the Redis server.
-      nodes = c.respond_to?(:nodes) ? c.nodes : [c]
-
-      nodes.each do |node|
-        begin
-          cursor, keys = node.scan(cursor, match: pattern, count: SCAN_BATCH_SIZE)
-          node.del(*keys) unless keys.empty?
-        end until cursor == "0"
-      end
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -545,28 +545,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/redis_cache_store.rb, line 232
+      def increment(name, amount = 1, options = nil)
+        instrument :increment, name, amount: amount do
+          failsafe :increment do
+            options = merged_options(options)
+            key = normalize_key(name, options)
+            change_counter(key, amount, options)
+          end
+        end
+      end
- -
-
# File activesupport/lib/active_support/cache/redis_cache_store.rb, line 232
-def increment(name, amount = 1, options = nil)
-  instrument :increment, name, amount: amount do
-    failsafe :increment do
-      options = merged_options(options)
-      key = normalize_key(name, options)
-      change_counter(key, amount, options)
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -586,22 +586,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/redis_cache_store.rb, line 160
+      def inspect
+        "#<#{self.class} options=#{options.inspect} redis=#{redis.inspect}>"
+      end
- -
-
# File activesupport/lib/active_support/cache/redis_cache_store.rb, line 160
-def inspect
-  "#<#{self.class} options=#{options.inspect} redis=#{redis.inspect}>"
-end
-
-
- -

+ See on GitHub + + + +

@@ -623,29 +623,29 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/redis_cache_store.rb, line 168
+      def read_multi(*names)
+        return {} if names.empty?
+
+        options = names.extract_options!
+        instrument_multi(:read_multi, names, options) do |payload|
+          read_multi_entries(names, **options).tap do |results|
+            payload[:hits] = results.keys
+          end
+        end
+      end
- -
-
# File activesupport/lib/active_support/cache/redis_cache_store.rb, line 168
-def read_multi(*names)
-  return {} if names.empty?
-
-  options = names.extract_options!
-  instrument_multi(:read_multi, names, options) do |payload|
-    read_multi_entries(names, **options).tap do |results|
-      payload[:hits] = results.keys
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -665,22 +665,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/redis_cache_store.rb, line 291
+      def stats
+        redis.then { |c| c.info }
+      end
- -
-
# File activesupport/lib/active_support/cache/redis_cache_store.rb, line 291
-def stats
-  redis.then { |c| c.info }
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Cache/SerializerWithFallback/Marshal61WithFallback.html b/src/classes/ActiveSupport/Cache/SerializerWithFallback/Marshal61WithFallback.html index 594185805b..c1e151546f 100644 --- a/src/classes/ActiveSupport/Cache/SerializerWithFallback/Marshal61WithFallback.html +++ b/src/classes/ActiveSupport/Cache/SerializerWithFallback/Marshal61WithFallback.html @@ -115,22 +115,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 72
+          def dump(entry)
+            Marshal.dump(entry)
+          end
- -
-
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 72
-def dump(entry)
-  Marshal.dump(entry)
-end
-
-
- - + See on GitHub + + + +

@@ -150,22 +150,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 76
+          def dump_compressed(entry, threshold)
+            Marshal.dump(entry.compressed(threshold))
+          end
- -
-
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 76
-def dump_compressed(entry, threshold)
-  Marshal.dump(entry.compressed(threshold))
-end
-
-
- -

+ See on GitHub + + + +

@@ -185,22 +185,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 83
+          def dumped?(dumped)
+            dumped.start_with?(MARSHAL_SIGNATURE)
+          end
- -
-
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 83
-def dumped?(dumped)
-  dumped.start_with?(MARSHAL_SIGNATURE)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Cache/SerializerWithFallback/Marshal70WithFallback.html b/src/classes/ActiveSupport/Cache/SerializerWithFallback/Marshal70WithFallback.html index bb81bf67c6..9f008c82bb 100644 --- a/src/classes/ActiveSupport/Cache/SerializerWithFallback/Marshal70WithFallback.html +++ b/src/classes/ActiveSupport/Cache/SerializerWithFallback/Marshal70WithFallback.html @@ -131,24 +131,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 110
+          def _load(marked)
+            dumped = marked.byteslice(1..-1)
+            dumped = Zlib::Inflate.inflate(dumped) if marked.start_with?(MARK_COMPRESSED)
+            Cache::Entry.unpack(marshal_load(dumped))
+          end
- -
-
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 110
-def _load(marked)
-  dumped = marked.byteslice(1..-1)
-  dumped = Zlib::Inflate.inflate(dumped) if marked.start_with?(MARK_COMPRESSED)
-  Cache::Entry.unpack(marshal_load(dumped))
-end
-
-
- - + See on GitHub + + + +

@@ -168,22 +168,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 95
+          def dump(entry)
+            MARK_UNCOMPRESSED + Marshal.dump(entry.pack)
+          end
- -
-
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 95
-def dump(entry)
-  MARK_UNCOMPRESSED + Marshal.dump(entry.pack)
-end
-
-
- -

+ See on GitHub + + + +

@@ -203,29 +203,29 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 99
+          def dump_compressed(entry, threshold)
+            dumped = Marshal.dump(entry.pack)
+
+            if dumped.bytesize >= threshold
+              compressed = Zlib::Deflate.deflate(dumped)
+              return MARK_COMPRESSED + compressed if compressed.bytesize < dumped.bytesize
+            end
+
+            MARK_UNCOMPRESSED + dumped
+          end
- -
-
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 99
-def dump_compressed(entry, threshold)
-  dumped = Marshal.dump(entry.pack)
-
-  if dumped.bytesize >= threshold
-    compressed = Zlib::Deflate.deflate(dumped)
-    return MARK_COMPRESSED + compressed if compressed.bytesize < dumped.bytesize
-  end
-
-  MARK_UNCOMPRESSED + dumped
-end
-
-
- -

+ See on GitHub + + + +

@@ -245,22 +245,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 116
+          def dumped?(dumped)
+            dumped.start_with?(MARK_UNCOMPRESSED, MARK_COMPRESSED)
+          end
- -
-
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 116
-def dumped?(dumped)
-  dumped.start_with?(MARK_UNCOMPRESSED, MARK_COMPRESSED)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Cache/SerializerWithFallback/Marshal71WithFallback.html b/src/classes/ActiveSupport/Cache/SerializerWithFallback/Marshal71WithFallback.html index 76b854c1bc..78915d1070 100644 --- a/src/classes/ActiveSupport/Cache/SerializerWithFallback/Marshal71WithFallback.html +++ b/src/classes/ActiveSupport/Cache/SerializerWithFallback/Marshal71WithFallback.html @@ -115,22 +115,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 131
+          def _load(dumped)
+            marshal_load(dumped)
+          end
- -
-
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 131
-def _load(dumped)
-  marshal_load(dumped)
-end
-
-
- - + See on GitHub + + + +

@@ -150,22 +150,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 127
+          def dump(value)
+            Marshal.dump(value)
+          end
- -
-
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 127
-def dump(value)
-  Marshal.dump(value)
-end
-
-
- -

+ See on GitHub + + + +

@@ -185,22 +185,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 135
+          def dumped?(dumped)
+            dumped.start_with?(MARSHAL_SIGNATURE)
+          end
- -
-
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 135
-def dumped?(dumped)
-  dumped.start_with?(MARSHAL_SIGNATURE)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Cache/SerializerWithFallback/MessagePackWithFallback.html b/src/classes/ActiveSupport/Cache/SerializerWithFallback/MessagePackWithFallback.html index 18200b53ed..d63761f57f 100644 --- a/src/classes/ActiveSupport/Cache/SerializerWithFallback/MessagePackWithFallback.html +++ b/src/classes/ActiveSupport/Cache/SerializerWithFallback/MessagePackWithFallback.html @@ -97,22 +97,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 148
+          def _load(dumped)
+            ActiveSupport::MessagePack::CacheSerializer.load(dumped)
+          end
- -
-
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 148
-def _load(dumped)
-  ActiveSupport::MessagePack::CacheSerializer.load(dumped)
-end
-
-
- - + See on GitHub + + + +

@@ -132,22 +132,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 144
+          def dump(value)
+            ActiveSupport::MessagePack::CacheSerializer.dump(value)
+          end
- -
-
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 144
-def dump(value)
-  ActiveSupport::MessagePack::CacheSerializer.dump(value)
-end
-
-
- -

+ See on GitHub + + + +

@@ -167,22 +167,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 152
+          def dumped?(dumped)
+            available? && ActiveSupport::MessagePack.signature?(dumped)
+          end
- -
-
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 152
-def dumped?(dumped)
-  available? && ActiveSupport::MessagePack.signature?(dumped)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Cache/SerializerWithFallback/PassthroughWithFallback.html b/src/classes/ActiveSupport/Cache/SerializerWithFallback/PassthroughWithFallback.html index e50ebdd2d8..4fdcb1937a 100644 --- a/src/classes/ActiveSupport/Cache/SerializerWithFallback/PassthroughWithFallback.html +++ b/src/classes/ActiveSupport/Cache/SerializerWithFallback/PassthroughWithFallback.html @@ -101,22 +101,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 57
+          def _load(entry)
+            entry
+          end
- -
-
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 57
-def _load(entry)
-  entry
-end
-
-
- - + See on GitHub + + + +

@@ -136,22 +136,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 49
+          def dump(entry)
+            entry
+          end
- -
-
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 49
-def dump(entry)
-  entry
-end
-
-
- -

+ See on GitHub + + + +

@@ -171,22 +171,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 53
+          def dump_compressed(entry, threshold)
+            entry.compressed(threshold)
+          end
- -
-
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 53
-def dump_compressed(entry, threshold)
-  entry.compressed(threshold)
-end
-
-
- -

+ See on GitHub + + + +

@@ -206,22 +206,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 61
+          def dumped?(dumped)
+            dumped.is_a?(Cache::Entry)
+          end
- -
-
# File activesupport/lib/active_support/cache/serializer_with_fallback.rb, line 61
-def dumped?(dumped)
-  dumped.is_a?(Cache::Entry)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Cache/Store.html b/src/classes/ActiveSupport/Cache/Store.html index 9cbc3e6aca..d6da1f93c0 100644 --- a/src/classes/ActiveSupport/Cache/Store.html +++ b/src/classes/ActiveSupport/Cache/Store.html @@ -258,38 +258,38 @@

Options

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache.rb, line 319
+      def initialize(options = nil)
+        @options = options ? validate_options(normalize_options(options)) : {}
+
+        @options[:compress] = true unless @options.key?(:compress)
+        @options[:compress_threshold] ||= DEFAULT_COMPRESS_LIMIT
+
+        @coder = @options.delete(:coder) do
+          legacy_serializer = Cache.format_version < 7.1 && !@options[:serializer]
+          serializer = @options.delete(:serializer) || default_serializer
+          serializer = Cache::SerializerWithFallback[serializer] if serializer.is_a?(Symbol)
+          compressor = @options.delete(:compressor) { Zlib }
+
+          Cache::Coder.new(serializer, compressor, legacy_serializer: legacy_serializer)
+        end
+
+        @coder ||= Cache::SerializerWithFallback[:passthrough]
+
+        @coder_supports_compression = @coder.respond_to?(:dump_compressed)
+      end
- -
-
# File activesupport/lib/active_support/cache.rb, line 319
-def initialize(options = nil)
-  @options = options ? validate_options(normalize_options(options)) : {}
-
-  @options[:compress] = true unless @options.key?(:compress)
-  @options[:compress_threshold] ||= DEFAULT_COMPRESS_LIMIT
-
-  @coder = @options.delete(:coder) do
-    legacy_serializer = Cache.format_version < 7.1 && !@options[:serializer]
-    serializer = @options.delete(:serializer) || default_serializer
-    serializer = Cache::SerializerWithFallback[serializer] if serializer.is_a?(Symbol)
-    compressor = @options.delete(:compressor) { Zlib }
-
-    Cache::Coder.new(serializer, compressor, legacy_serializer: legacy_serializer)
-  end
-
-  @coder ||= Cache::SerializerWithFallback[:passthrough]
-
-  @coder_supports_compression = @coder.respond_to?(:dump_compressed)
-end
-
-
- - + See on GitHub + + + + @@ -317,22 +317,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache.rb, line 738
+      def cleanup(options = nil)
+        raise NotImplementedError.new("#{self.class.name} does not support cleanup")
+      end
- -
-
# File activesupport/lib/active_support/cache.rb, line 738
-def cleanup(options = nil)
-  raise NotImplementedError.new("#{self.class.name} does not support cleanup")
-end
-
-
- - + See on GitHub + + + +

@@ -356,22 +356,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache.rb, line 748
+      def clear(options = nil)
+        raise NotImplementedError.new("#{self.class.name} does not support clear")
+      end
- -
-
# File activesupport/lib/active_support/cache.rb, line 748
-def clear(options = nil)
-  raise NotImplementedError.new("#{self.class.name} does not support clear")
-end
-
-
- -

+ See on GitHub + + + +

@@ -395,22 +395,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache.rb, line 729
+      def decrement(name, amount = 1, options = nil)
+        raise NotImplementedError.new("#{self.class.name} does not support decrement")
+      end
- -
-
# File activesupport/lib/active_support/cache.rb, line 729
-def decrement(name, amount = 1, options = nil)
-  raise NotImplementedError.new("#{self.class.name} does not support decrement")
-end
-
-
- -

+ See on GitHub + + + +

@@ -432,26 +432,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache.rb, line 667
+      def delete(name, options = nil)
+        options = merged_options(options)
+
+        instrument(:delete, name) do
+          delete_entry(normalize_key(name, options), **options)
+        end
+      end
- -
-
# File activesupport/lib/active_support/cache.rb, line 667
-def delete(name, options = nil)
-  options = merged_options(options)
-
-  instrument(:delete, name) do
-    delete_entry(normalize_key(name, options), **options)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -475,22 +475,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache.rb, line 711
+      def delete_matched(matcher, options = nil)
+        raise NotImplementedError.new("#{self.class.name} does not support delete_matched")
+      end
- -
-
# File activesupport/lib/active_support/cache.rb, line 711
-def delete_matched(matcher, options = nil)
-  raise NotImplementedError.new("#{self.class.name} does not support delete_matched")
-end
-
-
- -

+ See on GitHub + + + +

@@ -512,29 +512,29 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache.rb, line 679
+      def delete_multi(names, options = nil)
+        return 0 if names.empty?
+
+        options = merged_options(options)
+        names.map! { |key| normalize_key(key, options) }
+
+        instrument_multi :delete_multi, names do
+          delete_multi_entries(names, **options)
+        end
+      end
- -
-
# File activesupport/lib/active_support/cache.rb, line 679
-def delete_multi(names, options = nil)
-  return 0 if names.empty?
-
-  options = merged_options(options)
-  names.map! { |key| normalize_key(key, options) }
-
-  instrument_multi :delete_multi, names do
-    delete_multi_entries(names, **options)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -556,27 +556,27 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache.rb, line 693
+      def exist?(name, options = nil)
+        options = merged_options(options)
+
+        instrument(:exist?, name) do |payload|
+          entry = read_entry(normalize_key(name, options), **options, event: payload)
+          (entry && !entry.expired? && !entry.mismatched?(normalize_version(name, options))) || false
+        end
+      end
- -
-
# File activesupport/lib/active_support/cache.rb, line 693
-def exist?(name, options = nil)
-  options = merged_options(options)
-
-  instrument(:exist?, name) do |payload|
-    entry = read_entry(normalize_key(name, options), **options, event: payload)
-    (entry && !entry.expired? && !entry.mismatched?(normalize_version(name, options))) || false
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -682,46 +682,46 @@

Dynamic Options

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache.rb, line 458
+      def fetch(name, options = nil, &block)
+        if block_given?
+          options = merged_options(options)
+          key = normalize_key(name, options)
+
+          entry = nil
+          unless options[:force]
+            instrument(:read, name, options) do |payload|
+              cached_entry = read_entry(key, **options, event: payload)
+              entry = handle_expired_entry(cached_entry, key, options)
+              entry = nil if entry && entry.mismatched?(normalize_version(name, options))
+              payload[:super_operation] = :fetch if payload
+              payload[:hit] = !!entry if payload
+            end
+          end
+
+          if entry
+            get_entry_value(entry, name, options)
+          else
+            save_block_result_to_cache(name, options, &block)
+          end
+        elsif options && options[:force]
+          raise ArgumentError, "Missing block: Calling `Cache#fetch` with `force: true` requires a block."
+        else
+          read(name, options)
+        end
+      end
- -
-
# File activesupport/lib/active_support/cache.rb, line 458
-def fetch(name, options = nil, &block)
-  if block_given?
-    options = merged_options(options)
-    key = normalize_key(name, options)
-
-    entry = nil
-    unless options[:force]
-      instrument(:read, name, options) do |payload|
-        cached_entry = read_entry(key, **options, event: payload)
-        entry = handle_expired_entry(cached_entry, key, options)
-        entry = nil if entry && entry.mismatched?(normalize_version(name, options))
-        payload[:super_operation] = :fetch if payload
-        payload[:hit] = !!entry if payload
-      end
-    end
-
-    if entry
-      get_entry_value(entry, name, options)
-    else
-      save_block_result_to_cache(name, options, &block)
-    end
-  elsif options && options[:force]
-    raise ArgumentError, "Missing block: Calling `Cache#fetch` with `force: true` requires a block."
-  else
-    read(name, options)
-  end
-end
-
-
- -
+ See on GitHub + + + +

@@ -764,47 +764,47 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache.rb, line 592
+      def fetch_multi(*names)
+        raise ArgumentError, "Missing block: `Cache#fetch_multi` requires a block." unless block_given?
+        return {} if names.empty?
+
+        options = names.extract_options!
+        options = merged_options(options)
+
+        instrument_multi :read_multi, names, options do |payload|
+          if options[:force]
+            reads = {}
+          else
+            reads = read_multi_entries(names, **options)
+          end
+
+          writes  = {}
+          ordered = names.index_with do |name|
+            reads.fetch(name) { writes[name] = yield(name) }
+          end
+          writes.compact! if options[:skip_nil]
+
+          payload[:hits] = reads.keys
+          payload[:super_operation] = :fetch_multi
+
+          write_multi(writes, options)
+
+          ordered
+        end
+      end
- -
-
# File activesupport/lib/active_support/cache.rb, line 592
-def fetch_multi(*names)
-  raise ArgumentError, "Missing block: `Cache#fetch_multi` requires a block." unless block_given?
-  return {} if names.empty?
-
-  options = names.extract_options!
-  options = merged_options(options)
-
-  instrument_multi :read_multi, names, options do |payload|
-    if options[:force]
-      reads = {}
-    else
-      reads = read_multi_entries(names, **options)
-    end
-
-    writes  = {}
-    ordered = names.index_with do |name|
-      reads.fetch(name) { writes[name] = yield(name) }
-    end
-    writes.compact! if options[:skip_nil]
-
-    payload[:hits] = reads.keys
-    payload[:super_operation] = :fetch_multi
-
-    write_multi(writes, options)
-
-    ordered
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -828,22 +828,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache.rb, line 720
+      def increment(name, amount = 1, options = nil)
+        raise NotImplementedError.new("#{self.class.name} does not support increment")
+      end
- -
-
# File activesupport/lib/active_support/cache.rb, line 720
-def increment(name, amount = 1, options = nil)
-  raise NotImplementedError.new("#{self.class.name} does not support increment")
-end
-
-
- -

+ See on GitHub + + + +

@@ -863,25 +863,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache.rb, line 346
+      def mute
+        previous_silence, @silence = defined?(@silence) && @silence, true
+        yield
+      ensure
+        @silence = previous_silence
+      end
- -
-
# File activesupport/lib/active_support/cache.rb, line 346
-def mute
-  previous_silence, @silence = defined?(@silence) && @silence, true
-  yield
-ensure
-  @silence = previous_silence
-end
-
-
- -

+ See on GitHub + + + +

@@ -912,45 +912,45 @@

Options

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache.rb, line 502
+      def read(name, options = nil)
+        options = merged_options(options)
+        key     = normalize_key(name, options)
+        version = normalize_version(name, options)
+
+        instrument(:read, name, options) do |payload|
+          entry = read_entry(key, **options, event: payload)
+
+          if entry
+            if entry.expired?
+              delete_entry(key, **options)
+              payload[:hit] = false if payload
+              nil
+            elsif entry.mismatched?(version)
+              payload[:hit] = false if payload
+              nil
+            else
+              payload[:hit] = true if payload
+              entry.value
+            end
+          else
+            payload[:hit] = false if payload
+            nil
+          end
+        end
+      end
- -
-
# File activesupport/lib/active_support/cache.rb, line 502
-def read(name, options = nil)
-  options = merged_options(options)
-  key     = normalize_key(name, options)
-  version = normalize_version(name, options)
-
-  instrument(:read, name, options) do |payload|
-    entry = read_entry(key, **options, event: payload)
-
-    if entry
-      if entry.expired?
-        delete_entry(key, **options)
-        payload[:hit] = false if payload
-        nil
-      elsif entry.mismatched?(version)
-        payload[:hit] = false if payload
-        nil
-      else
-        payload[:hit] = true if payload
-        entry.value
-      end
-    else
-      payload[:hit] = false if payload
-      nil
-    end
-  end
-end
-
-
- -
+ See on GitHub + + + +

@@ -974,31 +974,31 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache.rb, line 535
+      def read_multi(*names)
+        return {} if names.empty?
+
+        options = names.extract_options!
+        options = merged_options(options)
+
+        instrument_multi :read_multi, names, options do |payload|
+          read_multi_entries(names, **options, event: payload).tap do |results|
+            payload[:hits] = results.keys
+          end
+        end
+      end
- -
-
# File activesupport/lib/active_support/cache.rb, line 535
-def read_multi(*names)
-  return {} if names.empty?
-
-  options = names.extract_options!
-  options = merged_options(options)
-
-  instrument_multi :read_multi, names, options do |payload|
-    read_multi_entries(names, **options, event: payload).tap do |results|
-      payload[:hits] = results.keys
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1018,23 +1018,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache.rb, line 340
+      def silence!
+        @silence = true
+        self
+      end
- -
-
# File activesupport/lib/active_support/cache.rb, line 340
-def silence!
-  @silence = true
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -1079,27 +1079,27 @@

Options

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache.rb, line 654
+      def write(name, value, options = nil)
+        options = merged_options(options)
+
+        instrument(:write, name, options) do
+          entry = Entry.new(value, **options.merge(version: normalize_version(name, options)))
+          write_entry(normalize_key(name, options), entry, **options)
+        end
+      end
- -
-
# File activesupport/lib/active_support/cache.rb, line 654
-def write(name, value, options = nil)
-  options = merged_options(options)
-
-  instrument(:write, name, options) do
-    entry = Entry.new(value, **options.merge(version: normalize_version(name, options)))
-    write_entry(normalize_key(name, options), entry, **options)
-  end
-end
-
-
- -
+ See on GitHub + + + +

@@ -1119,32 +1119,32 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache.rb, line 549
+      def write_multi(hash, options = nil)
+        return hash if hash.empty?
+
+        options = merged_options(options)
+
+        instrument_multi :write_multi, hash, options do |payload|
+          entries = hash.each_with_object({}) do |(name, value), memo|
+            memo[normalize_key(name, options)] = Entry.new(value, **options.merge(version: normalize_version(name, options)))
+          end
+
+          write_multi_entries entries, **options
+        end
+      end
- -
-
# File activesupport/lib/active_support/cache.rb, line 549
-def write_multi(hash, options = nil)
-  return hash if hash.empty?
-
-  options = merged_options(options)
-
-  instrument_multi :write_multi, hash, options do |payload|
-    entries = hash.each_with_object({}) do |(name, value), memo|
-      memo[normalize_key(name, options)] = Entry.new(value, **options.merge(version: normalize_version(name, options)))
-    end
-
-    write_multi_entries entries, **options
-  end
-end
-
-
- -

+ See on GitHub + + + +

Instance Private methods

@@ -1167,33 +1167,33 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache.rb, line 776
+        def key_matcher(pattern, options) # :doc:
+          prefix = options[:namespace].is_a?(Proc) ? options[:namespace].call : options[:namespace]
+          if prefix
+            source = pattern.source
+            if source.start_with?("^")
+              source = source[1, source.length]
+            else
+              source = ".*#{source[0, source.length]}"
+            end
+            Regexp.new("^#{Regexp.escape(prefix)}:#{source}", pattern.options)
+          else
+            pattern
+          end
+        end
- -
-
# File activesupport/lib/active_support/cache.rb, line 776
-def key_matcher(pattern, options) # :doc:
-  prefix = options[:namespace].is_a?(Proc) ? options[:namespace].call : options[:namespace]
-  if prefix
-    source = pattern.source
-    if source.start_with?("^")
-      source = source[1, source.length]
-    else
-      source = ".*#{source[0, source.length]}"
-    end
-    Regexp.new("^#{Regexp.escape(prefix)}:#{source}", pattern.options)
-  else
-    pattern
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Cache/Strategy/LocalCache.html b/src/classes/ActiveSupport/Cache/Strategy/LocalCache.html index bc79b541f3..90efaa3184 100644 --- a/src/classes/ActiveSupport/Cache/Strategy/LocalCache.html +++ b/src/classes/ActiveSupport/Cache/Strategy/LocalCache.html @@ -102,24 +102,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 73
+        def middleware
+          @middleware ||= Middleware.new(
+            "ActiveSupport::Cache::Strategy::LocalCache",
+            local_cache_key)
+        end
- -
-
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 73
-def middleware
-  @middleware ||= Middleware.new(
-    "ActiveSupport::Cache::Strategy::LocalCache",
-    local_cache_key)
-end
-
-
- - + See on GitHub + + + +

@@ -139,22 +139,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 67
+        def with_local_cache(&block)
+          use_temporary_local_cache(LocalStore.new, &block)
+        end
- -
-
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 67
-def with_local_cache(&block)
-  use_temporary_local_cache(LocalStore.new, &block)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Cache/Strategy/LocalCache/LocalStore.html b/src/classes/ActiveSupport/Cache/Strategy/LocalCache/LocalStore.html index dd3d688a3b..1356b40749 100644 --- a/src/classes/ActiveSupport/Cache/Strategy/LocalCache/LocalStore.html +++ b/src/classes/ActiveSupport/Cache/Strategy/LocalCache/LocalStore.html @@ -108,22 +108,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 36
+          def initialize
+            @data = {}
+          end
- -
-
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 36
-def initialize
-  @data = {}
-end
-
-
- - + See on GitHub + + + + @@ -147,22 +147,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 40
+          def clear(options = nil)
+            @data.clear
+          end
- -
-
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 40
-def clear(options = nil)
-  @data.clear
-end
-
-
- - + See on GitHub + + + +

@@ -182,22 +182,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 57
+          def delete_entry(key)
+            !!@data.delete(key)
+          end
- -
-
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 57
-def delete_entry(key)
-  !!@data.delete(key)
-end
-
-
- -

+ See on GitHub + + + +

@@ -217,22 +217,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 44
+          def read_entry(key)
+            @data[key]
+          end
- -
-
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 44
-def read_entry(key)
-  @data[key]
-end
-
-
- -

+ See on GitHub + + + +

@@ -252,22 +252,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 48
+          def read_multi_entries(keys)
+            @data.slice(*keys)
+          end
- -
-
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 48
-def read_multi_entries(keys)
-  @data.slice(*keys)
-end
-
-
- -

+ See on GitHub + + + +

@@ -287,23 +287,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 52
+          def write_entry(key, entry)
+            @data[key] = entry
+            true
+          end
- -
-
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 52
-def write_entry(key, entry)
-  @data[key] = entry
-  true
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Cache/WriteOptions.html b/src/classes/ActiveSupport/Cache/WriteOptions.html index f7d0b0ba57..0d922246ec 100644 --- a/src/classes/ActiveSupport/Cache/WriteOptions.html +++ b/src/classes/ActiveSupport/Cache/WriteOptions.html @@ -101,22 +101,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache.rb, line 1078
+      def expires_at
+        @options[:expires_at]
+      end
- -
-
# File activesupport/lib/active_support/cache.rb, line 1078
-def expires_at
-  @options[:expires_at]
-end
-
-
- - + See on GitHub + + + +

@@ -136,23 +136,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache.rb, line 1082
+      def expires_at=(expires_at)
+        @options.delete(:expires_in)
+        @options[:expires_at] = expires_at
+      end
- -
-
# File activesupport/lib/active_support/cache.rb, line 1082
-def expires_at=(expires_at)
-  @options.delete(:expires_in)
-  @options[:expires_at] = expires_at
-end
-
-
- -

+ See on GitHub + + + +

@@ -172,22 +172,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache.rb, line 1069
+      def expires_in
+        @options[:expires_in]
+      end
- -
-
# File activesupport/lib/active_support/cache.rb, line 1069
-def expires_in
-  @options[:expires_in]
-end
-
-
- -

+ See on GitHub + + + +

@@ -207,23 +207,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache.rb, line 1073
+      def expires_in=(expires_in)
+        @options.delete(:expires_at)
+        @options[:expires_in] = expires_in
+      end
- -
-
# File activesupport/lib/active_support/cache.rb, line 1073
-def expires_in=(expires_in)
-  @options.delete(:expires_at)
-  @options[:expires_in] = expires_in
-end
-
-
- -

+ See on GitHub + + + +

@@ -243,22 +243,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache.rb, line 1061
+      def version
+        @options[:version]
+      end
- -
-
# File activesupport/lib/active_support/cache.rb, line 1061
-def version
-  @options[:version]
-end
-
-
- -

+ See on GitHub + + + +

@@ -278,22 +278,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/cache.rb, line 1065
+      def version=(version)
+        @options[:version] = version
+      end
- -
-
# File activesupport/lib/active_support/cache.rb, line 1065
-def version=(version)
-  @options[:version] = version
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/CachingKeyGenerator.html b/src/classes/ActiveSupport/CachingKeyGenerator.html index 84e0925b2c..e1bdeb620f 100644 --- a/src/classes/ActiveSupport/CachingKeyGenerator.html +++ b/src/classes/ActiveSupport/CachingKeyGenerator.html @@ -92,23 +92,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/key_generator.rb, line 56
+    def initialize(key_generator)
+      @key_generator = key_generator
+      @cache_keys = Concurrent::Map.new
+    end
- -
-
# File activesupport/lib/active_support/key_generator.rb, line 56
-def initialize(key_generator)
-  @key_generator = key_generator
-  @cache_keys = Concurrent::Map.new
-end
-
-
- - + See on GitHub + + + + @@ -132,22 +132,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/key_generator.rb, line 62
+    def generate_key(*args)
+      @cache_keys[args.join("|")] ||= @key_generator.generate_key(*args)
+    end
- -
-
# File activesupport/lib/active_support/key_generator.rb, line 62
-def generate_key(*args)
-  @cache_keys[args.join("|")] ||= @key_generator.generate_key(*args)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Callbacks.html b/src/classes/ActiveSupport/Callbacks.html index 9197de9993..d85a092f73 100644 --- a/src/classes/ActiveSupport/Callbacks.html +++ b/src/classes/ActiveSupport/Callbacks.html @@ -168,67 +168,67 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 97
+    def run_callbacks(kind, type = nil)
+      callbacks = __callbacks[kind.to_sym]
+
+      if callbacks.empty?
+        yield if block_given?
+      else
+        env = Filters::Environment.new(self, false, nil)
+
+        next_sequence = callbacks.compile(type)
+
+        # Common case: no 'around' callbacks defined
+        if next_sequence.final?
+          next_sequence.invoke_before(env)
+          env.value = !env.halted && (!block_given? || yield)
+          next_sequence.invoke_after(env)
+          env.value
+        else
+          invoke_sequence = Proc.new do
+            skipped = nil
+
+            while true
+              current = next_sequence
+              current.invoke_before(env)
+              if current.final?
+                env.value = !env.halted && (!block_given? || yield)
+              elsif current.skip?(env)
+                (skipped ||= []) << current
+                next_sequence = next_sequence.nested
+                next
+              else
+                next_sequence = next_sequence.nested
+                begin
+                  target, block, method, *arguments = current.expand_call_template(env, invoke_sequence)
+                  target.send(method, *arguments, &block)
+                ensure
+                  next_sequence = current
+                end
+              end
+              current.invoke_after(env)
+              skipped.pop.invoke_after(env) while skipped&.first
+              break env.value
+            end
+          end
+
+          invoke_sequence.call
+        end
+      end
+    end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 97
-def run_callbacks(kind, type = nil)
-  callbacks = __callbacks[kind.to_sym]
-
-  if callbacks.empty?
-    yield if block_given?
-  else
-    env = Filters::Environment.new(self, false, nil)
-
-    next_sequence = callbacks.compile(type)
-
-    # Common case: no 'around' callbacks defined
-    if next_sequence.final?
-      next_sequence.invoke_before(env)
-      env.value = !env.halted && (!block_given? || yield)
-      next_sequence.invoke_after(env)
-      env.value
-    else
-      invoke_sequence = Proc.new do
-        skipped = nil
-
-        while true
-          current = next_sequence
-          current.invoke_before(env)
-          if current.final?
-            env.value = !env.halted && (!block_given? || yield)
-          elsif current.skip?(env)
-            (skipped ||= []) << current
-            next_sequence = next_sequence.nested
-            next
-          else
-            next_sequence = next_sequence.nested
-            begin
-              target, block, method, *arguments = current.expand_call_template(env, invoke_sequence)
-              target.send(method, *arguments, &block)
-            ensure
-              next_sequence = current
-            end
-          end
-          current.invoke_after(env)
-          skipped.pop.invoke_after(env) while skipped&.first
-          break env.value
-        end
-      end
-
-      invoke_sequence.call
-    end
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Callbacks/CallTemplate/InstanceExec0.html b/src/classes/ActiveSupport/Callbacks/CallTemplate/InstanceExec0.html index d694655b9c..18e17903ca 100644 --- a/src/classes/ActiveSupport/Callbacks/CallTemplate/InstanceExec0.html +++ b/src/classes/ActiveSupport/Callbacks/CallTemplate/InstanceExec0.html @@ -92,22 +92,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 438
+          def initialize(block)
+            @override_block = block
+          end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 438
-def initialize(block)
-  @override_block = block
-end
-
-
- - + See on GitHub + + + + @@ -131,22 +131,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 442
+          def expand(target, value, block)
+            [target, @override_block, :instance_exec]
+          end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 442
-def expand(target, value, block)
-  [target, @override_block, :instance_exec]
-end
-
-
- - + See on GitHub + + + +

@@ -166,24 +166,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 452
+          def inverted_lambda
+            lambda do |target, value, &block|
+              !target.instance_exec(&@override_block)
+            end
+          end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 452
-def inverted_lambda
-  lambda do |target, value, &block|
-    !target.instance_exec(&@override_block)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -203,24 +203,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 446
+          def make_lambda
+            lambda do |target, value, &block|
+              target.instance_exec(&@override_block)
+            end
+          end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 446
-def make_lambda
-  lambda do |target, value, &block|
-    target.instance_exec(&@override_block)
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Callbacks/CallTemplate/InstanceExec1.html b/src/classes/ActiveSupport/Callbacks/CallTemplate/InstanceExec1.html index 0d7ed0d175..811fbf2323 100644 --- a/src/classes/ActiveSupport/Callbacks/CallTemplate/InstanceExec1.html +++ b/src/classes/ActiveSupport/Callbacks/CallTemplate/InstanceExec1.html @@ -92,22 +92,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 460
+          def initialize(block)
+            @override_block = block
+          end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 460
-def initialize(block)
-  @override_block = block
-end
-
-
- - + See on GitHub + + + + @@ -131,22 +131,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 464
+          def expand(target, value, block)
+            [target, @override_block, :instance_exec, target]
+          end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 464
-def expand(target, value, block)
-  [target, @override_block, :instance_exec, target]
-end
-
-
- - + See on GitHub + + + +

@@ -166,24 +166,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 474
+          def inverted_lambda
+            lambda do |target, value, &block|
+              !target.instance_exec(target, &@override_block)
+            end
+          end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 474
-def inverted_lambda
-  lambda do |target, value, &block|
-    !target.instance_exec(target, &@override_block)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -203,24 +203,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 468
+          def make_lambda
+            lambda do |target, value, &block|
+              target.instance_exec(target, &@override_block)
+            end
+          end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 468
-def make_lambda
-  lambda do |target, value, &block|
-    target.instance_exec(target, &@override_block)
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Callbacks/CallTemplate/InstanceExec2.html b/src/classes/ActiveSupport/Callbacks/CallTemplate/InstanceExec2.html index 1cdb0f8d95..799e70e418 100644 --- a/src/classes/ActiveSupport/Callbacks/CallTemplate/InstanceExec2.html +++ b/src/classes/ActiveSupport/Callbacks/CallTemplate/InstanceExec2.html @@ -92,22 +92,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 482
+          def initialize(block)
+            @override_block = block
+          end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 482
-def initialize(block)
-  @override_block = block
-end
-
-
- - + See on GitHub + + + + @@ -131,23 +131,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 486
+          def expand(target, value, block)
+            raise ArgumentError unless block
+            [target, @override_block || block, :instance_exec, target, block]
+          end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 486
-def expand(target, value, block)
-  raise ArgumentError unless block
-  [target, @override_block || block, :instance_exec, target, block]
-end
-
-
- - + See on GitHub + + + +

@@ -167,25 +167,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 498
+          def inverted_lambda
+            lambda do |target, value, &block|
+              raise ArgumentError unless block
+              !target.instance_exec(target, block, &@override_block)
+            end
+          end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 498
-def inverted_lambda
-  lambda do |target, value, &block|
-    raise ArgumentError unless block
-    !target.instance_exec(target, block, &@override_block)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -205,25 +205,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 491
+          def make_lambda
+            lambda do |target, value, &block|
+              raise ArgumentError unless block
+              target.instance_exec(target, block, &@override_block)
+            end
+          end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 491
-def make_lambda
-  lambda do |target, value, &block|
-    raise ArgumentError unless block
-    target.instance_exec(target, block, &@override_block)
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Callbacks/CallTemplate/MethodCall.html b/src/classes/ActiveSupport/Callbacks/CallTemplate/MethodCall.html index 68f431ba15..01b5f8fc17 100644 --- a/src/classes/ActiveSupport/Callbacks/CallTemplate/MethodCall.html +++ b/src/classes/ActiveSupport/Callbacks/CallTemplate/MethodCall.html @@ -92,22 +92,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 380
+          def initialize(method)
+            @method_name = method
+          end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 380
-def initialize(method)
-  @method_name = method
-end
-
-
- - + See on GitHub + + + + @@ -143,22 +143,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 397
+          def expand(target, value, block)
+            [target, block, @method_name]
+          end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 397
-def expand(target, value, block)
-  [target, block, @method_name]
-end
-
-
- - + See on GitHub + + + +

@@ -178,24 +178,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 407
+          def inverted_lambda
+            lambda do |target, value, &block|
+              !target.send(@method_name, &block)
+            end
+          end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 407
-def inverted_lambda
-  lambda do |target, value, &block|
-    !target.send(@method_name, &block)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -215,24 +215,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 401
+          def make_lambda
+            lambda do |target, value, &block|
+              target.send(@method_name, &block)
+            end
+          end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 401
-def make_lambda
-  lambda do |target, value, &block|
-    target.send(@method_name, &block)
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Callbacks/CallTemplate/ObjectCall.html b/src/classes/ActiveSupport/Callbacks/CallTemplate/ObjectCall.html index 8178cf1596..1985a36ea0 100644 --- a/src/classes/ActiveSupport/Callbacks/CallTemplate/ObjectCall.html +++ b/src/classes/ActiveSupport/Callbacks/CallTemplate/ObjectCall.html @@ -92,23 +92,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 415
+          def initialize(target, method)
+            @override_target = target
+            @method_name = method
+          end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 415
-def initialize(target, method)
-  @override_target = target
-  @method_name = method
-end
-
-
- - + See on GitHub + + + + @@ -132,22 +132,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 420
+          def expand(target, value, block)
+            [@override_target || target, block, @method_name, target]
+          end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 420
-def expand(target, value, block)
-  [@override_target || target, block, @method_name, target]
-end
-
-
- - + See on GitHub + + + +

@@ -167,24 +167,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 430
+          def inverted_lambda
+            lambda do |target, value, &block|
+              !(@override_target || target).send(@method_name, target, &block)
+            end
+          end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 430
-def inverted_lambda
-  lambda do |target, value, &block|
-    !(@override_target || target).send(@method_name, target, &block)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -204,24 +204,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 424
+          def make_lambda
+            lambda do |target, value, &block|
+              (@override_target || target).send(@method_name, target, &block)
+            end
+          end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 424
-def make_lambda
-  lambda do |target, value, &block|
-    (@override_target || target).send(@method_name, target, &block)
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Callbacks/CallTemplate/ProcCall.html b/src/classes/ActiveSupport/Callbacks/CallTemplate/ProcCall.html index 996650b54e..31f7c4dedc 100644 --- a/src/classes/ActiveSupport/Callbacks/CallTemplate/ProcCall.html +++ b/src/classes/ActiveSupport/Callbacks/CallTemplate/ProcCall.html @@ -92,22 +92,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 507
+          def initialize(target)
+            @override_target = target
+          end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 507
-def initialize(target)
-  @override_target = target
-end
-
-
- - + See on GitHub + + + + @@ -131,22 +131,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 511
+          def expand(target, value, block)
+            [@override_target || target, block, :call, target, value]
+          end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 511
-def expand(target, value, block)
-  [@override_target || target, block, :call, target, value]
-end
-
-
- - + See on GitHub + + + +

@@ -166,24 +166,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 521
+          def inverted_lambda
+            lambda do |target, value, &block|
+              !(@override_target || target).call(target, value, &block)
+            end
+          end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 521
-def inverted_lambda
-  lambda do |target, value, &block|
-    !(@override_target || target).call(target, value, &block)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -203,24 +203,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 515
+          def make_lambda
+            lambda do |target, value, &block|
+              (@override_target || target).call(target, value, &block)
+            end
+          end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 515
-def make_lambda
-  lambda do |target, value, &block|
-    (@override_target || target).call(target, value, &block)
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Callbacks/ClassMethods.html b/src/classes/ActiveSupport/Callbacks/ClassMethods.html index b145cfabee..7e834a7b9c 100644 --- a/src/classes/ActiveSupport/Callbacks/ClassMethods.html +++ b/src/classes/ActiveSupport/Callbacks/ClassMethods.html @@ -151,28 +151,26 @@

Notes
- -
- - -
-
# File activesupport/lib/active_support/callbacks.rb, line 940
-        def define_callbacks(*names)
-          options = names.extract_options!
-
-          names.each do |name|
-            name = name.to_sym
-
-            ([self] + self.descendants).each do |target|
-              target.set_callbacks name, CallbackChain.new(name, options)
-            end
-
-            module_eval <<-RUBY, __FILE__, __LINE__ + 1
-              def _run_#{name}_callbacks(&block)
-                run_callbacks #{name.inspect}, &block
+          
+            
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 940
+        def define_callbacks(*names)
+          options = names.extract_options!
+
+          names.each do |name|
+            name = name.to_sym
+
+            ([self] + self.descendants).each do |target|
+              target.set_callbacks name, CallbackChain.new(name, options)
+            end
+
+            module_eval <<-RUBY, __FILE__, __LINE__ + 1
+              def _run_#{name}_callbacks(&block)
+                run_callbacks #{name.inspect}, &block
               end
 
               def self._#{name}_callbacks
@@ -186,13 +184,15 @@ 
Notes
def _#{name}_callbacks __callbacks[#{name.inspect}] end - RUBY - end - end
-
-
- - + RUBY + end + end + + See on GitHub + + + +

@@ -212,30 +212,30 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 850
+        def reset_callbacks(name)
+          callbacks = get_callbacks name
+
+          self.descendants.each do |target|
+            chain = target.get_callbacks(name).dup
+            callbacks.each { |c| chain.delete(c) }
+            target.set_callbacks name, chain
+          end
+
+          set_callbacks(name, callbacks.dup.clear)
+        end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 850
-def reset_callbacks(name)
-  callbacks = get_callbacks name
-
-  self.descendants.each do |target|
-    chain = target.get_callbacks(name).dup
-    callbacks.each { |c| chain.delete(c) }
-    target.set_callbacks name, chain
-  end
-
-  set_callbacks(name, callbacks.dup.clear)
-end
-
-
- -

+ See on GitHub + + + +

@@ -286,32 +286,32 @@

Options
- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 776
+        def set_callback(name, *filter_list, &block)
+          type, filters, options = normalize_callback_params(filter_list, block)
+
+          self_chain = get_callbacks name
+          mapped = filters.map do |filter|
+            Callback.build(self_chain, filter, type, options)
+          end
+
+          __update_callbacks(name) do |target, chain|
+            options[:prepend] ? chain.prepend(*mapped) : chain.append(*mapped)
+            target.set_callbacks name, chain
+          end
+        end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 776
-def set_callback(name, *filter_list, &block)
-  type, filters, options = normalize_callback_params(filter_list, block)
-
-  self_chain = get_callbacks name
-  mapped = filters.map do |filter|
-    Callback.build(self_chain, filter, type, options)
-  end
-
-  __update_callbacks(name) do |target, chain|
-    options[:prepend] ? chain.prepend(*mapped) : chain.append(*mapped)
-    target.set_callbacks name, chain
-  end
-end
-
-
- -
+ See on GitHub + + + +

@@ -368,42 +368,42 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 825
+        def skip_callback(name, *filter_list, &block)
+          type, filters, options = normalize_callback_params(filter_list, block)
+
+          options[:raise] = true unless options.key?(:raise)
+
+          __update_callbacks(name) do |target, chain|
+            filters.each do |filter|
+              callback = chain.find { |c| c.matches?(type, filter) }
+
+              if !callback && options[:raise]
+                raise ArgumentError, "#{type.to_s.capitalize} #{name} callback #{filter.inspect} has not been defined"
+              end
+
+              if callback && (options.key?(:if) || options.key?(:unless))
+                new_callback = callback.merge_conditional_options(chain, if_option: options[:if], unless_option: options[:unless])
+                chain.insert(chain.index(callback), new_callback)
+              end
+
+              chain.delete(callback)
+            end
+            target.set_callbacks name, chain
+          end
+        end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 825
-def skip_callback(name, *filter_list, &block)
-  type, filters, options = normalize_callback_params(filter_list, block)
-
-  options[:raise] = true unless options.key?(:raise)
-
-  __update_callbacks(name) do |target, chain|
-    filters.each do |filter|
-      callback = chain.find { |c| c.matches?(type, filter) }
-
-      if !callback && options[:raise]
-        raise ArgumentError, "#{type.to_s.capitalize} #{name} callback #{filter.inspect} has not been defined"
-      end
-
-      if callback && (options.key?(:if) || options.key?(:unless))
-        new_callback = callback.merge_conditional_options(chain, if_option: options[:if], unless_option: options[:unless])
-        chain.insert(chain.index(callback), new_callback)
-      end
-
-      chain.delete(callback)
-    end
-    target.set_callbacks name, chain
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Callbacks/Conditionals/Value.html b/src/classes/ActiveSupport/Callbacks/Conditionals/Value.html index db3cbfe1cd..525f0a7775 100644 --- a/src/classes/ActiveSupport/Callbacks/Conditionals/Value.html +++ b/src/classes/ActiveSupport/Callbacks/Conditionals/Value.html @@ -84,22 +84,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 155
+          def initialize(&block)
+            @block = block
+          end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 155
-def initialize(&block)
-  @block = block
-end
-
-
- - + See on GitHub + + + + @@ -123,20 +123,20 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 158
+          def call(target, value); @block.call(value); end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 158
-def call(target, value); @block.call(value); end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Callbacks/Filters/After.html b/src/classes/ActiveSupport/Callbacks/Filters/After.html index f8600ecee5..9e008d2c60 100644 --- a/src/classes/ActiveSupport/Callbacks/Filters/After.html +++ b/src/classes/ActiveSupport/Callbacks/Filters/After.html @@ -80,34 +80,34 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 216
+          def self.build(callback_sequence, user_callback, user_conditions, chain_config)
+            if chain_config[:skip_after_callbacks_if_terminated]
+              if user_conditions.any?
+                halting_and_conditional(callback_sequence, user_callback, user_conditions)
+              else
+                halting(callback_sequence, user_callback)
+              end
+            else
+              if user_conditions.any?
+                conditional callback_sequence, user_callback, user_conditions
+              else
+                simple callback_sequence, user_callback
+              end
+            end
+          end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 216
-def self.build(callback_sequence, user_callback, user_conditions, chain_config)
-  if chain_config[:skip_after_callbacks_if_terminated]
-    if user_conditions.any?
-      halting_and_conditional(callback_sequence, user_callback, user_conditions)
-    else
-      halting(callback_sequence, user_callback)
-    end
-  else
-    if user_conditions.any?
-      conditional callback_sequence, user_callback, user_conditions
-    else
-      simple callback_sequence, user_callback
-    end
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Callbacks/Filters/Before.html b/src/classes/ActiveSupport/Callbacks/Filters/Before.html index 0bc3a6d7b8..dc07591370 100644 --- a/src/classes/ActiveSupport/Callbacks/Filters/Before.html +++ b/src/classes/ActiveSupport/Callbacks/Filters/Before.html @@ -80,28 +80,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/callbacks.rb, line 166
+          def self.build(callback_sequence, user_callback, user_conditions, chain_config, filter, name)
+            halted_lambda = chain_config[:terminator]
+
+            if user_conditions.any?
+              halting_and_conditional(callback_sequence, user_callback, user_conditions, halted_lambda, filter, name)
+            else
+              halting(callback_sequence, user_callback, halted_lambda, filter, name)
+            end
+          end
- -
-
# File activesupport/lib/active_support/callbacks.rb, line 166
-def self.build(callback_sequence, user_callback, user_conditions, chain_config, filter, name)
-  halted_lambda = chain_config[:terminator]
-
-  if user_conditions.any?
-    halting_and_conditional(callback_sequence, user_callback, user_conditions, halted_lambda, filter, name)
-  else
-    halting(callback_sequence, user_callback, halted_lambda, filter, name)
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/CodeGenerator/MethodSet.html b/src/classes/ActiveSupport/CodeGenerator/MethodSet.html index 13254c482b..d9a241ab89 100644 --- a/src/classes/ActiveSupport/CodeGenerator/MethodSet.html +++ b/src/classes/ActiveSupport/CodeGenerator/MethodSet.html @@ -106,24 +106,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/code_generator.rb, line 8
+      def initialize(namespace)
+        @cache = METHOD_CACHES[namespace]
+        @sources = []
+        @methods = {}
+      end
- -
-
# File activesupport/lib/active_support/code_generator.rb, line 8
-def initialize(namespace)
-  @cache = METHOD_CACHES[namespace]
-  @sources = []
-  @methods = {}
-end
-
-
- - + See on GitHub + + + + @@ -147,27 +147,27 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/code_generator.rb, line 25
+      def apply(owner, path, line)
+        unless @sources.empty?
+          @cache.module_eval("# frozen_string_literal: true\n" + @sources.join(";"), path, line)
+        end
+        @methods.each do |name, as|
+          owner.define_method(name, @cache.instance_method(as))
+        end
+      end
- -
-
# File activesupport/lib/active_support/code_generator.rb, line 25
-def apply(owner, path, line)
-  unless @sources.empty?
-    @cache.module_eval("# frozen_string_literal: true\n" + @sources.join(";"), path, line)
-  end
-  @methods.each do |name, as|
-    owner.define_method(name, @cache.instance_method(as))
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -187,29 +187,29 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/code_generator.rb, line 14
+      def define_cached_method(name, as: name)
+        name = name.to_sym
+        as = as.to_sym
+        @methods.fetch(name) do
+          unless @cache.method_defined?(as)
+            yield @sources
+          end
+          @methods[name] = as
+        end
+      end
- -
-
# File activesupport/lib/active_support/code_generator.rb, line 14
-def define_cached_method(name, as: name)
-  name = name.to_sym
-  as = as.to_sym
-  @methods.fetch(name) do
-    unless @cache.method_defined?(as)
-      yield @sources
-    end
-    @methods[name] = as
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/CompareWithRange.html b/src/classes/ActiveSupport/CompareWithRange.html index df4db56cce..7f1ea98620 100644 --- a/src/classes/ActiveSupport/CompareWithRange.html +++ b/src/classes/ActiveSupport/CompareWithRange.html @@ -93,32 +93,32 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/range/compare_range.rb, line 16
+    def ===(value)
+      if value.is_a?(::Range)
+        is_backwards_op = value.exclude_end? ? :>= : :>
+        return false if value.begin && value.end && value.begin.public_send(is_backwards_op, value.end)
+        # 1...10 includes 1..9 but it does not include 1..10.
+        # 1..10 includes 1...11 but it does not include 1...12.
+        operator = exclude_end? && !value.exclude_end? ? :< : :<=
+        value_max = !exclude_end? && value.exclude_end? ? value.max : value.last
+        super(value.first) && (self.end.nil? || value_max.public_send(operator, last))
+      else
+        super
+      end
+    end
- -
-
# File activesupport/lib/active_support/core_ext/range/compare_range.rb, line 16
-def ===(value)
-  if value.is_a?(::Range)
-    is_backwards_op = value.exclude_end? ? :>= : :>
-    return false if value.begin && value.end && value.begin.public_send(is_backwards_op, value.end)
-    # 1...10 includes 1..9 but it does not include 1..10.
-    # 1..10 includes 1...11 but it does not include 1...12.
-    operator = exclude_end? && !value.exclude_end? ? :< : :<=
-    value_max = !exclude_end? && value.exclude_end? ? value.max : value.last
-    super(value.first) && (self.end.nil? || value_max.public_send(operator, last))
-  else
-    super
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -152,32 +152,32 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/range/compare_range.rb, line 41
+    def include?(value)
+      if value.is_a?(::Range)
+        is_backwards_op = value.exclude_end? ? :>= : :>
+        return false if value.begin && value.end && value.begin.public_send(is_backwards_op, value.end)
+        # 1...10 includes 1..9 but it does not include 1..10.
+        # 1..10 includes 1...11 but it does not include 1...12.
+        operator = exclude_end? && !value.exclude_end? ? :< : :<=
+        value_max = !exclude_end? && value.exclude_end? ? value.max : value.last
+        super(value.first) && (self.end.nil? || value_max.public_send(operator, last))
+      else
+        super
+      end
+    end
- -
-
# File activesupport/lib/active_support/core_ext/range/compare_range.rb, line 41
-def include?(value)
-  if value.is_a?(::Range)
-    is_backwards_op = value.exclude_end? ? :>= : :>
-    return false if value.begin && value.end && value.begin.public_send(is_backwards_op, value.end)
-    # 1...10 includes 1..9 but it does not include 1..10.
-    # 1..10 includes 1...11 but it does not include 1...12.
-    operator = exclude_end? && !value.exclude_end? ? :< : :<=
-    value_max = !exclude_end? && value.exclude_end? ? value.max : value.last
-    super(value.first) && (self.end.nil? || value_max.public_send(operator, last))
-  else
-    super
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Concern.html b/src/classes/ActiveSupport/Concern.html index df43bbfd97..ee49c57e65 100644 --- a/src/classes/ActiveSupport/Concern.html +++ b/src/classes/ActiveSupport/Concern.html @@ -212,26 +212,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/concern.rb, line 209
+    def class_methods(&class_methods_module_definition)
+      mod = const_defined?(:ClassMethods, false) ?
+        const_get(:ClassMethods) :
+        const_set(:ClassMethods, Module.new)
+
+      mod.module_eval(&class_methods_module_definition)
+    end
- -
-
# File activesupport/lib/active_support/concern.rb, line 209
-def class_methods(&class_methods_module_definition)
-  mod = const_defined?(:ClassMethods, false) ?
-    const_get(:ClassMethods) :
-    const_set(:ClassMethods, Module.new)
-
-  mod.module_eval(&class_methods_module_definition)
-end
-
-
- - + See on GitHub + + + +

@@ -251,32 +251,32 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/concern.rb, line 158
+    def included(base = nil, &block)
+      if base.nil?
+        if instance_variable_defined?(:@_included_block)
+          if @_included_block.source_location != block.source_location
+            raise MultipleIncludedBlocks
+          end
+        else
+          @_included_block = block
+        end
+      else
+        super
+      end
+    end
- -
-
# File activesupport/lib/active_support/concern.rb, line 158
-def included(base = nil, &block)
-  if base.nil?
-    if instance_variable_defined?(:@_included_block)
-      if @_included_block.source_location != block.source_location
-        raise MultipleIncludedBlocks
-      end
-    else
-      @_included_block = block
-    end
-  else
-    super
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -296,32 +296,32 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/concern.rb, line 175
+    def prepended(base = nil, &block)
+      if base.nil?
+        if instance_variable_defined?(:@_prepended_block)
+          if @_prepended_block.source_location != block.source_location
+            raise MultiplePrependBlocks
+          end
+        else
+          @_prepended_block = block
+        end
+      else
+        super
+      end
+    end
- -
-
# File activesupport/lib/active_support/concern.rb, line 175
-def prepended(base = nil, &block)
-  if base.nil?
-    if instance_variable_defined?(:@_prepended_block)
-      if @_prepended_block.source_location != block.source_location
-        raise MultiplePrependBlocks
-      end
-    else
-      @_prepended_block = block
-    end
-  else
-    super
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Concurrency/ShareLock.html b/src/classes/ActiveSupport/Concurrency/ShareLock.html index fe4bcb5500..0b09dd9a20 100644 --- a/src/classes/ActiveSupport/Concurrency/ShareLock.html +++ b/src/classes/ActiveSupport/Concurrency/ShareLock.html @@ -128,30 +128,30 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/concurrency/share_lock.rb, line 50
+      def initialize
+        super()
+
+        @cv = new_cond
+
+        @sharing = Hash.new(0)
+        @waiting = {}
+        @sleeping = {}
+        @exclusive_thread = nil
+        @exclusive_depth = 0
+      end
- -
-
# File activesupport/lib/active_support/concurrency/share_lock.rb, line 50
-def initialize
-  super()
-
-  @cv = new_cond
-
-  @sharing = Hash.new(0)
-  @waiting = {}
-  @sleeping = {}
-  @exclusive_thread = nil
-  @exclusive_depth = 0
-end
-
-
- - + See on GitHub + + + + @@ -177,28 +177,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/concurrency/share_lock.rb, line 148
+      def exclusive(purpose: nil, compatible: [], after_compatible: [], no_wait: false)
+        if start_exclusive(purpose: purpose, compatible: compatible, no_wait: no_wait)
+          begin
+            yield
+          ensure
+            stop_exclusive(compatible: after_compatible)
+          end
+        end
+      end
- -
-
# File activesupport/lib/active_support/concurrency/share_lock.rb, line 148
-def exclusive(purpose: nil, compatible: [], after_compatible: [], no_wait: false)
-  if start_exclusive(purpose: purpose, compatible: compatible, no_wait: no_wait)
-    begin
-      yield
-    ensure
-      stop_exclusive(compatible: after_compatible)
-    end
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -218,27 +218,27 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/concurrency/share_lock.rb, line 159
+      def sharing
+        start_sharing
+        begin
+          yield
+        ensure
+          stop_sharing
+        end
+      end
- -
-
# File activesupport/lib/active_support/concurrency/share_lock.rb, line 159
-def sharing
-  start_sharing
-  begin
-    yield
-  ensure
-    stop_sharing
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -262,36 +262,36 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/concurrency/share_lock.rb, line 76
+      def start_exclusive(purpose: nil, compatible: [], no_wait: false)
+        synchronize do
+          unless @exclusive_thread == Thread.current
+            if busy_for_exclusive?(purpose)
+              return false if no_wait
+
+              yield_shares(purpose: purpose, compatible: compatible, block_share: true) do
+                wait_for(:start_exclusive) { busy_for_exclusive?(purpose) }
+              end
+            end
+            @exclusive_thread = Thread.current
+          end
+          @exclusive_depth += 1
+
+          true
+        end
+      end
- -
-
# File activesupport/lib/active_support/concurrency/share_lock.rb, line 76
-def start_exclusive(purpose: nil, compatible: [], no_wait: false)
-  synchronize do
-    unless @exclusive_thread == Thread.current
-      if busy_for_exclusive?(purpose)
-        return false if no_wait
-
-        yield_shares(purpose: purpose, compatible: compatible, block_share: true) do
-          wait_for(:start_exclusive) { busy_for_exclusive?(purpose) }
-        end
-      end
-      @exclusive_thread = Thread.current
-    end
-    @exclusive_depth += 1
-
-    true
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -311,35 +311,35 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/concurrency/share_lock.rb, line 114
+      def start_sharing
+        synchronize do
+          if @sharing[Thread.current] > 0 || @exclusive_thread == Thread.current
+            # We already hold a lock; nothing to wait for
+          elsif @waiting[Thread.current]
+            # We're nested inside a +yield_shares+ call: we'll resume as
+            # soon as there isn't an exclusive lock in our way
+            wait_for(:start_sharing) { @exclusive_thread }
+          else
+            # This is an initial / outermost share call: any outstanding
+            # requests for an exclusive lock get to go first
+            wait_for(:start_sharing) { busy_for_sharing?(false) }
+          end
+          @sharing[Thread.current] += 1
+        end
+      end
- -
-
# File activesupport/lib/active_support/concurrency/share_lock.rb, line 114
-def start_sharing
-  synchronize do
-    if @sharing[Thread.current] > 0 || @exclusive_thread == Thread.current
-      # We already hold a lock; nothing to wait for
-    elsif @waiting[Thread.current]
-      # We're nested inside a +yield_shares+ call: we'll resume as
-      # soon as there isn't an exclusive lock in our way
-      wait_for(:start_sharing) { @exclusive_thread }
-    else
-      # This is an initial / outermost share call: any outstanding
-      # requests for an exclusive lock get to go first
-      wait_for(:start_sharing) { busy_for_sharing?(false) }
-    end
-    @sharing[Thread.current] += 1
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -359,36 +359,36 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/concurrency/share_lock.rb, line 96
+      def stop_exclusive(compatible: [])
+        synchronize do
+          raise "invalid unlock" if @exclusive_thread != Thread.current
+
+          @exclusive_depth -= 1
+          if @exclusive_depth == 0
+            @exclusive_thread = nil
+
+            if eligible_waiters?(compatible)
+              yield_shares(compatible: compatible, block_share: true) do
+                wait_for(:stop_exclusive) { @exclusive_thread || eligible_waiters?(compatible) }
+              end
+            end
+            @cv.broadcast
+          end
+        end
+      end
- -
-
# File activesupport/lib/active_support/concurrency/share_lock.rb, line 96
-def stop_exclusive(compatible: [])
-  synchronize do
-    raise "invalid unlock" if @exclusive_thread != Thread.current
-
-    @exclusive_depth -= 1
-    if @exclusive_depth == 0
-      @exclusive_thread = nil
-
-      if eligible_waiters?(compatible)
-        yield_shares(compatible: compatible, block_share: true) do
-          wait_for(:stop_exclusive) { @exclusive_thread || eligible_waiters?(compatible) }
-        end
-      end
-      @cv.broadcast
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -408,29 +408,29 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/concurrency/share_lock.rb, line 131
+      def stop_sharing
+        synchronize do
+          if @sharing[Thread.current] > 1
+            @sharing[Thread.current] -= 1
+          else
+            @sharing.delete Thread.current
+            @cv.broadcast
+          end
+        end
+      end
- -
-
# File activesupport/lib/active_support/concurrency/share_lock.rb, line 131
-def stop_sharing
-  synchronize do
-    if @sharing[Thread.current] > 1
-      @sharing[Thread.current] -= 1
-    else
-      @sharing.delete Thread.current
-      @cv.broadcast
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -450,49 +450,49 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/concurrency/share_lock.rb, line 171
+      def yield_shares(purpose: nil, compatible: [], block_share: false)
+        loose_shares = previous_wait = nil
+        synchronize do
+          if loose_shares = @sharing.delete(Thread.current)
+            if previous_wait = @waiting[Thread.current]
+              purpose = nil unless purpose == previous_wait[0]
+              compatible &= previous_wait[1]
+            end
+            compatible |= [false] unless block_share
+            @waiting[Thread.current] = [purpose, compatible]
+          end
+
+          @cv.broadcast
+        end
+
+        begin
+          yield
+        ensure
+          synchronize do
+            wait_for(:yield_shares) { @exclusive_thread && @exclusive_thread != Thread.current }
+
+            if previous_wait
+              @waiting[Thread.current] = previous_wait
+            else
+              @waiting.delete Thread.current
+            end
+            @sharing[Thread.current] = loose_shares if loose_shares
+          end
+        end
+      end
- -
-
# File activesupport/lib/active_support/concurrency/share_lock.rb, line 171
-def yield_shares(purpose: nil, compatible: [], block_share: false)
-  loose_shares = previous_wait = nil
-  synchronize do
-    if loose_shares = @sharing.delete(Thread.current)
-      if previous_wait = @waiting[Thread.current]
-        purpose = nil unless purpose == previous_wait[0]
-        compatible &= previous_wait[1]
-      end
-      compatible |= [false] unless block_share
-      @waiting[Thread.current] = [purpose, compatible]
-    end
-
-    @cv.broadcast
-  end
-
-  begin
-    yield
-  ensure
-    synchronize do
-      wait_for(:yield_shares) { @exclusive_thread && @exclusive_thread != Thread.current }
-
-      if previous_wait
-        @waiting[Thread.current] = previous_wait
-      else
-        @waiting.delete Thread.current
-      end
-      @sharing[Thread.current] = loose_shares if loose_shares
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Configurable.html b/src/classes/ActiveSupport/Configurable.html index 0e15d7f1b8..57b47a7ef1 100644 --- a/src/classes/ActiveSupport/Configurable.html +++ b/src/classes/ActiveSupport/Configurable.html @@ -118,22 +118,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/configurable.rb, line 155
+    def config
+      @_config ||= self.class.config.inheritable_copy
+    end
- -
-
# File activesupport/lib/active_support/configurable.rb, line 155
-def config
-  @_config ||= self.class.config.inheritable_copy
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Configurable/ClassMethods.html b/src/classes/ActiveSupport/Configurable/ClassMethods.html index dab072599d..10f93a5b37 100644 --- a/src/classes/ActiveSupport/Configurable/ClassMethods.html +++ b/src/classes/ActiveSupport/Configurable/ClassMethods.html @@ -83,27 +83,27 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/configurable.rb, line 30
+      def config
+        @_config ||= if respond_to?(:superclass) && superclass.respond_to?(:config)
+          superclass.config.inheritable_copy
+        else
+          # create a new "anonymous" class that will host the compiled reader methods
+          Class.new(Configuration).new
+        end
+      end
- -
-
# File activesupport/lib/active_support/configurable.rb, line 30
-def config
-  @_config ||= if respond_to?(:superclass) && superclass.respond_to?(:config)
-    superclass.config.inheritable_copy
-  else
-    # create a new "anonymous" class that will host the compiled reader methods
-    Class.new(Configuration).new
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -123,22 +123,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/configurable.rb, line 39
+      def configure
+        yield config
+      end
- -
-
# File activesupport/lib/active_support/configurable.rb, line 39
-def configure
-  yield config
-end
-
-
- -

+ See on GitHub + + + +

Instance Private methods

@@ -231,37 +231,37 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/configurable.rb, line 111
+      def config_accessor(*names, instance_reader: true, instance_writer: true, instance_accessor: true, default: nil) # :doc:
+        names.each do |name|
+          raise NameError.new("invalid config attribute name") unless /\A[_A-Za-z]\w*\z/.match?(name)
+
+          reader, reader_line = "def #{name}; config.#{name}; end", __LINE__
+          writer, writer_line = "def #{name}=(value); config.#{name} = value; end", __LINE__
+
+          singleton_class.class_eval reader, __FILE__, reader_line
+          singleton_class.class_eval writer, __FILE__, writer_line
+
+          if instance_accessor
+            class_eval reader, __FILE__, reader_line if instance_reader
+            class_eval writer, __FILE__, writer_line if instance_writer
+          end
+
+          send("#{name}=", block_given? ? yield : default)
+        end
+      end
- -
-
# File activesupport/lib/active_support/configurable.rb, line 111
-def config_accessor(*names, instance_reader: true, instance_writer: true, instance_accessor: true, default: nil) # :doc:
-  names.each do |name|
-    raise NameError.new("invalid config attribute name") unless /\A[_A-Za-z]\w*\z/.match?(name)
-
-    reader, reader_line = "def #{name}; config.#{name}; end", __LINE__
-    writer, writer_line = "def #{name}=(value); config.#{name} = value; end", __LINE__
-
-    singleton_class.class_eval reader, __FILE__, reader_line
-    singleton_class.class_eval writer, __FILE__, writer_line
-
-    if instance_accessor
-      class_eval reader, __FILE__, reader_line if instance_reader
-      class_eval writer, __FILE__, writer_line if instance_writer
-    end
-
-    send("#{name}=", block_given? ? yield : default)
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Configurable/Configuration.html b/src/classes/ActiveSupport/Configurable/Configuration.html index 1eac8d453f..ab1646a3c3 100644 --- a/src/classes/ActiveSupport/Configurable/Configuration.html +++ b/src/classes/ActiveSupport/Configurable/Configuration.html @@ -84,26 +84,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/configurable.rb, line 20
+      def self.compile_methods!(keys)
+        keys.reject { |m| method_defined?(m) }.each do |key|
+          class_eval <<-RUBY, __FILE__, __LINE__ + 1
+            def #{key}; _get(#{key.inspect}); end
+          RUBY
+        end
+      end
- -
-
# File activesupport/lib/active_support/configurable.rb, line 20
-      def self.compile_methods!(keys)
-        keys.reject { |m| method_defined?(m) }.each do |key|
-          class_eval <<-RUBY, __FILE__, __LINE__ + 1
-            def #{key}; _get(#{key.inspect}); end
-          RUBY
-        end
-      end
-
-
- - + See on GitHub + + + + @@ -127,22 +127,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/configurable.rb, line 15
+      def compile_methods!
+        self.class.compile_methods!(keys)
+      end
- -
-
# File activesupport/lib/active_support/configurable.rb, line 15
-def compile_methods!
-  self.class.compile_methods!(keys)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/CurrentAttributes.html b/src/classes/ActiveSupport/CurrentAttributes.html index eae1cf4cce..8e5e96a9fa 100644 --- a/src/classes/ActiveSupport/CurrentAttributes.html +++ b/src/classes/ActiveSupport/CurrentAttributes.html @@ -224,7 +224,8 @@

- + +

@@ -244,59 +245,59 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/current_attributes.rb, line 104
+      def attribute(*names)
+        invalid_attribute_names = names.map(&:to_sym) & INVALID_ATTRIBUTE_NAMES
+        if invalid_attribute_names.any?
+          raise ArgumentError, "Restricted attribute names: #{invalid_attribute_names.join(", ")}"
+        end
+
+        ActiveSupport::CodeGenerator.batch(generated_attribute_methods, __FILE__, __LINE__) do |owner|
+          names.each do |name|
+            owner.define_cached_method(name, namespace: :current_attributes) do |batch|
+              batch <<
+                "def #{name}" <<
+                "attributes[:#{name}]" <<
+                "end"
+            end
+            owner.define_cached_method("#{name}=", namespace: :current_attributes) do |batch|
+              batch <<
+                "def #{name}=(value)" <<
+                "attributes[:#{name}] = value" <<
+                "end"
+            end
+          end
+        end
+
+        ActiveSupport::CodeGenerator.batch(singleton_class, __FILE__, __LINE__) do |owner|
+          names.each do |name|
+            owner.define_cached_method(name, namespace: :current_attributes_delegation) do |batch|
+              batch <<
+                "def #{name}" <<
+                "instance.#{name}" <<
+                "end"
+            end
+            owner.define_cached_method("#{name}=", namespace: :current_attributes_delegation) do |batch|
+              batch <<
+                "def #{name}=(value)" <<
+                "instance.#{name} = value" <<
+                "end"
+            end
+          end
+        end
+      end
- -
-
# File activesupport/lib/active_support/current_attributes.rb, line 104
-def attribute(*names)
-  invalid_attribute_names = names.map(&:to_sym) & INVALID_ATTRIBUTE_NAMES
-  if invalid_attribute_names.any?
-    raise ArgumentError, "Restricted attribute names: #{invalid_attribute_names.join(", ")}"
-  end
-
-  ActiveSupport::CodeGenerator.batch(generated_attribute_methods, __FILE__, __LINE__) do |owner|
-    names.each do |name|
-      owner.define_cached_method(name, namespace: :current_attributes) do |batch|
-        batch <<
-          "def #{name}" <<
-          "attributes[:#{name}]" <<
-          "end"
-      end
-      owner.define_cached_method("#{name}=", namespace: :current_attributes) do |batch|
-        batch <<
-          "def #{name}=(value)" <<
-          "attributes[:#{name}] = value" <<
-          "end"
-      end
-    end
-  end
-
-  ActiveSupport::CodeGenerator.batch(singleton_class, __FILE__, __LINE__) do |owner|
-    names.each do |name|
-      owner.define_cached_method(name, namespace: :current_attributes_delegation) do |batch|
-        batch <<
-          "def #{name}" <<
-          "instance.#{name}" <<
-          "end"
-      end
-      owner.define_cached_method("#{name}=", namespace: :current_attributes_delegation) do |batch|
-        batch <<
-          "def #{name}=(value)" <<
-          "instance.#{name} = value" <<
-          "end"
-      end
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -316,22 +317,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/current_attributes.rb, line 146
+      def before_reset(*methods, &block)
+        set_callback :reset, :before, *methods, &block
+      end
- -
-
# File activesupport/lib/active_support/current_attributes.rb, line 146
-def before_reset(*methods, &block)
-  set_callback :reset, :before, *methods, &block
-end
-
-
- -

+ See on GitHub + + + +

@@ -351,22 +352,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/current_attributes.rb, line 99
+      def instance
+        current_instances[current_instances_key] ||= new
+      end
- -
-
# File activesupport/lib/active_support/current_attributes.rb, line 99
-def instance
-  current_instances[current_instances_key] ||= new
-end
-
-
- -

+ See on GitHub + + + +

@@ -386,22 +387,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/current_attributes.rb, line 197
+    def initialize
+      @attributes = {}
+    end
- -
-
# File activesupport/lib/active_support/current_attributes.rb, line 197
-def initialize
-  @attributes = {}
-end
-
-
- -

+ See on GitHub + + + +

@@ -425,22 +426,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/current_attributes.rb, line 151
+      def resets(*methods, &block)
+        set_callback :reset, :after, *methods, &block
+      end
- -
-
# File activesupport/lib/active_support/current_attributes.rb, line 151
-def resets(*methods, &block)
-  set_callback :reset, :after, *methods, &block
-end
-
-
- -

+ See on GitHub + + + + @@ -464,24 +465,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/current_attributes.rb, line 220
+    def reset
+      run_callbacks :reset do
+        self.attributes = {}
+      end
+    end
- -
-
# File activesupport/lib/active_support/current_attributes.rb, line 220
-def reset
-  run_callbacks :reset do
-    self.attributes = {}
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -510,26 +511,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/current_attributes.rb, line 211
+    def set(set_attributes)
+      old_attributes = compute_attributes(set_attributes.keys)
+      assign_attributes(set_attributes)
+      yield
+    ensure
+      assign_attributes(old_attributes)
+    end
- -
-
# File activesupport/lib/active_support/current_attributes.rb, line 211
-def set(set_attributes)
-  old_attributes = compute_attributes(set_attributes.keys)
-  assign_attributes(set_attributes)
-  yield
-ensure
-  assign_attributes(old_attributes)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Dependencies.html b/src/classes/ActiveSupport/Dependencies.html index de7a3009f1..bb43ce3859 100644 --- a/src/classes/ActiveSupport/Dependencies.html +++ b/src/classes/ActiveSupport/Dependencies.html @@ -106,22 +106,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/dependencies.rb, line 24
+    def self.load_interlock(&block)
+      interlock.loading(&block)
+    end
- -
-
# File activesupport/lib/active_support/dependencies.rb, line 24
-def self.load_interlock(&block)
-  interlock.loading(&block)
-end
-
-
- - + See on GitHub + + + +

@@ -141,22 +141,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/dependencies.rb, line 17
+    def self.run_interlock(&block)
+      interlock.running(&block)
+    end
- -
-
# File activesupport/lib/active_support/dependencies.rb, line 17
-def self.run_interlock(&block)
-  interlock.running(&block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -176,22 +176,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/dependencies.rb, line 31
+    def self.unload_interlock(&block)
+      interlock.unloading(&block)
+    end
- -
-
# File activesupport/lib/active_support/dependencies.rb, line 31
-def self.unload_interlock(&block)
-  interlock.unloading(&block)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Dependencies/ClassCache.html b/src/classes/ActiveSupport/Dependencies/ClassCache.html deleted file mode 100644 index f58b05e96a..0000000000 --- a/src/classes/ActiveSupport/Dependencies/ClassCache.html +++ /dev/null @@ -1,381 +0,0 @@ ---- -title: ActiveSupport::Dependencies::ClassCache -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - new() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/dependencies.rb, line 622
-def initialize
-  @store = Concurrent::Map.new
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - [](key) - -

- - -
- -
- - - - - -
- Alias for: get -
- - - -
- -
-

- - clear!() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/dependencies.rb, line 652
-def clear!
-  @store.clear
-end
-
-
- -
- -
-

- - empty?() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/dependencies.rb, line 626
-def empty?
-  @store.empty?
-end
-
-
- -
- -
-

- - get(key) - -

- - -
- -
- - - -
- Also aliased as: [] -
- - - - - - -
- - -
-
# File activesupport/lib/active_support/dependencies.rb, line 634
-def get(key)
-  key = key.name if key.respond_to?(:name)
-  @store[key] ||= Inflector.constantize(key)
-end
-
-
- -
- -
-

- - key?(key) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/dependencies.rb, line 630
-def key?(key)
-  @store.key?(key)
-end
-
-
- -
- -
-

- - safe_get(key) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/dependencies.rb, line 640
-def safe_get(key)
-  key = key.name if key.respond_to?(:name)
-  @store[key] ||= Inflector.safe_constantize(key)
-end
-
-
- -
- -
-

- - store(klass) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/dependencies.rb, line 645
-def store(klass)
-  return self unless klass.respond_to?(:name)
-  raise(ArgumentError, "anonymous classes cannot be cached") if klass.name.empty?
-  @store[klass.name] = klass
-  self
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveSupport/Dependencies/Interlock.html b/src/classes/ActiveSupport/Dependencies/Interlock.html index 2c50c7dc2e..6d333bc38f 100644 --- a/src/classes/ActiveSupport/Dependencies/Interlock.html +++ b/src/classes/ActiveSupport/Dependencies/Interlock.html @@ -109,22 +109,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/dependencies/interlock.rb, line 32
+      def done_running
+        @lock.stop_sharing
+      end
- -
-
# File activesupport/lib/active_support/dependencies/interlock.rb, line 32
-def done_running
-  @lock.stop_sharing
-end
-
-
- - + See on GitHub + + + +

@@ -144,22 +144,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/dependencies/interlock.rb, line 24
+      def done_unloading
+        @lock.stop_exclusive(compatible: [:load, :unload])
+      end
- -
-
# File activesupport/lib/active_support/dependencies/interlock.rb, line 24
-def done_unloading
-  @lock.stop_exclusive(compatible: [:load, :unload])
-end
-
-
- -

+ See on GitHub + + + +

@@ -179,22 +179,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/dependencies/interlock.rb, line 12
+      def loading(&block)
+        @lock.exclusive(purpose: :load, compatible: [:load], after_compatible: [:load], &block)
+      end
- -
-
# File activesupport/lib/active_support/dependencies/interlock.rb, line 12
-def loading(&block)
-  @lock.exclusive(purpose: :load, compatible: [:load], after_compatible: [:load], &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -214,22 +214,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/dependencies/interlock.rb, line 40
+      def permit_concurrent_loads(&block)
+        @lock.yield_shares(compatible: [:load], &block)
+      end
- -
-
# File activesupport/lib/active_support/dependencies/interlock.rb, line 40
-def permit_concurrent_loads(&block)
-  @lock.yield_shares(compatible: [:load], &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -249,22 +249,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/dependencies/interlock.rb, line 36
+      def running(&block)
+        @lock.sharing(&block)
+      end
- -
-
# File activesupport/lib/active_support/dependencies/interlock.rb, line 36
-def running(&block)
-  @lock.sharing(&block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -284,22 +284,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/dependencies/interlock.rb, line 28
+      def start_running
+        @lock.start_sharing
+      end
- -
-
# File activesupport/lib/active_support/dependencies/interlock.rb, line 28
-def start_running
-  @lock.start_sharing
-end
-
-
- -

+ See on GitHub + + + +

@@ -319,22 +319,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/dependencies/interlock.rb, line 20
+      def start_unloading
+        @lock.start_exclusive(purpose: :unload, compatible: [:load, :unload])
+      end
- -
-
# File activesupport/lib/active_support/dependencies/interlock.rb, line 20
-def start_unloading
-  @lock.start_exclusive(purpose: :unload, compatible: [:load, :unload])
-end
-
-
- -

+ See on GitHub + + + +

@@ -354,22 +354,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/dependencies/interlock.rb, line 16
+      def unloading(&block)
+        @lock.exclusive(purpose: :unload, compatible: [:load, :unload], after_compatible: [:load, :unload], &block)
+      end
- -
-
# File activesupport/lib/active_support/dependencies/interlock.rb, line 16
-def unloading(&block)
-  @lock.exclusive(purpose: :unload, compatible: [:load, :unload], after_compatible: [:load, :unload], &block)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Dependencies/Loadable.html b/src/classes/ActiveSupport/Dependencies/Loadable.html deleted file mode 100644 index 704f29ed14..0000000000 --- a/src/classes/ActiveSupport/Dependencies/Loadable.html +++ /dev/null @@ -1,112 +0,0 @@ ---- -title: ActiveSupport::Dependencies::Loadable -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - - -

Instance Public methods

- -
-

- - require_dependency(file_name, message = "No such file to load -- %s.rb") - -

- - -
-

Warning: This method is obsolete in :zeitwerk mode. In :zeitwerk mode semantics match Ruby's and you do not need to be defensive with load order. Just refer to classes and modules normally. If the constant name is dynamic, camelize if needed, and constantize.

- -

In :classic mode, interprets a file using mechanism and marks its defined constants as autoloaded. file_name can be either a string or respond to to_path.

- -

In :classic mode, use this method in code that absolutely needs a certain constant to be defined at that point. A typical use case is to make constant name resolution deterministic for constants with the same relative name in different namespaces whose evaluation would depend on load order otherwise.

- -

Engines that do not control the mode in which their parent application runs should call require_dependency where needed in case the runtime mode is :classic.

-
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/dependencies.rb, line 282
-def require_dependency(file_name, message = "No such file to load -- %s.rb")
-  file_name = file_name.to_path if file_name.respond_to?(:to_path)
-  unless file_name.is_a?(String)
-    raise ArgumentError, "the file name must either be a String or implement #to_path -- you passed #{file_name.inspect}"
-  end
-
-  Dependencies.depend_on(file_name, message)
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveSupport/Dependencies/RequireDependency.html b/src/classes/ActiveSupport/Dependencies/RequireDependency.html index c82813e8b9..4ca7e41c6a 100644 --- a/src/classes/ActiveSupport/Dependencies/RequireDependency.html +++ b/src/classes/ActiveSupport/Dependencies/RequireDependency.html @@ -77,32 +77,32 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/dependencies/require_dependency.rb, line 11
+  def require_dependency(filename)
+    filename = filename.to_path if filename.respond_to?(:to_path)
+
+    unless filename.is_a?(String)
+      raise ArgumentError, "the file name must be either a String or implement #to_path -- you passed #{filename.inspect}"
+    end
+
+    if abspath = ActiveSupport::Dependencies.search_for_file(filename)
+      require abspath
+    else
+      require filename
+    end
+  end
- -
-
# File activesupport/lib/active_support/dependencies/require_dependency.rb, line 11
-def require_dependency(filename)
-  filename = filename.to_path if filename.respond_to?(:to_path)
-
-  unless filename.is_a?(String)
-    raise ArgumentError, "the file name must be either a String or implement #to_path -- you passed #{filename.inspect}"
-  end
-
-  if abspath = ActiveSupport::Dependencies.search_for_file(filename)
-    require abspath
-  else
-    require filename
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Dependencies/WatchStack.html b/src/classes/ActiveSupport/Dependencies/WatchStack.html deleted file mode 100644 index ed90d464ad..0000000000 --- a/src/classes/ActiveSupport/Dependencies/WatchStack.html +++ /dev/null @@ -1,343 +0,0 @@ ---- -title: ActiveSupport::Dependencies::WatchStack -layout: default ---- -
- -
-
- -
- -

The WatchStack keeps a stack of the modules being watched as files are loaded. If a file in the process of being loaded (parent.rb) triggers the load of another file (child.rb) the stack will ensure that child.rb handles the new constants.

- -

If child.rb is being autoloaded, its constants will be added to autoloaded_constants. If it was being required, they will be discarded.

- -

This is handled by walking back up the watch stack and adding the constants found by child.rb to the list of original constants in parent.rb.

- -
- - - - - - - - - - - -

Methods

- - - - - -

Included Modules

- - - - - - - - - - - - -

Attributes

- - - - - - - - -
- [R] - watching

@watching is a stack of lists of constants being watched. For instance, if parent.rb is autoloaded, the stack will look like [[Object]]. If parent.rb then requires namespace/child.rb, the stack will look like [[Object], [Namespace]].

- - - - -

Class Public methods

- -
-

- - new() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/dependencies.rb, line 115
-def initialize
-  @watching = []
-  @stack = Hash.new { |h, k| h[k] = [] }
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - each(&block) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/dependencies.rb, line 120
-def each(&block)
-  @stack.each(&block)
-end
-
-
- -
- -
-

- - new_constants() - -

- - -
-

Returns a list of new constants found since the last call to watch_namespaces.

-
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/dependencies.rb, line 130
-def new_constants
-  constants = []
-
-  # Grab the list of namespaces that we're looking for new constants under
-  @watching.last.each do |namespace|
-    # Retrieve the constants that were present under the namespace when watch_namespaces
-    # was originally called
-    original_constants = @stack[namespace].last
-
-    mod = Inflector.constantize(namespace) if Dependencies.qualified_const_defined?(namespace)
-    next unless mod.is_a?(Module)
-
-    # Get a list of the constants that were added
-    new_constants = mod.constants(false) - original_constants
-
-    # @stack[namespace] returns an Array of the constants that are being evaluated
-    # for that namespace. For instance, if parent.rb requires child.rb, the first
-    # element of @stack[Object] will be an Array of the constants that were present
-    # before parent.rb was required. The second element will be an Array of the
-    # constants that were present before child.rb was required.
-    @stack[namespace].each do |namespace_constants|
-      namespace_constants.concat(new_constants)
-    end
-
-    # Normalize the list of new constants, and add them to the list we will return
-    new_constants.each do |suffix|
-      constants << ([namespace, suffix] - ["Object"]).join("::")
-    end
-  end
-  constants
-ensure
-  # A call to new_constants is always called after a call to watch_namespaces
-  pop_modules(@watching.pop)
-end
-
-
- -
- -
-

- - watch_namespaces(namespaces) - -

- - -
-

Add a set of modules to the watch stack, remembering the initial constants.

-
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/dependencies.rb, line 167
-def watch_namespaces(namespaces)
-  @watching << namespaces.map do |namespace|
-    module_name = Dependencies.to_constant_name(namespace)
-    original_constants = Dependencies.qualified_const_defined?(module_name) ?
-      Inflector.constantize(module_name).constants(false) : []
-
-    @stack[module_name] << original_constants
-    module_name
-  end
-end
-
-
- -
- -
-

- - watching?() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/dependencies.rb, line 124
-def watching?
-  !@watching.empty?
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveSupport/Dependencies/ZeitwerkIntegration.html b/src/classes/ActiveSupport/Dependencies/ZeitwerkIntegration.html deleted file mode 100644 index aaaef7fad3..0000000000 --- a/src/classes/ActiveSupport/Dependencies/ZeitwerkIntegration.html +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: ActiveSupport::Dependencies::ZeitwerkIntegration -layout: default ---- -
- - -
diff --git a/src/classes/ActiveSupport/Dependencies/ZeitwerkIntegration/Decorations.html b/src/classes/ActiveSupport/Dependencies/ZeitwerkIntegration/Decorations.html deleted file mode 100644 index 046f6fd400..0000000000 --- a/src/classes/ActiveSupport/Dependencies/ZeitwerkIntegration/Decorations.html +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: ActiveSupport::Dependencies::ZeitwerkIntegration::Decorations -layout: default ---- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveSupport/Dependencies/ZeitwerkIntegration/Inflector.html b/src/classes/ActiveSupport/Dependencies/ZeitwerkIntegration/Inflector.html deleted file mode 100644 index df2923345a..0000000000 --- a/src/classes/ActiveSupport/Dependencies/ZeitwerkIntegration/Inflector.html +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: ActiveSupport::Dependencies::ZeitwerkIntegration::Inflector -layout: default ---- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveSupport/Dependencies/ZeitwerkIntegration/RequireDependency.html b/src/classes/ActiveSupport/Dependencies/ZeitwerkIntegration/RequireDependency.html deleted file mode 100644 index 238a438e3c..0000000000 --- a/src/classes/ActiveSupport/Dependencies/ZeitwerkIntegration/RequireDependency.html +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: ActiveSupport::Dependencies::ZeitwerkIntegration::RequireDependency -layout: default ---- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveSupport/Deprecation.html b/src/classes/ActiveSupport/Deprecation.html index 21273dd8cc..e483250225 100644 --- a/src/classes/ActiveSupport/Deprecation.html +++ b/src/classes/ActiveSupport/Deprecation.html @@ -280,28 +280,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation.rb, line 68
+    def initialize(deprecation_horizon = "7.2", gem_name = "Rails")
+      self.gem_name = gem_name
+      self.deprecation_horizon = deprecation_horizon
+      # By default, warnings are not silenced and debugging is off.
+      self.silenced = false
+      self.debug = false
+      @silence_counter = Concurrent::ThreadLocalVar.new(0)
+      @explicitly_allowed_warnings = Concurrent::ThreadLocalVar.new(nil)
+    end
- -
-
# File activesupport/lib/active_support/deprecation.rb, line 68
-def initialize(deprecation_horizon = "7.2", gem_name = "Rails")
-  self.gem_name = gem_name
-  self.deprecation_horizon = deprecation_horizon
-  # By default, warnings are not silenced and debugging is off.
-  self.silenced = false
-  self.debug = false
-  @silence_counter = Concurrent::ThreadLocalVar.new(0)
-  @explicitly_allowed_warnings = Concurrent::ThreadLocalVar.new(nil)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Deprecation/Behavior.html b/src/classes/ActiveSupport/Deprecation/Behavior.html index 145d6fcdc6..75ef957761 100644 --- a/src/classes/ActiveSupport/Deprecation/Behavior.html +++ b/src/classes/ActiveSupport/Deprecation/Behavior.html @@ -128,22 +128,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/behaviors.rb, line 74
+      def behavior
+        @behavior ||= [DEFAULT_BEHAVIORS[:stderr]]
+      end
- -
-
# File activesupport/lib/active_support/deprecation/behaviors.rb, line 74
-def behavior
-  @behavior ||= [DEFAULT_BEHAVIORS[:stderr]]
-end
-
-
- - + See on GitHub + + + +

@@ -197,22 +197,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/behaviors.rb, line 109
+      def behavior=(behavior)
+        @behavior = Array(behavior).map { |b| DEFAULT_BEHAVIORS[b] || arity_coerce(b) }
+      end
- -
-
# File activesupport/lib/active_support/deprecation/behaviors.rb, line 109
-def behavior=(behavior)
-  @behavior = Array(behavior).map { |b| DEFAULT_BEHAVIORS[b] || arity_coerce(b) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -232,22 +232,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/behaviors.rb, line 79
+      def disallowed_behavior
+        @disallowed_behavior ||= [DEFAULT_BEHAVIORS[:raise]]
+      end
- -
-
# File activesupport/lib/active_support/deprecation/behaviors.rb, line 79
-def disallowed_behavior
-  @disallowed_behavior ||= [DEFAULT_BEHAVIORS[:raise]]
-end
-
-
- -

+ See on GitHub + + + +

@@ -267,22 +267,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/behaviors.rb, line 117
+      def disallowed_behavior=(behavior)
+        @disallowed_behavior = Array(behavior).map { |b| DEFAULT_BEHAVIORS[b] || arity_coerce(b) }
+      end
- -
-
# File activesupport/lib/active_support/deprecation/behaviors.rb, line 117
-def disallowed_behavior=(behavior)
-  @disallowed_behavior = Array(behavior).map { |b| DEFAULT_BEHAVIORS[b] || arity_coerce(b) }
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Deprecation/DeprecatedConstantAccessor.html b/src/classes/ActiveSupport/Deprecation/DeprecatedConstantAccessor.html index 885fe92602..41d5684012 100644 --- a/src/classes/ActiveSupport/Deprecation/DeprecatedConstantAccessor.html +++ b/src/classes/ActiveSupport/Deprecation/DeprecatedConstantAccessor.html @@ -106,42 +106,42 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/constant_accessor.rb, line 28
+      def self.included(base)
+        require "active_support/inflector/methods"
+
+        extension = Module.new do
+          def const_missing(missing_const_name)
+            if class_variable_defined?(:@@_deprecated_constants)
+              if (replacement = class_variable_get(:@@_deprecated_constants)[missing_const_name.to_s])
+                replacement[:deprecator].warn(replacement[:message] || "#{name}::#{missing_const_name} is deprecated! Use #{replacement[:new]} instead.", caller_locations)
+                return ActiveSupport::Inflector.constantize(replacement[:new].to_s)
+              end
+            end
+            super
+          end
+
+          def deprecate_constant(const_name, new_constant, message: nil, deprecator: nil)
+            ActiveSupport.deprecator.warn("DeprecatedConstantAccessor.deprecate_constant without a deprecator is deprecated") unless deprecator
+            deprecator ||= ActiveSupport::Deprecation._instance
+            class_variable_set(:@@_deprecated_constants, {}) unless class_variable_defined?(:@@_deprecated_constants)
+            class_variable_get(:@@_deprecated_constants)[const_name.to_s] = { new: new_constant, message: message, deprecator: deprecator }
+          end
+        end
+        base.singleton_class.prepend extension
+      end
- -
-
# File activesupport/lib/active_support/deprecation/constant_accessor.rb, line 28
-def self.included(base)
-  require "active_support/inflector/methods"
-
-  extension = Module.new do
-    def const_missing(missing_const_name)
-      if class_variable_defined?(:@@_deprecated_constants)
-        if (replacement = class_variable_get(:@@_deprecated_constants)[missing_const_name.to_s])
-          replacement[:deprecator].warn(replacement[:message] || "#{name}::#{missing_const_name} is deprecated! Use #{replacement[:new]} instead.", caller_locations)
-          return ActiveSupport::Inflector.constantize(replacement[:new].to_s)
-        end
-      end
-      super
-    end
-
-    def deprecate_constant(const_name, new_constant, message: nil, deprecator: nil)
-      ActiveSupport.deprecator.warn("DeprecatedConstantAccessor.deprecate_constant without a deprecator is deprecated") unless deprecator
-      deprecator ||= ActiveSupport::Deprecation._instance
-      class_variable_set(:@@_deprecated_constants, {}) unless class_variable_defined?(:@@_deprecated_constants)
-      class_variable_get(:@@_deprecated_constants)[const_name.to_s] = { new: new_constant, message: message, deprecator: deprecator }
-    end
-  end
-  base.singleton_class.prepend extension
-end
-
-
- - + See on GitHub + + + + @@ -165,28 +165,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/constant_accessor.rb, line 32
+          def const_missing(missing_const_name)
+            if class_variable_defined?(:@@_deprecated_constants)
+              if (replacement = class_variable_get(:@@_deprecated_constants)[missing_const_name.to_s])
+                replacement[:deprecator].warn(replacement[:message] || "#{name}::#{missing_const_name} is deprecated! Use #{replacement[:new]} instead.", caller_locations)
+                return ActiveSupport::Inflector.constantize(replacement[:new].to_s)
+              end
+            end
+            super
+          end
- -
-
# File activesupport/lib/active_support/deprecation/constant_accessor.rb, line 32
-def const_missing(missing_const_name)
-  if class_variable_defined?(:@@_deprecated_constants)
-    if (replacement = class_variable_get(:@@_deprecated_constants)[missing_const_name.to_s])
-      replacement[:deprecator].warn(replacement[:message] || "#{name}::#{missing_const_name} is deprecated! Use #{replacement[:new]} instead.", caller_locations)
-      return ActiveSupport::Inflector.constantize(replacement[:new].to_s)
-    end
-  end
-  super
-end
-
-
- - + See on GitHub + + + +

@@ -206,25 +206,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/constant_accessor.rb, line 42
+          def deprecate_constant(const_name, new_constant, message: nil, deprecator: nil)
+            ActiveSupport.deprecator.warn("DeprecatedConstantAccessor.deprecate_constant without a deprecator is deprecated") unless deprecator
+            deprecator ||= ActiveSupport::Deprecation._instance
+            class_variable_set(:@@_deprecated_constants, {}) unless class_variable_defined?(:@@_deprecated_constants)
+            class_variable_get(:@@_deprecated_constants)[const_name.to_s] = { new: new_constant, message: message, deprecator: deprecator }
+          end
- -
-
# File activesupport/lib/active_support/deprecation/constant_accessor.rb, line 42
-def deprecate_constant(const_name, new_constant, message: nil, deprecator: nil)
-  ActiveSupport.deprecator.warn("DeprecatedConstantAccessor.deprecate_constant without a deprecator is deprecated") unless deprecator
-  deprecator ||= ActiveSupport::Deprecation._instance
-  class_variable_set(:@@_deprecated_constants, {}) unless class_variable_defined?(:@@_deprecated_constants)
-  class_variable_get(:@@_deprecated_constants)[const_name.to_s] = { new: new_constant, message: message, deprecator: deprecator }
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Deprecation/DeprecatedConstantProxy.html b/src/classes/ActiveSupport/Deprecation/DeprecatedConstantProxy.html index 1a426d260f..e2953a2ed0 100644 --- a/src/classes/ActiveSupport/Deprecation/DeprecatedConstantProxy.html +++ b/src/classes/ActiveSupport/Deprecation/DeprecatedConstantProxy.html @@ -123,25 +123,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/proxy_wrappers.rb, line 123
+      def self.new(*args, **options, &block)
+        object = args.first
+
+        return object unless object
+        super
+      end
- -
-
# File activesupport/lib/active_support/deprecation/proxy_wrappers.rb, line 123
-def self.new(*args, **options, &block)
-  object = args.first
-
-  return object unless object
-  super
-end
-
-
- - + See on GitHub + + + +

@@ -161,28 +161,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/proxy_wrappers.rb, line 130
+      def initialize(old_const, new_const, deprecator = nil, message: "#{old_const} is deprecated! Use #{new_const} instead.")
+        Kernel.require "active_support/inflector/methods"
+
+        @old_const = old_const
+        @new_const = new_const
+        ActiveSupport.deprecator.warn("DeprecatedConstantProxy without a deprecator is deprecated") unless deprecator
+        @deprecator = deprecator || ActiveSupport::Deprecation._instance
+        @message = message
+      end
- -
-
# File activesupport/lib/active_support/deprecation/proxy_wrappers.rb, line 130
-def initialize(old_const, new_const, deprecator = nil, message: "#{old_const} is deprecated! Use #{new_const} instead.")
-  Kernel.require "active_support/inflector/methods"
-
-  @old_const = old_const
-  @new_const = new_const
-  ActiveSupport.deprecator.warn("DeprecatedConstantProxy without a deprecator is deprecated") unless deprecator
-  @deprecator = deprecator || ActiveSupport::Deprecation._instance
-  @message = message
-end
-
-
- -

+ See on GitHub + + + + @@ -206,23 +206,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/proxy_wrappers.rb, line 161
+      def append_features(base)
+        @deprecator.warn(@message, caller_locations)
+        base.include(target)
+      end
- -
-
# File activesupport/lib/active_support/deprecation/proxy_wrappers.rb, line 161
-def append_features(base)
-  @deprecator.warn(@message, caller_locations)
-  base.include(target)
-end
-
-
- - + See on GitHub + + + +

@@ -247,22 +247,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/proxy_wrappers.rb, line 157
+      def class
+        target.class
+      end
- -
-
# File activesupport/lib/active_support/deprecation/proxy_wrappers.rb, line 157
-def class
-  target.class
-end
-
-
- -

+ See on GitHub + + + +

@@ -282,23 +282,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/proxy_wrappers.rb, line 171
+      def extended(base)
+        @deprecator.warn(@message, caller_locations)
+        base.extend(target)
+      end
- -
-
# File activesupport/lib/active_support/deprecation/proxy_wrappers.rb, line 171
-def extended(base)
-  @deprecator.warn(@message, caller_locations)
-  base.extend(target)
-end
-
-
- -

+ See on GitHub + + + +

@@ -318,22 +318,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/proxy_wrappers.rb, line 144
+      def inspect
+        target.inspect
+      end
- -
-
# File activesupport/lib/active_support/deprecation/proxy_wrappers.rb, line 144
-def inspect
-  target.inspect
-end
-
-
- -

+ See on GitHub + + + +

@@ -353,23 +353,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/proxy_wrappers.rb, line 166
+      def prepend_features(base)
+        @deprecator.warn(@message, caller_locations)
+        base.prepend(target)
+      end
- -
-
# File activesupport/lib/active_support/deprecation/proxy_wrappers.rb, line 166
-def prepend_features(base)
-  @deprecator.warn(@message, caller_locations)
-  base.prepend(target)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Deprecation/DeprecatedInstanceVariableProxy.html b/src/classes/ActiveSupport/Deprecation/DeprecatedInstanceVariableProxy.html index e25b09123d..0575e23d05 100644 --- a/src/classes/ActiveSupport/Deprecation/DeprecatedInstanceVariableProxy.html +++ b/src/classes/ActiveSupport/Deprecation/DeprecatedInstanceVariableProxy.html @@ -116,26 +116,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/proxy_wrappers.rb, line 89
+      def initialize(instance, method, var = "@#{method}", deprecator = nil)
+        @instance = instance
+        @method = method
+        @var = var
+        ActiveSupport.deprecator.warn("DeprecatedInstanceVariableProxy without a deprecator is deprecated") unless deprecator
+        @deprecator = deprecator || ActiveSupport::Deprecation._instance
+      end
- -
-
# File activesupport/lib/active_support/deprecation/proxy_wrappers.rb, line 89
-def initialize(instance, method, var = "@#{method}", deprecator = nil)
-  @instance = instance
-  @method = method
-  @var = var
-  ActiveSupport.deprecator.warn("DeprecatedInstanceVariableProxy without a deprecator is deprecated") unless deprecator
-  @deprecator = deprecator || ActiveSupport::Deprecation._instance
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Deprecation/DeprecatedObjectProxy.html b/src/classes/ActiveSupport/Deprecation/DeprecatedObjectProxy.html index 80766ccd3c..e2543b685f 100644 --- a/src/classes/ActiveSupport/Deprecation/DeprecatedObjectProxy.html +++ b/src/classes/ActiveSupport/Deprecation/DeprecatedObjectProxy.html @@ -95,25 +95,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/proxy_wrappers.rb, line 39
+      def initialize(object, message, deprecator = nil)
+        @object = object
+        @message = message
+        ActiveSupport.deprecator.warn("DeprecatedObjectProxy without a deprecator is deprecated") unless deprecator
+        @deprecator = deprecator || ActiveSupport::Deprecation._instance
+      end
- -
-
# File activesupport/lib/active_support/deprecation/proxy_wrappers.rb, line 39
-def initialize(object, message, deprecator = nil)
-  @object = object
-  @message = message
-  ActiveSupport.deprecator.warn("DeprecatedObjectProxy without a deprecator is deprecated") unless deprecator
-  @deprecator = deprecator || ActiveSupport::Deprecation._instance
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Deprecation/Deprecators.html b/src/classes/ActiveSupport/Deprecation/Deprecators.html index a4708e0943..cc64351fcf 100644 --- a/src/classes/ActiveSupport/Deprecation/Deprecators.html +++ b/src/classes/ActiveSupport/Deprecation/Deprecators.html @@ -122,23 +122,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/deprecators.rb, line 10
+      def initialize
+        @options = {}
+        @deprecators = {}
+      end
- -
-
# File activesupport/lib/active_support/deprecation/deprecators.rb, line 10
-def initialize
-  @options = {}
-  @deprecators = {}
-end
-
-
- - + See on GitHub + + + + @@ -162,22 +162,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/deprecators.rb, line 16
+      def [](name)
+        @deprecators[name]
+      end
- -
-
# File activesupport/lib/active_support/deprecation/deprecators.rb, line 16
-def [](name)
-  @deprecators[name]
-end
-
-
- - + See on GitHub + + + +

@@ -208,23 +208,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/deprecators.rb, line 34
+      def []=(name, deprecator)
+        apply_options(deprecator)
+        @deprecators[name] = deprecator
+      end
- -
-
# File activesupport/lib/active_support/deprecation/deprecators.rb, line 34
-def []=(name, deprecator)
-  apply_options(deprecator)
-  @deprecators[name] = deprecator
-end
-
-
- -

+ See on GitHub + + + +

@@ -246,22 +246,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/deprecators.rb, line 60
+      def behavior=(behavior)
+        set_option(:behavior, behavior)
+      end
- -
-
# File activesupport/lib/active_support/deprecation/deprecators.rb, line 60
-def behavior=(behavior)
-  set_option(:behavior, behavior)
-end
-
-
- -

+ See on GitHub + + + +

@@ -281,22 +281,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/deprecators.rb, line 52
+      def debug=(debug)
+        set_option(:debug, debug)
+      end
- -
-
# File activesupport/lib/active_support/deprecation/deprecators.rb, line 52
-def debug=(debug)
-  set_option(:debug, debug)
-end
-
-
- -

+ See on GitHub + + + +

@@ -318,22 +318,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/deprecators.rb, line 68
+      def disallowed_behavior=(disallowed_behavior)
+        set_option(:disallowed_behavior, disallowed_behavior)
+      end
- -
-
# File activesupport/lib/active_support/deprecation/deprecators.rb, line 68
-def disallowed_behavior=(disallowed_behavior)
-  set_option(:disallowed_behavior, disallowed_behavior)
-end
-
-
- -

+ See on GitHub + + + +

@@ -355,22 +355,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/deprecators.rb, line 76
+      def disallowed_warnings=(disallowed_warnings)
+        set_option(:disallowed_warnings, disallowed_warnings)
+      end
- -
-
# File activesupport/lib/active_support/deprecation/deprecators.rb, line 76
-def disallowed_warnings=(disallowed_warnings)
-  set_option(:disallowed_warnings, disallowed_warnings)
-end
-
-
- -

+ See on GitHub + + + +

@@ -390,23 +390,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/deprecators.rb, line 41
+      def each(&block)
+        return to_enum(__method__) unless block
+        @deprecators.each_value(&block)
+      end
- -
-
# File activesupport/lib/active_support/deprecation/deprecators.rb, line 41
-def each(&block)
-  return to_enum(__method__) unless block
-  @deprecators.each_value(&block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -428,25 +428,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/deprecators.rb, line 84
+      def silence(&block)
+        each { |deprecator| deprecator.begin_silence }
+        block.call
+      ensure
+        each { |deprecator| deprecator.end_silence }
+      end
- -
-
# File activesupport/lib/active_support/deprecation/deprecators.rb, line 84
-def silence(&block)
-  each { |deprecator| deprecator.begin_silence }
-  block.call
-ensure
-  each { |deprecator| deprecator.end_silence }
-end
-
-
- -

+ See on GitHub + + + +

@@ -466,22 +466,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/deprecators.rb, line 47
+      def silenced=(silenced)
+        set_option(:silenced, silenced)
+      end
- -
-
# File activesupport/lib/active_support/deprecation/deprecators.rb, line 47
-def silenced=(silenced)
-  set_option(:silenced, silenced)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Deprecation/Disallowed.html b/src/classes/ActiveSupport/Deprecation/Disallowed.html index a7211f9250..304f627c2b 100644 --- a/src/classes/ActiveSupport/Deprecation/Disallowed.html +++ b/src/classes/ActiveSupport/Deprecation/Disallowed.html @@ -93,22 +93,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/disallowed.rb, line 21
+      def disallowed_warnings
+        @disallowed_warnings ||= []
+      end
- -
-
# File activesupport/lib/active_support/deprecation/disallowed.rb, line 21
-def disallowed_warnings
-  @disallowed_warnings ||= []
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Deprecation/MethodWrapper.html b/src/classes/ActiveSupport/Deprecation/MethodWrapper.html index ae87731888..f19ee8fa5a 100644 --- a/src/classes/ActiveSupport/Deprecation/MethodWrapper.html +++ b/src/classes/ActiveSupport/Deprecation/MethodWrapper.html @@ -101,50 +101,50 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/method_wrappers.rb, line 35
+      def deprecate_methods(target_module, *method_names)
+        options = method_names.extract_options!
+        deprecator = options.delete(:deprecator) || self
+        method_names += options.keys
+        mod = nil
+
+        method_names.each do |method_name|
+          message = options[method_name]
+          if target_module.method_defined?(method_name) || target_module.private_method_defined?(method_name)
+            method = target_module.instance_method(method_name)
+            target_module.module_eval do
+              redefine_method(method_name) do |*args, &block|
+                deprecator.deprecation_warning(method_name, message)
+                method.bind_call(self, *args, &block)
+              end
+              ruby2_keywords(method_name)
+            end
+          else
+            mod ||= Module.new
+            mod.module_eval do
+              define_method(method_name) do |*args, &block|
+                deprecator.deprecation_warning(method_name, message)
+                super(*args, &block)
+              end
+              ruby2_keywords(method_name)
+            end
+          end
+        end
+
+        target_module.prepend(mod) if mod
+      end
- -
-
# File activesupport/lib/active_support/deprecation/method_wrappers.rb, line 35
-def deprecate_methods(target_module, *method_names)
-  options = method_names.extract_options!
-  deprecator = options.delete(:deprecator) || self
-  method_names += options.keys
-  mod = nil
-
-  method_names.each do |method_name|
-    message = options[method_name]
-    if target_module.method_defined?(method_name) || target_module.private_method_defined?(method_name)
-      method = target_module.instance_method(method_name)
-      target_module.module_eval do
-        redefine_method(method_name) do |*args, &block|
-          deprecator.deprecation_warning(method_name, message)
-          method.bind_call(self, *args, &block)
-        end
-        ruby2_keywords(method_name)
-      end
-    else
-      mod ||= Module.new
-      mod.module_eval do
-        define_method(method_name) do |*args, &block|
-          deprecator.deprecation_warning(method_name, message)
-          super(*args, &block)
-        end
-        ruby2_keywords(method_name)
-      end
-    end
-  end
-
-  target_module.prepend(mod) if mod
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Deprecation/Reporting.html b/src/classes/ActiveSupport/Deprecation/Reporting.html index a0e9f9e388..9d51fba90f 100644 --- a/src/classes/ActiveSupport/Deprecation/Reporting.html +++ b/src/classes/ActiveSupport/Deprecation/Reporting.html @@ -153,28 +153,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/reporting.rb, line 89
+      def allow(allowed_warnings = :all, if: true, &block)
+        conditional = binding.local_variable_get(:if)
+        conditional = conditional.call if conditional.respond_to?(:call)
+        if conditional
+          @explicitly_allowed_warnings.bind(allowed_warnings, &block)
+        else
+          yield
+        end
+      end
- -
-
# File activesupport/lib/active_support/deprecation/reporting.rb, line 89
-def allow(allowed_warnings = :all, if: true, &block)
-  conditional = binding.local_variable_get(:if)
-  conditional = conditional.call if conditional.respond_to?(:call)
-  if conditional
-    @explicitly_allowed_warnings.bind(allowed_warnings, &block)
-  else
-    yield
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -194,25 +194,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/reporting.rb, line 99
+      def deprecation_warning(deprecated_method_name, message = nil, caller_backtrace = nil)
+        caller_backtrace ||= caller_locations(2)
+        deprecated_method_warning(deprecated_method_name, message).tap do |msg|
+          warn(msg, caller_backtrace)
+        end
+      end
- -
-
# File activesupport/lib/active_support/deprecation/reporting.rb, line 99
-def deprecation_warning(deprecated_method_name, message = nil, caller_backtrace = nil)
-  caller_backtrace ||= caller_locations(2)
-  deprecated_method_warning(deprecated_method_name, message).tap do |msg|
-    warn(msg, caller_backtrace)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -242,25 +242,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/reporting.rb, line 41
+      def silence(&block)
+        begin_silence
+        block.call
+      ensure
+        end_silence
+      end
- -
-
# File activesupport/lib/active_support/deprecation/reporting.rb, line 41
-def silence(&block)
-  begin_silence
-  block.call
-ensure
-  end_silence
-end
-
-
- -

+ See on GitHub + + + +

@@ -280,22 +280,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/reporting.rb, line 56
+      def silenced
+        @silenced || @silence_counter.value.nonzero?
+      end
- -
-
# File activesupport/lib/active_support/deprecation/reporting.rb, line 56
-def silenced
-  @silenced || @silence_counter.value.nonzero?
-end
-
-
- -

+ See on GitHub + + + +

@@ -319,31 +319,31 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/deprecation/reporting.rb, line 18
+      def warn(message = nil, callstack = nil)
+        return if silenced
+
+        callstack ||= caller_locations(2)
+        deprecation_message(callstack, message).tap do |full_message|
+          if deprecation_disallowed?(message)
+            disallowed_behavior.each { |b| b.call(full_message, callstack, self) }
+          else
+            behavior.each { |b| b.call(full_message, callstack, self) }
+          end
+        end
+      end
- -
-
# File activesupport/lib/active_support/deprecation/reporting.rb, line 18
-def warn(message = nil, callstack = nil)
-  return if silenced
-
-  callstack ||= caller_locations(2)
-  deprecation_message(callstack, message).tap do |full_message|
-    if deprecation_disallowed?(message)
-      disallowed_behavior.each { |b| b.call(full_message, callstack, self) }
-    else
-      behavior.each { |b| b.call(full_message, callstack, self) }
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/DescendantsTracker.html b/src/classes/ActiveSupport/DescendantsTracker.html index 373f170185..daf3dbdc19 100644 --- a/src/classes/ActiveSupport/DescendantsTracker.html +++ b/src/classes/ActiveSupport/DescendantsTracker.html @@ -96,22 +96,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/descendants_tracker.rb, line 104
+        def descendants(klass)
+          klass.descendants
+        end
- -
-
# File activesupport/lib/active_support/descendants_tracker.rb, line 104
-def descendants(klass)
-  klass.descendants
-end
-
-
- - + See on GitHub + + + +

@@ -131,22 +131,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/descendants_tracker.rb, line 100
+        def subclasses(klass)
+          klass.subclasses
+        end
- -
-
# File activesupport/lib/active_support/descendants_tracker.rb, line 100
-def subclasses(klass)
-  klass.subclasses
-end
-
-
- -

+ See on GitHub + + + + @@ -170,23 +170,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/descendants_tracker.rb, line 109
+      def descendants
+        subclasses = DescendantsTracker.reject!(self.subclasses)
+        subclasses.concat(subclasses.flat_map(&:descendants))
+      end
- -
-
# File activesupport/lib/active_support/descendants_tracker.rb, line 109
-def descendants
-  subclasses = DescendantsTracker.reject!(self.subclasses)
-  subclasses.concat(subclasses.flat_map(&:descendants))
-end
-
-
- - + See on GitHub + + + +

@@ -206,22 +206,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/descendants_tracker.rb, line 175
+      def subclasses
+        DescendantsTracker.subclasses(self)
+      end
- -
-
# File activesupport/lib/active_support/descendants_tracker.rb, line 175
-def subclasses
-  DescendantsTracker.subclasses(self)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Duration.html b/src/classes/ActiveSupport/Duration.html index 91d9bf6a7c..e28e522cbc 100644 --- a/src/classes/ActiveSupport/Duration.html +++ b/src/classes/ActiveSupport/Duration.html @@ -358,45 +358,45 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/duration.rb, line 189
+      def build(value)
+        unless value.is_a?(::Numeric)
+          raise TypeError, "can't build an #{self.name} from a #{value.class.name}"
+        end
+
+        parts = {}
+        remainder_sign = value <=> 0
+        remainder = value.round(9).abs
+        variable = false
+
+        PARTS.each do |part|
+          unless part == :seconds
+            part_in_seconds = PARTS_IN_SECONDS[part]
+            parts[part] = remainder.div(part_in_seconds) * remainder_sign
+            remainder %= part_in_seconds
+
+            unless parts[part].zero?
+              variable ||= VARIABLE_PARTS.include?(part)
+            end
+          end
+        end unless value == 0
+
+        parts[:seconds] = remainder * remainder_sign
+
+        new(value, parts, variable)
+      end
- -
-
# File activesupport/lib/active_support/duration.rb, line 189
-def build(value)
-  unless value.is_a?(::Numeric)
-    raise TypeError, "can't build an #{self.name} from a #{value.class.name}"
-  end
-
-  parts = {}
-  remainder_sign = value <=> 0
-  remainder = value.round(9).abs
-  variable = false
-
-  PARTS.each do |part|
-    unless part == :seconds
-      part_in_seconds = PARTS_IN_SECONDS[part]
-      parts[part] = remainder.div(part_in_seconds) * remainder_sign
-      remainder %= part_in_seconds
-
-      unless parts[part].zero?
-        variable ||= VARIABLE_PARTS.include?(part)
-      end
-    end
-  end unless value == 0
-
-  parts[:seconds] = remainder * remainder_sign
-
-  new(value, parts, variable)
-end
-
-
- - + See on GitHub + + + +

@@ -418,23 +418,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/duration.rb, line 144
+      def parse(iso8601duration)
+        parts = ISO8601Parser.new(iso8601duration).parse!
+        new(calculate_total_seconds(parts), parts)
+      end
- -
-
# File activesupport/lib/active_support/duration.rb, line 144
-def parse(iso8601duration)
-  parts = ISO8601Parser.new(iso8601duration).parse!
-  new(calculate_total_seconds(parts), parts)
-end
-
-
- -

+ See on GitHub + + + + @@ -458,28 +458,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/duration.rb, line 307
+    def %(other)
+      if Duration === other || Scalar === other
+        Duration.build(value % other.value)
+      elsif Numeric === other
+        Duration.build(value % other)
+      else
+        raise_type_error(other)
+      end
+    end
- -
-
# File activesupport/lib/active_support/duration.rb, line 307
-def %(other)
-  if Duration === other || Scalar === other
-    Duration.build(value % other.value)
-  elsif Numeric === other
-    Duration.build(value % other)
-  else
-    raise_type_error(other)
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -499,28 +499,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/duration.rb, line 282
+    def *(other)
+      if Scalar === other || Duration === other
+        Duration.new(value * other.value, @parts.transform_values { |number| number * other.value }, @variable || other.variable?)
+      elsif Numeric === other
+        Duration.new(value * other, @parts.transform_values { |number| number * other }, @variable)
+      else
+        raise_type_error(other)
+      end
+    end
- -
-
# File activesupport/lib/active_support/duration.rb, line 282
-def *(other)
-  if Scalar === other || Duration === other
-    Duration.new(value * other.value, @parts.transform_values { |number| number * other.value }, @variable || other.variable?)
-  elsif Numeric === other
-    Duration.new(value * other, @parts.transform_values { |number| number * other }, @variable)
-  else
-    raise_type_error(other)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -540,30 +540,30 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/duration.rb, line 263
+    def +(other)
+      if Duration === other
+        parts = @parts.merge(other._parts) do |_key, value, other_value|
+          value + other_value
+        end
+        Duration.new(value + other.value, parts, @variable || other.variable?)
+      else
+        seconds = @parts.fetch(:seconds, 0) + other
+        Duration.new(value + other, @parts.merge(seconds: seconds), @variable)
+      end
+    end
- -
-
# File activesupport/lib/active_support/duration.rb, line 263
-def +(other)
-  if Duration === other
-    parts = @parts.merge(other._parts) do |_key, value, other_value|
-      value + other_value
-    end
-    Duration.new(value + other.value, parts, @variable || other.variable?)
-  else
-    seconds = @parts.fetch(:seconds, 0) + other
-    Duration.new(value + other, @parts.merge(seconds: seconds), @variable)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -583,22 +583,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/duration.rb, line 277
+    def -(other)
+      self + (-other)
+    end
- -
-
# File activesupport/lib/active_support/duration.rb, line 277
-def -(other)
-  self + (-other)
-end
-
-
- -

+ See on GitHub + + + +

@@ -618,30 +618,30 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/duration.rb, line 293
+    def /(other)
+      if Scalar === other
+        Duration.new(value / other.value, @parts.transform_values { |number| number / other.value }, @variable)
+      elsif Duration === other
+        value / other.value
+      elsif Numeric === other
+        Duration.new(value / other, @parts.transform_values { |number| number / other }, @variable)
+      else
+        raise_type_error(other)
+      end
+    end
- -
-
# File activesupport/lib/active_support/duration.rb, line 293
-def /(other)
-  if Scalar === other
-    Duration.new(value / other.value, @parts.transform_values { |number| number / other.value }, @variable)
-  elsif Duration === other
-    value / other.value
-  elsif Numeric === other
-    Duration.new(value / other, @parts.transform_values { |number| number / other }, @variable)
-  else
-    raise_type_error(other)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -661,26 +661,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/duration.rb, line 253
+    def <=>(other)
+      if Duration === other
+        value <=> other.value
+      elsif Numeric === other
+        value <=> other
+      end
+    end
- -
-
# File activesupport/lib/active_support/duration.rb, line 253
-def <=>(other)
-  if Duration === other
-    value <=> other.value
-  elsif Numeric === other
-    value <=> other
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -700,26 +700,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/duration.rb, line 336
+    def ==(other)
+      if Duration === other
+        other.value == value
+      else
+        other == value
+      end
+    end
- -
-
# File activesupport/lib/active_support/duration.rb, line 336
-def ==(other)
-  if Duration === other
-    other.value == value
-  else
-    other == value
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -743,7 +743,8 @@

-

+ +

@@ -767,22 +768,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/duration.rb, line 439
+    def ago(time = ::Time.current)
+      sum(-1, time)
+    end
- -
-
# File activesupport/lib/active_support/duration.rb, line 439
-def ago(time = ::Time.current)
-  sum(-1, time)
-end
-
-
- -

+ See on GitHub + + + +

@@ -806,7 +807,8 @@

-

+ +

@@ -826,22 +828,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/duration.rb, line 421
+    def eql?(other)
+      Duration === other && other.value.eql?(value)
+    end
- -
-
# File activesupport/lib/active_support/duration.rb, line 421
-def eql?(other)
-  Duration === other && other.value.eql?(value)
-end
-
-
- -

+ See on GitHub + + + +

@@ -865,7 +867,8 @@

-

+ +

@@ -885,22 +888,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/duration.rb, line 425
+    def hash
+      @value.hash
+    end
- -
-
# File activesupport/lib/active_support/duration.rb, line 425
-def hash
-  @value.hash
-end
-
-
- -

+ See on GitHub + + + +

@@ -923,22 +926,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/duration.rb, line 394
+    def in_days
+      in_seconds / SECONDS_PER_DAY.to_f
+    end
- -
-
# File activesupport/lib/active_support/duration.rb, line 394
-def in_days
-  in_seconds / SECONDS_PER_DAY.to_f
-end
-
-
- -

+ See on GitHub + + + +

@@ -961,22 +964,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/duration.rb, line 387
+    def in_hours
+      in_seconds / SECONDS_PER_HOUR.to_f
+    end
- -
-
# File activesupport/lib/active_support/duration.rb, line 387
-def in_hours
-  in_seconds / SECONDS_PER_HOUR.to_f
-end
-
-
- -

+ See on GitHub + + + +

@@ -999,22 +1002,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/duration.rb, line 380
+    def in_minutes
+      in_seconds / SECONDS_PER_MINUTE.to_f
+    end
- -
-
# File activesupport/lib/active_support/duration.rb, line 380
-def in_minutes
-  in_seconds / SECONDS_PER_MINUTE.to_f
-end
-
-
- -

+ See on GitHub + + + +

@@ -1037,22 +1040,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/duration.rb, line 408
+    def in_months
+      in_seconds / SECONDS_PER_MONTH.to_f
+    end
- -
-
# File activesupport/lib/active_support/duration.rb, line 408
-def in_months
-  in_seconds / SECONDS_PER_MONTH.to_f
-end
-
-
- -

+ See on GitHub + + + +

@@ -1076,7 +1079,8 @@

-

+ +

@@ -1099,22 +1103,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/duration.rb, line 401
+    def in_weeks
+      in_seconds / SECONDS_PER_WEEK.to_f
+    end
- -
-
# File activesupport/lib/active_support/duration.rb, line 401
-def in_weeks
-  in_seconds / SECONDS_PER_WEEK.to_f
-end
-
-
- -

+ See on GitHub + + + +

@@ -1137,22 +1141,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/duration.rb, line 415
+    def in_years
+      in_seconds / SECONDS_PER_YEAR.to_f
+    end
- -
-
# File activesupport/lib/active_support/duration.rb, line 415
-def in_years
-  in_seconds / SECONDS_PER_YEAR.to_f
-end
-
-
- -

+ See on GitHub + + + +

@@ -1172,22 +1176,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/duration.rb, line 468
+    def iso8601(precision: nil)
+      ISO8601Serializer.new(self, precision: precision).serialize
+    end
- -
-
# File activesupport/lib/active_support/duration.rb, line 468
-def iso8601(precision: nil)
-  ISO8601Serializer.new(self, precision: precision).serialize
-end
-
-
- -

+ See on GitHub + + + +

@@ -1207,22 +1211,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/duration.rb, line 236
+    def parts
+      @parts.dup
+    end
- -
-
# File activesupport/lib/active_support/duration.rb, line 236
-def parts
-  @parts.dup
-end
-
-
- -

+ See on GitHub + + + +

@@ -1246,22 +1250,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/duration.rb, line 431
+    def since(time = ::Time.current)
+      sum(1, time)
+    end
- -
-
# File activesupport/lib/active_support/duration.rb, line 431
-def since(time = ::Time.current)
-  sum(1, time)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1301,22 +1305,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/duration.rb, line 372
+    def to_i
+      @value.to_i
+    end
- -
-
# File activesupport/lib/active_support/duration.rb, line 372
-def to_i
-  @value.to_i
-end
-
-
- -

+ See on GitHub + + + +

@@ -1339,22 +1343,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/duration.rb, line 348
+    def to_s
+      @value.to_s
+    end
- -
-
# File activesupport/lib/active_support/duration.rb, line 348
-def to_s
-  @value.to_s
-end
-
-
- -

+ See on GitHub + + + +

@@ -1378,7 +1382,8 @@

-

+ + diff --git a/src/classes/ActiveSupport/EncryptedConfiguration.html b/src/classes/ActiveSupport/EncryptedConfiguration.html index 1f3cc9c4d0..90761dd19d 100644 --- a/src/classes/ActiveSupport/EncryptedConfiguration.html +++ b/src/classes/ActiveSupport/EncryptedConfiguration.html @@ -128,25 +128,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/encrypted_configuration.rb, line 48
+    def initialize(config_path:, key_path:, env_key:, raise_if_missing_key:)
+      super content_path: config_path, key_path: key_path,
+        env_key: env_key, raise_if_missing_key: raise_if_missing_key
+      @config = nil
+      @options = nil
+    end
- -
-
# File activesupport/lib/active_support/encrypted_configuration.rb, line 48
-def initialize(config_path:, key_path:, env_key:, raise_if_missing_key:)
-  super content_path: config_path, key_path: key_path,
-    env_key: env_key, raise_if_missing_key: raise_if_missing_key
-  @config = nil
-  @options = nil
-end
-
-
- - + See on GitHub + + + + @@ -177,22 +177,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/encrypted_configuration.rb, line 75
+    def config
+      @config ||= deserialize(read).deep_symbolize_keys
+    end
- -
-
# File activesupport/lib/active_support/encrypted_configuration.rb, line 75
-def config
-  @config ||= deserialize(read).deep_symbolize_keys
-end
-
-
- - + See on GitHub + + + +

@@ -212,25 +212,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/encrypted_configuration.rb, line 56
+    def read
+      super
+    rescue ActiveSupport::EncryptedFile::MissingContentError
+      # Allow a config to be started without a file present
+      ""
+    end
- -
-
# File activesupport/lib/active_support/encrypted_configuration.rb, line 56
-def read
-  super
-rescue ActiveSupport::EncryptedFile::MissingContentError
-  # Allow a config to be started without a file present
-  ""
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/EncryptedConfiguration/InvalidContentError.html b/src/classes/ActiveSupport/EncryptedConfiguration/InvalidContentError.html index 47c5a3325a..58543ff44f 100644 --- a/src/classes/ActiveSupport/EncryptedConfiguration/InvalidContentError.html +++ b/src/classes/ActiveSupport/EncryptedConfiguration/InvalidContentError.html @@ -84,22 +84,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/encrypted_configuration.rb, line 37
+      def initialize(content_path)
+        super "Invalid YAML in '#{content_path}'."
+      end
- -
-
# File activesupport/lib/active_support/encrypted_configuration.rb, line 37
-def initialize(content_path)
-  super "Invalid YAML in '#{content_path}'."
-end
-
-
- - + See on GitHub + + + + @@ -123,22 +123,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/encrypted_configuration.rb, line 41
+      def message
+        cause.is_a?(Psych::SyntaxError) ? "#{super}\n\n  #{cause.message}" : super
+      end
- -
-
# File activesupport/lib/active_support/encrypted_configuration.rb, line 41
-def message
-  cause.is_a?(Psych::SyntaxError) ? "#{super}\n\n  #{cause.message}" : super
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/EncryptedFile.html b/src/classes/ActiveSupport/EncryptedFile.html index d68733495f..a2614a6c2c 100644 --- a/src/classes/ActiveSupport/EncryptedFile.html +++ b/src/classes/ActiveSupport/EncryptedFile.html @@ -177,22 +177,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/encrypted_file.rb, line 31
+    def self.generate_key
+      SecureRandom.hex(ActiveSupport::MessageEncryptor.key_len(CIPHER))
+    end
- -
-
# File activesupport/lib/active_support/encrypted_file.rb, line 31
-def self.generate_key
-  SecureRandom.hex(ActiveSupport::MessageEncryptor.key_len(CIPHER))
-end
-
-
- - + See on GitHub + + + +

@@ -212,24 +212,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/encrypted_file.rb, line 42
+    def initialize(content_path:, key_path:, env_key:, raise_if_missing_key:)
+      @content_path = Pathname.new(content_path).yield_self { |path| path.symlink? ? path.realpath : path }
+      @key_path = Pathname.new(key_path)
+      @env_key, @raise_if_missing_key = env_key, raise_if_missing_key
+    end
- -
-
# File activesupport/lib/active_support/encrypted_file.rb, line 42
-def initialize(content_path:, key_path:, env_key:, raise_if_missing_key:)
-  @content_path = Pathname.new(content_path).yield_self { |path| path.symlink? ? path.realpath : path }
-  @key_path = Pathname.new(key_path)
-  @env_key, @raise_if_missing_key = env_key, raise_if_missing_key
-end
-
-
- -

+ See on GitHub + + + + @@ -253,22 +253,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/encrypted_file.rb, line 83
+    def change(&block)
+      writing read, &block
+    end
- -
-
# File activesupport/lib/active_support/encrypted_file.rb, line 83
-def change(&block)
-  writing read, &block
-end
-
-
- - + See on GitHub + + + +

@@ -288,22 +288,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/encrypted_file.rb, line 52
+    def key
+      read_env_key || read_key_file || handle_missing_key
+    end
- -
-
# File activesupport/lib/active_support/encrypted_file.rb, line 52
-def key
-  read_env_key || read_key_file || handle_missing_key
-end
-
-
- -

+ See on GitHub + + + +

@@ -323,22 +323,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/encrypted_file.rb, line 58
+    def key?
+      read_env_key || read_key_file
+    end
- -
-
# File activesupport/lib/active_support/encrypted_file.rb, line 58
-def key?
-  read_env_key || read_key_file
-end
-
-
- -

+ See on GitHub + + + +

@@ -367,26 +367,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/encrypted_file.rb, line 70
+    def read
+      if !key.nil? && content_path.exist?
+        decrypt content_path.binread
+      else
+        raise MissingContentError, content_path
+      end
+    end
- -
-
# File activesupport/lib/active_support/encrypted_file.rb, line 70
-def read
-  if !key.nil? && content_path.exist?
-    decrypt content_path.binread
-  else
-    raise MissingContentError, content_path
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -406,23 +406,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/encrypted_file.rb, line 78
+    def write(contents)
+      IO.binwrite "#{content_path}.tmp", encrypt(contents)
+      FileUtils.mv "#{content_path}.tmp", content_path
+    end
- -
-
# File activesupport/lib/active_support/encrypted_file.rb, line 78
-def write(contents)
-  IO.binwrite "#{content_path}.tmp", encrypt(contents)
-  FileUtils.mv "#{content_path}.tmp", content_path
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/EncryptedFile/InvalidKeyLengthError.html b/src/classes/ActiveSupport/EncryptedFile/InvalidKeyLengthError.html index 2f293f44f0..424db9b515 100644 --- a/src/classes/ActiveSupport/EncryptedFile/InvalidKeyLengthError.html +++ b/src/classes/ActiveSupport/EncryptedFile/InvalidKeyLengthError.html @@ -80,22 +80,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/encrypted_file.rb, line 24
+      def initialize
+        super "Encryption key must be exactly #{EncryptedFile.expected_key_length} characters."
+      end
- -
-
# File activesupport/lib/active_support/encrypted_file.rb, line 24
-def initialize
-  super "Encryption key must be exactly #{EncryptedFile.expected_key_length} characters."
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/EncryptedFile/MissingContentError.html b/src/classes/ActiveSupport/EncryptedFile/MissingContentError.html index b8379ae2b6..2cdbba5091 100644 --- a/src/classes/ActiveSupport/EncryptedFile/MissingContentError.html +++ b/src/classes/ActiveSupport/EncryptedFile/MissingContentError.html @@ -80,22 +80,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/encrypted_file.rb, line 10
+      def initialize(content_path)
+        super "Missing encrypted content file in #{content_path}."
+      end
- -
-
# File activesupport/lib/active_support/encrypted_file.rb, line 10
-def initialize(content_path)
-  super "Missing encrypted content file in #{content_path}."
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/EncryptedFile/MissingKeyError.html b/src/classes/ActiveSupport/EncryptedFile/MissingKeyError.html index ad2df53c69..80853de469 100644 --- a/src/classes/ActiveSupport/EncryptedFile/MissingKeyError.html +++ b/src/classes/ActiveSupport/EncryptedFile/MissingKeyError.html @@ -80,24 +80,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/encrypted_file.rb, line 16
+      def initialize(key_path:, env_key:)
+        super \
+          "Missing encryption key to decrypt file with. " +
+          "Ask your team for your master key and write it to #{key_path} or put it in the ENV['#{env_key}']."
+      end
- -
-
# File activesupport/lib/active_support/encrypted_file.rb, line 16
-def initialize(key_path:, env_key:)
-  super \
-    "Missing encryption key to decrypt file with. " +
-    "Ask your team for your master key and write it to #{key_path} or put it in the ENV['#{env_key}']."
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/ErrorReporter.html b/src/classes/ActiveSupport/ErrorReporter.html index 5362592d80..2422fc426f 100644 --- a/src/classes/ActiveSupport/ErrorReporter.html +++ b/src/classes/ActiveSupport/ErrorReporter.html @@ -196,23 +196,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/error_reporter.rb, line 32
+    def initialize(*subscribers, logger: nil)
+      @subscribers = subscribers.flatten
+      @logger = logger
+    end
- -
-
# File activesupport/lib/active_support/error_reporter.rb, line 32
-def initialize(*subscribers, logger: nil)
-  @subscribers = subscribers.flatten
-  @logger = logger
-end
-
-
- - + See on GitHub + + + + @@ -238,28 +238,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/error_reporter.rb, line 147
+    def disable(subscriber)
+      disabled_subscribers = (ActiveSupport::IsolatedExecutionState[self] ||= [])
+      disabled_subscribers << subscriber
+      begin
+        yield
+      ensure
+        disabled_subscribers.delete(subscriber)
+      end
+    end
- -
-
# File activesupport/lib/active_support/error_reporter.rb, line 147
-def disable(subscriber)
-  disabled_subscribers = (ActiveSupport::IsolatedExecutionState[self] ||= [])
-  disabled_subscribers << subscriber
-  begin
-    yield
-  ensure
-    disabled_subscribers.delete(subscriber)
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -311,26 +311,26 @@

Options

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/error_reporter.rb, line 74
+    def handle(*error_classes, severity: :warning, context: {}, fallback: nil, source: DEFAULT_SOURCE)
+      error_classes = [StandardError] if error_classes.blank?
+      yield
+    rescue *error_classes => error
+      report(error, handled: true, severity: severity, context: context, source: source)
+      fallback.call if fallback
+    end
- -
-
# File activesupport/lib/active_support/error_reporter.rb, line 74
-def handle(*error_classes, severity: :warning, context: {}, fallback: nil, source: DEFAULT_SOURCE)
-  error_classes = [StandardError] if error_classes.blank?
-  yield
-rescue *error_classes => error
-  report(error, handled: true, severity: severity, context: context, source: source)
-  fallback.call if fallback
-end
-
-
- -
+ See on GitHub + + + +

@@ -375,26 +375,26 @@

Options

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/error_reporter.rb, line 110
+    def record(*error_classes, severity: :error, context: {}, source: DEFAULT_SOURCE)
+      error_classes = [StandardError] if error_classes.blank?
+      yield
+    rescue *error_classes => error
+      report(error, handled: false, severity: severity, context: context, source: source)
+      raise
+    end
- -
-
# File activesupport/lib/active_support/error_reporter.rb, line 110
-def record(*error_classes, severity: :error, context: {}, source: DEFAULT_SOURCE)
-  error_classes = [StandardError] if error_classes.blank?
-  yield
-rescue *error_classes => error
-  report(error, handled: false, severity: severity, context: context, source: source)
-  raise
-end
-
-
- -
+ See on GitHub + + + +

@@ -417,49 +417,49 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/error_reporter.rb, line 172
+    def report(error, handled: true, severity: handled ? :warning : :error, context: {}, source: DEFAULT_SOURCE)
+      return if error.instance_variable_defined?(:@__rails_error_reported)
+
+      unless SEVERITIES.include?(severity)
+        raise ArgumentError, "severity must be one of #{SEVERITIES.map(&:inspect).join(", ")}, got: #{severity.inspect}"
+      end
+
+      full_context = ActiveSupport::ExecutionContext.to_h.merge(context)
+      disabled_subscribers = ActiveSupport::IsolatedExecutionState[self]
+      @subscribers.each do |subscriber|
+        unless disabled_subscribers&.any? { |s| s === subscriber }
+          subscriber.report(error, handled: handled, severity: severity, context: full_context, source: source)
+        end
+      rescue => subscriber_error
+        if logger
+          logger.fatal(
+            "Error subscriber raised an error: #{subscriber_error.message} (#{subscriber_error.class})\n" +
+            subscriber_error.backtrace.join("\n")
+          )
+        else
+          raise
+        end
+      end
+
+      unless error.frozen?
+        error.instance_variable_set(:@__rails_error_reported, true)
+      end
+
+      nil
+    end
- -
-
# File activesupport/lib/active_support/error_reporter.rb, line 172
-def report(error, handled: true, severity: handled ? :warning : :error, context: {}, source: DEFAULT_SOURCE)
-  return if error.instance_variable_defined?(:@__rails_error_reported)
-
-  unless SEVERITIES.include?(severity)
-    raise ArgumentError, "severity must be one of #{SEVERITIES.map(&:inspect).join(", ")}, got: #{severity.inspect}"
-  end
-
-  full_context = ActiveSupport::ExecutionContext.to_h.merge(context)
-  disabled_subscribers = ActiveSupport::IsolatedExecutionState[self]
-  @subscribers.each do |subscriber|
-    unless disabled_subscribers&.any? { |s| s === subscriber }
-      subscriber.report(error, handled: handled, severity: severity, context: full_context, source: source)
-    end
-  rescue => subscriber_error
-    if logger
-      logger.fatal(
-        "Error subscriber raised an error: #{subscriber_error.message} (#{subscriber_error.class})\n" +
-        subscriber_error.backtrace.join("\n")
-      )
-    else
-      raise
-    end
-  end
-
-  unless error.frozen?
-    error.instance_variable_set(:@__rails_error_reported, true)
-  end
-
-  nil
-end
-
-
- -

+ See on GitHub + + + +

@@ -482,22 +482,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/error_reporter.rb, line 163
+    def set_context(...)
+      ActiveSupport::ExecutionContext.set(...)
+    end
- -
-
# File activesupport/lib/active_support/error_reporter.rb, line 163
-def set_context(...)
-  ActiveSupport::ExecutionContext.set(...)
-end
-
-
- -

+ See on GitHub + + + +

@@ -522,25 +522,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/error_reporter.rb, line 123
+    def subscribe(subscriber)
+      unless subscriber.respond_to?(:report)
+        raise ArgumentError, "Error subscribers must respond to #report"
+      end
+      @subscribers << subscriber
+    end
- -
-
# File activesupport/lib/active_support/error_reporter.rb, line 123
-def subscribe(subscriber)
-  unless subscriber.respond_to?(:report)
-    raise ArgumentError, "Error subscribers must respond to #report"
-  end
-  @subscribers << subscriber
-end
-
-
- -

+ See on GitHub + + + +

@@ -568,22 +568,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/error_reporter.rb, line 138
+    def unsubscribe(subscriber)
+      @subscribers.delete_if { |s| subscriber === s }
+    end
- -
-
# File activesupport/lib/active_support/error_reporter.rb, line 138
-def unsubscribe(subscriber)
-  @subscribers.delete_if { |s| subscriber === s }
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/ErrorReporter/TestHelper/ErrorSubscriber.html b/src/classes/ActiveSupport/ErrorReporter/TestHelper/ErrorSubscriber.html index b61408879e..eabf834ab6 100644 --- a/src/classes/ActiveSupport/ErrorReporter/TestHelper/ErrorSubscriber.html +++ b/src/classes/ActiveSupport/ErrorReporter/TestHelper/ErrorSubscriber.html @@ -98,22 +98,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/error_reporter/test_helper.rb, line 7
+    def initialize
+      @events = []
+    end
- -
-
# File activesupport/lib/active_support/error_reporter/test_helper.rb, line 7
-def initialize
-  @events = []
-end
-
-
- - + See on GitHub + + + + @@ -137,22 +137,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/error_reporter/test_helper.rb, line 11
+    def report(error, handled:, severity:, source:, context:)
+      @events << [error, handled, severity, source, context]
+    end
- -
-
# File activesupport/lib/active_support/error_reporter/test_helper.rb, line 11
-def report(error, handled:, severity:, source:, context:)
-  @events << [error, handled, severity, source, context]
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/EventedFileUpdateChecker/PathHelper.html b/src/classes/ActiveSupport/EventedFileUpdateChecker/PathHelper.html deleted file mode 100644 index a294d46a1e..0000000000 --- a/src/classes/ActiveSupport/EventedFileUpdateChecker/PathHelper.html +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: ActiveSupport::EventedFileUpdateChecker::PathHelper -layout: default ---- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveSupport/ExecutionWrapper.html b/src/classes/ActiveSupport/ExecutionWrapper.html index 7591cf8ace..50d19b7247 100644 --- a/src/classes/ActiveSupport/ExecutionWrapper.html +++ b/src/classes/ActiveSupport/ExecutionWrapper.html @@ -116,28 +116,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/execution_wrapper.rb, line 51
+    def self.register_hook(hook, outer: false)
+      if outer
+        to_run RunHook.new(hook), prepend: true
+        to_complete :after, CompleteHook.new(hook)
+      else
+        to_run RunHook.new(hook)
+        to_complete CompleteHook.new(hook)
+      end
+    end
- -
-
# File activesupport/lib/active_support/execution_wrapper.rb, line 51
-def self.register_hook(hook, outer: false)
-  if outer
-    to_run RunHook.new(hook), prepend: true
-    to_complete :after, CompleteHook.new(hook)
-  else
-    to_run RunHook.new(hook)
-    to_complete CompleteHook.new(hook)
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -161,37 +161,37 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/execution_wrapper.rb, line 67
+    def self.run!(reset: false)
+      if reset
+        lost_instance = IsolatedExecutionState.delete(active_key)
+        lost_instance&.complete!
+      else
+        return Null if active?
+      end
+
+      new.tap do |instance|
+        success = nil
+        begin
+          instance.run!
+          success = true
+        ensure
+          instance.complete! unless success
+        end
+      end
+    end
- -
-
# File activesupport/lib/active_support/execution_wrapper.rb, line 67
-def self.run!(reset: false)
-  if reset
-    lost_instance = IsolatedExecutionState.delete(active_key)
-    lost_instance&.complete!
-  else
-    return Null if active?
-  end
-
-  new.tap do |instance|
-    success = nil
-    begin
-      instance.run!
-      success = true
-    ensure
-      instance.complete! unless success
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -211,22 +211,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/execution_wrapper.rb, line 22
+    def self.to_complete(*args, &block)
+      set_callback(:complete, *args, &block)
+    end
- -
-
# File activesupport/lib/active_support/execution_wrapper.rb, line 22
-def self.to_complete(*args, &block)
-  set_callback(:complete, *args, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -246,22 +246,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/execution_wrapper.rb, line 18
+    def self.to_run(*args, &block)
+      set_callback(:run, *args, &block)
+    end
- -
-
# File activesupport/lib/active_support/execution_wrapper.rb, line 18
-def self.to_run(*args, &block)
-  set_callback(:run, *args, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -281,32 +281,32 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/execution_wrapper.rb, line 87
+    def self.wrap(source: "application.active_support")
+      return yield if active?
+
+      instance = run!
+      begin
+        yield
+      rescue => error
+        error_reporter&.report(error, handled: false, source: source)
+        raise
+      ensure
+        instance.complete!
+      end
+    end
- -
-
# File activesupport/lib/active_support/execution_wrapper.rb, line 87
-def self.wrap(source: "application.active_support")
-  return yield if active?
-
-  instance = run!
-  begin
-    yield
-  rescue => error
-    error_reporter&.report(error, handled: false, source: source)
-    raise
-  ensure
-    instance.complete!
-  end
-end
-
-
- -

+ See on GitHub + + + + @@ -332,24 +332,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/execution_wrapper.rb, line 136
+    def complete!
+      complete
+    ensure
+      IsolatedExecutionState.delete(self.class.active_key)
+    end
- -
-
# File activesupport/lib/active_support/execution_wrapper.rb, line 136
-def complete!
-  complete
-ensure
-  IsolatedExecutionState.delete(self.class.active_key)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/FileUpdateChecker.html b/src/classes/ActiveSupport/FileUpdateChecker.html index 21a420cea2..29e3675197 100644 --- a/src/classes/ActiveSupport/FileUpdateChecker.html +++ b/src/classes/ActiveSupport/FileUpdateChecker.html @@ -124,34 +124,34 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/file_update_checker.rb, line 44
+    def initialize(files, dirs = {}, &block)
+      unless block
+        raise ArgumentError, "A block is required to initialize a FileUpdateChecker"
+      end
+
+      @files = files.freeze
+      @glob  = compile_glob(dirs)
+      @block = block
+
+      @watched    = nil
+      @updated_at = nil
+
+      @last_watched   = watched
+      @last_update_at = updated_at(@last_watched)
+    end
- -
-
# File activesupport/lib/active_support/file_update_checker.rb, line 44
-def initialize(files, dirs = {}, &block)
-  unless block
-    raise ArgumentError, "A block is required to initialize a FileUpdateChecker"
-  end
-
-  @files = files.freeze
-  @glob  = compile_glob(dirs)
-  @block = block
-
-  @watched    = nil
-  @updated_at = nil
-
-  @last_watched   = watched
-  @last_update_at = updated_at(@last_watched)
-end
-
-
- - + See on GitHub + + + + @@ -175,27 +175,27 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/file_update_checker.rb, line 82
+    def execute
+      @last_watched   = watched
+      @last_update_at = updated_at(@last_watched)
+      @block.call
+    ensure
+      @watched = nil
+      @updated_at = nil
+    end
- -
-
# File activesupport/lib/active_support/file_update_checker.rb, line 82
-def execute
-  @last_watched   = watched
-  @last_update_at = updated_at(@last_watched)
-  @block.call
-ensure
-  @watched = nil
-  @updated_at = nil
-end
-
-
- - + See on GitHub + + + +

@@ -215,28 +215,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/file_update_checker.rb, line 92
+    def execute_if_updated
+      if updated?
+        yield if block_given?
+        execute
+        true
+      else
+        false
+      end
+    end
- -
-
# File activesupport/lib/active_support/file_update_checker.rb, line 92
-def execute_if_updated
-  if updated?
-    yield if block_given?
-    execute
-    true
-  else
-    false
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -256,35 +256,35 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/file_update_checker.rb, line 63
+    def updated?
+      current_watched = watched
+      if @last_watched.size != current_watched.size
+        @watched = current_watched
+        true
+      else
+        current_updated_at = updated_at(current_watched)
+        if @last_update_at < current_updated_at
+          @watched    = current_watched
+          @updated_at = current_updated_at
+          true
+        else
+          false
+        end
+      end
+    end
- -
-
# File activesupport/lib/active_support/file_update_checker.rb, line 63
-def updated?
-  current_watched = watched
-  if @last_watched.size != current_watched.size
-    @watched = current_watched
-    true
-  else
-    current_updated_at = updated_at(current_watched)
-    if @last_update_at < current_updated_at
-      @watched    = current_watched
-      @updated_at = current_updated_at
-      true
-    else
-      false
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/ForkTracker/ModernCoreExt.html b/src/classes/ActiveSupport/ForkTracker/ModernCoreExt.html index 14d2e450a7..cfd2f431ca 100644 --- a/src/classes/ActiveSupport/ForkTracker/ModernCoreExt.html +++ b/src/classes/ActiveSupport/ForkTracker/ModernCoreExt.html @@ -75,26 +75,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/fork_tracker.rb, line 6
+      def _fork
+        pid = super
+        if pid == 0
+          ForkTracker.after_fork_callback
+        end
+        pid
+      end
- -
-
# File activesupport/lib/active_support/fork_tracker.rb, line 6
-def _fork
-  pid = super
-  if pid == 0
-    ForkTracker.after_fork_callback
-  end
-  pid
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Gzip.html b/src/classes/ActiveSupport/Gzip.html index 7d254f2a60..2c203a53bc 100644 --- a/src/classes/ActiveSupport/Gzip.html +++ b/src/classes/ActiveSupport/Gzip.html @@ -106,26 +106,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/gzip.rb, line 32
+    def self.compress(source, level = Zlib::DEFAULT_COMPRESSION, strategy = Zlib::DEFAULT_STRATEGY)
+      output = Stream.new
+      gz = Zlib::GzipWriter.new(output, level, strategy)
+      gz.write(source)
+      gz.close
+      output.string
+    end
- -
-
# File activesupport/lib/active_support/gzip.rb, line 32
-def self.compress(source, level = Zlib::DEFAULT_COMPRESSION, strategy = Zlib::DEFAULT_STRATEGY)
-  output = Stream.new
-  gz = Zlib::GzipWriter.new(output, level, strategy)
-  gz.write(source)
-  gz.close
-  output.string
-end
-
-
- - + See on GitHub + + + +

@@ -145,22 +145,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/gzip.rb, line 27
+    def self.decompress(source)
+      Zlib::GzipReader.wrap(StringIO.new(source), &:read)
+    end
- -
-
# File activesupport/lib/active_support/gzip.rb, line 27
-def self.decompress(source)
-  Zlib::GzipReader.wrap(StringIO.new(source), &:read)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Gzip/Stream.html b/src/classes/ActiveSupport/Gzip/Stream.html index bbc05bc977..dcd00980f4 100644 --- a/src/classes/ActiveSupport/Gzip/Stream.html +++ b/src/classes/ActiveSupport/Gzip/Stream.html @@ -84,23 +84,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/gzip.rb, line 19
+      def initialize(*)
+        super
+        set_encoding "BINARY"
+      end
- -
-
# File activesupport/lib/active_support/gzip.rb, line 19
-def initialize(*)
-  super
-  set_encoding "BINARY"
-end
-
-
- - + See on GitHub + + + + @@ -124,20 +124,20 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/gzip.rb, line 23
+      def close; rewind; end
- -
-
# File activesupport/lib/active_support/gzip.rb, line 23
-def close; rewind; end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/HashWithIndifferentAccess.html b/src/classes/ActiveSupport/HashWithIndifferentAccess.html index f37a2537be..93ea5e1b36 100644 --- a/src/classes/ActiveSupport/HashWithIndifferentAccess.html +++ b/src/classes/ActiveSupport/HashWithIndifferentAccess.html @@ -324,22 +324,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 85
+    def self.[](*args)
+      new.merge!(Hash[*args])
+    end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 85
-def self.[](*args)
-  new.merge!(Hash[*args])
-end
-
-
- - + See on GitHub + + + +

@@ -359,33 +359,33 @@

- -
- - -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 70
-def initialize(constructor = nil)
-  if constructor.respond_to?(:to_hash)
-    super()
-    update(constructor)
+          
+            
+ + Source code + - hash = constructor.is_a?(Hash) ? constructor : constructor.to_hash - self.default = hash.default if hash.default - self.default_proc = hash.default_proc if hash.default_proc - elsif constructor.nil? - super() - else - super(constructor) - end -end
-
-
- -

+
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 70
+    def initialize(constructor = nil)
+      if constructor.respond_to?(:to_hash)
+        super()
+        update(constructor)
+
+        hash = constructor.is_a?(Hash) ? constructor : constructor.to_hash
+        self.default = hash.default if hash.default
+        self.default_proc = hash.default_proc if hash.default_proc
+      elsif constructor.nil?
+        super()
+      else
+        super(constructor)
+      end
+    end
+ + See on GitHub + + + + @@ -417,22 +417,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 168
+    def [](key)
+      super(convert_key(key))
+    end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 168
-def [](key)
-  super(convert_key(key))
-end
-
-
- - + See on GitHub + + + +

@@ -462,22 +462,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 98
+    def []=(key, value)
+      regular_writer(convert_key(key), convert_value(value, conversion: :assignment))
+    end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 98
-def []=(key, value)
-  regular_writer(convert_key(key), convert_value(value, conversion: :assignment))
-end
-
-
- -

+ See on GitHub + + + +

@@ -505,22 +505,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 181
+    def assoc(key)
+      super(convert_key(key))
+    end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 181
-def assoc(key)
-  super(convert_key(key))
-end
-
-
- -

+ See on GitHub + + + +

@@ -540,22 +540,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 375
+    def compact
+      dup.tap(&:compact!)
+    end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 375
-def compact
-  dup.tap(&:compact!)
-end
-
-
- -

+ See on GitHub + + + +

@@ -575,20 +575,20 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 319
+    def deep_stringify_keys; dup end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 319
-def deep_stringify_keys; dup end
-
-
- -

+ See on GitHub + + + +

@@ -608,20 +608,20 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 317
+    def deep_stringify_keys!; self end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 317
-def deep_stringify_keys!; self end
-
-
- -

+ See on GitHub + + + +

@@ -641,20 +641,20 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 324
+    def deep_symbolize_keys; to_hash.deep_symbolize_keys! end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 324
-def deep_symbolize_keys; to_hash.deep_symbolize_keys! end
-
-
- -

+ See on GitHub + + + +

@@ -683,26 +683,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 223
+    def default(key = (no_key = true))
+      if no_key
+        super()
+      else
+        super(convert_key(key))
+      end
+    end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 223
-def default(key = (no_key = true))
-  if no_key
-    super()
-  else
-    super(convert_key(key))
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -722,22 +722,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 303
+    def delete(key)
+      super(convert_key(key))
+    end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 303
-def delete(key)
-  super(convert_key(key))
-end
-
-
- -

+ See on GitHub + + + +

@@ -765,23 +765,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 208
+    def dig(*args)
+      args[0] = convert_key(args[0]) if args.size > 0
+      super(*args)
+    end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 208
-def dig(*args)
-  args[0] = convert_key(args[0]) if args.size > 0
-  super(*args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -809,24 +809,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 264
+    def dup
+      self.class.new(self).tap do |new_hash|
+        set_defaults(new_hash)
+      end
+    end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 264
-def dup
-  self.class.new(self).tap do |new_hash|
-    set_defaults(new_hash)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -855,22 +855,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 311
+    def except(*keys)
+      dup.except!(*keys)
+    end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 311
-def except(*keys)
-  dup.except!(*keys)
-end
-
-
- -

+ See on GitHub + + + +

@@ -890,22 +890,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 58
+    def extractable_options?
+      true
+    end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 58
-def extractable_options?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -934,22 +934,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 195
+    def fetch(key, *extras)
+      super(convert_key(key), *extras)
+    end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 195
-def fetch(key, *extras)
-  super(convert_key(key), *extras)
-end
-
-
- -

+ See on GitHub + + + +

@@ -977,23 +977,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 251
+    def fetch_values(*indices, &block)
+      indices.map! { |key| convert_key(key) }
+      super
+    end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 251
-def fetch_values(*indices, &block)
-  indices.map! { |key| convert_key(key) }
-  super
-end
-
-
- -

+ See on GitHub + + + +

@@ -1017,7 +1017,8 @@

-

+ +

@@ -1041,7 +1042,8 @@

-

+ +

@@ -1071,22 +1073,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 151
+    def key?(key)
+      super(convert_key(key))
+    end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 151
-def key?(key)
-  super(convert_key(key))
-end
-
-
- -

+ See on GitHub + + + +

@@ -1110,7 +1112,8 @@

-

+ +

@@ -1130,22 +1133,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 273
+    def merge(*hashes, &block)
+      dup.update(*hashes, &block)
+    end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 273
-def merge(*hashes, &block)
-  dup.update(*hashes, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1169,7 +1172,8 @@

-

+ +

@@ -1189,22 +1193,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 66
+    def nested_under_indifferent_access
+      self
+    end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 66
-def nested_under_indifferent_access
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -1228,7 +1232,8 @@

-

+ +

@@ -1252,7 +1257,8 @@

-

+ +

@@ -1272,23 +1278,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 332
+    def reject(*args, &block)
+      return to_enum(:reject) unless block_given?
+      dup.tap { |hash| hash.reject!(*args, &block) }
+    end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 332
-def reject(*args, &block)
-  return to_enum(:reject) unless block_given?
-  dup.tap { |hash| hash.reject!(*args, &block) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -1312,22 +1318,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 298
+    def replace(other_hash)
+      super(self.class.new(other_hash))
+    end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 298
-def replace(other_hash)
-  super(self.class.new(other_hash))
-end
-
-
- -

+ See on GitHub + + + +

@@ -1356,22 +1362,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 283
+    def reverse_merge(other_hash)
+      super(self.class.new(other_hash))
+    end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 283
-def reverse_merge(other_hash)
-  super(self.class.new(other_hash))
-end
-
-
- -

+ See on GitHub + + + +

@@ -1395,22 +1401,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 289
+    def reverse_merge!(other_hash)
+      super(self.class.new(other_hash))
+    end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 289
-def reverse_merge!(other_hash)
-  super(self.class.new(other_hash))
-end
-
-
- -

+ See on GitHub + + + +

@@ -1430,23 +1436,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 327
+    def select(*args, &block)
+      return to_enum(:select) unless block_given?
+      dup.tap { |hash| hash.select!(*args, &block) }
+    end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 327
-def select(*args, &block)
-  return to_enum(:select) unless block_given?
-  dup.tap { |hash| hash.select!(*args, &block) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -1466,23 +1472,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 365
+    def slice(*keys)
+      keys.map! { |key| convert_key(key) }
+      self.class.new(super)
+    end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 365
-def slice(*keys)
-  keys.map! { |key| convert_key(key) }
-  self.class.new(super)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1502,23 +1508,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 370
+    def slice!(*keys)
+      keys.map! { |key| convert_key(key) }
+      super
+    end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 370
-def slice!(*keys)
-  keys.map! { |key| convert_key(key) }
-  super
-end
-
-
- -

+ See on GitHub + + + +

@@ -1542,7 +1548,8 @@

-

+ +

@@ -1562,20 +1569,20 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 318
+    def stringify_keys; dup end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 318
-def stringify_keys; dup end
-
-
- -

+ See on GitHub + + + +

@@ -1595,20 +1602,20 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 316
+    def stringify_keys!; self end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 316
-def stringify_keys!; self end
-
-
- -

+ See on GitHub + + + +

@@ -1632,20 +1639,20 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 322
+    def symbolize_keys; to_hash.symbolize_keys! end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 322
-def symbolize_keys; to_hash.symbolize_keys! end
-
-
- -

+ See on GitHub + + + +

@@ -1665,28 +1672,28 @@

- -
- - -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 380
-def to_hash
-  _new_hash = Hash.new
-  set_defaults(_new_hash)
+          
+            
+ + Source code + - each do |key, value| - _new_hash[key] = convert_value(value, conversion: :to_hash) - end - _new_hash -end
-
-
- -

+
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 380
+    def to_hash
+      _new_hash = Hash.new
+      set_defaults(_new_hash)
+
+      each do |key, value|
+        _new_hash[key] = convert_value(value, conversion: :to_hash)
+      end
+      _new_hash
+    end
+ + See on GitHub + + + +

@@ -1710,7 +1717,8 @@

-

+ +

@@ -1730,20 +1738,20 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 325
+    def to_options!; self end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 325
-def to_options!; self end
-
-
- -

+ See on GitHub + + + +

@@ -1763,23 +1771,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 344
+    def transform_keys(hash = NOT_GIVEN, &block)
+      return to_enum(:transform_keys) if NOT_GIVEN.equal?(hash) && !block_given?
+      dup.tap { |h| h.transform_keys!(hash, &block) }
+    end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 344
-def transform_keys(hash = NOT_GIVEN, &block)
-  return to_enum(:transform_keys) if NOT_GIVEN.equal?(hash) && !block_given?
-  dup.tap { |h| h.transform_keys!(hash, &block) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -1799,34 +1807,34 @@

- -
- - -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 349
-def transform_keys!(hash = NOT_GIVEN, &block)
-  return to_enum(:transform_keys!) if NOT_GIVEN.equal?(hash) && !block_given?
+          
+            
+ + Source code + - if hash.nil? - super - elsif NOT_GIVEN.equal?(hash) - keys.each { |key| self[yield(key)] = delete(key) } - elsif block_given? - keys.each { |key| self[hash[key] || yield(key)] = delete(key) } - else - keys.each { |key| self[hash[key] || key] = delete(key) } - end +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 349
+    def transform_keys!(hash = NOT_GIVEN, &block)
+      return to_enum(:transform_keys!) if NOT_GIVEN.equal?(hash) && !block_given?
 
-  self
-end
-
-
- -

+ if hash.nil? + super + elsif NOT_GIVEN.equal?(hash) + keys.each { |key| self[yield(key)] = delete(key) } + elsif block_given? + keys.each { |key| self[hash[key] || yield(key)] = delete(key) } + else + keys.each { |key| self[hash[key] || key] = delete(key) } + end + + self + end + + See on GitHub + + + +

@@ -1846,23 +1854,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 337
+    def transform_values(&block)
+      return to_enum(:transform_values) unless block_given?
+      dup.tap { |hash| hash.transform_values!(&block) }
+    end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 337
-def transform_values(&block)
-  return to_enum(:transform_values) unless block_given?
-  dup.tap { |hash| hash.transform_values!(&block) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -1909,29 +1917,29 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 132
+    def update(*other_hashes, &block)
+      if other_hashes.size == 1
+        update_with_single_argument(other_hashes.first, block)
+      else
+        other_hashes.each do |other_hash|
+          update_with_single_argument(other_hash, block)
+        end
+      end
+      self
+    end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 132
-def update(*other_hashes, &block)
-  if other_hashes.size == 1
-    update_with_single_argument(other_hashes.first, block)
-  else
-    other_hashes.each do |other_hash|
-      update_with_single_argument(other_hash, block)
-    end
-  end
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -1957,23 +1965,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 237
+    def values_at(*keys)
+      keys.map! { |key| convert_key(key) }
+      super
+    end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 237
-def values_at(*keys)
-  keys.map! { |key| convert_key(key) }
-  super
-end
-
-
- -

+ See on GitHub + + + +

@@ -1997,7 +2005,8 @@

-

+ +

@@ -2021,7 +2030,8 @@

-

+ +

@@ -2041,22 +2051,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 62
+    def with_indifferent_access
+      dup
+    end
- -
-
# File activesupport/lib/active_support/hash_with_indifferent_access.rb, line 62
-def with_indifferent_access
-  dup
-end
-
-
- -

+ See on GitHub + + + +

@@ -2080,7 +2090,8 @@

-

+ + diff --git a/src/classes/ActiveSupport/Inflector.html b/src/classes/ActiveSupport/Inflector.html index bf79bcc1c1..0ffa0cce3d 100644 --- a/src/classes/ActiveSupport/Inflector.html +++ b/src/classes/ActiveSupport/Inflector.html @@ -213,36 +213,36 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/methods.rb, line 70
+    def camelize(term, uppercase_first_letter = true)
+      string = term.to_s
+      # String#camelize takes a symbol (:upper or :lower), so here we also support :lower to keep the methods consistent.
+      if !uppercase_first_letter || uppercase_first_letter == :lower
+        string = string.sub(inflections.acronyms_camelize_regex) { |match| match.downcase! || match }
+      elsif string.match?(/\A[a-z\d]*\z/)
+        return inflections.acronyms[string]&.dup || string.capitalize
+      else
+        string = string.sub(/^[a-z\d]*/) { |match| inflections.acronyms[match] || match.capitalize! || match }
+      end
+      string.gsub!(/(?:_|(\/))([a-z\d]*)/i) do
+        word = $2
+        substituted = inflections.acronyms[word] || word.capitalize! || word
+        $1 ? "::#{substituted}" : substituted
+      end
+      string
+    end
- -
-
# File activesupport/lib/active_support/inflector/methods.rb, line 70
-def camelize(term, uppercase_first_letter = true)
-  string = term.to_s
-  # String#camelize takes a symbol (:upper or :lower), so here we also support :lower to keep the methods consistent.
-  if !uppercase_first_letter || uppercase_first_letter == :lower
-    string = string.sub(inflections.acronyms_camelize_regex) { |match| match.downcase! || match }
-  elsif string.match?(/\A[a-z\d]*\z/)
-    return inflections.acronyms[string]&.dup || string.capitalize
-  else
-    string = string.sub(/^[a-z\d]*/) { |match| inflections.acronyms[match] || match.capitalize! || match }
-  end
-  string.gsub!(/(?:_|(\/))([a-z\d]*)/i) do
-    word = $2
-    substituted = inflections.acronyms[word] || word.capitalize! || word
-    $1 ? "::#{substituted}" : substituted
-  end
-  string
-end
-
-
- - + See on GitHub + + + +

@@ -271,23 +271,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/methods.rb, line 218
+    def classify(table_name)
+      # strip out any leading schema name
+      camelize(singularize(table_name.to_s.sub(/.*\./, "")))
+    end
- -
-
# File activesupport/lib/active_support/inflector/methods.rb, line 218
-def classify(table_name)
-  # strip out any leading schema name
-  camelize(singularize(table_name.to_s.sub(/.*\./, "")))
-end
-
-
- -

+ See on GitHub + + + +

@@ -323,22 +323,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/methods.rb, line 289
+    def constantize(camel_cased_word)
+      Object.const_get(camel_cased_word)
+    end
- -
-
# File activesupport/lib/active_support/inflector/methods.rb, line 289
-def constantize(camel_cased_word)
-  Object.const_get(camel_cased_word)
-end
-
-
- -

+ See on GitHub + + + +

@@ -361,22 +361,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/methods.rb, line 226
+    def dasherize(underscored_word)
+      underscored_word.tr("_", "-")
+    end
- -
-
# File activesupport/lib/active_support/inflector/methods.rb, line 226
-def dasherize(underscored_word)
-  underscored_word.tr("_", "-")
-end
-
-
- -

+ See on GitHub + + + +

@@ -405,22 +405,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/methods.rb, line 256
+    def deconstantize(path)
+      path.to_s[0, path.rindex("::") || 0] # implementation based on the one in facets' Module#spacename
+    end
- -
-
# File activesupport/lib/active_support/inflector/methods.rb, line 256
-def deconstantize(path)
-  path.to_s[0, path.rindex("::") || 0] # implementation based on the one in facets' Module#spacename
-end
-
-
- -

+ See on GitHub + + + +

@@ -448,27 +448,27 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/methods.rb, line 238
+    def demodulize(path)
+      path = path.to_s
+      if i = path.rindex("::")
+        path[(i + 2), path.length]
+      else
+        path
+      end
+    end
- -
-
# File activesupport/lib/active_support/inflector/methods.rb, line 238
-def demodulize(path)
-  path = path.to_s
-  if i = path.rindex("::")
-    path[(i + 2), path.length]
-  else
-    path
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -493,22 +493,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/methods.rb, line 175
+    def downcase_first(string)
+      string.length > 0 ? string[0].downcase.concat(string[1..-1]) : ""
+    end
- -
-
# File activesupport/lib/active_support/inflector/methods.rb, line 175
-def downcase_first(string)
-  string.length > 0 ? string[0].downcase.concat(string[1..-1]) : ""
-end
-
-
- -

+ See on GitHub + + + +

@@ -533,22 +533,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/methods.rb, line 267
+    def foreign_key(class_name, separate_class_name_and_id_with_underscore = true)
+      underscore(demodulize(class_name)) + (separate_class_name_and_id_with_underscore ? "_id" : "id")
+    end
- -
-
# File activesupport/lib/active_support/inflector/methods.rb, line 267
-def foreign_key(class_name, separate_class_name_and_id_with_underscore = true)
-  underscore(demodulize(class_name)) + (separate_class_name_and_id_with_underscore ? "_id" : "id")
-end
-
-
- -

+ See on GitHub + + + +

@@ -599,44 +599,44 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/methods.rb, line 135
+    def humanize(lower_case_and_underscored_word, capitalize: true, keep_id_suffix: false)
+      result = lower_case_and_underscored_word.to_s.dup
+
+      inflections.humans.each { |(rule, replacement)| break if result.sub!(rule, replacement) }
+
+      result.tr!("_", " ")
+      result.lstrip!
+      if !keep_id_suffix && lower_case_and_underscored_word&.end_with?("_id")
+        result.delete_suffix!(" id")
+      end
+
+      result.gsub!(/([a-z\d]+)/i) do |match|
+        match.downcase!
+        inflections.acronyms[match] || match
+      end
+
+      if capitalize
+        result.sub!(/\A\w/) do |match|
+          match.upcase!
+          match
+        end
+      end
+
+      result
+    end
- -
-
# File activesupport/lib/active_support/inflector/methods.rb, line 135
-def humanize(lower_case_and_underscored_word, capitalize: true, keep_id_suffix: false)
-  result = lower_case_and_underscored_word.to_s.dup
-
-  inflections.humans.each { |(rule, replacement)| break if result.sub!(rule, replacement) }
-
-  result.tr!("_", " ")
-  result.lstrip!
-  if !keep_id_suffix && lower_case_and_underscored_word&.end_with?("_id")
-    result.delete_suffix!(" id")
-  end
-
-  result.gsub!(/([a-z\d]+)/i) do |match|
-    match.downcase!
-    inflections.acronyms[match] || match
-  end
-
-  if capitalize
-    result.sub!(/\A\w/) do |match|
-      match.upcase!
-      match
-    end
-  end
-
-  result
-end
-
-
- -

+ See on GitHub + + + +

@@ -661,26 +661,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/inflections.rb, line 265
+    def inflections(locale = :en)
+      if block_given?
+        yield Inflections.instance(locale)
+      else
+        Inflections.instance_or_fallback(locale)
+      end
+    end
- -
-
# File activesupport/lib/active_support/inflector/inflections.rb, line 265
-def inflections(locale = :en)
-  if block_given?
-    yield Inflections.instance(locale)
-  else
-    Inflections.instance_or_fallback(locale)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -708,22 +708,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/methods.rb, line 334
+    def ordinal(number)
+      I18n.translate("number.nth.ordinals", number: number)
+    end
- -
-
# File activesupport/lib/active_support/inflector/methods.rb, line 334
-def ordinal(number)
-  I18n.translate("number.nth.ordinals", number: number)
-end
-
-
- -

+ See on GitHub + + + +

@@ -751,22 +751,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/methods.rb, line 347
+    def ordinalize(number)
+      I18n.translate("number.nth.ordinalized", number: number)
+    end
- -
-
# File activesupport/lib/active_support/inflector/methods.rb, line 347
-def ordinalize(number)
-  I18n.translate("number.nth.ordinalized", number: number)
-end
-
-
- -

+ See on GitHub + + + +

@@ -811,44 +811,44 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/transliterate.rb, line 123
+    def parameterize(string, separator: "-", preserve_case: false, locale: nil)
+      # Replace accented chars with their ASCII equivalents.
+      parameterized_string = transliterate(string, locale: locale)
+
+      # Turn unwanted chars into the separator.
+      parameterized_string.gsub!(/[^a-z0-9\-_]+/i, separator)
+
+      unless separator.nil? || separator.empty?
+        if separator == "-"
+          re_duplicate_separator        = /-{2,}/
+          re_leading_trailing_separator = /^-|-$/i
+        else
+          re_sep = Regexp.escape(separator)
+          re_duplicate_separator        = /#{re_sep}{2,}/
+          re_leading_trailing_separator = /^#{re_sep}|#{re_sep}$/i
+        end
+        # No more than one of the separator in a row.
+        parameterized_string.gsub!(re_duplicate_separator, separator)
+        # Remove leading/trailing separator.
+        parameterized_string.gsub!(re_leading_trailing_separator, "")
+      end
+
+      parameterized_string.downcase! unless preserve_case
+      parameterized_string
+    end
- -
-
# File activesupport/lib/active_support/inflector/transliterate.rb, line 123
-def parameterize(string, separator: "-", preserve_case: false, locale: nil)
-  # Replace accented chars with their ASCII equivalents.
-  parameterized_string = transliterate(string, locale: locale)
-
-  # Turn unwanted chars into the separator.
-  parameterized_string.gsub!(/[^a-z0-9\-_]+/i, separator)
-
-  unless separator.nil? || separator.empty?
-    if separator == "-"
-      re_duplicate_separator        = /-{2,}/
-      re_leading_trailing_separator = /^-|-$/i
-    else
-      re_sep = Regexp.escape(separator)
-      re_duplicate_separator        = /#{re_sep}{2,}/
-      re_leading_trailing_separator = /^#{re_sep}|#{re_sep}$/i
-    end
-    # No more than one of the separator in a row.
-    parameterized_string.gsub!(re_duplicate_separator, separator)
-    # Remove leading/trailing separator.
-    parameterized_string.gsub!(re_leading_trailing_separator, "")
-  end
-
-  parameterized_string.downcase! unless preserve_case
-  parameterized_string
-end
-
-
- -

+ See on GitHub + + + +

@@ -878,22 +878,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/methods.rb, line 33
+    def pluralize(word, locale = :en)
+      apply_inflections(word, inflections(locale).plurals, locale)
+    end
- -
-
# File activesupport/lib/active_support/inflector/methods.rb, line 33
-def pluralize(word, locale = :en)
-  apply_inflections(word, inflections(locale).plurals, locale)
-end
-
-
- -

+ See on GitHub + + + +

@@ -934,28 +934,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/methods.rb, line 315
+    def safe_constantize(camel_cased_word)
+      constantize(camel_cased_word)
+    rescue NameError => e
+      raise if e.name && !(camel_cased_word.to_s.split("::").include?(e.name.to_s) ||
+        e.name.to_s == camel_cased_word.to_s)
+    rescue LoadError => e
+      message = e.respond_to?(:original_message) ? e.original_message : e.message
+      raise unless /Unable to autoload constant #{const_regexp(camel_cased_word)}/.match?(message)
+    end
- -
-
# File activesupport/lib/active_support/inflector/methods.rb, line 315
-def safe_constantize(camel_cased_word)
-  constantize(camel_cased_word)
-rescue NameError => e
-  raise if e.name && !(camel_cased_word.to_s.split("::").include?(e.name.to_s) ||
-    e.name.to_s == camel_cased_word.to_s)
-rescue LoadError => e
-  message = e.respond_to?(:original_message) ? e.original_message : e.message
-  raise unless /Unable to autoload constant #{const_regexp(camel_cased_word)}/.match?(message)
-end
-
-
- -

+ See on GitHub + + + +

@@ -985,22 +985,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/methods.rb, line 50
+    def singularize(word, locale = :en)
+      apply_inflections(word, inflections(locale).singulars, locale)
+    end
- -
-
# File activesupport/lib/active_support/inflector/methods.rb, line 50
-def singularize(word, locale = :en)
-  apply_inflections(word, inflections(locale).singulars, locale)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1025,22 +1025,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/methods.rb, line 204
+    def tableize(class_name)
+      pluralize(underscore(class_name))
+    end
- -
-
# File activesupport/lib/active_support/inflector/methods.rb, line 204
-def tableize(class_name)
-  pluralize(underscore(class_name))
-end
-
-
- -

+ See on GitHub + + + +

@@ -1069,24 +1069,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/methods.rb, line 192
+    def titleize(word, keep_id_suffix: false)
+      humanize(underscore(word), keep_id_suffix: keep_id_suffix).gsub(/\b(?
- -
-
# File activesupport/lib/active_support/inflector/methods.rb, line 192
-def titleize(word, keep_id_suffix: false)
-  humanize(underscore(word), keep_id_suffix: keep_id_suffix).gsub(/\b(?<!\w['’`()])[a-z]/) do |match|
-    match.capitalize
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1154,51 +1154,51 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/transliterate.rb, line 64
+    def transliterate(string, replacement = "?", locale: nil)
+      raise ArgumentError, "Can only transliterate strings. Received #{string.class.name}" unless string.is_a?(String)
+      raise ArgumentError, "Cannot transliterate strings with #{string.encoding} encoding" unless ALLOWED_ENCODINGS_FOR_TRANSLITERATE.include?(string.encoding)
+
+      return string.dup if string.ascii_only?
+      string = string.dup if string.frozen?
+
+      input_encoding = string.encoding
+
+      # US-ASCII is a subset of UTF-8 so we'll force encoding as UTF-8 if
+      # US-ASCII is given. This way we can let tidy_bytes handle the string
+      # in the same way as we do for UTF-8
+      string.force_encoding(Encoding::UTF_8) if string.encoding == Encoding::US_ASCII
+
+      # GB18030 is Unicode compatible but is not a direct mapping so needs to be
+      # transcoded. Using invalid/undef :replace will result in loss of data in
+      # the event of invalid characters, but since tidy_bytes will replace
+      # invalid/undef with a "?" we're safe to do the same beforehand
+      string.encode!(Encoding::UTF_8, invalid: :replace, undef: :replace) if string.encoding == Encoding::GB18030
+
+      transliterated = I18n.transliterate(
+        ActiveSupport::Multibyte::Unicode.tidy_bytes(string).unicode_normalize(:nfc),
+        replacement: replacement,
+        locale: locale
+      )
+
+      # Restore the string encoding of the input if it was not UTF-8.
+      # Apply invalid/undef :replace as tidy_bytes does
+      transliterated.encode!(input_encoding, invalid: :replace, undef: :replace) if input_encoding != transliterated.encoding
+
+      transliterated
+    end
- -
-
# File activesupport/lib/active_support/inflector/transliterate.rb, line 64
-def transliterate(string, replacement = "?", locale: nil)
-  raise ArgumentError, "Can only transliterate strings. Received #{string.class.name}" unless string.is_a?(String)
-  raise ArgumentError, "Cannot transliterate strings with #{string.encoding} encoding" unless ALLOWED_ENCODINGS_FOR_TRANSLITERATE.include?(string.encoding)
-
-  return string.dup if string.ascii_only?
-  string = string.dup if string.frozen?
-
-  input_encoding = string.encoding
-
-  # US-ASCII is a subset of UTF-8 so we'll force encoding as UTF-8 if
-  # US-ASCII is given. This way we can let tidy_bytes handle the string
-  # in the same way as we do for UTF-8
-  string.force_encoding(Encoding::UTF_8) if string.encoding == Encoding::US_ASCII
-
-  # GB18030 is Unicode compatible but is not a direct mapping so needs to be
-  # transcoded. Using invalid/undef :replace will result in loss of data in
-  # the event of invalid characters, but since tidy_bytes will replace
-  # invalid/undef with a "?" we're safe to do the same beforehand
-  string.encode!(Encoding::UTF_8, invalid: :replace, undef: :replace) if string.encoding == Encoding::GB18030
-
-  transliterated = I18n.transliterate(
-    ActiveSupport::Multibyte::Unicode.tidy_bytes(string).unicode_normalize(:nfc),
-    replacement: replacement,
-    locale: locale
-  )
-
-  # Restore the string encoding of the input if it was not UTF-8.
-  # Apply invalid/undef :replace as tidy_bytes does
-  transliterated.encode!(input_encoding, invalid: :replace, undef: :replace) if input_encoding != transliterated.encoding
-
-  transliterated
-end
-
-
- -

+ See on GitHub + + + +

@@ -1229,28 +1229,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/methods.rb, line 99
+    def underscore(camel_cased_word)
+      return camel_cased_word.to_s.dup unless /[A-Z-]|::/.match?(camel_cased_word)
+      word = camel_cased_word.to_s.gsub("::", "/")
+      word.gsub!(inflections.acronyms_underscore_regex) { "#{$1 && '_' }#{$2.downcase}" }
+      word.gsub!(/(?<=[A-Z])(?=[A-Z][a-z])|(?<=[a-z\d])(?=[A-Z])/, "_")
+      word.tr!("-", "_")
+      word.downcase!
+      word
+    end
- -
-
# File activesupport/lib/active_support/inflector/methods.rb, line 99
-def underscore(camel_cased_word)
-  return camel_cased_word.to_s.dup unless /[A-Z-]|::/.match?(camel_cased_word)
-  word = camel_cased_word.to_s.gsub("::", "/")
-  word.gsub!(inflections.acronyms_underscore_regex) { "#{$1 && '_' }#{$2.downcase}" }
-  word.gsub!(/(?<=[A-Z])(?=[A-Z][a-z])|(?<=[a-z\d])(?=[A-Z])/, "_")
-  word.tr!("-", "_")
-  word.downcase!
-  word
-end
-
-
- -

+ See on GitHub + + + +

@@ -1275,22 +1275,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/methods.rb, line 166
+    def upcase_first(string)
+      string.length > 0 ? string[0].upcase.concat(string[1..-1]) : ""
+    end
- -
-
# File activesupport/lib/active_support/inflector/methods.rb, line 166
-def upcase_first(string)
-  string.length > 0 ? string[0].upcase.concat(string[1..-1]) : ""
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Inflector/Inflections.html b/src/classes/ActiveSupport/Inflector/Inflections.html index 7d7e0da77c..5fd3a9f353 100644 --- a/src/classes/ActiveSupport/Inflector/Inflections.html +++ b/src/classes/ActiveSupport/Inflector/Inflections.html @@ -195,22 +195,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/inflections.rb, line 65
+      def self.instance(locale = :en)
+        @__instance__[locale] ||= new
+      end
- -
-
# File activesupport/lib/active_support/inflector/inflections.rb, line 65
-def self.instance(locale = :en)
-  @__instance__[locale] ||= new
-end
-
-
- - + See on GitHub + + + +

@@ -230,25 +230,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/inflections.rb, line 69
+      def self.instance_or_fallback(locale)
+        I18n.fallbacks[locale].each do |k|
+          return @__instance__[k] if @__instance__.key?(k)
+        end
+        instance(locale)
+      end
- -
-
# File activesupport/lib/active_support/inflector/inflections.rb, line 69
-def self.instance_or_fallback(locale)
-  I18n.fallbacks[locale].each do |k|
-    return @__instance__[k] if @__instance__.key?(k)
-  end
-  instance(locale)
-end
-
-
- -

+ See on GitHub + + + +

@@ -268,23 +268,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/inflections.rb, line 80
+      def initialize
+        @plurals, @singulars, @uncountables, @humans, @acronyms = [], [], Uncountables.new, [], {}
+        define_acronym_regex_patterns
+      end
- -
-
# File activesupport/lib/active_support/inflector/inflections.rb, line 80
-def initialize
-  @plurals, @singulars, @uncountables, @humans, @acronyms = [], [], Uncountables.new, [], {}
-  define_acronym_regex_patterns
-end
-
-
- -

+ See on GitHub + + + + @@ -349,23 +349,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/inflections.rb, line 142
+      def acronym(word)
+        @acronyms[word.downcase] = word
+        define_acronym_regex_patterns
+      end
- -
-
# File activesupport/lib/active_support/inflector/inflections.rb, line 142
-def acronym(word)
-  @acronyms[word.downcase] = word
-  define_acronym_regex_patterns
-end
-
-
- - + See on GitHub + + + +

@@ -389,36 +389,36 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/inflections.rb, line 231
+      def clear(scope = :all)
+        case scope
+        when :all
+          clear(:acronyms)
+          clear(:plurals)
+          clear(:singulars)
+          clear(:uncountables)
+          clear(:humans)
+        when :acronyms
+          @acronyms = {}
+          define_acronym_regex_patterns
+        when :uncountables
+          @uncountables = Uncountables.new
+        when :plurals, :singulars, :humans
+          instance_variable_set "@#{scope}", []
+        end
+      end
- -
-
# File activesupport/lib/active_support/inflector/inflections.rb, line 231
-def clear(scope = :all)
-  case scope
-  when :all
-    clear(:acronyms)
-    clear(:plurals)
-    clear(:singulars)
-    clear(:uncountables)
-    clear(:humans)
-  when :acronyms
-    @acronyms = {}
-    define_acronym_regex_patterns
-  when :uncountables
-    @uncountables = Uncountables.new
-  when :plurals, :singulars, :humans
-    instance_variable_set "@#{scope}", []
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -442,22 +442,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/inflections.rb, line 220
+      def human(rule, replacement)
+        @humans.prepend([rule, replacement])
+      end
- -
-
# File activesupport/lib/active_support/inflector/inflections.rb, line 220
-def human(rule, replacement)
-  @humans.prepend([rule, replacement])
-end
-
-
- -

+ See on GitHub + + + +

@@ -481,47 +481,47 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/inflections.rb, line 174
+      def irregular(singular, plural)
+        @uncountables.delete(singular)
+        @uncountables.delete(plural)
+
+        s0 = singular[0]
+        srest = singular[1..-1]
+
+        p0 = plural[0]
+        prest = plural[1..-1]
+
+        if s0.upcase == p0.upcase
+          plural(/(#{s0})#{srest}$/i, '\1' + prest)
+          plural(/(#{p0})#{prest}$/i, '\1' + prest)
+
+          singular(/(#{s0})#{srest}$/i, '\1' + srest)
+          singular(/(#{p0})#{prest}$/i, '\1' + srest)
+        else
+          plural(/#{s0.upcase}(?i)#{srest}$/,   p0.upcase   + prest)
+          plural(/#{s0.downcase}(?i)#{srest}$/, p0.downcase + prest)
+          plural(/#{p0.upcase}(?i)#{prest}$/,   p0.upcase   + prest)
+          plural(/#{p0.downcase}(?i)#{prest}$/, p0.downcase + prest)
+
+          singular(/#{s0.upcase}(?i)#{srest}$/,   s0.upcase   + srest)
+          singular(/#{s0.downcase}(?i)#{srest}$/, s0.downcase + srest)
+          singular(/#{p0.upcase}(?i)#{prest}$/,   s0.upcase   + srest)
+          singular(/#{p0.downcase}(?i)#{prest}$/, s0.downcase + srest)
+        end
+      end
- -
-
# File activesupport/lib/active_support/inflector/inflections.rb, line 174
-def irregular(singular, plural)
-  @uncountables.delete(singular)
-  @uncountables.delete(plural)
-
-  s0 = singular[0]
-  srest = singular[1..-1]
-
-  p0 = plural[0]
-  prest = plural[1..-1]
-
-  if s0.upcase == p0.upcase
-    plural(/(#{s0})#{srest}$/i, '\1' + prest)
-    plural(/(#{p0})#{prest}$/i, '\1' + prest)
-
-    singular(/(#{s0})#{srest}$/i, '\1' + srest)
-    singular(/(#{p0})#{prest}$/i, '\1' + srest)
-  else
-    plural(/#{s0.upcase}(?i)#{srest}$/,   p0.upcase   + prest)
-    plural(/#{s0.downcase}(?i)#{srest}$/, p0.downcase + prest)
-    plural(/#{p0.upcase}(?i)#{prest}$/,   p0.upcase   + prest)
-    plural(/#{p0.downcase}(?i)#{prest}$/, p0.downcase + prest)
-
-    singular(/#{s0.upcase}(?i)#{srest}$/,   s0.upcase   + srest)
-    singular(/#{s0.downcase}(?i)#{srest}$/, s0.downcase + srest)
-    singular(/#{p0.upcase}(?i)#{prest}$/,   s0.upcase   + srest)
-    singular(/#{p0.downcase}(?i)#{prest}$/, s0.downcase + srest)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -541,24 +541,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/inflections.rb, line 151
+      def plural(rule, replacement)
+        @uncountables.delete(rule) if rule.is_a?(String)
+        @uncountables.delete(replacement)
+        @plurals.prepend([rule, replacement])
+      end
- -
-
# File activesupport/lib/active_support/inflector/inflections.rb, line 151
-def plural(rule, replacement)
-  @uncountables.delete(rule) if rule.is_a?(String)
-  @uncountables.delete(replacement)
-  @plurals.prepend([rule, replacement])
-end
-
-
- -

+ See on GitHub + + + +

@@ -578,24 +578,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/inflections.rb, line 161
+      def singular(rule, replacement)
+        @uncountables.delete(rule) if rule.is_a?(String)
+        @uncountables.delete(replacement)
+        @singulars.prepend([rule, replacement])
+      end
- -
-
# File activesupport/lib/active_support/inflector/inflections.rb, line 161
-def singular(rule, replacement)
-  @uncountables.delete(rule) if rule.is_a?(String)
-  @uncountables.delete(replacement)
-  @singulars.prepend([rule, replacement])
-end
-
-
- -

+ See on GitHub + + + +

@@ -620,22 +620,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/inflections.rb, line 208
+      def uncountable(*words)
+        @uncountables.add(words)
+      end
- -
-
# File activesupport/lib/active_support/inflector/inflections.rb, line 208
-def uncountable(*words)
-  @uncountables.add(words)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Inflector/Inflections/Uncountables.html b/src/classes/ActiveSupport/Inflector/Inflections/Uncountables.html index e45b29bdda..61d42385b7 100644 --- a/src/classes/ActiveSupport/Inflector/Inflections/Uncountables.html +++ b/src/classes/ActiveSupport/Inflector/Inflections/Uncountables.html @@ -96,23 +96,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/inflections.rb, line 34
+        def initialize
+          @regex_array = []
+          super
+        end
- -
-
# File activesupport/lib/active_support/inflector/inflections.rb, line 34
-def initialize
-  @regex_array = []
-  super
-end
-
-
- - + See on GitHub + + + + @@ -136,22 +136,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/inflections.rb, line 44
+        def <<(*word)
+          add(word)
+        end
- -
-
# File activesupport/lib/active_support/inflector/inflections.rb, line 44
-def <<(*word)
-  add(word)
-end
-
-
- - + See on GitHub + + + +

@@ -171,25 +171,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/inflections.rb, line 48
+        def add(words)
+          words = words.flatten.map(&:downcase)
+          concat(words)
+          @regex_array += words.map { |word| to_regex(word) }
+          self
+        end
- -
-
# File activesupport/lib/active_support/inflector/inflections.rb, line 48
-def add(words)
-  words = words.flatten.map(&:downcase)
-  concat(words)
-  @regex_array += words.map { |word| to_regex(word) }
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -209,23 +209,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/inflections.rb, line 39
+        def delete(entry)
+          super entry
+          @regex_array.delete(to_regex(entry))
+        end
- -
-
# File activesupport/lib/active_support/inflector/inflections.rb, line 39
-def delete(entry)
-  super entry
-  @regex_array.delete(to_regex(entry))
-end
-
-
- -

+ See on GitHub + + + +

@@ -245,22 +245,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/inflector/inflections.rb, line 55
+        def uncountable?(str)
+          @regex_array.any? { |regex| regex.match? str }
+        end
- -
-
# File activesupport/lib/active_support/inflector/inflections.rb, line 55
-def uncountable?(str)
-  @regex_array.any? { |regex| regex.match? str }
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/InheritableOptions.html b/src/classes/ActiveSupport/InheritableOptions.html index aee63c9a43..1be88ef804 100644 --- a/src/classes/ActiveSupport/InheritableOptions.html +++ b/src/classes/ActiveSupport/InheritableOptions.html @@ -106,29 +106,29 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/ordered_options.rb, line 94
+    def initialize(parent = nil)
+      if parent.kind_of?(OrderedOptions)
+        # use the faster _get when dealing with OrderedOptions
+        super() { |h, k| parent._get(k) }
+      elsif parent
+        super() { |h, k| parent[k] }
+      else
+        super()
+      end
+    end
- -
-
# File activesupport/lib/active_support/ordered_options.rb, line 94
-def initialize(parent = nil)
-  if parent.kind_of?(OrderedOptions)
-    # use the faster _get when dealing with OrderedOptions
-    super() { |h, k| parent._get(k) }
-  elsif parent
-    super() { |h, k| parent[k] }
-  else
-    super()
-  end
-end
-
-
- - + See on GitHub + + + + @@ -152,22 +152,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/ordered_options.rb, line 105
+    def inheritable_copy
+      self.class.new(self)
+    end
- -
-
# File activesupport/lib/active_support/ordered_options.rb, line 105
-def inheritable_copy
-  self.class.new(self)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/JSON.html b/src/classes/ActiveSupport/JSON.html index 6fa5a2bd87..9c167eae1a 100644 --- a/src/classes/ActiveSupport/JSON.html +++ b/src/classes/ActiveSupport/JSON.html @@ -132,28 +132,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/json/decoding.rb, line 22
+      def decode(json)
+        data = ::JSON.parse(json, quirks_mode: true)
+
+        if ActiveSupport.parse_json_times
+          convert_dates_from(data)
+        else
+          data
+        end
+      end
- -
-
# File activesupport/lib/active_support/json/decoding.rb, line 22
-def decode(json)
-  data = ::JSON.parse(json, quirks_mode: true)
-
-  if ActiveSupport.parse_json_times
-    convert_dates_from(data)
-  else
-    data
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -177,7 +177,8 @@

-

+ +

@@ -201,22 +202,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/json/encoding.rb, line 22
+      def encode(value, options = nil)
+        Encoding.json_encoder.new(options).encode(value)
+      end
- -
-
# File activesupport/lib/active_support/json/encoding.rb, line 22
-def encode(value, options = nil)
-  Encoding.json_encoder.new(options).encode(value)
-end
-
-
- -

+ See on GitHub + + + +

@@ -240,7 +241,8 @@

-

+ +

@@ -267,22 +269,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/json/decoding.rb, line 43
+      def parse_error
+        ::JSON::ParserError
+      end
- -
-
# File activesupport/lib/active_support/json/decoding.rb, line 43
-def parse_error
-  ::JSON::ParserError
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/KeyGenerator.html b/src/classes/ActiveSupport/KeyGenerator.html index f297760b6b..edd3d908cf 100644 --- a/src/classes/ActiveSupport/KeyGenerator.html +++ b/src/classes/ActiveSupport/KeyGenerator.html @@ -100,22 +100,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/key_generator.rb, line 23
+      def hash_digest_class
+        @hash_digest_class ||= OpenSSL::Digest::SHA1
+      end
- -
-
# File activesupport/lib/active_support/key_generator.rb, line 23
-def hash_digest_class
-  @hash_digest_class ||= OpenSSL::Digest::SHA1
-end
-
-
- - + See on GitHub + + + +

@@ -135,26 +135,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/key_generator.rb, line 15
+      def hash_digest_class=(klass)
+        if klass.kind_of?(Class) && klass < OpenSSL::Digest
+          @hash_digest_class = klass
+        else
+          raise ArgumentError, "#{klass} is expected to be an OpenSSL::Digest subclass"
+        end
+      end
- -
-
# File activesupport/lib/active_support/key_generator.rb, line 15
-def hash_digest_class=(klass)
-  if klass.kind_of?(Class) && klass < OpenSSL::Digest
-    @hash_digest_class = klass
-  else
-    raise ArgumentError, "#{klass} is expected to be an OpenSSL::Digest subclass"
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -174,28 +174,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/key_generator.rb, line 28
+    def initialize(secret, options = {})
+      @secret = secret
+      # The default iterations are higher than required for our key derivation uses
+      # on the off chance someone uses this for password storage
+      @iterations = options[:iterations] || 2**16
+      # Also allow configuration here so people can use this to build a rotation
+      # scheme when switching the digest class.
+      @hash_digest_class = options[:hash_digest_class] || self.class.hash_digest_class
+    end
- -
-
# File activesupport/lib/active_support/key_generator.rb, line 28
-def initialize(secret, options = {})
-  @secret = secret
-  # The default iterations are higher than required for our key derivation uses
-  # on the off chance someone uses this for password storage
-  @iterations = options[:iterations] || 2**16
-  # Also allow configuration here so people can use this to build a rotation
-  # scheme when switching the digest class.
-  @hash_digest_class = options[:hash_digest_class] || self.class.hash_digest_class
-end
-
-
- -

+ See on GitHub + + + + @@ -219,22 +219,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/key_generator.rb, line 41
+    def generate_key(salt, key_size = 64)
+      OpenSSL::PKCS5.pbkdf2_hmac(@secret, salt, @iterations, key_size, @hash_digest_class.new)
+    end
- -
-
# File activesupport/lib/active_support/key_generator.rb, line 41
-def generate_key(salt, key_size = 64)
-  OpenSSL::PKCS5.pbkdf2_hmac(@secret, salt, @iterations, key_size, @hash_digest_class.new)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/LazyLoadHooks.html b/src/classes/ActiveSupport/LazyLoadHooks.html index acc00066d7..5dffd3f662 100644 --- a/src/classes/ActiveSupport/LazyLoadHooks.html +++ b/src/classes/ActiveSupport/LazyLoadHooks.html @@ -122,26 +122,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/lazy_load_hooks.rb, line 60
+    def on_load(name, options = {}, &block)
+      @loaded[name].each do |base|
+        execute_hook(name, base, options, block)
+      end
+
+      @load_hooks[name] << [block, options]
+    end
- -
-
# File activesupport/lib/active_support/lazy_load_hooks.rb, line 60
-def on_load(name, options = {}, &block)
-  @loaded[name].each do |base|
-    execute_hook(name, base, options, block)
-  end
-
-  @load_hooks[name] << [block, options]
-end
-
-
- - + See on GitHub + + + +

@@ -166,25 +166,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/lazy_load_hooks.rb, line 75
+    def run_load_hooks(name, base = Object)
+      @loaded[name] << base
+      @load_hooks[name].each do |hook, options|
+        execute_hook(name, base, options, hook)
+      end
+    end
- -
-
# File activesupport/lib/active_support/lazy_load_hooks.rb, line 75
-def run_load_hooks(name, base = Object)
-  @loaded[name] << base
-  @load_hooks[name].each do |hook, options|
-    execute_hook(name, base, options, hook)
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/LogSubscriber.html b/src/classes/ActiveSupport/LogSubscriber.html index 582a2dc093..3e7f35c328 100644 --- a/src/classes/ActiveSupport/LogSubscriber.html +++ b/src/classes/ActiveSupport/LogSubscriber.html @@ -331,22 +331,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/log_subscriber.rb, line 109
+      def flush_all!
+        logger.flush if logger.respond_to?(:flush)
+      end
- -
-
# File activesupport/lib/active_support/log_subscriber.rb, line 109
-def flush_all!
-  logger.flush if logger.respond_to?(:flush)
-end
-
-
- - + See on GitHub + + + +

@@ -366,22 +366,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/log_subscriber.rb, line 104
+      def log_subscribers
+        subscribers
+      end
- -
-
# File activesupport/lib/active_support/log_subscriber.rb, line 104
-def log_subscribers
-  subscribers
-end
-
-
- -

+ See on GitHub + + + +

@@ -401,24 +401,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/log_subscriber.rb, line 90
+      def logger
+        @logger ||= if defined?(Rails) && Rails.respond_to?(:logger)
+          Rails.logger
+        end
+      end
- -
-
# File activesupport/lib/active_support/log_subscriber.rb, line 90
-def logger
-  @logger ||= if defined?(Rails) && Rails.respond_to?(:logger)
-    Rails.logger
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -438,23 +438,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/log_subscriber.rb, line 130
+    def initialize
+      super
+      @event_levels = {}
+    end
- -
-
# File activesupport/lib/active_support/log_subscriber.rb, line 130
-def initialize
-  super
-  @event_levels = {}
-end
-
-
- -

+ See on GitHub + + + + @@ -478,24 +478,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/log_subscriber.rb, line 143
+    def call(event)
+      super if logger
+    rescue => e
+      log_exception(event.name, e)
+    end
- -
-
# File activesupport/lib/active_support/log_subscriber.rb, line 143
-def call(event)
-  super if logger
-rescue => e
-  log_exception(event.name, e)
-end
-
-
- - + See on GitHub + + + +

@@ -515,22 +515,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/log_subscriber.rb, line 135
+    def logger
+      LogSubscriber.logger
+    end
- -
-
# File activesupport/lib/active_support/log_subscriber.rb, line 135
-def logger
-  LogSubscriber.logger
-end
-
-
- -

+ See on GitHub + + + +

@@ -550,24 +550,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/log_subscriber.rb, line 149
+    def publish_event(event)
+      super if logger
+    rescue => e
+      log_exception(event.name, e)
+    end
- -
-
# File activesupport/lib/active_support/log_subscriber.rb, line 149
-def publish_event(event)
-  super if logger
-rescue => e
-  log_exception(event.name, e)
-end
-
-
- -

+ See on GitHub + + + +

@@ -587,22 +587,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/log_subscriber.rb, line 139
+    def silenced?(event)
+      logger.nil? || logger.level > @event_levels.fetch(event, Float::INFINITY)
+    end
- -
-
# File activesupport/lib/active_support/log_subscriber.rb, line 139
-def silenced?(event)
-  logger.nil? || logger.level > @event_levels.fetch(event, Float::INFINITY)
-end
-
-
- -

+ See on GitHub + + + +

Instance Private methods

@@ -625,26 +625,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/log_subscriber.rb, line 169
+    def color(text, color, mode_options = {}) # :doc:
+      return text unless colorize_logging
+      color = self.class.const_get(color.upcase) if color.is_a?(Symbol)
+      mode = mode_from(mode_options)
+      clear = "\e[#{MODES[:clear]}m"
+      "#{mode}#{color}#{text}#{clear}"
+    end
- -
-
# File activesupport/lib/active_support/log_subscriber.rb, line 169
-def color(text, color, mode_options = {}) # :doc:
-  return text unless colorize_logging
-  color = self.class.const_get(color.upcase) if color.is_a?(Symbol)
-  mode = mode_from(mode_options)
-  clear = "\e[#{MODES[:clear]}m"
-  "#{mode}#{color}#{text}#{clear}"
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/LogSubscriber/TestHelper.html b/src/classes/ActiveSupport/LogSubscriber/TestHelper.html index fbf17f375a..f2a4ffd99c 100644 --- a/src/classes/ActiveSupport/LogSubscriber/TestHelper.html +++ b/src/classes/ActiveSupport/LogSubscriber/TestHelper.html @@ -124,22 +124,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/log_subscriber/test_helper.rb, line 101
+      def set_logger(logger)
+        ActiveSupport::LogSubscriber.logger = logger
+      end
- -
-
# File activesupport/lib/active_support/log_subscriber/test_helper.rb, line 101
-def set_logger(logger)
-  ActiveSupport::LogSubscriber.logger = logger
-end
-
-
- - + See on GitHub + + + +

@@ -159,22 +159,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/log_subscriber/test_helper.rb, line 92
+      def wait
+        @notifier.wait
+      end
- -
-
# File activesupport/lib/active_support/log_subscriber/test_helper.rb, line 92
-def wait
-  @notifier.wait
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/LogSubscriber/TestHelper/MockLogger.html b/src/classes/ActiveSupport/LogSubscriber/TestHelper/MockLogger.html index c632233a57..5a631f552f 100644 --- a/src/classes/ActiveSupport/LogSubscriber/TestHelper/MockLogger.html +++ b/src/classes/ActiveSupport/LogSubscriber/TestHelper/MockLogger.html @@ -126,24 +126,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/log_subscriber/test_helper.rb, line 60
+        def initialize(level = DEBUG)
+          @flush_count = 0
+          @level = level
+          @logged = Hash.new { |h, k| h[k] = [] }
+        end
- -
-
# File activesupport/lib/active_support/log_subscriber/test_helper.rb, line 60
-def initialize(level = DEBUG)
-  @flush_count = 0
-  @level = level
-  @logged = Hash.new { |h, k| h[k] = [] }
-end
-
-
- - + See on GitHub + + + + @@ -167,22 +167,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/log_subscriber/test_helper.rb, line 78
+        def flush
+          @flush_count += 1
+        end
- -
-
# File activesupport/lib/active_support/log_subscriber/test_helper.rb, line 78
-def flush
-  @flush_count += 1
-end
-
-
- - + See on GitHub + + + +

@@ -202,22 +202,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/log_subscriber/test_helper.rb, line 74
+        def logged(level)
+          @logged[level].compact.map { |l| l.to_s.strip }
+        end
- -
-
# File activesupport/lib/active_support/log_subscriber/test_helper.rb, line 74
-def logged(level)
-  @logged[level].compact.map { |l| l.to_s.strip }
-end
-
-
- -

+ See on GitHub + + + +

@@ -237,26 +237,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/log_subscriber/test_helper.rb, line 66
+        def method_missing(level, message = nil)
+          if block_given?
+            @logged[level] << yield
+          else
+            @logged[level] << message
+          end
+        end
- -
-
# File activesupport/lib/active_support/log_subscriber/test_helper.rb, line 66
-def method_missing(level, message = nil)
-  if block_given?
-    @logged[level] << yield
-  else
-    @logged[level] << message
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Logger.html b/src/classes/ActiveSupport/Logger.html index 5668dc5b8b..bcabee743a 100644 --- a/src/classes/ActiveSupport/Logger.html +++ b/src/classes/ActiveSupport/Logger.html @@ -124,31 +124,31 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/logger.rb, line 16
+    def self.logger_outputs_to?(logger, *sources)
+      loggers = if logger.is_a?(BroadcastLogger)
+        logger.broadcasts
+      else
+        [logger]
+      end
+
+      logdevs = loggers.map { |logger| logger.instance_variable_get(:@logdev) }
+      logger_sources = logdevs.filter_map { |logdev| logdev.dev if logdev.respond_to?(:dev) }
+
+      (sources & logger_sources).any?
+    end
- -
-
# File activesupport/lib/active_support/logger.rb, line 16
-def self.logger_outputs_to?(logger, *sources)
-  loggers = if logger.is_a?(BroadcastLogger)
-    logger.broadcasts
-  else
-    [logger]
-  end
-
-  logdevs = loggers.map { |logger| logger.instance_variable_get(:@logdev) }
-  logger_sources = logdevs.filter_map { |logdev| logdev.dev if logdev.respond_to?(:dev) }
-
-  (sources & logger_sources).any?
-end
-
-
- - + See on GitHub + + + +

@@ -168,23 +168,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/logger.rb, line 29
+    def initialize(*args, **kwargs)
+      super
+      @formatter ||= SimpleFormatter.new
+    end
- -
-
# File activesupport/lib/active_support/logger.rb, line 29
-def initialize(*args, **kwargs)
-  super
-  @formatter ||= SimpleFormatter.new
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Logger/SimpleFormatter.html b/src/classes/ActiveSupport/Logger/SimpleFormatter.html index 6541a668a1..9005b91889 100644 --- a/src/classes/ActiveSupport/Logger/SimpleFormatter.html +++ b/src/classes/ActiveSupport/Logger/SimpleFormatter.html @@ -87,22 +87,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/logger.rb, line 37
+      def call(severity, timestamp, progname, msg)
+        "#{String === msg ? msg : msg.inspect}\n"
+      end
- -
-
# File activesupport/lib/active_support/logger.rb, line 37
-def call(severity, timestamp, progname, msg)
-  "#{String === msg ? msg : msg.inspect}\n"
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/LoggerSilence.html b/src/classes/ActiveSupport/LoggerSilence.html index e25e3824f8..b935b63f60 100644 --- a/src/classes/ActiveSupport/LoggerSilence.html +++ b/src/classes/ActiveSupport/LoggerSilence.html @@ -75,22 +75,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/logger_silence.rb, line 17
+    def silence(severity = Logger::ERROR)
+      silencer ? log_at(severity) { yield self } : yield(self)
+    end
- -
-
# File activesupport/lib/active_support/logger_silence.rb, line 17
-def silence(severity = Logger::ERROR)
-  silencer ? log_at(severity) { yield self } : yield(self)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/MessageEncryptor.html b/src/classes/ActiveSupport/MessageEncryptor.html index ff729b92b2..7bf7abd73f 100644 --- a/src/classes/ActiveSupport/MessageEncryptor.html +++ b/src/classes/ActiveSupport/MessageEncryptor.html @@ -201,22 +201,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/message_encryptor.rb, line 252
+    def self.key_len(cipher = default_cipher)
+      OpenSSL::Cipher.new(cipher).key_len
+    end
- -
-
# File activesupport/lib/active_support/message_encryptor.rb, line 252
-def self.key_len(cipher = default_cipher)
-  OpenSSL::Cipher.new(cipher).key_len
-end
-
-
- - + See on GitHub + + + +

@@ -269,28 +269,28 @@

Options

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/message_encryptor.rb, line 183
+    def initialize(secret, sign_secret = nil, **options)
+      super(**options)
+      @secret = secret
+      @cipher = options[:cipher] || self.class.default_cipher
+      @aead_mode = new_cipher.authenticated?
+      @verifier = if !@aead_mode
+        MessageVerifier.new(sign_secret || secret, **options, serializer: NullSerializer)
+      end
+    end
- -
-
# File activesupport/lib/active_support/message_encryptor.rb, line 183
-def initialize(secret, sign_secret = nil, **options)
-  super(**options)
-  @secret = secret
-  @cipher = options[:cipher] || self.class.default_cipher
-  @aead_mode = new_cipher.authenticated?
-  @verifier = if !@aead_mode
-    MessageVerifier.new(sign_secret || secret, **options, serializer: NullSerializer)
-  end
-end
-
-
- -
+ See on GitHub + + + + @@ -329,28 +329,28 @@

Options

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/message_encryptor.rb, line 241
+    def decrypt_and_verify(message, **options)
+      catch_and_raise :invalid_message_format, as: InvalidMessage do
+        catch_and_raise :invalid_message_serialization, as: InvalidMessage do
+          catch_and_ignore :invalid_message_content do
+            read_message(message, **options)
+          end
+        end
+      end
+    end
- -
-
# File activesupport/lib/active_support/message_encryptor.rb, line 241
-def decrypt_and_verify(message, **options)
-  catch_and_raise :invalid_message_format, as: InvalidMessage do
-    catch_and_raise :invalid_message_serialization, as: InvalidMessage do
-      catch_and_ignore :invalid_message_content do
-        read_message(message, **options)
-      end
-    end
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -394,22 +394,22 @@

Options

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/message_encryptor.rb, line 220
+    def encrypt_and_sign(value, **options)
+      create_message(value, **options)
+    end
- -
-
# File activesupport/lib/active_support/message_encryptor.rb, line 220
-def encrypt_and_sign(value, **options)
-  create_message(value, **options)
-end
-
-
- -
+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/MessageEncryptors.html b/src/classes/ActiveSupport/MessageEncryptors.html index b1ba6ae3b7..197940eb78 100644 --- a/src/classes/ActiveSupport/MessageEncryptors.html +++ b/src/classes/ActiveSupport/MessageEncryptors.html @@ -125,20 +125,10 @@

- -
- - -
-
# File activesupport/lib/active_support/message_encryptors.rb, line 48
-    
-
-
- - + + See on GitHub + +

@@ -159,20 +149,10 @@

- -
- - -
-
# File activesupport/lib/active_support/message_encryptors.rb, line 56
-    
-
-
- -

+ + See on GitHub + +

@@ -193,20 +173,10 @@

- -
- - -
-
# File activesupport/lib/active_support/message_encryptors.rb, line 117
-    
-
-
- -

+ + See on GitHub + +

@@ -234,20 +204,10 @@

- -
- - -
-
# File activesupport/lib/active_support/message_encryptors.rb, line 31
-    
-
-
- -

+ + See on GitHub + +

@@ -299,20 +259,10 @@

- -
- - -
-
# File activesupport/lib/active_support/message_encryptors.rb, line 62
-    
-
-
- -

+ + See on GitHub + +

@@ -333,20 +283,10 @@

- -
- - -
-
# File activesupport/lib/active_support/message_encryptors.rb, line 111
-    
-
-
- -

+ + See on GitHub + + diff --git a/src/classes/ActiveSupport/MessagePack.html b/src/classes/ActiveSupport/MessagePack.html index a0fe9eba3b..c569c97cdc 100644 --- a/src/classes/ActiveSupport/MessagePack.html +++ b/src/classes/ActiveSupport/MessagePack.html @@ -109,20 +109,10 @@

- -
- - -
-
# File activesupport/lib/active_support/message_pack.rb, line 20
-    
-
-
- - + + See on GitHub + +

@@ -143,20 +133,10 @@

- -
- - -
-
# File activesupport/lib/active_support/message_pack.rb, line 30
-    
-
-
- -

+ + See on GitHub + +

@@ -177,20 +157,10 @@

- -
- - -
-
# File activesupport/lib/active_support/message_pack.rb, line 39
-    
-
-
- -

+ + See on GitHub + + diff --git a/src/classes/ActiveSupport/MessagePack/CacheSerializer.html b/src/classes/ActiveSupport/MessagePack/CacheSerializer.html index 30808873e5..72fd465186 100644 --- a/src/classes/ActiveSupport/MessagePack/CacheSerializer.html +++ b/src/classes/ActiveSupport/MessagePack/CacheSerializer.html @@ -75,24 +75,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/message_pack/cache_serializer.rb, line 11
+      def load(dumped)
+        super
+      rescue ActiveSupport::MessagePack::MissingClassError
+        # Treat missing class as cache miss => return nil
+      end
- -
-
# File activesupport/lib/active_support/message_pack/cache_serializer.rb, line 11
-def load(dumped)
-  super
-rescue ActiveSupport::MessagePack::MissingClassError
-  # Treat missing class as cache miss => return nil
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/MessageVerifier.html b/src/classes/ActiveSupport/MessageVerifier.html index 1f86671907..9de36be40d 100644 --- a/src/classes/ActiveSupport/MessageVerifier.html +++ b/src/classes/ActiveSupport/MessageVerifier.html @@ -220,25 +220,25 @@

Options

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/message_verifier.rb, line 153
+    def initialize(secret, **options)
+      raise ArgumentError, "Secret should not be nil." unless secret
+      super(**options)
+      @secret = secret
+      @digest = options[:digest]&.to_s || "SHA1"
+    end
- -
-
# File activesupport/lib/active_support/message_verifier.rb, line 153
-def initialize(secret, **options)
-  raise ArgumentError, "Secret should not be nil." unless secret
-  super(**options)
-  @secret = secret
-  @digest = options[:digest]&.to_s || "SHA1"
-end
-
-
- - + See on GitHub + + + + @@ -294,22 +294,22 @@

Options

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/message_verifier.rb, line 292
+    def generate(value, **options)
+      create_message(value, **options)
+    end
- -
-
# File activesupport/lib/active_support/message_verifier.rb, line 292
-def generate(value, **options)
-  create_message(value, **options)
-end
-
-
- - + See on GitHub + + + +

@@ -337,22 +337,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/message_verifier.rb, line 169
+    def valid_message?(message)
+      !!catch_and_ignore(:invalid_message_format) { extract_encoded(message) }
+    end
- -
-
# File activesupport/lib/active_support/message_verifier.rb, line 169
-def valid_message?(message)
-  !!catch_and_ignore(:invalid_message_format) { extract_encoded(message) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -412,28 +412,28 @@

Options

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/message_verifier.rb, line 210
+    def verified(message, **options)
+      catch_and_ignore :invalid_message_format do
+        catch_and_raise :invalid_message_serialization do
+          catch_and_ignore :invalid_message_content do
+            read_message(message, **options)
+          end
+        end
+      end
+    end
- -
-
# File activesupport/lib/active_support/message_verifier.rb, line 210
-def verified(message, **options)
-  catch_and_ignore :invalid_message_format do
-    catch_and_raise :invalid_message_serialization do
-      catch_and_ignore :invalid_message_content do
-        read_message(message, **options)
-      end
-    end
-  end
-end
-
-
- -
+ See on GitHub + + + +

@@ -481,28 +481,28 @@

Options

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/message_verifier.rb, line 248
+    def verify(message, **options)
+      catch_and_raise :invalid_message_format, as: InvalidSignature do
+        catch_and_raise :invalid_message_serialization do
+          catch_and_raise :invalid_message_content, as: InvalidSignature do
+            read_message(message, **options)
+          end
+        end
+      end
+    end
- -
-
# File activesupport/lib/active_support/message_verifier.rb, line 248
-def verify(message, **options)
-  catch_and_raise :invalid_message_format, as: InvalidSignature do
-    catch_and_raise :invalid_message_serialization do
-      catch_and_raise :invalid_message_content, as: InvalidSignature do
-        read_message(message, **options)
-      end
-    end
-  end
-end
-
-
- -
+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/MessageVerifiers.html b/src/classes/ActiveSupport/MessageVerifiers.html index 0c0b1af53e..983ce6da62 100644 --- a/src/classes/ActiveSupport/MessageVerifiers.html +++ b/src/classes/ActiveSupport/MessageVerifiers.html @@ -125,20 +125,10 @@

- -
- - -
-
# File activesupport/lib/active_support/message_verifiers.rb, line 47
-    
-
-
- - + + See on GitHub + +

@@ -159,20 +149,10 @@

- -
- - -
-
# File activesupport/lib/active_support/message_verifiers.rb, line 55
-    
-
-
- -

+ + See on GitHub + +

@@ -193,20 +173,10 @@

- -
- - -
-
# File activesupport/lib/active_support/message_verifiers.rb, line 113
-    
-
-
- -

+ + See on GitHub + +

@@ -234,20 +204,10 @@

- -
- - -
-
# File activesupport/lib/active_support/message_verifiers.rb, line 31
-    
-
-
- -

+ + See on GitHub + +

@@ -299,20 +259,10 @@

- -
- - -
-
# File activesupport/lib/active_support/message_verifiers.rb, line 61
-    
-
-
- -

+ + See on GitHub + +

@@ -333,20 +283,10 @@

- -
- - -
-
# File activesupport/lib/active_support/message_verifiers.rb, line 107
-    
-
-
- -

+ + See on GitHub + + diff --git a/src/classes/ActiveSupport/Messages/Rotator.html b/src/classes/ActiveSupport/Messages/Rotator.html deleted file mode 100644 index 37f7b045d5..0000000000 --- a/src/classes/ActiveSupport/Messages/Rotator.html +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: ActiveSupport::Messages::Rotator -layout: default ---- -
- -
-
- - - - - - - - - -

Namespace

- - -

Module

- - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/ActiveSupport/Messages/Rotator/Encryptor.html b/src/classes/ActiveSupport/Messages/Rotator/Encryptor.html deleted file mode 100644 index 19ee55fb4b..0000000000 --- a/src/classes/ActiveSupport/Messages/Rotator/Encryptor.html +++ /dev/null @@ -1,117 +0,0 @@ ---- -title: ActiveSupport::Messages::Rotator::Encryptor -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - -

Included Modules

- - - - - - - - - - - - - - - -

Instance Public methods

- -
-

- - decrypt_and_verify(*args, on_rotation: @on_rotation, **options) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/messages/rotator.rb, line 21
-def decrypt_and_verify(*args, on_rotation: @on_rotation, **options)
-  super
-rescue MessageEncryptor::InvalidMessage, MessageVerifier::InvalidSignature
-  run_rotations(on_rotation) { |encryptor| encryptor.decrypt_and_verify(*args, **options) } || raise
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveSupport/Messages/Rotator/Verifier.html b/src/classes/ActiveSupport/Messages/Rotator/Verifier.html deleted file mode 100644 index 9139e09286..0000000000 --- a/src/classes/ActiveSupport/Messages/Rotator/Verifier.html +++ /dev/null @@ -1,115 +0,0 @@ ---- -title: ActiveSupport::Messages::Rotator::Verifier -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - -

Included Modules

- - - - - - - - - - - - - - - -

Instance Public methods

- -
-

- - verified(*args, on_rotation: @on_rotation, **options) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/messages/rotator.rb, line 36
-def verified(*args, on_rotation: @on_rotation, **options)
-  super || run_rotations(on_rotation) { |verifier| verifier.verified(*args, **options) }
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveSupport/Messages/SerializerWithFallback/JsonWithFallback.html b/src/classes/ActiveSupport/Messages/SerializerWithFallback/JsonWithFallback.html index 5d56ac99f2..060596f916 100644 --- a/src/classes/ActiveSupport/Messages/SerializerWithFallback/JsonWithFallback.html +++ b/src/classes/ActiveSupport/Messages/SerializerWithFallback/JsonWithFallback.html @@ -119,22 +119,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/messages/serializer_with_fallback.rb, line 90
+          def _load(dumped)
+            ActiveSupport::JSON.decode(dumped)
+          end
- -
-
# File activesupport/lib/active_support/messages/serializer_with_fallback.rb, line 90
-def _load(dumped)
-  ActiveSupport::JSON.decode(dumped)
-end
-
-
- - + See on GitHub + + + +

@@ -154,22 +154,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/messages/serializer_with_fallback.rb, line 86
+          def dump(object)
+            ActiveSupport::JSON.encode(object)
+          end
- -
-
# File activesupport/lib/active_support/messages/serializer_with_fallback.rb, line 86
-def dump(object)
-  ActiveSupport::JSON.encode(object)
-end
-
-
- -

+ See on GitHub + + + +

@@ -189,22 +189,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/messages/serializer_with_fallback.rb, line 96
+          def dumped?(dumped)
+            JSON_START_WITH.match?(dumped)
+          end
- -
-
# File activesupport/lib/active_support/messages/serializer_with_fallback.rb, line 96
-def dumped?(dumped)
-  JSON_START_WITH.match?(dumped)
-end
-
-
- -

+ See on GitHub + + + +

@@ -224,22 +224,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/messages/serializer_with_fallback.rb, line 82
+          def format
+            :json
+          end
- -
-
# File activesupport/lib/active_support/messages/serializer_with_fallback.rb, line 82
-def format
-  :json
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Messages/SerializerWithFallback/MarshalWithFallback.html b/src/classes/ActiveSupport/Messages/SerializerWithFallback/MarshalWithFallback.html index 0d95cbd18e..248783f31b 100644 --- a/src/classes/ActiveSupport/Messages/SerializerWithFallback/MarshalWithFallback.html +++ b/src/classes/ActiveSupport/Messages/SerializerWithFallback/MarshalWithFallback.html @@ -119,22 +119,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/messages/serializer_with_fallback.rb, line 67
+          def _load(dumped)
+            Marshal.load(dumped)
+          end
- -
-
# File activesupport/lib/active_support/messages/serializer_with_fallback.rb, line 67
-def _load(dumped)
-  Marshal.load(dumped)
-end
-
-
- - + See on GitHub + + + +

@@ -154,22 +154,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/messages/serializer_with_fallback.rb, line 63
+          def dump(object)
+            Marshal.dump(object)
+          end
- -
-
# File activesupport/lib/active_support/messages/serializer_with_fallback.rb, line 63
-def dump(object)
-  Marshal.dump(object)
-end
-
-
- -

+ See on GitHub + + + +

@@ -189,22 +189,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/messages/serializer_with_fallback.rb, line 73
+          def dumped?(dumped)
+            dumped.start_with?(MARSHAL_SIGNATURE)
+          end
- -
-
# File activesupport/lib/active_support/messages/serializer_with_fallback.rb, line 73
-def dumped?(dumped)
-  dumped.start_with?(MARSHAL_SIGNATURE)
-end
-
-
- -

+ See on GitHub + + + +

@@ -224,22 +224,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/messages/serializer_with_fallback.rb, line 59
+          def format
+            :marshal
+          end
- -
-
# File activesupport/lib/active_support/messages/serializer_with_fallback.rb, line 59
-def format
-  :marshal
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Messages/SerializerWithFallback/MessagePackWithFallback.html b/src/classes/ActiveSupport/Messages/SerializerWithFallback/MessagePackWithFallback.html index 639a276ea9..9cdc36554f 100644 --- a/src/classes/ActiveSupport/Messages/SerializerWithFallback/MessagePackWithFallback.html +++ b/src/classes/ActiveSupport/Messages/SerializerWithFallback/MessagePackWithFallback.html @@ -101,22 +101,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/messages/serializer_with_fallback.rb, line 125
+          def _load(dumped)
+            ActiveSupport::MessagePack.load(dumped)
+          end
- -
-
# File activesupport/lib/active_support/messages/serializer_with_fallback.rb, line 125
-def _load(dumped)
-  ActiveSupport::MessagePack.load(dumped)
-end
-
-
- - + See on GitHub + + + +

@@ -136,22 +136,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/messages/serializer_with_fallback.rb, line 121
+          def dump(object)
+            ActiveSupport::MessagePack.dump(object)
+          end
- -
-
# File activesupport/lib/active_support/messages/serializer_with_fallback.rb, line 121
-def dump(object)
-  ActiveSupport::MessagePack.dump(object)
-end
-
-
- -

+ See on GitHub + + + +

@@ -171,22 +171,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/messages/serializer_with_fallback.rb, line 129
+          def dumped?(dumped)
+            available? && ActiveSupport::MessagePack.signature?(dumped)
+          end
- -
-
# File activesupport/lib/active_support/messages/serializer_with_fallback.rb, line 129
-def dumped?(dumped)
-  available? && ActiveSupport::MessagePack.signature?(dumped)
-end
-
-
- -

+ See on GitHub + + + +

@@ -206,22 +206,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/messages/serializer_with_fallback.rb, line 117
+          def format
+            :message_pack
+          end
- -
-
# File activesupport/lib/active_support/messages/serializer_with_fallback.rb, line 117
-def format
-  :message_pack
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Multibyte.html b/src/classes/ActiveSupport/Multibyte.html index 1910c5aa86..46e89a6e41 100644 --- a/src/classes/ActiveSupport/Multibyte.html +++ b/src/classes/ActiveSupport/Multibyte.html @@ -102,22 +102,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/multibyte.rb, line 19
+    def self.proxy_class
+      @proxy_class ||= ActiveSupport::Multibyte::Chars
+    end
- -
-
# File activesupport/lib/active_support/multibyte.rb, line 19
-def self.proxy_class
-  @proxy_class ||= ActiveSupport::Multibyte::Chars
-end
-
-
- - + See on GitHub + + + +

@@ -140,22 +140,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/multibyte.rb, line 14
+    def self.proxy_class=(klass)
+      @proxy_class = klass
+    end
- -
-
# File activesupport/lib/active_support/multibyte.rb, line 14
-def self.proxy_class=(klass)
-  @proxy_class = klass
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Multibyte/Chars.html b/src/classes/ActiveSupport/Multibyte/Chars.html index 1476b4b4b2..eeb43bf555 100644 --- a/src/classes/ActiveSupport/Multibyte/Chars.html +++ b/src/classes/ActiveSupport/Multibyte/Chars.html @@ -204,23 +204,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/multibyte/chars.rb, line 56
+      def initialize(string)
+        @wrapped_string = string
+        @wrapped_string.force_encoding(Encoding::UTF_8) unless @wrapped_string.frozen?
+      end
- -
-
# File activesupport/lib/active_support/multibyte/chars.rb, line 56
-def initialize(string)
-  @wrapped_string = string
-  @wrapped_string.force_encoding(Encoding::UTF_8) unless @wrapped_string.frozen?
-end
-
-
- - + See on GitHub + + + + @@ -248,22 +248,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/multibyte/chars.rb, line 140
+      def compose
+        chars(Unicode.compose(@wrapped_string.codepoints.to_a).pack("U*"))
+      end
- -
-
# File activesupport/lib/active_support/multibyte/chars.rb, line 140
-def compose
-  chars(Unicode.compose(@wrapped_string.codepoints.to_a).pack("U*"))
-end
-
-
- - + See on GitHub + + + +

@@ -287,22 +287,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/multibyte/chars.rb, line 132
+      def decompose
+        chars(Unicode.decompose(:canonical, @wrapped_string.codepoints.to_a).pack("U*"))
+      end
- -
-
# File activesupport/lib/active_support/multibyte/chars.rb, line 132
-def decompose
-  chars(Unicode.decompose(:canonical, @wrapped_string.codepoints.to_a).pack("U*"))
-end
-
-
- -

+ See on GitHub + + + +

@@ -326,22 +326,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/multibyte/chars.rb, line 148
+      def grapheme_length
+        @wrapped_string.grapheme_clusters.length
+      end
- -
-
# File activesupport/lib/active_support/multibyte/chars.rb, line 148
-def grapheme_length
-  @wrapped_string.grapheme_clusters.length
-end
-
-
- -

+ See on GitHub + + + +

@@ -364,22 +364,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/multibyte/chars.rb, line 115
+      def limit(limit)
+        chars(@wrapped_string.truncate_bytes(limit, omission: nil))
+      end
- -
-
# File activesupport/lib/active_support/multibyte/chars.rb, line 115
-def limit(limit)
-  chars(@wrapped_string.truncate_bytes(limit, omission: nil))
-end
-
-
- -

+ See on GitHub + + + +

@@ -399,27 +399,27 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/multibyte/chars.rb, line 62
+      def method_missing(method, *args, &block)
+        result = @wrapped_string.__send__(method, *args, &block)
+        if method.end_with?("!")
+          self if result
+        else
+          result.kind_of?(String) ? chars(result) : result
+        end
+      end
- -
-
# File activesupport/lib/active_support/multibyte/chars.rb, line 62
-def method_missing(method, *args, &block)
-  result = @wrapped_string.__send__(method, *args, &block)
-  if method.end_with?("!")
-    self if result
-  else
-    result.kind_of?(String) ? chars(result) : result
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -439,22 +439,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/multibyte/chars.rb, line 74
+      def respond_to_missing?(method, include_private)
+        @wrapped_string.respond_to?(method, include_private)
+      end
- -
-
# File activesupport/lib/active_support/multibyte/chars.rb, line 74
-def respond_to_missing?(method, include_private)
-  @wrapped_string.respond_to?(method, include_private)
-end
-
-
- -

+ See on GitHub + + + +

@@ -477,22 +477,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/multibyte/chars.rb, line 106
+      def reverse
+        chars(@wrapped_string.grapheme_clusters.reverse.join)
+      end
- -
-
# File activesupport/lib/active_support/multibyte/chars.rb, line 106
-def reverse
-  chars(@wrapped_string.grapheme_clusters.reverse.join)
-end
-
-
- -

+ See on GitHub + + + +

@@ -519,25 +519,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/multibyte/chars.rb, line 96
+      def slice!(*args)
+        string_sliced = @wrapped_string.slice!(*args)
+        if string_sliced
+          chars(string_sliced)
+        end
+      end
- -
-
# File activesupport/lib/active_support/multibyte/chars.rb, line 96
-def slice!(*args)
-  string_sliced = @wrapped_string.slice!(*args)
-  if string_sliced
-    chars(string_sliced)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -560,22 +560,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/multibyte/chars.rb, line 83
+      def split(*args)
+        @wrapped_string.split(*args).map { |i| self.class.new(i) }
+      end
- -
-
# File activesupport/lib/active_support/multibyte/chars.rb, line 83
-def split(*args)
-  @wrapped_string.split(*args).map { |i| self.class.new(i) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -597,22 +597,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/multibyte/chars.rb, line 157
+      def tidy_bytes(force = false)
+        chars(Unicode.tidy_bytes(@wrapped_string, force))
+      end
- -
-
# File activesupport/lib/active_support/multibyte/chars.rb, line 157
-def tidy_bytes(force = false)
-  chars(Unicode.tidy_bytes(@wrapped_string, force))
-end
-
-
- -

+ See on GitHub + + + +

@@ -636,7 +636,8 @@

-

+ +

@@ -664,22 +665,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/multibyte/chars.rb, line 123
+      def titleize
+        chars(downcase.to_s.gsub(/\b('?\S)/u) { $1.upcase })
+      end
- -
-
# File activesupport/lib/active_support/multibyte/chars.rb, line 123
-def titleize
-  chars(downcase.to_s.gsub(/\b('?\S)/u) { $1.upcase })
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Multibyte/Unicode.html b/src/classes/ActiveSupport/Multibyte/Unicode.html index 29c45381ad..893bf1b089 100644 --- a/src/classes/ActiveSupport/Multibyte/Unicode.html +++ b/src/classes/ActiveSupport/Multibyte/Unicode.html @@ -101,22 +101,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/multibyte/unicode.rb, line 21
+      def compose(codepoints)
+        codepoints.pack("U*").unicode_normalize(:nfc).codepoints
+      end
- -
-
# File activesupport/lib/active_support/multibyte/unicode.rb, line 21
-def compose(codepoints)
-  codepoints.pack("U*").unicode_normalize(:nfc).codepoints
-end
-
-
- - + See on GitHub + + + +

@@ -136,26 +136,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/multibyte/unicode.rb, line 12
+      def decompose(type, codepoints)
+        if type == :compatibility
+          codepoints.pack("U*").unicode_normalize(:nfkd).codepoints
+        else
+          codepoints.pack("U*").unicode_normalize(:nfd).codepoints
+        end
+      end
- -
-
# File activesupport/lib/active_support/multibyte/unicode.rb, line 12
-def decompose(type, codepoints)
-  if type == :compatibility
-    codepoints.pack("U*").unicode_normalize(:nfkd).codepoints
-  else
-    codepoints.pack("U*").unicode_normalize(:nfd).codepoints
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -177,24 +177,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/multibyte/unicode.rb, line 30
+      def tidy_bytes(string, force = false)
+        return string if string.empty? || string.ascii_only?
+        return recode_windows1252_chars(string) if force
+        string.scrub { |bad| recode_windows1252_chars(bad) }
+      end
- -
-
# File activesupport/lib/active_support/multibyte/unicode.rb, line 30
-def tidy_bytes(string, force = false)
-  return string if string.empty? || string.ascii_only?
-  return recode_windows1252_chars(string) if force
-  string.scrub { |bad| recode_windows1252_chars(bad) }
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Multibyte/Unicode/Codepoint.html b/src/classes/ActiveSupport/Multibyte/Unicode/Codepoint.html deleted file mode 100644 index 6a88e70e94..0000000000 --- a/src/classes/ActiveSupport/Multibyte/Unicode/Codepoint.html +++ /dev/null @@ -1,211 +0,0 @@ ---- -title: ActiveSupport::Multibyte::Unicode::Codepoint -layout: default ---- -
- -
-
- -
- -

Holds data about a codepoint in the Unicode database.

- -
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- [RW] - code
- [RW] - combining_class
- [RW] - decomp_mapping
- [RW] - decomp_type
- [RW] - lowercase_mapping
- [RW] - uppercase_mapping
- - - - -

Class Public methods

- -
-

- - new() - -

- - -
-

Initializing Codepoint object with default values

-
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/multibyte/unicode.rb, line 301
-def initialize
-  @combining_class = 0
-  @uppercase_mapping = 0
-  @lowercase_mapping = 0
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - swapcase_mapping() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/multibyte/unicode.rb, line 307
-def swapcase_mapping
-  uppercase_mapping > 0 ? uppercase_mapping : lowercase_mapping
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveSupport/Multibyte/Unicode/UnicodeDatabase.html b/src/classes/ActiveSupport/Multibyte/Unicode/UnicodeDatabase.html deleted file mode 100644 index f25bacee20..0000000000 --- a/src/classes/ActiveSupport/Multibyte/Unicode/UnicodeDatabase.html +++ /dev/null @@ -1,312 +0,0 @@ ---- -title: ActiveSupport::Multibyte::Unicode::UnicodeDatabase -layout: default ---- -
- -
-
- -
- -

Holds static data from the Unicode database.

- -
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - -

Constants

- - - - - - - - - - - - - - -
ATTRIBUTES=:codepoints, :composition_exclusion, :composition_map, :boundary, :cp1252
 
- - - - - - -

Class Public methods

- -
-

- - dirname() - -

- - -
-

Returns the directory in which the data files are stored.

-
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/multibyte/unicode.rb, line 361
-def self.dirname
-  File.expand_path("../values", __dir__)
-end
-
-
- -
- -
-

- - filename() - -

- - -
-

Returns the filename for the data file for this version.

-
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/multibyte/unicode.rb, line 366
-def self.filename
-  File.expand_path File.join(dirname, "unicode_tables.dat")
-end
-
-
- -
- -
-

- - new() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/multibyte/unicode.rb, line 318
-def initialize
-  @codepoints = Hash.new(Codepoint.new)
-  @composition_exclusion = []
-  @composition_map = {}
-  @boundary = {}
-  @cp1252 = {}
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - ===(other) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/multibyte/unicode.rb, line 348
-def ===(other)
-  detect { |i| i === other } ? true : false
-end
-
-
- -
- -
-

- - load() - -

- - -
-

Loads the Unicode database and returns all the internal objects of UnicodeDatabase.

-
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/multibyte/unicode.rb, line 338
-def load
-  begin
-    @codepoints, @composition_exclusion, @composition_map, @boundary, @cp1252 = File.open(self.class.filename, "rb") { |f| Marshal.load f.read }
-  rescue => e
-    raise IOError.new("Couldn't load the Unicode tables for UTF8Handler (#{e.message}), ActiveSupport::Multibyte is unusable")
-  end
-
-  # Redefine the === method so we can write shorter rules for grapheme cluster breaks
-  @boundary.each_key do |k|
-    @boundary[k].instance_eval do
-      def ===(other)
-        detect { |i| i === other } ? true : false
-      end
-    end if @boundary[k].kind_of?(Array)
-  end
-
-  # define attr_reader methods for the instance variables
-  class << self
-    attr_reader(*ATTRIBUTES)
-  end
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveSupport/Notifications.html b/src/classes/ActiveSupport/Notifications.html index b26609aecb..7e0efe6998 100644 --- a/src/classes/ActiveSupport/Notifications.html +++ b/src/classes/ActiveSupport/Notifications.html @@ -307,26 +307,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications.rb, line 204
+      def instrument(name, payload = {})
+        if notifier.listening?(name)
+          instrumenter.instrument(name, payload) { yield payload if block_given? }
+        else
+          yield payload if block_given?
+        end
+      end
- -
-
# File activesupport/lib/active_support/notifications.rb, line 204
-def instrument(name, payload = {})
-  if notifier.listening?(name)
-    instrumenter.instrument(name, payload) { yield payload if block_given? }
-  else
-    yield payload if block_given?
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -346,22 +346,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications.rb, line 268
+      def instrumenter
+        registry[notifier] ||= Instrumenter.new(notifier)
+      end
- -
-
# File activesupport/lib/active_support/notifications.rb, line 268
-def instrumenter
-  registry[notifier] ||= Instrumenter.new(notifier)
-end
-
-
- -

+ See on GitHub + + + +

@@ -381,22 +381,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications.rb, line 253
+      def monotonic_subscribe(pattern = nil, callback = nil, &block)
+        notifier.subscribe(pattern, callback, monotonic: true, &block)
+      end
- -
-
# File activesupport/lib/active_support/notifications.rb, line 253
-def monotonic_subscribe(pattern = nil, callback = nil, &block)
-  notifier.subscribe(pattern, callback, monotonic: true, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -416,22 +416,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications.rb, line 196
+      def publish(name, *args)
+        notifier.publish(name, *args)
+      end
- -
-
# File activesupport/lib/active_support/notifications.rb, line 196
-def publish(name, *args)
-  notifier.publish(name, *args)
-end
-
-
- -

+ See on GitHub + + + +

@@ -482,22 +482,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications.rb, line 243
+      def subscribe(pattern = nil, callback = nil, &block)
+        notifier.subscribe(pattern, callback, monotonic: false, &block)
+      end
- -
-
# File activesupport/lib/active_support/notifications.rb, line 243
-def subscribe(pattern = nil, callback = nil, &block)
-  notifier.subscribe(pattern, callback, monotonic: false, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -517,25 +517,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications.rb, line 257
+      def subscribed(callback, pattern = nil, monotonic: false, &block)
+        subscriber = notifier.subscribe(pattern, callback, monotonic: monotonic)
+        yield
+      ensure
+        unsubscribe(subscriber)
+      end
- -
-
# File activesupport/lib/active_support/notifications.rb, line 257
-def subscribed(callback, pattern = nil, monotonic: false, &block)
-  subscriber = notifier.subscribe(pattern, callback, monotonic: monotonic)
-  yield
-ensure
-  unsubscribe(subscriber)
-end
-
-
- -

+ See on GitHub + + + +

@@ -555,22 +555,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications.rb, line 264
+      def unsubscribe(subscriber_or_name)
+        notifier.unsubscribe(subscriber_or_name)
+      end
- -
-
# File activesupport/lib/active_support/notifications.rb, line 264
-def unsubscribe(subscriber_or_name)
-  notifier.unsubscribe(subscriber_or_name)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Notifications/Event.html b/src/classes/ActiveSupport/Notifications/Event.html index d9337ec75e..d6fd3407f5 100644 --- a/src/classes/ActiveSupport/Notifications/Event.html +++ b/src/classes/ActiveSupport/Notifications/Event.html @@ -154,30 +154,30 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/instrumenter.rb, line 110
+      def initialize(name, start, ending, transaction_id, payload)
+        @name           = name
+        @payload        = payload.dup
+        @time           = start ? start.to_f * 1_000.0 : start
+        @transaction_id = transaction_id
+        @end            = ending ? ending.to_f * 1_000.0 : ending
+        @cpu_time_start = 0.0
+        @cpu_time_finish = 0.0
+        @allocation_count_start = 0
+        @allocation_count_finish = 0
+      end
- -
-
# File activesupport/lib/active_support/notifications/instrumenter.rb, line 110
-def initialize(name, start, ending, transaction_id, payload)
-  @name           = name
-  @payload        = payload.dup
-  @time           = start ? start.to_f * 1_000.0 : start
-  @transaction_id = transaction_id
-  @end            = ending ? ending.to_f * 1_000.0 : ending
-  @cpu_time_start = 0.0
-  @cpu_time_finish = 0.0
-  @allocation_count_start = 0
-  @allocation_count_finish = 0
-end
-
-
- - + See on GitHub + + + + @@ -201,22 +201,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/instrumenter.rb, line 164
+      def allocations
+        @allocation_count_finish - @allocation_count_start
+      end
- -
-
# File activesupport/lib/active_support/notifications/instrumenter.rb, line 164
-def allocations
-  @allocation_count_finish - @allocation_count_start
-end
-
-
- - + See on GitHub + + + +

@@ -236,22 +236,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/instrumenter.rb, line 151
+      def cpu_time
+        @cpu_time_finish - @cpu_time_start
+      end
- -
-
# File activesupport/lib/active_support/notifications/instrumenter.rb, line 151
-def cpu_time
-  @cpu_time_finish - @cpu_time_start
-end
-
-
- -

+ See on GitHub + + + +

@@ -282,22 +282,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/instrumenter.rb, line 197
+      def duration
+        self.end - time
+      end
- -
-
# File activesupport/lib/active_support/notifications/instrumenter.rb, line 197
-def duration
-  self.end - time
-end
-
-
- -

+ See on GitHub + + + +

@@ -317,24 +317,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/instrumenter.rb, line 143
+      def finish!
+        @cpu_time_finish = now_cpu
+        @end = now
+        @allocation_count_finish = now_allocations
+      end
- -
-
# File activesupport/lib/active_support/notifications/instrumenter.rb, line 143
-def finish!
-  @cpu_time_finish = now_cpu
-  @end = now
-  @allocation_count_finish = now_allocations
-end
-
-
- -

+ See on GitHub + + + +

@@ -354,23 +354,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/instrumenter.rb, line 157
+      def idle_time
+        diff = duration - cpu_time
+        diff > 0.0 ? diff : 0.0
+      end
- -
-
# File activesupport/lib/active_support/notifications/instrumenter.rb, line 157
-def idle_time
-  diff = duration - cpu_time
-  diff > 0.0 ? diff : 0.0
-end
-
-
- -

+ See on GitHub + + + +

@@ -390,31 +390,31 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/instrumenter.rb, line 122
+      def record
+        start!
+        begin
+          yield payload if block_given?
+        rescue Exception => e
+          payload[:exception] = [e.class.name, e.message]
+          payload[:exception_object] = e
+          raise e
+        ensure
+          finish!
+        end
+      end
- -
-
# File activesupport/lib/active_support/notifications/instrumenter.rb, line 122
-def record
-  start!
-  begin
-    yield payload if block_given?
-  rescue Exception => e
-    payload[:exception] = [e.class.name, e.message]
-    payload[:exception_object] = e
-    raise e
-  ensure
-    finish!
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -434,24 +434,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/instrumenter.rb, line 136
+      def start!
+        @time = now
+        @cpu_time_start = now_cpu
+        @allocation_count_start = now_allocations
+      end
- -
-
# File activesupport/lib/active_support/notifications/instrumenter.rb, line 136
-def start!
-  @time = now
-  @cpu_time_start = now_cpu
-  @allocation_count_start = now_allocations
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Notifications/Fanout.html b/src/classes/ActiveSupport/Notifications/Fanout.html index 6a0b177b39..60785f8fa6 100644 --- a/src/classes/ActiveSupport/Notifications/Fanout.html +++ b/src/classes/ActiveSupport/Notifications/Fanout.html @@ -164,27 +164,27 @@

- -
- - -
-
# File activesupport/lib/active_support/notifications/fanout.rb, line 50
-def initialize
-  @string_subscribers = Concurrent::Map.new { |h, k| h.compute_if_absent(k) { [] } }
-  @other_subscribers = []
-  @all_listeners_for = Concurrent::Map.new
-  @groups_for = Concurrent::Map.new
-  @silenceable_groups_for = Concurrent::Map.new
-  super
-end
-
-
- - + +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/fanout.rb, line 50
+      def initialize
+        @string_subscribers = Concurrent::Map.new { |h, k| h.compute_if_absent(k) { [] } }
+        @other_subscribers = []
+        @all_listeners_for = Concurrent::Map.new
+        @groups_for = Concurrent::Map.new
+        @silenceable_groups_for = Concurrent::Map.new
+        super
+      end
+ + See on GitHub + +
+ + @@ -208,27 +208,27 @@

- -
- - -
-
# File activesupport/lib/active_support/notifications/fanout.rb, line 295
-def all_listeners_for(name)
-  # this is correctly done double-checked locking (Concurrent::Map's lookups have volatile semantics)
-  @all_listeners_for[name] || synchronize do
-    # use synchronisation when accessing @subscribers
-    @all_listeners_for[name] ||=
-      @string_subscribers[name] + @other_subscribers.select { |s| s.subscribed_to?(name) }
-  end
-end
-
-
- - + +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/fanout.rb, line 295
+      def all_listeners_for(name)
+        # this is correctly done double-checked locking (Concurrent::Map's lookups have volatile semantics)
+        @all_listeners_for[name] || synchronize do
+          # use synchronisation when accessing @subscribers
+          @all_listeners_for[name] ||=
+            @string_subscribers[name] + @other_subscribers.select { |s| s.subscribed_to?(name) }
+        end
+      end
+ + See on GitHub + +
+ +

@@ -248,22 +248,22 @@

- -
- - -
-
# File activesupport/lib/active_support/notifications/fanout.rb, line 270
-def build_handle(name, id, payload)
-  Handle.new(self, name, id, payload)
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/fanout.rb, line 270
+      def build_handle(name, id, payload)
+        Handle.new(self, name, id, payload)
+      end
+ + See on GitHub + +
+ +

@@ -283,24 +283,24 @@

- -
- - -
-
# File activesupport/lib/active_support/notifications/fanout.rb, line 281
-def finish(name, id, payload, listeners = nil)
-  handle_stack = IsolatedExecutionState[:_fanout_handle_stack]
-  handle = handle_stack.pop
-  handle.finish_with_values(name, id, payload)
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/fanout.rb, line 281
+      def finish(name, id, payload, listeners = nil)
+        handle_stack = IsolatedExecutionState[:_fanout_handle_stack]
+        handle = handle_stack.pop
+        handle.finish_with_values(name, id, payload)
+      end
+ + See on GitHub + +
+ +

@@ -320,22 +320,22 @@

- -
- - -
-
# File activesupport/lib/active_support/notifications/fanout.rb, line 304
-def listeners_for(name)
-  all_listeners_for(name).reject { |s| s.silenced?(name) }
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/fanout.rb, line 304
+      def listeners_for(name)
+        all_listeners_for(name).reject { |s| s.silenced?(name) }
+      end
+ + See on GitHub + +
+ +

@@ -355,22 +355,22 @@

- -
- - -
-
# File activesupport/lib/active_support/notifications/fanout.rb, line 308
-def listening?(name)
-  all_listeners_for(name).any? { |s| !s.silenced?(name) }
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/fanout.rb, line 308
+      def listening?(name)
+        all_listeners_for(name).any? { |s| !s.silenced?(name) }
+      end
+ + See on GitHub + +
+ +

@@ -390,22 +390,22 @@

- -
- - -
-
# File activesupport/lib/active_support/notifications/fanout.rb, line 287
-def publish(name, *args)
-  iterate_guarding_exceptions(listeners_for(name)) { |s| s.publish(name, *args) }
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/fanout.rb, line 287
+      def publish(name, *args)
+        iterate_guarding_exceptions(listeners_for(name)) { |s| s.publish(name, *args) }
+      end
+ + See on GitHub + +
+ +

@@ -425,22 +425,22 @@

- -
- - -
-
# File activesupport/lib/active_support/notifications/fanout.rb, line 291
-def publish_event(event)
-  iterate_guarding_exceptions(listeners_for(event.name)) { |s| s.publish_event(event) }
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/fanout.rb, line 291
+      def publish_event(event)
+        iterate_guarding_exceptions(listeners_for(event.name)) { |s| s.publish_event(event) }
+      end
+ + See on GitHub + +
+ +

@@ -460,25 +460,25 @@

- -
- - -
-
# File activesupport/lib/active_support/notifications/fanout.rb, line 274
-def start(name, id, payload)
-  handle_stack = (IsolatedExecutionState[:_fanout_handle_stack] ||= [])
-  handle = build_handle(name, id, payload)
-  handle_stack << handle
-  handle.start
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/fanout.rb, line 274
+      def start(name, id, payload)
+        handle_stack = (IsolatedExecutionState[:_fanout_handle_stack] ||= [])
+        handle = build_handle(name, id, payload)
+        handle_stack << handle
+        handle.start
+      end
+ + See on GitHub + +
+ +

@@ -498,35 +498,35 @@

- -
- - -
-
# File activesupport/lib/active_support/notifications/fanout.rb, line 64
-def subscribe(pattern = nil, callable = nil, monotonic: false, &block)
-  subscriber = Subscribers.new(pattern, callable || block, monotonic)
-  synchronize do
-    case pattern
-    when String
-      @string_subscribers[pattern] << subscriber
-      clear_cache(pattern)
-    when NilClass, Regexp
-      @other_subscribers << subscriber
-      clear_cache
-    else
-      raise ArgumentError,  "pattern must be specified as a String, Regexp or empty"
-    end
-  end
-  subscriber
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/fanout.rb, line 64
+      def subscribe(pattern = nil, callable = nil, monotonic: false, &block)
+        subscriber = Subscribers.new(pattern, callable || block, monotonic)
+        synchronize do
+          case pattern
+          when String
+            @string_subscribers[pattern] << subscriber
+            clear_cache(pattern)
+          when NilClass, Regexp
+            @other_subscribers << subscriber
+            clear_cache
+          else
+            raise ArgumentError,  "pattern must be specified as a String, Regexp or empty"
+          end
+        end
+        subscriber
+      end
+ + See on GitHub + +
+ +

@@ -546,38 +546,38 @@

- -
- - -
-
# File activesupport/lib/active_support/notifications/fanout.rb, line 81
-def unsubscribe(subscriber_or_name)
-  synchronize do
-    case subscriber_or_name
-    when String
-      @string_subscribers[subscriber_or_name].clear
-      clear_cache(subscriber_or_name)
-      @other_subscribers.each { |sub| sub.unsubscribe!(subscriber_or_name) }
-    else
-      pattern = subscriber_or_name.try(:pattern)
-      if String === pattern
-        @string_subscribers[pattern].delete(subscriber_or_name)
-        clear_cache(pattern)
-      else
-        @other_subscribers.delete(subscriber_or_name)
-        clear_cache
-      end
-    end
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/fanout.rb, line 81
+      def unsubscribe(subscriber_or_name)
+        synchronize do
+          case subscriber_or_name
+          when String
+            @string_subscribers[subscriber_or_name].clear
+            clear_cache(subscriber_or_name)
+            @other_subscribers.each { |sub| sub.unsubscribe!(subscriber_or_name) }
+          else
+            pattern = subscriber_or_name.try(:pattern)
+            if String === pattern
+              @string_subscribers[pattern].delete(subscriber_or_name)
+              clear_cache(pattern)
+            else
+              @other_subscribers.delete(subscriber_or_name)
+              clear_cache
+            end
+          end
+        end
+      end
+ + See on GitHub + +
+ +

@@ -597,21 +597,21 @@

- -
- - -
-
# File activesupport/lib/active_support/notifications/fanout.rb, line 313
-def wait
-end
-
-
- -

+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/fanout.rb, line 313
+      def wait
+      end
+ + See on GitHub + +
+ + diff --git a/src/classes/ActiveSupport/Notifications/Fanout/Handle.html b/src/classes/ActiveSupport/Notifications/Fanout/Handle.html index eba6564d89..d41296ec32 100644 --- a/src/classes/ActiveSupport/Notifications/Fanout/Handle.html +++ b/src/classes/ActiveSupport/Notifications/Fanout/Handle.html @@ -104,22 +104,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/fanout.rb, line 247
+        def finish
+          finish_with_values(@name, @id, @payload)
+        end
- -
-
# File activesupport/lib/active_support/notifications/fanout.rb, line 247
-def finish
-  finish_with_values(@name, @id, @payload)
-end
-
-
- - + See on GitHub + + + +

@@ -139,27 +139,27 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/fanout.rb, line 238
+        def start
+          ensure_state! :initialized
+          @state = :started
+
+          @groups.each do |group|
+            group.start(@name, @id, @payload)
+          end
+        end
- -
-
# File activesupport/lib/active_support/notifications/fanout.rb, line 238
-def start
-  ensure_state! :initialized
-  @state = :started
-
-  @groups.each do |group|
-    group.start(@name, @id, @payload)
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Notifications/Fanout/Subscribers/EventObject.html b/src/classes/ActiveSupport/Notifications/Fanout/Subscribers/EventObject.html index 6394908c83..a713c03eec 100644 --- a/src/classes/ActiveSupport/Notifications/Fanout/Subscribers/EventObject.html +++ b/src/classes/ActiveSupport/Notifications/Fanout/Subscribers/EventObject.html @@ -85,22 +85,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/fanout.rb, line 432
+          def group_class
+            EventObjectGroup
+          end
- -
-
# File activesupport/lib/active_support/notifications/fanout.rb, line 432
-def group_class
-  EventObjectGroup
-end
-
-
- - + See on GitHub + + + +

@@ -120,22 +120,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/fanout.rb, line 436
+          def publish_event(event)
+            @delegate.call event
+          end
- -
-
# File activesupport/lib/active_support/notifications/fanout.rb, line 436
-def publish_event(event)
-  @delegate.call event
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Notifications/Fanout/Subscribers/Matcher/AllMessages.html b/src/classes/ActiveSupport/Notifications/Fanout/Subscribers/Matcher/AllMessages.html index c4e9ae056d..aa7be04c2c 100644 --- a/src/classes/ActiveSupport/Notifications/Fanout/Subscribers/Matcher/AllMessages.html +++ b/src/classes/ActiveSupport/Notifications/Fanout/Subscribers/Matcher/AllMessages.html @@ -85,22 +85,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/fanout.rb, line 363
+            def ===(name)
+              true
+            end
- -
-
# File activesupport/lib/active_support/notifications/fanout.rb, line 363
-def ===(name)
-  true
-end
-
-
- - + See on GitHub + + + +

@@ -120,22 +120,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/fanout.rb, line 367
+            def unsubscribe!(*)
+              false
+            end
- -
-
# File activesupport/lib/active_support/notifications/fanout.rb, line 367
-def unsubscribe!(*)
-  false
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Notifications/InstrumentationSubscriberError.html b/src/classes/ActiveSupport/Notifications/InstrumentationSubscriberError.html index 82338923c3..ed7b362645 100644 --- a/src/classes/ActiveSupport/Notifications/InstrumentationSubscriberError.html +++ b/src/classes/ActiveSupport/Notifications/InstrumentationSubscriberError.html @@ -94,24 +94,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/fanout.rb, line 13
+      def initialize(exceptions)
+        @exceptions = exceptions
+        exception_class_names = exceptions.map { |e| e.class.name }
+        super "Exception(s) occurred within instrumentation subscribers: #{exception_class_names.join(', ')}"
+      end
- -
-
# File activesupport/lib/active_support/notifications/fanout.rb, line 13
-def initialize(exceptions)
-  @exceptions = exceptions
-  exception_class_names = exceptions.map { |e| e.class.name }
-  super "Exception(s) occurred within instrumentation subscribers: #{exception_class_names.join(', ')}"
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Notifications/Instrumenter.html b/src/classes/ActiveSupport/Notifications/Instrumenter.html index f2ed7ce568..1047448e2a 100644 --- a/src/classes/ActiveSupport/Notifications/Instrumenter.html +++ b/src/classes/ActiveSupport/Notifications/Instrumenter.html @@ -120,27 +120,27 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/instrumenter.rb, line 12
+      def initialize(notifier)
+        unless notifier.respond_to?(:build_handle)
+          notifier = LegacyHandle::Wrapper.new(notifier)
+        end
+
+        @id       = unique_id
+        @notifier = notifier
+      end
- -
-
# File activesupport/lib/active_support/notifications/instrumenter.rb, line 12
-def initialize(notifier)
-  unless notifier.respond_to?(:build_handle)
-    notifier = LegacyHandle::Wrapper.new(notifier)
-  end
-
-  @id       = unique_id
-  @notifier = notifier
-end
-
-
- - + See on GitHub + + + + @@ -170,22 +170,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/instrumenter.rb, line 78
+      def build_handle(name, payload)
+        @notifier.build_handle(name, @id, payload)
+      end
- -
-
# File activesupport/lib/active_support/notifications/instrumenter.rb, line 78
-def build_handle(name, payload)
-  @notifier.build_handle(name, @id, payload)
-end
-
-
- - + See on GitHub + + + +

@@ -205,22 +205,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/instrumenter.rb, line 92
+      def finish(name, payload)
+        @notifier.finish name, @id, payload
+      end
- -
-
# File activesupport/lib/active_support/notifications/instrumenter.rb, line 92
-def finish(name, payload)
-  @notifier.finish name, @id, payload
-end
-
-
- -

+ See on GitHub + + + +

@@ -240,22 +240,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/instrumenter.rb, line 96
+      def finish_with_state(listeners_state, name, payload)
+        @notifier.finish name, @id, payload, listeners_state
+      end
- -
-
# File activesupport/lib/active_support/notifications/instrumenter.rb, line 96
-def finish_with_state(listeners_state, name, payload)
-  @notifier.finish name, @id, payload, listeners_state
-end
-
-
- -

+ See on GitHub + + + +

@@ -275,32 +275,32 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/instrumenter.rb, line 54
+      def instrument(name, payload = {})
+        handle = build_handle(name, payload)
+        handle.start
+        begin
+          yield payload if block_given?
+        rescue Exception => e
+          payload[:exception] = [e.class.name, e.message]
+          payload[:exception_object] = e
+          raise e
+        ensure
+          handle.finish
+        end
+      end
- -
-
# File activesupport/lib/active_support/notifications/instrumenter.rb, line 54
-def instrument(name, payload = {})
-  handle = build_handle(name, payload)
-  handle.start
-  begin
-    yield payload if block_given?
-  rescue Exception => e
-    payload[:exception] = [e.class.name, e.message]
-    payload[:exception_object] = e
-    raise e
-  ensure
-    handle.finish
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -320,22 +320,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/notifications/instrumenter.rb, line 87
+      def start(name, payload)
+        @notifier.start name, @id, payload
+      end
- -
-
# File activesupport/lib/active_support/notifications/instrumenter.rb, line 87
-def start(name, payload)
-  @notifier.start name, @id, payload
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/NumberHelper.html b/src/classes/ActiveSupport/NumberHelper.html index 66e69dfeb0..5bb2e78f7c 100644 --- a/src/classes/ActiveSupport/NumberHelper.html +++ b/src/classes/ActiveSupport/NumberHelper.html @@ -162,22 +162,22 @@

Examples

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/number_helper.rb, line 114
+    def number_to_currency(number, options = {})
+      NumberToCurrencyConverter.convert(number, options)
+    end
- -
-
# File activesupport/lib/active_support/number_helper.rb, line 114
-def number_to_currency(number, options = {})
-  NumberToCurrencyConverter.convert(number, options)
-end
-
-
- - + See on GitHub + + + +

@@ -225,22 +225,22 @@

Examples

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/number_helper.rb, line 189
+    def number_to_delimited(number, options = {})
+      NumberToDelimitedConverter.convert(number, options)
+    end
- -
-
# File activesupport/lib/active_support/number_helper.rb, line 189
-def number_to_delimited(number, options = {})
-  NumberToDelimitedConverter.convert(number, options)
-end
-
-
- -
+ See on GitHub + + + +

@@ -357,22 +357,22 @@

Custom Unit Quan - -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/number_helper.rb, line 392
+    def number_to_human(number, options = {})
+      NumberToHumanConverter.convert(number, options)
+    end
- -
-
# File activesupport/lib/active_support/number_helper.rb, line 392
-def number_to_human(number, options = {})
-  NumberToHumanConverter.convert(number, options)
-end
-
-
- -

+ See on GitHub + + + +

@@ -429,22 +429,22 @@

Examples

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/number_helper.rb, line 283
+    def number_to_human_size(number, options = {})
+      NumberToHumanSizeConverter.convert(number, options)
+    end
- -
-
# File activesupport/lib/active_support/number_helper.rb, line 283
-def number_to_human_size(number, options = {})
-  NumberToHumanSizeConverter.convert(number, options)
-end
-
-
- -
+ See on GitHub + + + +

@@ -497,22 +497,22 @@

Examples

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/number_helper.rb, line 154
+    def number_to_percentage(number, options = {})
+      NumberToPercentageConverter.convert(number, options)
+    end
- -
-
# File activesupport/lib/active_support/number_helper.rb, line 154
-def number_to_percentage(number, options = {})
-  NumberToPercentageConverter.convert(number, options)
-end
-
-
- -
+ See on GitHub + + + +

@@ -565,22 +565,22 @@

Examples

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/number_helper.rb, line 53
+    def number_to_phone(number, options = {})
+      NumberToPhoneConverter.convert(number, options)
+    end
- -
-
# File activesupport/lib/active_support/number_helper.rb, line 53
-def number_to_phone(number, options = {})
-  NumberToPhoneConverter.convert(number, options)
-end
-
-
- -
+ See on GitHub + + + +

@@ -638,22 +638,22 @@

Examples

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/number_helper.rb, line 236
+    def number_to_rounded(number, options = {})
+      NumberToRoundedConverter.convert(number, options)
+    end
- -
-
# File activesupport/lib/active_support/number_helper.rb, line 236
-def number_to_rounded(number, options = {})
-  NumberToRoundedConverter.convert(number, options)
-end
-
-
- -
+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/NumericWithFormat.html b/src/classes/ActiveSupport/NumericWithFormat.html index 3ff385a73d..9138fa17cc 100644 --- a/src/classes/ActiveSupport/NumericWithFormat.html +++ b/src/classes/ActiveSupport/NumericWithFormat.html @@ -83,7 +83,8 @@

- + +

@@ -210,45 +211,45 @@

Examples

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/numeric/conversions.rb, line 113
+    def to_fs(format = nil, options = nil)
+      return to_s if format.nil?
+
+      case format
+      when Integer, String
+        to_s(format)
+      when :phone
+        ActiveSupport::NumberHelper.number_to_phone(self, options || {})
+      when :currency
+        ActiveSupport::NumberHelper.number_to_currency(self, options || {})
+      when :percentage
+        ActiveSupport::NumberHelper.number_to_percentage(self, options || {})
+      when :delimited
+        ActiveSupport::NumberHelper.number_to_delimited(self, options || {})
+      when :rounded
+        ActiveSupport::NumberHelper.number_to_rounded(self, options || {})
+      when :human
+        ActiveSupport::NumberHelper.number_to_human(self, options || {})
+      when :human_size
+        ActiveSupport::NumberHelper.number_to_human_size(self, options || {})
+      when Symbol
+        to_s
+      else
+        to_s(format)
+      end
+    end
- -
-
# File activesupport/lib/active_support/core_ext/numeric/conversions.rb, line 113
-def to_fs(format = nil, options = nil)
-  return to_s if format.nil?
-
-  case format
-  when Integer, String
-    to_s(format)
-  when :phone
-    ActiveSupport::NumberHelper.number_to_phone(self, options || {})
-  when :currency
-    ActiveSupport::NumberHelper.number_to_currency(self, options || {})
-  when :percentage
-    ActiveSupport::NumberHelper.number_to_percentage(self, options || {})
-  when :delimited
-    ActiveSupport::NumberHelper.number_to_delimited(self, options || {})
-  when :rounded
-    ActiveSupport::NumberHelper.number_to_rounded(self, options || {})
-  when :human
-    ActiveSupport::NumberHelper.number_to_human(self, options || {})
-  when :human_size
-    ActiveSupport::NumberHelper.number_to_human_size(self, options || {})
-  when Symbol
-    to_s
-  else
-    to_s(format)
-  end
-end
-
-
- -
+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/OrderedHash.html b/src/classes/ActiveSupport/OrderedHash.html deleted file mode 100644 index 0fde77bc39..0000000000 --- a/src/classes/ActiveSupport/OrderedHash.html +++ /dev/null @@ -1,318 +0,0 @@ ---- -title: ActiveSupport::OrderedHash -layout: default ---- -
- -
-
- -
- -

DEPRECATED: ActiveSupport::OrderedHash implements a hash that preserves insertion order.

- -
oh = ActiveSupport::OrderedHash.new
-oh[:a] = 1
-oh[:b] = 2
-oh.keys # => [:a, :b], this order is guaranteed
-
- -

Also, maps the omap feature for YAML files (See yaml.org/type/omap.html) to support ordered items when loading from yaml.

- -

ActiveSupport::OrderedHash is namespaced to prevent conflicts with other implementations.

- -
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - - -

Instance Public methods

- -
-

- - encode_with(coder) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/ordered_hash.rb, line 29
-def encode_with(coder)
-  coder.represent_seq "!omap", map { |k, v| { k => v } }
-end
-
-
- -
- -
-

- - extractable_options?() - -

- - -
-

Returns true to make sure that this hash is extractable via Array#extract_options!

-
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/ordered_hash.rb, line 46
-def extractable_options?
-  true
-end
-
-
- -
- -
-

- - nested_under_indifferent_access() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/ordered_hash.rb, line 41
-def nested_under_indifferent_access
-  self
-end
-
-
- -
- -
-

- - reject(*args, &block) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/ordered_hash.rb, line 37
-def reject(*args, &block)
-  dup.tap { |hash| hash.reject!(*args, &block) }
-end
-
-
- -
- -
-

- - select(*args, &block) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/ordered_hash.rb, line 33
-def select(*args, &block)
-  dup.tap { |hash| hash.select!(*args, &block) }
-end
-
-
- -
- -
-

- - to_yaml_type() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/ordered_hash.rb, line 25
-def to_yaml_type
-  "!tag:yaml.org,2002:omap"
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveSupport/OrderedOptions.html b/src/classes/ActiveSupport/OrderedOptions.html index ffb68fa9b2..4935bdd103 100644 --- a/src/classes/ActiveSupport/OrderedOptions.html +++ b/src/classes/ActiveSupport/OrderedOptions.html @@ -146,22 +146,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/ordered_options.rb, line 41
+    def [](key)
+      super(key.to_sym)
+    end
- -
-
# File activesupport/lib/active_support/ordered_options.rb, line 41
-def [](key)
-  super(key.to_sym)
-end
-
-
- - + See on GitHub + + + +

@@ -181,22 +181,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/ordered_options.rb, line 37
+    def []=(key, value)
+      super(key.to_sym, value)
+    end
- -
-
# File activesupport/lib/active_support/ordered_options.rb, line 37
-def []=(key, value)
-  super(key.to_sym, value)
-end
-
-
- -

+ See on GitHub + + + +

@@ -220,7 +220,8 @@

-

+ +

@@ -240,22 +241,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/ordered_options.rb, line 45
+    def dig(*keys)
+      super(*keys.flatten.map(&:to_sym))
+    end
- -
-
# File activesupport/lib/active_support/ordered_options.rb, line 45
-def dig(*keys)
-  super(*keys.flatten.map(&:to_sym))
-end
-
-
- -

+ See on GitHub + + + +

@@ -275,22 +276,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/ordered_options.rb, line 68
+    def extractable_options?
+      true
+    end
- -
-
# File activesupport/lib/active_support/ordered_options.rb, line 68
-def extractable_options?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -310,22 +311,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/ordered_options.rb, line 72
+    def inspect
+      "#<#{self.class.name} #{super}>"
+    end
- -
-
# File activesupport/lib/active_support/ordered_options.rb, line 72
-def inspect
-  "#<#{self.class.name} #{super}>"
-end
-
-
- -

+ See on GitHub + + + +

@@ -345,33 +346,33 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/ordered_options.rb, line 49
+    def method_missing(name, *args)
+      name_string = +name.to_s
+      if name_string.chomp!("=")
+        self[name_string] = args.first
+      else
+        bangs = name_string.chomp!("!")
+
+        if bangs
+          self[name_string].presence || raise(KeyError.new(":#{name_string} is blank"))
+        else
+          self[name_string]
+        end
+      end
+    end
- -
-
# File activesupport/lib/active_support/ordered_options.rb, line 49
-def method_missing(name, *args)
-  name_string = +name.to_s
-  if name_string.chomp!("=")
-    self[name_string] = args.first
-  else
-    bangs = name_string.chomp!("!")
-
-    if bangs
-      self[name_string].presence || raise(KeyError.new(":#{name_string} is blank"))
-    else
-      self[name_string]
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -391,22 +392,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/ordered_options.rb, line 64
+    def respond_to_missing?(name, include_private)
+      true
+    end
- -
-
# File activesupport/lib/active_support/ordered_options.rb, line 64
-def respond_to_missing?(name, include_private)
-  true
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/ParameterFilter.html b/src/classes/ActiveSupport/ParameterFilter.html index f73280d674..817c26cb28 100644 --- a/src/classes/ActiveSupport/ParameterFilter.html +++ b/src/classes/ActiveSupport/ParameterFilter.html @@ -130,23 +130,23 @@

Options

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/parameter_filter.rb, line 77
+    def initialize(filters = [], mask: FILTERED)
+      @mask = mask
+      compile_filters!(filters)
+    end
- -
-
# File activesupport/lib/active_support/parameter_filter.rb, line 77
-def initialize(filters = [], mask: FILTERED)
-  @mask = mask
-  compile_filters!(filters)
-end
-
-
- - + See on GitHub + + + +

@@ -174,33 +174,33 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/parameter_filter.rb, line 55
+    def self.precompile_filters(filters)
+      filters, patterns = filters.partition { |filter| filter.is_a?(Proc) }
+
+      patterns.map! do |pattern|
+        pattern.is_a?(Regexp) ? pattern : "(?i:#{Regexp.escape pattern.to_s})"
+      end
+
+      deep_patterns = patterns.extract! { |pattern| pattern.to_s.include?("\\.") }
+
+      filters << Regexp.new(patterns.join("|")) if patterns.any?
+      filters << Regexp.new(deep_patterns.join("|")) if deep_patterns.any?
+
+      filters
+    end
- -
-
# File activesupport/lib/active_support/parameter_filter.rb, line 55
-def self.precompile_filters(filters)
-  filters, patterns = filters.partition { |filter| filter.is_a?(Proc) }
-
-  patterns.map! do |pattern|
-    pattern.is_a?(Regexp) ? pattern : "(?i:#{Regexp.escape pattern.to_s})"
-  end
-
-  deep_patterns = patterns.extract! { |pattern| pattern.to_s.include?("\\.") }
-
-  filters << Regexp.new(patterns.join("|")) if patterns.any?
-  filters << Regexp.new(deep_patterns.join("|")) if deep_patterns.any?
-
-  filters
-end
-
-
- -

+ See on GitHub + + + + @@ -224,22 +224,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/parameter_filter.rb, line 83
+    def filter(params)
+      @no_filters ? params.dup : call(params)
+    end
- -
-
# File activesupport/lib/active_support/parameter_filter.rb, line 83
-def filter(params)
-  @no_filters ? params.dup : call(params)
-end
-
-
- - + See on GitHub + + + +

@@ -259,22 +259,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/parameter_filter.rb, line 88
+    def filter_param(key, value)
+      @no_filters ? value : value_for_key(key, value)
+    end
- -
-
# File activesupport/lib/active_support/parameter_filter.rb, line 88
-def filter_param(key, value)
-  @no_filters ? value : value_for_key(key, value)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/PerThreadRegistry.html b/src/classes/ActiveSupport/PerThreadRegistry.html deleted file mode 100644 index c6a3dbceb0..0000000000 --- a/src/classes/ActiveSupport/PerThreadRegistry.html +++ /dev/null @@ -1,187 +0,0 @@ ---- -title: ActiveSupport::PerThreadRegistry -layout: default ---- -
- -
-
- -
- -

NOTE: This approach has been deprecated for end-user code in favor of thread_mattr_accessor and friends. Please use that approach instead.

- -

This module is used to encapsulate access to thread local variables.

- -

Instead of polluting the thread locals namespace:

- -
Thread.current[:connection_handler]
-
- -

you define a class that extends this module:

- -
module ActiveRecord
-  class RuntimeRegistry
-    extend ActiveSupport::PerThreadRegistry
-
-    attr_accessor :connection_handler
-  end
-end
-
- -

and invoke the declared instance accessors as class methods. So

- -
ActiveRecord::RuntimeRegistry.connection_handler = connection_handler
-
- -

sets a connection handler local to the current thread, and

- -
ActiveRecord::RuntimeRegistry.connection_handler
-
- -

returns a connection handler local to the current thread.

- -

This feature is accomplished by instantiating the class and storing the instance as a thread local keyed by the class name. In the example above a key “ActiveRecord::RuntimeRegistry” is stored in Thread.current. The class methods proxy to said thread local instance.

- -

If the class has an initializer, it must accept no arguments.

- -
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - extended(object) - -

- - -
- -
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/per_thread_registry.rb, line 42
-    def self.extended(object)
-      ActiveSupport::Deprecation.warn(<<~MSG)
-        ActiveSupport::PerThreadRegistry is deprecated and will be removed in Rails 7.1.
-        Use `Module#thread_mattr_accessor` instead.
-      MSG
-      object.instance_variable_set :@per_thread_registry_key, object.name.freeze
-    end
-
-
- -
- - - -

Instance Public methods

- -
-

- - instance() - -

- - -
- -
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/per_thread_registry.rb, line 50
-def instance
-  Thread.current[@per_thread_registry_key] ||= new
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/ActiveSupport/ProxyObject.html b/src/classes/ActiveSupport/ProxyObject.html index 0be8119b9a..a4f87d908c 100644 --- a/src/classes/ActiveSupport/ProxyObject.html +++ b/src/classes/ActiveSupport/ProxyObject.html @@ -89,22 +89,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/proxy_object.rb, line 13
+    def raise(*args)
+      ::Object.send(:raise, *args)
+    end
- -
-
# File activesupport/lib/active_support/proxy_object.rb, line 13
-def raise(*args)
-  ::Object.send(:raise, *args)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/RangeWithFormat.html b/src/classes/ActiveSupport/RangeWithFormat.html index ed9f0a3536..0f545fef7b 100644 --- a/src/classes/ActiveSupport/RangeWithFormat.html +++ b/src/classes/ActiveSupport/RangeWithFormat.html @@ -129,7 +129,8 @@

- + +

@@ -175,26 +176,26 @@

Adding your - -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/range/conversions.rb, line 51
+    def to_fs(format = :default)
+      if formatter = RANGE_FORMATS[format]
+        formatter.call(self.begin, self.end)
+      else
+        to_s
+      end
+    end
- -
-
# File activesupport/lib/active_support/core_ext/range/conversions.rb, line 51
-def to_fs(format = :default)
-  if formatter = RANGE_FORMATS[format]
-    formatter.call(self.begin, self.end)
-  else
-    to_s
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Reloader.html b/src/classes/ActiveSupport/Reloader.html index a3ffa1972a..64eb3a04da 100644 --- a/src/classes/ActiveSupport/Reloader.html +++ b/src/classes/ActiveSupport/Reloader.html @@ -134,22 +134,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/reloader.rb, line 44
+    def self.after_class_unload(*args, &block)
+      set_callback(:class_unload, :after, *args, &block)
+    end
- -
-
# File activesupport/lib/active_support/reloader.rb, line 44
-def self.after_class_unload(*args, &block)
-  set_callback(:class_unload, :after, *args, &block)
-end
-
-
- - + See on GitHub + + + +

@@ -169,22 +169,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/reloader.rb, line 39
+    def self.before_class_unload(*args, &block)
+      set_callback(:class_unload, *args, &block)
+    end
- -
-
# File activesupport/lib/active_support/reloader.rb, line 39
-def self.before_class_unload(*args, &block)
-  set_callback(:class_unload, *args, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -204,23 +204,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/reloader.rb, line 99
+    def initialize
+      super
+      @locked = false
+    end
- -
-
# File activesupport/lib/active_support/reloader.rb, line 99
-def initialize
-  super
-  @locked = false
-end
-
-
- -

+ See on GitHub + + + +

@@ -240,29 +240,29 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/reloader.rb, line 51
+    def self.reload!
+      executor.wrap do
+        new.tap do |instance|
+          instance.run!
+        ensure
+          instance.complete!
+        end
+      end
+      prepare!
+    end
- -
-
# File activesupport/lib/active_support/reloader.rb, line 51
-def self.reload!
-  executor.wrap do
-    new.tap do |instance|
-      instance.run!
-    ensure
-      instance.complete!
-    end
-  end
-  prepare!
-end
-
-
- -

+ See on GitHub + + + +

@@ -282,22 +282,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/reloader.rb, line 34
+    def self.to_prepare(*args, &block)
+      set_callback(:prepare, *args, &block)
+    end
- -
-
# File activesupport/lib/active_support/reloader.rb, line 34
-def self.to_prepare(*args, &block)
-  set_callback(:prepare, *args, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -317,31 +317,31 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/reloader.rb, line 71
+    def self.wrap(**kwargs)
+      return yield if active?
+
+      executor.wrap(**kwargs) do
+        instance = run!
+        begin
+          yield
+        ensure
+          instance.complete!
+        end
+      end
+    end
- -
-
# File activesupport/lib/active_support/reloader.rb, line 71
-def self.wrap(**kwargs)
-  return yield if active?
-
-  executor.wrap(**kwargs) do
-    instance = run!
-    begin
-      yield
-    ensure
-      instance.complete!
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + + @@ -365,25 +365,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/reloader.rb, line 114
+    def release_unload_lock!
+      if @locked
+        @locked = false
+        ActiveSupport::Dependencies.interlock.done_unloading
+      end
+    end
- -
-
# File activesupport/lib/active_support/reloader.rb, line 114
-def release_unload_lock!
-  if @locked
-    @locked = false
-    ActiveSupport::Dependencies.interlock.done_unloading
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -403,25 +403,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/reloader.rb, line 106
+    def require_unload_lock!
+      unless @locked
+        ActiveSupport::Dependencies.interlock.start_unloading
+        @locked = true
+      end
+    end
- -
-
# File activesupport/lib/active_support/reloader.rb, line 106
-def require_unload_lock!
-  unless @locked
-    ActiveSupport::Dependencies.interlock.start_unloading
-    @locked = true
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Rescuable.html b/src/classes/ActiveSupport/Rescuable.html index 34392efb1d..c7f263e8ee 100644 --- a/src/classes/ActiveSupport/Rescuable.html +++ b/src/classes/ActiveSupport/Rescuable.html @@ -96,22 +96,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/rescuable.rb, line 166
+    def rescue_with_handler(exception)
+      self.class.rescue_with_handler exception, object: self
+    end
- -
-
# File activesupport/lib/active_support/rescuable.rb, line 166
-def rescue_with_handler(exception)
-  self.class.rescue_with_handler exception, object: self
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Rescuable/ClassMethods.html b/src/classes/ActiveSupport/Rescuable/ClassMethods.html index 757dfe0843..2b3b91fce5 100644 --- a/src/classes/ActiveSupport/Rescuable/ClassMethods.html +++ b/src/classes/ActiveSupport/Rescuable/ClassMethods.html @@ -106,41 +106,41 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/rescuable.rb, line 53
+      def rescue_from(*klasses, with: nil, &block)
+        unless with
+          if block_given?
+            with = block
+          else
+            raise ArgumentError, "Need a handler. Pass the with: keyword argument or provide a block."
+          end
+        end
+
+        klasses.each do |klass|
+          key = if klass.is_a?(Module) && klass.respond_to?(:===)
+            klass.name
+          elsif klass.is_a?(String)
+            klass
+          else
+            raise ArgumentError, "#{klass.inspect} must be an Exception class or a String referencing an Exception class"
+          end
+
+          # Put the new handler at the end because the list is read in reverse.
+          self.rescue_handlers += [[key, with]]
+        end
+      end
- -
-
# File activesupport/lib/active_support/rescuable.rb, line 53
-def rescue_from(*klasses, with: nil, &block)
-  unless with
-    if block_given?
-      with = block
-    else
-      raise ArgumentError, "Need a handler. Pass the with: keyword argument or provide a block."
-    end
-  end
-
-  klasses.each do |klass|
-    key = if klass.is_a?(Module) && klass.respond_to?(:===)
-      klass.name
-    elsif klass.is_a?(String)
-      klass
-    else
-      raise ArgumentError, "#{klass.inspect} must be an Exception class or a String referencing an Exception class"
-    end
-
-    # Put the new handler at the end because the list is read in reverse.
-    self.rescue_handlers += [[key, with]]
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -171,33 +171,33 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/rescuable.rb, line 90
+      def rescue_with_handler(exception, object: self, visited_exceptions: [])
+        visited_exceptions << exception
+
+        if handler = handler_for_rescue(exception, object: object)
+          handler.call exception
+          exception
+        elsif exception
+          if visited_exceptions.include?(exception.cause)
+            nil
+          else
+            rescue_with_handler(exception.cause, object: object, visited_exceptions: visited_exceptions)
+          end
+        end
+      end
- -
-
# File activesupport/lib/active_support/rescuable.rb, line 90
-def rescue_with_handler(exception, object: self, visited_exceptions: [])
-  visited_exceptions << exception
-
-  if handler = handler_for_rescue(exception, object: object)
-    handler.call exception
-    exception
-  elsif exception
-    if visited_exceptions.include?(exception.cause)
-      nil
-    else
-      rescue_with_handler(exception.cause, object: object, visited_exceptions: visited_exceptions)
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/SafeBuffer.html b/src/classes/ActiveSupport/SafeBuffer.html index cd3a957297..e62754ce30 100644 --- a/src/classes/ActiveSupport/SafeBuffer.html +++ b/src/classes/ActiveSupport/SafeBuffer.html @@ -229,23 +229,23 @@

- -
- - -
-
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 70
-def initialize(str = "")
-  @html_safe = true
-  super
-end
-
-
- - + +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 70
+    def initialize(str = "")
+      @html_safe = true
+      super
+    end
+ + See on GitHub + +
+ + @@ -269,29 +269,29 @@

- -
- - -
-
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 130
-def %(args)
-  case args
-  when Hash
-    escaped_args = args.transform_values { |arg| explicit_html_escape_interpolated_argument(arg) }
-  else
-    escaped_args = Array(args).map { |arg| explicit_html_escape_interpolated_argument(arg) }
-  end
+          
+            
+ + Source code + - self.class.new(super(escaped_args)) -end
-
-
- - +
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 130
+    def %(args)
+      case args
+      when Hash
+        escaped_args = args.transform_values { |arg| explicit_html_escape_interpolated_argument(arg) }
+      else
+        escaped_args = Array(args).map { |arg| explicit_html_escape_interpolated_argument(arg) }
+      end
+
+      self.class.new(super(escaped_args))
+    end
+ + See on GitHub + + + +

@@ -311,25 +311,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 123
+    def *(_)
+      new_string = super
+      new_safe_buffer = new_string.is_a?(SafeBuffer) ? new_string : SafeBuffer.new(new_string)
+      new_safe_buffer.instance_variable_set(:@html_safe, @html_safe)
+      new_safe_buffer
+    end
- -
-
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 123
-def *(_)
-  new_string = super
-  new_safe_buffer = new_string.is_a?(SafeBuffer) ? new_string : SafeBuffer.new(new_string)
-  new_safe_buffer.instance_variable_set(:@html_safe, @html_safe)
-  new_safe_buffer
-end
-
-
- -

+ See on GitHub + + + +

@@ -349,22 +349,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 119
+    def +(other)
+      dup.concat(other)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 119
-def +(other)
-  dup.concat(other)
-end
-
-
- -

+ See on GitHub + + + +

@@ -388,7 +388,8 @@

-

+ +

@@ -412,30 +413,30 @@

- -
- - -
-
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 38
-def [](*args)
-  if html_safe?
-    new_string = super
+          
+            
+ + Source code + - return unless new_string +
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 38
+    def [](*args)
+      if html_safe?
+        new_string = super
 
-    string_into_safe_buffer(new_string, true)
-  else
-    to_str[*args]
-  end
-end
-
-
- -

+ return unless new_string + + string_into_safe_buffer(new_string, true) + else + to_str[*args] + end + end + + See on GitHub + + + +

@@ -455,26 +456,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 111
+    def []=(arg1, arg2, arg3 = nil)
+      if arg3
+        super(arg1, arg2, implicit_html_escape_interpolated_argument(arg3))
+      else
+        super(arg1, implicit_html_escape_interpolated_argument(arg2))
+      end
+    end
- -
-
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 111
-def []=(arg1, arg2, arg3 = nil)
-  if arg3
-    super(arg1, arg2, implicit_html_escape_interpolated_argument(arg3))
-  else
-    super(arg1, implicit_html_escape_interpolated_argument(arg2))
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -494,22 +495,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 95
+    def bytesplice(*args, value)
+      super(*args, implicit_html_escape_interpolated_argument(value))
+    end
- -
-
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 95
-def bytesplice(*args, value)
-  super(*args, implicit_html_escape_interpolated_argument(value))
-end
-
-
- -

+ See on GitHub + + + +

@@ -529,24 +530,24 @@

- -
- - -
-
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 59
-def chr
-  return super unless html_safe?
+          
+            
+ + Source code + - string_into_safe_buffer(super, true) -end
-
-
- -

+
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 59
+    def chr
+      return super unless html_safe?
+
+      string_into_safe_buffer(super, true)
+    end
+ + See on GitHub + + + +

@@ -570,25 +571,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 87
+    def concat(value)
+      unless value.nil?
+        super(implicit_html_escape_interpolated_argument(value))
+      end
+      self
+    end
- -
-
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 87
-def concat(value)
-  unless value.nil?
-    super(implicit_html_escape_interpolated_argument(value))
-  end
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -608,22 +609,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 153
+    def encode_with(coder)
+      coder.represent_object nil, to_str
+    end
- -
-
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 153
-def encode_with(coder)
-  coder.represent_object nil, to_str
-end
-
-
- -

+ See on GitHub + + + +

@@ -643,23 +644,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 75
+    def initialize_copy(other)
+      super
+      @html_safe = other.html_safe?
+    end
- -
-
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 75
-def initialize_copy(other)
-  super
-  @html_safe = other.html_safe?
-end
-
-
- -

+ See on GitHub + + + +

@@ -679,22 +680,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 99
+    def insert(index, value)
+      super(index, implicit_html_escape_interpolated_argument(value))
+    end
- -
-
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 99
-def insert(index, value)
-  super(index, implicit_html_escape_interpolated_argument(value))
-end
-
-
- -

+ See on GitHub + + + +

@@ -718,7 +719,8 @@

-

+ +

@@ -738,22 +740,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 103
+    def prepend(value)
+      super(implicit_html_escape_interpolated_argument(value))
+    end
- -
-
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 103
-def prepend(value)
-  super(implicit_html_escape_interpolated_argument(value))
-end
-
-
- -

+ See on GitHub + + + +

@@ -773,22 +775,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 107
+    def replace(value)
+      super(implicit_html_escape_interpolated_argument(value))
+    end
- -
-
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 107
-def replace(value)
-  super(implicit_html_escape_interpolated_argument(value))
-end
-
-
- -

+ See on GitHub + + + +

@@ -808,23 +810,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 65
+    def safe_concat(value)
+      raise SafeConcatError unless html_safe?
+      original_concat(value)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 65
-def safe_concat(value)
-  raise SafeConcatError unless html_safe?
-  original_concat(value)
-end
-
-
- -

+ See on GitHub + + + +

@@ -848,7 +850,8 @@

-

+ +

@@ -868,26 +871,26 @@

- -
- - -
-
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 51
-def slice!(*args)
-  new_string = super
+          
+            
+ + Source code + - return new_string if !html_safe? || new_string.nil? +
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 51
+    def slice!(*args)
+      new_string = super
 
-  string_into_safe_buffer(new_string, true)
-end
-
-
- -

+ return new_string if !html_safe? || new_string.nil? + + string_into_safe_buffer(new_string, true) + end + + See on GitHub + + + +

@@ -907,22 +910,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 149
+    def to_param
+      to_str
+    end
- -
-
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 149
-def to_param
-  to_str
-end
-
-
- -

+ See on GitHub + + + +

@@ -942,22 +945,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 145
+    def to_s
+      self
+    end
- -
-
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 145
-def to_s
-  self
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/SafeBuffer/SafeConcatError.html b/src/classes/ActiveSupport/SafeBuffer/SafeConcatError.html index c7a3c07c67..c86c95e3a1 100644 --- a/src/classes/ActiveSupport/SafeBuffer/SafeConcatError.html +++ b/src/classes/ActiveSupport/SafeBuffer/SafeConcatError.html @@ -86,22 +86,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 33
+      def initialize
+        super "Could not concatenate to the buffer because it is not HTML safe."
+      end
- -
-
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 33
-def initialize
-  super "Could not concatenate to the buffer because it is not HTML safe."
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/SecureCompareRotator.html b/src/classes/ActiveSupport/SecureCompareRotator.html index 68753e8034..dd503dea9f 100644 --- a/src/classes/ActiveSupport/SecureCompareRotator.html +++ b/src/classes/ActiveSupport/SecureCompareRotator.html @@ -151,24 +151,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/secure_compare_rotator.rb, line 37
+    def initialize(value, on_rotation: nil)
+      @value = value
+      @rotate_values = []
+      @on_rotation = on_rotation
+    end
- -
-
# File activesupport/lib/active_support/secure_compare_rotator.rb, line 37
-def initialize(value, on_rotation: nil)
-  @value = value
-  @rotate_values = []
-  @on_rotation = on_rotation
-end
-
-
- - + See on GitHub + + + + @@ -192,22 +192,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/secure_compare_rotator.rb, line 43
+    def rotate(previous_value)
+      @rotate_values << previous_value
+    end
- -
-
# File activesupport/lib/active_support/secure_compare_rotator.rb, line 43
-def rotate(previous_value)
-  @rotate_values << previous_value
-end
-
-
- - + See on GitHub + + + +

@@ -227,29 +227,29 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/secure_compare_rotator.rb, line 47
+    def secure_compare!(other_value, on_rotation: @on_rotation)
+      if secure_compare(@value, other_value)
+        true
+      elsif @rotate_values.any? { |value| secure_compare(value, other_value) }
+        on_rotation&.call
+        true
+      else
+        raise InvalidMatch
+      end
+    end
- -
-
# File activesupport/lib/active_support/secure_compare_rotator.rb, line 47
-def secure_compare!(other_value, on_rotation: @on_rotation)
-  if secure_compare(@value, other_value)
-    true
-  elsif @rotate_values.any? { |value| secure_compare(value, other_value) }
-    on_rotation&.call
-    true
-  else
-    raise InvalidMatch
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/SecurityUtils.html b/src/classes/ActiveSupport/SecurityUtils.html index 0835668894..c784dd7013 100644 --- a/src/classes/ActiveSupport/SecurityUtils.html +++ b/src/classes/ActiveSupport/SecurityUtils.html @@ -78,22 +78,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/security_utils.rb, line 11
+      def fixed_length_secure_compare(a, b)
+        OpenSSL.fixed_length_secure_compare(a, b)
+      end
- -
-
# File activesupport/lib/active_support/security_utils.rb, line 11
-def fixed_length_secure_compare(a, b)
-  OpenSSL.fixed_length_secure_compare(a, b)
-end
-
-
- - + See on GitHub + + + +

@@ -115,22 +115,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/security_utils.rb, line 33
+    def secure_compare(a, b)
+      a.bytesize == b.bytesize && fixed_length_secure_compare(a, b)
+    end
- -
-
# File activesupport/lib/active_support/security_utils.rb, line 33
-def secure_compare(a, b)
-  a.bytesize == b.bytesize && fixed_length_secure_compare(a, b)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Subscriber.html b/src/classes/ActiveSupport/Subscriber.html index 453a881a38..aa897d901c 100644 --- a/src/classes/ActiveSupport/Subscriber.html +++ b/src/classes/ActiveSupport/Subscriber.html @@ -136,32 +136,32 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/subscriber.rb, line 35
+      def attach_to(namespace, subscriber = new, notifier = ActiveSupport::Notifications, inherit_all: false)
+        @namespace  = namespace
+        @subscriber = subscriber
+        @notifier   = notifier
+        @inherit_all = inherit_all
+
+        subscribers << subscriber
+
+        # Add event subscribers for all existing methods on the class.
+        fetch_public_methods(subscriber, inherit_all).each do |event|
+          add_event_subscriber(event)
+        end
+      end
- -
-
# File activesupport/lib/active_support/subscriber.rb, line 35
-def attach_to(namespace, subscriber = new, notifier = ActiveSupport::Notifications, inherit_all: false)
-  @namespace  = namespace
-  @subscriber = subscriber
-  @notifier   = notifier
-  @inherit_all = inherit_all
-
-  subscribers << subscriber
-
-  # Add event subscribers for all existing methods on the class.
-  fetch_public_methods(subscriber, inherit_all).each do |event|
-    add_event_subscriber(event)
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -181,36 +181,36 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/subscriber.rb, line 50
+      def detach_from(namespace, notifier = ActiveSupport::Notifications)
+        @namespace  = namespace
+        @subscriber = find_attached_subscriber
+        @notifier   = notifier
+
+        return unless subscriber
+
+        subscribers.delete(subscriber)
+
+        # Remove event subscribers of all existing methods on the class.
+        fetch_public_methods(subscriber, true).each do |event|
+          remove_event_subscriber(event)
+        end
+
+        # Reset notifier so that event subscribers will not add for new methods added to the class.
+        @notifier = nil
+      end
- -
-
# File activesupport/lib/active_support/subscriber.rb, line 50
-def detach_from(namespace, notifier = ActiveSupport::Notifications)
-  @namespace  = namespace
-  @subscriber = find_attached_subscriber
-  @notifier   = notifier
-
-  return unless subscriber
-
-  subscribers.delete(subscriber)
-
-  # Remove event subscribers of all existing methods on the class.
-  fetch_public_methods(subscriber, true).each do |event|
-    remove_event_subscriber(event)
-  end
-
-  # Reset notifier so that event subscribers will not add for new methods added to the class.
-  @notifier = nil
-end
-
-
- -

+ See on GitHub + + + +

@@ -230,27 +230,27 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/subscriber.rb, line 69
+      def method_added(event)
+        # Only public methods are added as subscribers, and only if a notifier
+        # has been set up. This means that subscribers will only be set up for
+        # classes that call #attach_to.
+        if public_method_defined?(event) && notifier
+          add_event_subscriber(event)
+        end
+      end
- -
-
# File activesupport/lib/active_support/subscriber.rb, line 69
-def method_added(event)
-  # Only public methods are added as subscribers, and only if a notifier
-  # has been set up. This means that subscribers will only be set up for
-  # classes that call #attach_to.
-  if public_method_defined?(event) && notifier
-    add_event_subscriber(event)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -270,23 +270,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/subscriber.rb, line 130
+    def initialize
+      @patterns  = {}
+      super
+    end
- -
-
# File activesupport/lib/active_support/subscriber.rb, line 130
-def initialize
-  @patterns  = {}
-  super
-end
-
-
- -

+ See on GitHub + + + +

@@ -306,22 +306,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/subscriber.rb, line 78
+      def subscribers
+        @@subscribers ||= []
+      end
- -
-
# File activesupport/lib/active_support/subscriber.rb, line 78
-def subscribers
-  @@subscribers ||= []
-end
-
-
- -

+ See on GitHub + + + +

Class Private methods

@@ -344,29 +344,29 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/subscriber.rb, line 85
+        def add_event_subscriber(event) # :doc:
+          return if invalid_event?(event)
+
+          pattern = prepare_pattern(event)
+
+          # Don't add multiple subscribers (e.g. if methods are redefined).
+          return if pattern_subscribed?(pattern)
+
+          subscriber.patterns[pattern] = notifier.subscribe(pattern, subscriber)
+        end
- -
-
# File activesupport/lib/active_support/subscriber.rb, line 85
-def add_event_subscriber(event) # :doc:
-  return if invalid_event?(event)
-
-  pattern = prepare_pattern(event)
-
-  # Don't add multiple subscribers (e.g. if methods are redefined).
-  return if pattern_subscribed?(pattern)
-
-  subscriber.patterns[pattern] = notifier.subscribe(pattern, subscriber)
-end
-
-
- - + See on GitHub + + + +

@@ -386,29 +386,29 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/subscriber.rb, line 96
+        def remove_event_subscriber(event) # :doc:
+          return if invalid_event?(event)
+
+          pattern = prepare_pattern(event)
+
+          return unless pattern_subscribed?(pattern)
+
+          notifier.unsubscribe(subscriber.patterns[pattern])
+          subscriber.patterns.delete(pattern)
+        end
- -
-
# File activesupport/lib/active_support/subscriber.rb, line 96
-def remove_event_subscriber(event) # :doc:
-  return if invalid_event?(event)
-
-  pattern = prepare_pattern(event)
-
-  return unless pattern_subscribed?(pattern)
-
-  notifier.unsubscribe(subscriber.patterns[pattern])
-  subscriber.patterns.delete(pattern)
-end
-
-
- -

+ See on GitHub + + + + @@ -432,23 +432,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/subscriber.rb, line 135
+    def call(event)
+      method = event.name[0, event.name.index(".")]
+      send(method, event)
+    end
- -
-
# File activesupport/lib/active_support/subscriber.rb, line 135
-def call(event)
-  method = event.name[0, event.name.index(".")]
-  send(method, event)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/TaggedLogging.html b/src/classes/ActiveSupport/TaggedLogging.html index f9d4375177..2e7bc6bee4 100644 --- a/src/classes/ActiveSupport/TaggedLogging.html +++ b/src/classes/ActiveSupport/TaggedLogging.html @@ -108,32 +108,32 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/tagged_logging.rb, line 117
+    def self.new(logger)
+      logger = logger.clone
+
+      if logger.formatter
+        logger.formatter = logger.formatter.clone
+      else
+        # Ensure we set a default formatter so we aren't extending nil!
+        logger.formatter = ActiveSupport::Logger::SimpleFormatter.new
+      end
+
+      logger.formatter.extend Formatter
+      logger.extend(self)
+    end
- -
-
# File activesupport/lib/active_support/tagged_logging.rb, line 117
-def self.new(logger)
-  logger = logger.clone
-
-  if logger.formatter
-    logger.formatter = logger.formatter.clone
-  else
-    # Ensure we set a default formatter so we aren't extending nil!
-    logger.formatter = ActiveSupport::Logger::SimpleFormatter.new
-  end
-
-  logger.formatter.extend Formatter
-  logger.extend(self)
-end
-
-
- - + See on GitHub + + + + @@ -157,23 +157,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/tagged_logging.rb, line 144
+    def flush
+      clear_tags!
+      super if defined?(super)
+    end
- -
-
# File activesupport/lib/active_support/tagged_logging.rb, line 144
-def flush
-  clear_tags!
-  super if defined?(super)
-end
-
-
- - + See on GitHub + + + +

@@ -193,29 +193,29 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/tagged_logging.rb, line 133
+    def tagged(*tags)
+      if block_given?
+        formatter.tagged(*tags) { yield self }
+      else
+        logger = ActiveSupport::TaggedLogging.new(self)
+        logger.formatter.extend LocalTagStorage
+        logger.push_tags(*formatter.current_tags, *tags)
+        logger
+      end
+    end
- -
-
# File activesupport/lib/active_support/tagged_logging.rb, line 133
-def tagged(*tags)
-  if block_given?
-    formatter.tagged(*tags) { yield self }
-  else
-    logger = ActiveSupport::TaggedLogging.new(self)
-    logger.formatter.extend LocalTagStorage
-    logger.push_tags(*formatter.current_tags, *tags)
-    logger
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/TestCase.html b/src/classes/ActiveSupport/TestCase.html index dcfa6fbe4a..33e84b8b7e 100644 --- a/src/classes/ActiveSupport/TestCase.html +++ b/src/classes/ActiveSupport/TestCase.html @@ -230,20 +230,10 @@

- -
- - -
-
# File activesupport/lib/active_support/test_case.rb, line 121
-      
-
-
- - + + See on GitHub + +

@@ -271,20 +261,10 @@

- -
- - -
-
# File activesupport/lib/active_support/test_case.rb, line 127
-    
-
-
- -

+ + See on GitHub + +

@@ -325,25 +305,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/test_case.rb, line 80
+      def parallelize(workers: :number_of_processors, with: :processes, threshold: ActiveSupport.test_parallelization_threshold)
+        workers = Concurrent.physical_processor_count if workers == :number_of_processors
+        workers = ENV["PARALLEL_WORKERS"].to_i if ENV["PARALLEL_WORKERS"]
+
+        Minitest.parallel_executor = ActiveSupport::Testing::ParallelizeExecutor.new(size: workers, with: with, threshold: threshold)
+      end
- -
-
# File activesupport/lib/active_support/test_case.rb, line 80
-def parallelize(workers: :number_of_processors, with: :processes, threshold: ActiveSupport.test_parallelization_threshold)
-  workers = Concurrent.physical_processor_count if workers == :number_of_processors
-  workers = ENV["PARALLEL_WORKERS"].to_i if ENV["PARALLEL_WORKERS"]
-
-  Minitest.parallel_executor = ActiveSupport::Testing::ParallelizeExecutor.new(size: workers, with: with, threshold: threshold)
-end
-
-
- -

+ See on GitHub + + + +

@@ -374,22 +354,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/test_case.rb, line 100
+      def parallelize_setup(&block)
+        ActiveSupport::Testing::Parallelization.after_fork_hook(&block)
+      end
- -
-
# File activesupport/lib/active_support/test_case.rb, line 100
-def parallelize_setup(&block)
-  ActiveSupport::Testing::Parallelization.after_fork_hook(&block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -420,22 +400,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/test_case.rb, line 117
+      def parallelize_teardown(&block)
+        ActiveSupport::Testing::Parallelization.run_cleanup_hook(&block)
+      end
- -
-
# File activesupport/lib/active_support/test_case.rb, line 117
-def parallelize_teardown(&block)
-  ActiveSupport::Testing::Parallelization.run_cleanup_hook(&block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -460,22 +440,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/test_case.rb, line 43
+      def test_order
+        ActiveSupport.test_order ||= :random
+      end
- -
-
# File activesupport/lib/active_support/test_case.rb, line 43
-def test_order
-  ActiveSupport.test_order ||= :random
-end
-
-
- -

+ See on GitHub + + + +

@@ -509,22 +489,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/test_case.rb, line 33
+      def test_order=(new_order)
+        ActiveSupport.test_order = new_order
+      end
- -
-
# File activesupport/lib/active_support/test_case.rb, line 33
-def test_order=(new_order)
-  ActiveSupport.test_order = new_order
-end
-
-
- -

+ See on GitHub + + + + @@ -549,20 +529,10 @@

- -
- - -
-
# File activesupport/lib/active_support/test_case.rb, line 231
-    
-
-
- - + + See on GitHub + +

@@ -583,20 +553,10 @@

- -
- - -
-
# File activesupport/lib/active_support/test_case.rb, line 154
-    
-
-
- -

+ + See on GitHub + +

@@ -617,20 +577,10 @@

- -
- - -
-
# File activesupport/lib/active_support/test_case.rb, line 165
-    
-
-
- -

+ + See on GitHub + +

@@ -651,20 +601,10 @@

- -
- - -
-
# File activesupport/lib/active_support/test_case.rb, line 176
-    
-
-
- -

+ + See on GitHub + +

@@ -685,20 +625,10 @@

- -
- - -
-
# File activesupport/lib/active_support/test_case.rb, line 187
-    
-
-
- -

+ + See on GitHub + +

@@ -719,20 +649,10 @@

- -
- - -
-
# File activesupport/lib/active_support/test_case.rb, line 198
-    
-
-
- -

+ + See on GitHub + +

@@ -753,20 +673,10 @@

- -
- - -
-
# File activesupport/lib/active_support/test_case.rb, line 209
-    
-
-
- -

+ + See on GitHub + +

@@ -787,20 +697,10 @@

- -
- - -
-
# File activesupport/lib/active_support/test_case.rb, line 220
-    
-
-
- -

+ + See on GitHub + +

@@ -821,20 +721,10 @@

- -
- - -
-
# File activesupport/lib/active_support/test_case.rb, line 242
-    
-
-
- -

+ + See on GitHub + +

@@ -855,20 +745,10 @@

- -
- - -
-
# File activesupport/lib/active_support/test_case.rb, line 253
-    
-
-
- -

+ + See on GitHub + +

@@ -889,20 +769,10 @@

- -
- - -
-
# File activesupport/lib/active_support/test_case.rb, line 264
-    
-
-
- -

+ + See on GitHub + +

@@ -923,20 +793,10 @@

- -
- - -
-
# File activesupport/lib/active_support/test_case.rb, line 275
-    
-
-
- -

+ + See on GitHub + +

@@ -957,20 +817,10 @@

- -
- - -
-
# File activesupport/lib/active_support/test_case.rb, line 286
-    
-
-
- -

+ + See on GitHub + + diff --git a/src/classes/ActiveSupport/Testing/Assertions.html b/src/classes/ActiveSupport/Testing/Assertions.html index 1416b6ce7c..d75ae02192 100644 --- a/src/classes/ActiveSupport/Testing/Assertions.html +++ b/src/classes/ActiveSupport/Testing/Assertions.html @@ -136,46 +136,46 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/assertions.rb, line 191
+      def assert_changes(expression, message = nil, from: UNTRACKED, to: UNTRACKED, &block)
+        exp = expression.respond_to?(:call) ? expression : -> { eval(expression.to_s, block.binding) }
+
+        before = exp.call
+        retval = _assert_nothing_raised_or_warn("assert_changes", &block)
+
+        unless from == UNTRACKED
+          error = "Expected change from #{from.inspect}, got #{before}"
+          error = "#{message}.\n#{error}" if message
+          assert from === before, error
+        end
+
+        after = exp.call
+
+        error = "#{expression.inspect} didn't change"
+        error = "#{error}. It was already #{to}" if before == to
+        error = "#{message}.\n#{error}" if message
+        refute_equal before, after, error
+
+        unless to == UNTRACKED
+          error = "Expected change to #{to}, got #{after}\n"
+          error = "#{message}.\n#{error}" if message
+          assert to === after, error
+        end
+
+        retval
+      end
- -
-
# File activesupport/lib/active_support/testing/assertions.rb, line 191
-def assert_changes(expression, message = nil, from: UNTRACKED, to: UNTRACKED, &block)
-  exp = expression.respond_to?(:call) ? expression : -> { eval(expression.to_s, block.binding) }
-
-  before = exp.call
-  retval = _assert_nothing_raised_or_warn("assert_changes", &block)
-
-  unless from == UNTRACKED
-    error = "Expected change from #{from.inspect}, got #{before}"
-    error = "#{message}.\n#{error}" if message
-    assert from === before, error
-  end
-
-  after = exp.call
-
-  error = "#{expression.inspect} didn't change"
-  error = "#{error}. It was already #{to}" if before == to
-  error = "#{message}.\n#{error}" if message
-  refute_equal before, after, error
-
-  unless to == UNTRACKED
-    error = "Expected change to #{to}, got #{after}\n"
-    error = "#{message}.\n#{error}" if message
-    assert to === after, error
-  end
-
-  retval
-end
-
-
- - + See on GitHub + + + +

@@ -246,46 +246,46 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/assertions.rb, line 101
+      def assert_difference(expression, *args, &block)
+        expressions =
+          if expression.is_a?(Hash)
+            message = args[0]
+            expression
+          else
+            difference = args[0] || 1
+            message = args[1]
+            Array(expression).index_with(difference)
+          end
+
+        exps = expressions.keys.map { |e|
+          e.respond_to?(:call) ? e : lambda { eval(e, block.binding) }
+        }
+        before = exps.map(&:call)
+
+        retval = _assert_nothing_raised_or_warn("assert_difference", &block)
+
+        expressions.zip(exps, before) do |(code, diff), exp, before_value|
+          actual = exp.call
+          error  = "#{code.inspect} didn't change by #{diff}, but by #{actual - before_value}"
+          error  = "#{message}.\n#{error}" if message
+          assert_equal(before_value + diff, actual, error)
+        end
+
+        retval
+      end
- -
-
# File activesupport/lib/active_support/testing/assertions.rb, line 101
-def assert_difference(expression, *args, &block)
-  expressions =
-    if expression.is_a?(Hash)
-      message = args[0]
-      expression
-    else
-      difference = args[0] || 1
-      message = args[1]
-      Array(expression).index_with(difference)
-    end
-
-  exps = expressions.keys.map { |e|
-    e.respond_to?(:call) ? e : lambda { eval(e, block.binding) }
-  }
-  before = exps.map(&:call)
-
-  retval = _assert_nothing_raised_or_warn("assert_difference", &block)
-
-  expressions.zip(exps, before) do |(code, diff), exp, before_value|
-    actual = exp.call
-    error  = "#{code.inspect} didn't change by #{diff}, but by #{actual - before_value}"
-    error  = "#{message}.\n#{error}" if message
-    assert_equal(before_value + diff, actual, error)
-  end
-
-  retval
-end
-
-
- -

+ See on GitHub + + + +

@@ -324,44 +324,44 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/assertions.rb, line 238
+      def assert_no_changes(expression, message = nil, from: UNTRACKED, &block)
+        exp = expression.respond_to?(:call) ? expression : -> { eval(expression.to_s, block.binding) }
+
+        before = exp.call
+        retval = _assert_nothing_raised_or_warn("assert_no_changes", &block)
+
+        unless from == UNTRACKED
+          error = "Expected initial value of #{from.inspect}"
+          error = "#{message}.\n#{error}" if message
+          assert from === before, error
+        end
+
+        after = exp.call
+
+        error = "#{expression.inspect} changed"
+        error = "#{message}.\n#{error}" if message
+
+        if before.nil?
+          assert_nil after, error
+        else
+          assert_equal before, after, error
+        end
+
+        retval
+      end
- -
-
# File activesupport/lib/active_support/testing/assertions.rb, line 238
-def assert_no_changes(expression, message = nil, from: UNTRACKED, &block)
-  exp = expression.respond_to?(:call) ? expression : -> { eval(expression.to_s, block.binding) }
-
-  before = exp.call
-  retval = _assert_nothing_raised_or_warn("assert_no_changes", &block)
-
-  unless from == UNTRACKED
-    error = "Expected initial value of #{from.inspect}"
-    error = "#{message}.\n#{error}" if message
-    assert from === before, error
-  end
-
-  after = exp.call
-
-  error = "#{expression.inspect} changed"
-  error = "#{message}.\n#{error}" if message
-
-  if before.nil?
-    assert_nil after, error
-  else
-    assert_equal before, after, error
-  end
-
-  retval
-end
-
-
- -

+ See on GitHub + + + +

@@ -407,22 +407,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/assertions.rb, line 153
+      def assert_no_difference(expression, message = nil, &block)
+        assert_difference expression, 0, message, &block
+      end
- -
-
# File activesupport/lib/active_support/testing/assertions.rb, line 153
-def assert_no_difference(expression, message = nil, &block)
-  assert_difference expression, 0, message, &block
-end
-
-
- -

+ See on GitHub + + + +

@@ -452,23 +452,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/assertions.rb, line 21
+      def assert_not(object, message = nil)
+        message ||= "Expected #{mu_pp(object)} to be nil or false"
+        assert !object, message
+      end
- -
-
# File activesupport/lib/active_support/testing/assertions.rb, line 21
-def assert_not(object, message = nil)
-  message ||= "Expected #{mu_pp(object)} to be nil or false"
-  assert !object, message
-end
-
-
- -

+ See on GitHub + + + +

@@ -495,24 +495,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/assertions.rb, line 48
+      def assert_nothing_raised
+        yield.tap { assert(true) }
+      rescue => error
+        raise Minitest::UnexpectedError.new(error)
+      end
- -
-
# File activesupport/lib/active_support/testing/assertions.rb, line 48
-def assert_nothing_raised
-  yield.tap { assert(true) }
-rescue => error
-  raise Minitest::UnexpectedError.new(error)
-end
-
-
- -

+ See on GitHub + + + +

@@ -536,7 +536,8 @@

-

+ +

@@ -565,24 +566,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/assertions.rb, line 34
+      def assert_raises(*exp, match: nil, &block)
+        error = super(*exp, &block)
+        assert_match(match, error.message) if match
+        error
+      end
- -
-
# File activesupport/lib/active_support/testing/assertions.rb, line 34
-def assert_raises(*exp, match: nil, &block)
-  error = super(*exp, &block)
-  assert_match(match, error.message) if match
-  error
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Testing/ConstantStubbing.html b/src/classes/ActiveSupport/Testing/ConstantStubbing.html index c4b5993c1e..6686fa57e9 100644 --- a/src/classes/ActiveSupport/Testing/ConstantStubbing.html +++ b/src/classes/ActiveSupport/Testing/ConstantStubbing.html @@ -87,28 +87,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/constant_stubbing.rb, line 21
+      def stub_const(mod, constant, new_value)
+        old_value = mod.const_get(constant, false)
+        mod.send(:remove_const, constant)
+        mod.const_set(constant, new_value)
+        yield
+      ensure
+        mod.send(:remove_const, constant)
+        mod.const_set(constant, old_value)
+      end
- -
-
# File activesupport/lib/active_support/testing/constant_stubbing.rb, line 21
-def stub_const(mod, constant, new_value)
-  old_value = mod.const_get(constant, false)
-  mod.send(:remove_const, constant)
-  mod.const_set(constant, new_value)
-  yield
-ensure
-  mod.send(:remove_const, constant)
-  mod.const_set(constant, old_value)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Testing/Declarative.html b/src/classes/ActiveSupport/Testing/Declarative.html index b79fc9a32e..ef44fed291 100644 --- a/src/classes/ActiveSupport/Testing/Declarative.html +++ b/src/classes/ActiveSupport/Testing/Declarative.html @@ -80,31 +80,31 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/declarative.rb, line 13
+        def test(name, &block)
+          test_name = "test_#{name.gsub(/\s+/, '_')}".to_sym
+          defined = method_defined? test_name
+          raise "#{test_name} is already defined in #{self}" if defined
+          if block_given?
+            define_method(test_name, &block)
+          else
+            define_method(test_name) do
+              flunk "No implementation provided for #{name}"
+            end
+          end
+        end
- -
-
# File activesupport/lib/active_support/testing/declarative.rb, line 13
-def test(name, &block)
-  test_name = "test_#{name.gsub(/\s+/, '_')}".to_sym
-  defined = method_defined? test_name
-  raise "#{test_name} is already defined in #{self}" if defined
-  if block_given?
-    define_method(test_name, &block)
-  else
-    define_method(test_name) do
-      flunk "No implementation provided for #{name}"
-    end
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Testing/Deprecation.html b/src/classes/ActiveSupport/Testing/Deprecation.html index 48f5818c06..c8fbcd629d 100644 --- a/src/classes/ActiveSupport/Testing/Deprecation.html +++ b/src/classes/ActiveSupport/Testing/Deprecation.html @@ -103,33 +103,33 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/deprecation.rb, line 30
+      def assert_deprecated(match = nil, deprecator = nil, &block)
+        match, deprecator = nil, match if match.is_a?(ActiveSupport::Deprecation)
+        unless deprecator
+          ActiveSupport.deprecator.warn("assert_deprecated without a deprecator is deprecated")
+          deprecator = ActiveSupport::Deprecation._instance
+        end
+        result, warnings = collect_deprecations(deprecator, &block)
+        assert !warnings.empty?, "Expected a deprecation warning within the block but received none"
+        if match
+          match = Regexp.new(Regexp.escape(match)) unless match.is_a?(Regexp)
+          assert warnings.any? { |w| match.match?(w) }, "No deprecation warning matched #{match}: #{warnings.join(', ')}"
+        end
+        result
+      end
- -
-
# File activesupport/lib/active_support/testing/deprecation.rb, line 30
-def assert_deprecated(match = nil, deprecator = nil, &block)
-  match, deprecator = nil, match if match.is_a?(ActiveSupport::Deprecation)
-  unless deprecator
-    ActiveSupport.deprecator.warn("assert_deprecated without a deprecator is deprecated")
-    deprecator = ActiveSupport::Deprecation._instance
-  end
-  result, warnings = collect_deprecations(deprecator, &block)
-  assert !warnings.empty?, "Expected a deprecation warning within the block but received none"
-  if match
-    match = Regexp.new(Regexp.escape(match)) unless match.is_a?(Regexp)
-    assert warnings.any? { |w| match.match?(w) }, "No deprecation warning matched #{match}: #{warnings.join(', ')}"
-  end
-  result
-end
-
-
- - + See on GitHub + + + +

@@ -158,28 +158,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/deprecation.rb, line 54
+      def assert_not_deprecated(deprecator = nil, &block)
+        unless deprecator
+          ActiveSupport.deprecator.warn("assert_not_deprecated without a deprecator is deprecated")
+          deprecator = ActiveSupport::Deprecation._instance
+        end
+        result, deprecations = collect_deprecations(deprecator, &block)
+        assert deprecations.empty?, "Expected no deprecation warning within the block but received #{deprecations.size}: \n  #{deprecations * "\n  "}"
+        result
+      end
- -
-
# File activesupport/lib/active_support/testing/deprecation.rb, line 54
-def assert_not_deprecated(deprecator = nil, &block)
-  unless deprecator
-    ActiveSupport.deprecator.warn("assert_not_deprecated without a deprecator is deprecated")
-    deprecator = ActiveSupport::Deprecation._instance
-  end
-  result, deprecations = collect_deprecations(deprecator, &block)
-  assert deprecations.empty?, "Expected no deprecation warning within the block but received #{deprecations.size}: \n  #{deprecations * "\n  "}"
-  result
-end
-
-
- -

+ See on GitHub + + + +

@@ -206,34 +206,34 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/deprecation.rb, line 72
+      def collect_deprecations(deprecator = nil)
+        unless deprecator
+          ActiveSupport.deprecator.warn("collect_deprecations without a deprecator is deprecated")
+          deprecator = ActiveSupport::Deprecation._instance
+        end
+        old_behavior = deprecator.behavior
+        deprecations = []
+        deprecator.behavior = Proc.new do |message, callstack|
+          deprecations << message
+        end
+        result = yield
+        [result, deprecations]
+      ensure
+        deprecator.behavior = old_behavior
+      end
- -
-
# File activesupport/lib/active_support/testing/deprecation.rb, line 72
-def collect_deprecations(deprecator = nil)
-  unless deprecator
-    ActiveSupport.deprecator.warn("collect_deprecations without a deprecator is deprecated")
-    deprecator = ActiveSupport::Deprecation._instance
-  end
-  old_behavior = deprecator.behavior
-  deprecations = []
-  deprecator.behavior = Proc.new do |message, callstack|
-    deprecations << message
-  end
-  result = yield
-  [result, deprecations]
-ensure
-  deprecator.behavior = old_behavior
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Testing/ErrorReporterAssertions.html b/src/classes/ActiveSupport/Testing/ErrorReporterAssertions.html index 564995d252..c0c8b80c4e 100644 --- a/src/classes/ActiveSupport/Testing/ErrorReporterAssertions.html +++ b/src/classes/ActiveSupport/Testing/ErrorReporterAssertions.html @@ -110,36 +110,36 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/error_reporter_assertions.rb, line 88
+      def assert_error_reported(error_class = StandardError, &block)
+        reports = ErrorCollector.record do
+          _assert_nothing_raised_or_warn("assert_error_reported", &block)
+        end
+
+        if reports.empty?
+          assert(false, "Expected a #{error_class.name} to be reported, but there were no errors reported.")
+        elsif (report = reports.find { |r| error_class === r.error })
+          self.assertions += 1
+          report
+        else
+          message = "Expected a #{error_class.name} to be reported, but none of the " \
+            "#{reports.size} reported errors matched:  \n" \
+            "#{reports.map { |r| r.error.class.name }.join("\n  ")}"
+          assert(false, message)
+        end
+      end
- -
-
# File activesupport/lib/active_support/testing/error_reporter_assertions.rb, line 88
-def assert_error_reported(error_class = StandardError, &block)
-  reports = ErrorCollector.record do
-    _assert_nothing_raised_or_warn("assert_error_reported", &block)
-  end
-
-  if reports.empty?
-    assert(false, "Expected a #{error_class.name} to be reported, but there were no errors reported.")
-  elsif (report = reports.find { |r| error_class === r.error })
-    self.assertions += 1
-    report
-  else
-    message = "Expected a #{error_class.name} to be reported, but none of the " \
-      "#{reports.size} reported errors matched:  \n" \
-      "#{reports.map { |r| r.error.class.name }.join("\n  ")}"
-    assert(false, message)
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -166,25 +166,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/error_reporter_assertions.rb, line 62
+      def assert_no_error_reported(&block)
+        reports = ErrorCollector.record do
+          _assert_nothing_raised_or_warn("assert_no_error_reported", &block)
+        end
+        assert_predicate(reports, :empty?)
+      end
- -
-
# File activesupport/lib/active_support/testing/error_reporter_assertions.rb, line 62
-def assert_no_error_reported(&block)
-  reports = ErrorCollector.record do
-    _assert_nothing_raised_or_warn("assert_no_error_reported", &block)
-  end
-  assert_predicate(reports, :empty?)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Testing/FileFixtures.html b/src/classes/ActiveSupport/Testing/FileFixtures.html index 0b277f2401..6f3e134398 100644 --- a/src/classes/ActiveSupport/Testing/FileFixtures.html +++ b/src/classes/ActiveSupport/Testing/FileFixtures.html @@ -89,29 +89,29 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/file_fixtures.rb, line 26
+      def file_fixture(fixture_name)
+        path = Pathname.new(File.join(file_fixture_path, fixture_name))
+
+        if path.exist?
+          path
+        else
+          msg = "the directory '%s' does not contain a file named '%s'"
+          raise ArgumentError, msg % [file_fixture_path, fixture_name]
+        end
+      end
- -
-
# File activesupport/lib/active_support/testing/file_fixtures.rb, line 26
-def file_fixture(fixture_name)
-  path = Pathname.new(File.join(file_fixture_path, fixture_name))
-
-  if path.exist?
-    path
-  else
-    msg = "the directory '%s' does not contain a file named '%s'"
-    raise ArgumentError, msg % [file_fixture_path, fixture_name]
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Testing/Isolation.html b/src/classes/ActiveSupport/Testing/Isolation.html index 573d948eb0..f2cacfc3e7 100644 --- a/src/classes/ActiveSupport/Testing/Isolation.html +++ b/src/classes/ActiveSupport/Testing/Isolation.html @@ -93,22 +93,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/isolation.rb, line 14
+      def self.forking_env?
+        !ENV["NO_FORK"] && Process.respond_to?(:fork)
+      end
- -
-
# File activesupport/lib/active_support/testing/isolation.rb, line 14
-def self.forking_env?
-  !ENV["NO_FORK"] && Process.respond_to?(:fork)
-end
-
-
- - + See on GitHub + + + + @@ -132,26 +132,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/isolation.rb, line 18
+      def run
+        serialized = run_in_isolation do
+          super
+        end
+
+        Marshal.load(serialized)
+      end
- -
-
# File activesupport/lib/active_support/testing/isolation.rb, line 18
-def run
-  serialized = run_in_isolation do
-    super
-  end
-
-  Marshal.load(serialized)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Testing/Isolation/Forking.html b/src/classes/ActiveSupport/Testing/Isolation/Forking.html index 1c17e3a23c..ef6a13c797 100644 --- a/src/classes/ActiveSupport/Testing/Isolation/Forking.html +++ b/src/classes/ActiveSupport/Testing/Isolation/Forking.html @@ -75,54 +75,54 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/isolation.rb, line 27
+        def run_in_isolation(&blk)
+          IO.pipe do |read, write|
+            read.binmode
+            write.binmode
+
+            pid = fork do
+              read.close
+              yield
+              begin
+                if error?
+                  failures.map! { |e|
+                    begin
+                      Marshal.dump e
+                      e
+                    rescue TypeError
+                      ex = Exception.new e.message
+                      ex.set_backtrace e.backtrace
+                      Minitest::UnexpectedError.new ex
+                    end
+                  }
+                end
+                test_result = defined?(Minitest::Result) ? Minitest::Result.from(self) : dup
+                result = Marshal.dump(test_result)
+              end
+
+              write.puts [result].pack("m")
+              exit!
+            end
+
+            write.close
+            result = read.read
+            Process.wait2(pid)
+            result.unpack1("m")
+          end
+        end
- -
-
# File activesupport/lib/active_support/testing/isolation.rb, line 27
-def run_in_isolation(&blk)
-  IO.pipe do |read, write|
-    read.binmode
-    write.binmode
-
-    pid = fork do
-      read.close
-      yield
-      begin
-        if error?
-          failures.map! { |e|
-            begin
-              Marshal.dump e
-              e
-            rescue TypeError
-              ex = Exception.new e.message
-              ex.set_backtrace e.backtrace
-              Minitest::UnexpectedError.new ex
-            end
-          }
-        end
-        test_result = defined?(Minitest::Result) ? Minitest::Result.from(self) : dup
-        result = Marshal.dump(test_result)
-      end
-
-      write.puts [result].pack("m")
-      exit!
-    end
-
-    write.close
-    result = read.read
-    Process.wait2(pid)
-    result.unpack1("m")
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Testing/Isolation/Subprocess.html b/src/classes/ActiveSupport/Testing/Isolation/Subprocess.html index dcc79f2947..bcb21da4f8 100644 --- a/src/classes/ActiveSupport/Testing/Isolation/Subprocess.html +++ b/src/classes/ActiveSupport/Testing/Isolation/Subprocess.html @@ -93,56 +93,56 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/isolation.rb, line 69
+        def run_in_isolation(&blk)
+          require "tempfile"
+
+          if ENV["ISOLATION_TEST"]
+            yield
+            test_result = defined?(Minitest::Result) ? Minitest::Result.from(self) : dup
+            File.open(ENV["ISOLATION_OUTPUT"], "w") do |file|
+              file.puts [Marshal.dump(test_result)].pack("m")
+            end
+            exit!
+          else
+            Tempfile.open("isolation") do |tmpfile|
+              env = {
+                "ISOLATION_TEST" => self.class.name,
+                "ISOLATION_OUTPUT" => tmpfile.path
+              }
+
+              test_opts = "-n#{self.class.name}##{name}"
+
+              load_path_args = []
+              $-I.each do |p|
+                load_path_args << "-I"
+                load_path_args << File.expand_path(p)
+              end
+
+              child = IO.popen([env, Gem.ruby, *load_path_args, $0, *ORIG_ARGV, test_opts])
+
+              begin
+                Process.wait(child.pid)
+              rescue Errno::ECHILD # The child process may exit before we wait
+                nil
+              end
+
+              return tmpfile.read.unpack1("m")
+            end
+          end
+        end
- -
-
# File activesupport/lib/active_support/testing/isolation.rb, line 69
-def run_in_isolation(&blk)
-  require "tempfile"
-
-  if ENV["ISOLATION_TEST"]
-    yield
-    test_result = defined?(Minitest::Result) ? Minitest::Result.from(self) : dup
-    File.open(ENV["ISOLATION_OUTPUT"], "w") do |file|
-      file.puts [Marshal.dump(test_result)].pack("m")
-    end
-    exit!
-  else
-    Tempfile.open("isolation") do |tmpfile|
-      env = {
-        "ISOLATION_TEST" => self.class.name,
-        "ISOLATION_OUTPUT" => tmpfile.path
-      }
-
-      test_opts = "-n#{self.class.name}##{name}"
-
-      load_path_args = []
-      $-I.each do |p|
-        load_path_args << "-I"
-        load_path_args << File.expand_path(p)
-      end
-
-      child = IO.popen([env, Gem.ruby, *load_path_args, $0, *ORIG_ARGV, test_opts])
-
-      begin
-        Process.wait(child.pid)
-      rescue Errno::ECHILD # The child process may exit before we wait
-        nil
-      end
-
-      return tmpfile.read.unpack1("m")
-    end
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Testing/Parallelization/Server.html b/src/classes/ActiveSupport/Testing/Parallelization/Server.html index d86424c79a..38673e441b 100644 --- a/src/classes/ActiveSupport/Testing/Parallelization/Server.html +++ b/src/classes/ActiveSupport/Testing/Parallelization/Server.html @@ -124,24 +124,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/parallelization/server.rb, line 12
+        def initialize
+          @queue = Queue.new
+          @active_workers = Concurrent::Map.new
+          @in_flight = Concurrent::Map.new
+        end
- -
-
# File activesupport/lib/active_support/testing/parallelization/server.rb, line 12
-def initialize
-  @queue = Queue.new
-  @active_workers = Concurrent::Map.new
-  @in_flight = Concurrent::Map.new
-end
-
-
- - + See on GitHub + + + + @@ -165,23 +165,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/parallelization/server.rb, line 28
+        def <<(o)
+          o[2] = DRbObject.new(o[2]) if o
+          @queue << o
+        end
- -
-
# File activesupport/lib/active_support/testing/parallelization/server.rb, line 28
-def <<(o)
-  o[2] = DRbObject.new(o[2]) if o
-  @queue << o
-end
-
-
- - + See on GitHub + + + +

@@ -201,22 +201,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/parallelization/server.rb, line 48
+        def active_workers?
+          @active_workers.size > 0
+        end
- -
-
# File activesupport/lib/active_support/testing/parallelization/server.rb, line 48
-def active_workers?
-  @active_workers.size > 0
-end
-
-
- -

+ See on GitHub + + + +

@@ -236,22 +236,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/parallelization/server.rb, line 52
+        def interrupt
+          @queue.clear
+        end
- -
-
# File activesupport/lib/active_support/testing/parallelization/server.rb, line 52
-def interrupt
-  @queue.clear
-end
-
-
- -

+ See on GitHub + + + +

@@ -271,25 +271,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/parallelization/server.rb, line 33
+        def pop
+          if test = @queue.pop
+            @in_flight[[test[0].to_s, test[1]]] = test
+            test
+          end
+        end
- -
-
# File activesupport/lib/active_support/testing/parallelization/server.rb, line 33
-def pop
-  if test = @queue.pop
-    @in_flight[[test[0].to_s, test[1]]] = test
-    test
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -309,28 +309,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/parallelization/server.rb, line 18
+        def record(reporter, result)
+          raise DRb::DRbConnError if result.is_a?(DRb::DRbUnknown)
+
+          @in_flight.delete([result.klass, result.name])
+
+          reporter.synchronize do
+            reporter.record(result)
+          end
+        end
- -
-
# File activesupport/lib/active_support/testing/parallelization/server.rb, line 18
-def record(reporter, result)
-  raise DRb::DRbConnError if result.is_a?(DRb::DRbUnknown)
-
-  @in_flight.delete([result.klass, result.name])
-
-  reporter.synchronize do
-    reporter.record(result)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -350,42 +350,42 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/parallelization/server.rb, line 56
+        def shutdown
+          # Wait for initial queue to drain
+          while @queue.length != 0
+            sleep 0.1
+          end
+
+          @queue.close
+
+          # Wait until all workers have finished
+          while active_workers?
+            sleep 0.1
+          end
+
+          @in_flight.values.each do |(klass, name, reporter)|
+            result = Minitest::Result.from(klass.new(name))
+            error = RuntimeError.new("result not reported")
+            error.set_backtrace([""])
+            result.failures << Minitest::UnexpectedError.new(error)
+            reporter.synchronize do
+              reporter.record(result)
+            end
+          end
+        end
- -
-
# File activesupport/lib/active_support/testing/parallelization/server.rb, line 56
-def shutdown
-  # Wait for initial queue to drain
-  while @queue.length != 0
-    sleep 0.1
-  end
-
-  @queue.close
-
-  # Wait until all workers have finished
-  while active_workers?
-    sleep 0.1
-  end
-
-  @in_flight.values.each do |(klass, name, reporter)|
-    result = Minitest::Result.from(klass.new(name))
-    error = RuntimeError.new("result not reported")
-    error.set_backtrace([""])
-    result.failures << Minitest::UnexpectedError.new(error)
-    reporter.synchronize do
-      reporter.record(result)
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -405,22 +405,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/parallelization/server.rb, line 40
+        def start_worker(worker_id)
+          @active_workers[worker_id] = true
+        end
- -
-
# File activesupport/lib/active_support/testing/parallelization/server.rb, line 40
-def start_worker(worker_id)
-  @active_workers[worker_id] = true
-end
-
-
- -

+ See on GitHub + + + +

@@ -440,22 +440,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/parallelization/server.rb, line 44
+        def stop_worker(worker_id)
+          @active_workers.delete(worker_id)
+        end
- -
-
# File activesupport/lib/active_support/testing/parallelization/server.rb, line 44
-def stop_worker(worker_id)
-  @active_workers.delete(worker_id)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Testing/Parallelization/Worker.html b/src/classes/ActiveSupport/Testing/Parallelization/Worker.html index 961d1afd42..9e850e0322 100644 --- a/src/classes/ActiveSupport/Testing/Parallelization/Worker.html +++ b/src/classes/ActiveSupport/Testing/Parallelization/Worker.html @@ -104,25 +104,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/parallelization/worker.rb, line 7
+        def initialize(number, url)
+          @id = SecureRandom.uuid
+          @number = number
+          @url = url
+          @setup_exception = nil
+        end
- -
-
# File activesupport/lib/active_support/testing/parallelization/worker.rb, line 7
-def initialize(number, url)
-  @id = SecureRandom.uuid
-  @number = number
-  @url = url
-  @setup_exception = nil
-end
-
-
- - + See on GitHub + + + + @@ -146,24 +146,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/parallelization/worker.rb, line 80
+        def after_fork
+          Parallelization.after_fork_hooks.each do |cb|
+            cb.call(@number)
+          end
+        end
- -
-
# File activesupport/lib/active_support/testing/parallelization/worker.rb, line 80
-def after_fork
-  Parallelization.after_fork_hooks.each do |cb|
-    cb.call(@number)
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -183,32 +183,32 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/parallelization/worker.rb, line 42
+        def perform_job(job)
+          klass    = job[0]
+          method   = job[1]
+          reporter = job[2]
+
+          set_process_title("#{klass}##{method}")
+
+          result = klass.with_info_handler reporter do
+            Minitest.run_one_method(klass, method)
+          end
+
+          safe_record(reporter, result)
+        end
- -
-
# File activesupport/lib/active_support/testing/parallelization/worker.rb, line 42
-def perform_job(job)
-  klass    = job[0]
-  method   = job[1]
-  reporter = job[2]
-
-  set_process_title("#{klass}##{method}")
-
-  result = klass.with_info_handler reporter do
-    Minitest.run_one_method(klass, method)
-  end
-
-  safe_record(reporter, result)
-end
-
-
- -

+ See on GitHub + + + +

@@ -228,24 +228,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/parallelization/worker.rb, line 86
+        def run_cleanup
+          Parallelization.run_cleanup_hooks.each do |cb|
+            cb.call(@number)
+          end
+        end
- -
-
# File activesupport/lib/active_support/testing/parallelization/worker.rb, line 86
-def run_cleanup
-  Parallelization.run_cleanup_hooks.each do |cb|
-    cb.call(@number)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -265,42 +265,42 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/parallelization/worker.rb, line 56
+        def safe_record(reporter, result)
+          add_setup_exception(result) if @setup_exception
+
+          begin
+            @queue.record(reporter, result)
+          rescue DRb::DRbConnError
+            result.failures.map! do |failure|
+              if failure.respond_to?(:error)
+                # minitest >5.14.0
+                error = DRb::DRbRemoteError.new(failure.error)
+              else
+                error = DRb::DRbRemoteError.new(failure.exception)
+              end
+              Minitest::UnexpectedError.new(error)
+            end
+            @queue.record(reporter, result)
+          rescue Interrupt
+            @queue.interrupt
+            raise
+          end
+
+          set_process_title("(idle)")
+        end
- -
-
# File activesupport/lib/active_support/testing/parallelization/worker.rb, line 56
-def safe_record(reporter, result)
-  add_setup_exception(result) if @setup_exception
-
-  begin
-    @queue.record(reporter, result)
-  rescue DRb::DRbConnError
-    result.failures.map! do |failure|
-      if failure.respond_to?(:error)
-        # minitest >5.14.0
-        error = DRb::DRbRemoteError.new(failure.error)
-      else
-        error = DRb::DRbRemoteError.new(failure.exception)
-      end
-      Minitest::UnexpectedError.new(error)
-    end
-    @queue.record(reporter, result)
-  rescue Interrupt
-    @queue.interrupt
-    raise
-  end
-
-  set_process_title("(idle)")
-end
-
-
- -

+ See on GitHub + + + +

@@ -320,40 +320,40 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/parallelization/worker.rb, line 14
+        def start
+          fork do
+            set_process_title("(starting)")
+
+            DRb.stop_service
+
+            @queue = DRbObject.new_with_uri(@url)
+            @queue.start_worker(@id)
+
+            begin
+              after_fork
+            rescue => @setup_exception; end
+
+            work_from_queue
+          ensure
+            set_process_title("(stopping)")
+
+            run_cleanup
+            @queue.stop_worker(@id)
+          end
+        end
- -
-
# File activesupport/lib/active_support/testing/parallelization/worker.rb, line 14
-def start
-  fork do
-    set_process_title("(starting)")
-
-    DRb.stop_service
-
-    @queue = DRbObject.new_with_uri(@url)
-    @queue.start_worker(@id)
-
-    begin
-      after_fork
-    rescue => @setup_exception; end
-
-    work_from_queue
-  ensure
-    set_process_title("(stopping)")
-
-    run_cleanup
-    @queue.stop_worker(@id)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -373,24 +373,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/parallelization/worker.rb, line 36
+        def work_from_queue
+          while job = @queue.pop
+            perform_job(job)
+          end
+        end
- -
-
# File activesupport/lib/active_support/testing/parallelization/worker.rb, line 36
-def work_from_queue
-  while job = @queue.pop
-    perform_job(job)
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Testing/SetupAndTeardown.html b/src/classes/ActiveSupport/Testing/SetupAndTeardown.html index 96d57fa124..4173cba48c 100644 --- a/src/classes/ActiveSupport/Testing/SetupAndTeardown.html +++ b/src/classes/ActiveSupport/Testing/SetupAndTeardown.html @@ -118,24 +118,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/setup_and_teardown.rb, line 21
+      def self.prepended(klass)
+        klass.include ActiveSupport::Callbacks
+        klass.define_callbacks :setup, :teardown
+        klass.extend ClassMethods
+      end
- -
-
# File activesupport/lib/active_support/testing/setup_and_teardown.rb, line 21
-def self.prepended(klass)
-  klass.include ActiveSupport::Callbacks
-  klass.define_callbacks :setup, :teardown
-  klass.extend ClassMethods
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Testing/SetupAndTeardown/ClassMethods.html b/src/classes/ActiveSupport/Testing/SetupAndTeardown/ClassMethods.html index 45bbe43c60..e99482fe50 100644 --- a/src/classes/ActiveSupport/Testing/SetupAndTeardown/ClassMethods.html +++ b/src/classes/ActiveSupport/Testing/SetupAndTeardown/ClassMethods.html @@ -79,22 +79,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/setup_and_teardown.rb, line 29
+        def setup(*args, &block)
+          set_callback(:setup, :before, *args, &block)
+        end
- -
-
# File activesupport/lib/active_support/testing/setup_and_teardown.rb, line 29
-def setup(*args, &block)
-  set_callback(:setup, :before, *args, &block)
-end
-
-
- - + See on GitHub + + + +

@@ -114,22 +114,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/setup_and_teardown.rb, line 34
+        def teardown(*args, &block)
+          set_callback(:teardown, :after, *args, &block)
+        end
- -
-
# File activesupport/lib/active_support/testing/setup_and_teardown.rb, line 34
-def teardown(*args, &block)
-  set_callback(:teardown, :after, *args, &block)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/Testing/TimeHelpers.html b/src/classes/ActiveSupport/Testing/TimeHelpers.html index e6005560d1..1d330c36be 100644 --- a/src/classes/ActiveSupport/Testing/TimeHelpers.html +++ b/src/classes/ActiveSupport/Testing/TimeHelpers.html @@ -101,23 +101,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/time_helpers.rb, line 69
+      def after_teardown
+        travel_back
+        super
+      end
- -
-
# File activesupport/lib/active_support/testing/time_helpers.rb, line 69
-def after_teardown
-  travel_back
-  super
-end
-
-
- - + See on GitHub + + + +

@@ -153,22 +153,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/time_helpers.rb, line 252
+      def freeze_time(with_usec: false, &block)
+        travel_to Time.now, with_usec: with_usec, &block
+      end
- -
-
# File activesupport/lib/active_support/testing/time_helpers.rb, line 252
-def freeze_time(with_usec: false, &block)
-  travel_to Time.now, with_usec: with_usec, &block
-end
-
-
- -

+ See on GitHub + + + +

@@ -206,22 +206,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/time_helpers.rb, line 97
+      def travel(duration, with_usec: false, &block)
+        travel_to Time.now + duration, with_usec: with_usec, &block
+      end
- -
-
# File activesupport/lib/active_support/testing/time_helpers.rb, line 97
-def travel(duration, with_usec: false, &block)
-  travel_to Time.now + duration, with_usec: with_usec, &block
-end
-
-
- -

+ See on GitHub + + + +

@@ -268,27 +268,27 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/testing/time_helpers.rb, line 226
+      def travel_back
+        stubbed_time = Time.current if block_given? && simple_stubs.stubbed?
+
+        simple_stubs.unstub_all!
+        yield if block_given?
+      ensure
+        travel_to stubbed_time if stubbed_time
+      end
- -
-
# File activesupport/lib/active_support/testing/time_helpers.rb, line 226
-def travel_back
-  stubbed_time = Time.current if block_given? && simple_stubs.stubbed?
-
-  simple_stubs.unstub_all!
-  yield if block_given?
-ensure
-  travel_to stubbed_time if stubbed_time
-end
-
-
- -

+ See on GitHub + + + +

@@ -328,19 +328,17 @@

- -
- - -
-
# File activesupport/lib/active_support/testing/time_helpers.rb, line 133
-      def travel_to(date_or_time, with_usec: false)
-        if block_given? && in_block
-          travel_to_nested_block_call = <<~MSG
-
+          
+            
+ + Source code + + +
# File activesupport/lib/active_support/testing/time_helpers.rb, line 133
+      def travel_to(date_or_time, with_usec: false)
+        if block_given? && in_block
+          travel_to_nested_block_call = <<~MSG
+
       Calling `travel_to` with a block, when we have previously already made a call to `travel_to`, can lead to confusing time stubbing.
 
       Instead of:
@@ -362,54 +360,56 @@ 

# 5 days from today end - MSG - raise travel_to_nested_block_call - end - - if date_or_time.is_a?(Date) && !date_or_time.is_a?(DateTime) - now = date_or_time.midnight.to_time - elsif date_or_time.is_a?(String) - now = Time.zone.parse(date_or_time) - elsif with_usec - now = date_or_time.to_time - else - now = date_or_time.to_time.change(usec: 0) - end - - stubs = simple_stubs - stubbed_time = Time.now if stubs.stubbing(Time, :now) - stubs.stub_object(Time, :now) { at(now) } - - stubs.stub_object(Time, :new) do |*args, **options| - if args.empty? && options.empty? - at(now) - else - stub = stubs.stubbing(Time, :new) - Time.send(stub.original_method, *args, **options) - end - end - - stubs.stub_object(Date, :today) { jd(now.to_date.jd) } - stubs.stub_object(DateTime, :now) { jd(now.to_date.jd, now.hour, now.min, now.sec, Rational(now.utc_offset, 86400)) } - - if block_given? - begin - self.in_block = true - yield - ensure - if stubbed_time - travel_to stubbed_time - else - travel_back - end - self.in_block = false - end - end - end

-
-
- -

+ MSG + raise travel_to_nested_block_call + end + + if date_or_time.is_a?(Date) && !date_or_time.is_a?(DateTime) + now = date_or_time.midnight.to_time + elsif date_or_time.is_a?(String) + now = Time.zone.parse(date_or_time) + elsif with_usec + now = date_or_time.to_time + else + now = date_or_time.to_time.change(usec: 0) + end + + stubs = simple_stubs + stubbed_time = Time.now if stubs.stubbing(Time, :now) + stubs.stub_object(Time, :now) { at(now) } + + stubs.stub_object(Time, :new) do |*args, **options| + if args.empty? && options.empty? + at(now) + else + stub = stubs.stubbing(Time, :new) + Time.send(stub.original_method, *args, **options) + end + end + + stubs.stub_object(Date, :today) { jd(now.to_date.jd) } + stubs.stub_object(DateTime, :now) { jd(now.to_date.jd, now.hour, now.min, now.sec, Rational(now.utc_offset, 86400)) } + + if block_given? + begin + self.in_block = true + yield + ensure + if stubbed_time + travel_to stubbed_time + else + travel_back + end + self.in_block = false + end + end + end + + See on GitHub + + + +

@@ -433,7 +433,8 @@

-

+ + diff --git a/src/classes/ActiveSupport/TimeWithZone.html b/src/classes/ActiveSupport/TimeWithZone.html index 5030b9706e..9ca5107e2b 100644 --- a/src/classes/ActiveSupport/TimeWithZone.html +++ b/src/classes/ActiveSupport/TimeWithZone.html @@ -423,24 +423,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 51
+    def initialize(utc_time, time_zone, local_time = nil, period = nil)
+      @utc = utc_time ? transfer_time_values_to_utc_constructor(utc_time) : nil
+      @time_zone, @time = time_zone, local_time
+      @period = @utc ? period : get_period_and_ensure_valid_local_time(period)
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 51
-def initialize(utc_time, time_zone, local_time = nil, period = nil)
-  @utc = utc_time ? transfer_time_values_to_utc_constructor(utc_time) : nil
-  @time_zone, @time = time_zone, local_time
-  @period = @utc ? period : get_period_and_ensure_valid_local_time(period)
-end
-
-
- - + See on GitHub + + + + @@ -481,27 +481,27 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 299
+    def +(other)
+      if duration_of_variable_length?(other)
+        method_missing(:+, other)
+      else
+        result = utc.acts_like?(:date) ? utc.since(other) : utc + other rescue utc.since(other)
+        result.in_time_zone(time_zone)
+      end
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 299
-def +(other)
-  if duration_of_variable_length?(other)
-    method_missing(:+, other)
-  else
-    result = utc.acts_like?(:date) ? utc.since(other) : utc + other rescue utc.since(other)
-    result.in_time_zone(time_zone)
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -539,29 +539,29 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 333
+    def -(other)
+      if other.acts_like?(:time)
+        to_time - other.to_time
+      elsif duration_of_variable_length?(other)
+        method_missing(:-, other)
+      else
+        result = utc.acts_like?(:date) ? utc.ago(other) : utc - other rescue utc.ago(other)
+        result.in_time_zone(time_zone)
+      end
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 333
-def -(other)
-  if other.acts_like?(:time)
-    to_time - other.to_time
-  elsif duration_of_variable_length?(other)
-    method_missing(:-, other)
-  else
-    result = utc.acts_like?(:date) ? utc.ago(other) : utc - other rescue utc.ago(other)
-    result.in_time_zone(time_zone)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -581,22 +581,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 232
+    def <=>(other)
+      utc <=> other
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 232
-def <=>(other)
-  utc <=> other
-end
-
-
- -

+ See on GitHub + + + +

@@ -616,22 +616,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 494
+    def acts_like_time?
+      true
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 494
-def acts_like_time?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -666,28 +666,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 422
+    def advance(options)
+      # If we're advancing a value of variable length (i.e., years, weeks, months, days), advance from #time,
+      # otherwise advance from #utc, for accuracy when moving across DST boundaries
+      if options.values_at(:years, :weeks, :months, :days).any?
+        method_missing(:advance, options)
+      else
+        utc.advance(options).in_time_zone(time_zone)
+      end
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 422
-def advance(options)
-  # If we're advancing a value of variable length (i.e., years, weeks, months, days), advance from #time,
-  # otherwise advance from #utc, for accuracy when moving across DST boundaries
-  if options.values_at(:years, :weeks, :months, :days).any?
-    method_missing(:advance, options)
-  else
-    utc.advance(options).in_time_zone(time_zone)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -720,22 +720,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 361
+    def ago(other)
+      since(-other)
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 361
-def ago(other)
-  since(-other)
-end
-
-
- -

+ See on GitHub + + + +

@@ -764,26 +764,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 166
+    def as_json(options = nil)
+      if ActiveSupport::JSON::Encoding.use_standard_json_time_format
+        xmlschema(ActiveSupport::JSON::Encoding.time_precision)
+      else
+        %(#{time.strftime("%Y/%m/%d %H:%M:%S")} #{formatted_offset(false)})
+      end
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 166
-def as_json(options = nil)
-  if ActiveSupport::JSON::Encoding.use_standard_json_time_format
-    xmlschema(ActiveSupport::JSON::Encoding.time_precision)
-  else
-    %(#{time.strftime("%Y/%m/%d %H:%M:%S")} #{formatted_offset(false)})
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -803,22 +803,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 240
+    def between?(min, max)
+      utc.between?(min, max)
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 240
-def between?(min, max)
-  utc.between?(min, max)
-end
-
-
- -

+ See on GitHub + + + +

@@ -838,22 +838,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 505
+    def blank?
+      false
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 505
-def blank?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -881,37 +881,37 @@

- -
- - -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 382
-def change(options)
-  if options[:zone] && options[:offset]
-    raise ArgumentError, "Can't change both :offset and :zone at the same time: #{options.inspect}"
-  end
+          
+            
+ + Source code + - new_time = time.change(options) +
# File activesupport/lib/active_support/time_with_zone.rb, line 382
+    def change(options)
+      if options[:zone] && options[:offset]
+        raise ArgumentError, "Can't change both :offset and :zone at the same time: #{options.inspect}"
+      end
 
-  if options[:zone]
-    new_zone = ::Time.find_zone(options[:zone])
-  elsif options[:offset]
-    new_zone = ::Time.find_zone(new_time.utc_offset)
-  end
+      new_time = time.change(options)
 
-  new_zone ||= time_zone
-  periods = new_zone.periods_for_local(new_time)
+      if options[:zone]
+        new_zone = ::Time.find_zone(options[:zone])
+      elsif options[:offset]
+        new_zone = ::Time.find_zone(new_time.utc_offset)
+      end
 
-  self.class.new(nil, new_zone, new_time, periods.include?(period) ? period : nil)
-end
-
-
- -

+ new_zone ||= time_zone + periods = new_zone.periods_for_local(new_time) + + self.class.new(nil, new_zone, new_time, periods.include?(period) ? period : nil) + end + + See on GitHub + + + +

@@ -935,7 +935,8 @@

-

+ +

@@ -964,22 +965,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 94
+    def dst?
+      period.dst?
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 94
-def dst?
-  period.dst?
-end
-
-
- -

+ See on GitHub + + + +

@@ -999,22 +1000,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 275
+    def eql?(other)
+      other.eql?(utc)
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 275
-def eql?(other)
-  other.eql?(utc)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1041,22 +1042,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 125
+    def formatted_offset(colon = true, alternate_utc_string = nil)
+      utc? && alternate_utc_string || TimeZone.seconds_to_utc_offset(utc_offset, colon)
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 125
-def formatted_offset(colon = true, alternate_utc_string = nil)
-  utc? && alternate_utc_string || TimeZone.seconds_to_utc_offset(utc_offset, colon)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1076,24 +1077,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 509
+    def freeze
+      # preload instance variables before freezing
+      period; utc; time; to_datetime; to_time
+      super
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 509
-def freeze
-  # preload instance variables before freezing
-  period; utc; time; to_datetime; to_time
-  super
-end
-
-
- -

+ See on GitHub + + + +

@@ -1113,22 +1114,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 270
+    def future?
+      utc.future?
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 270
-def future?
-  utc.future?
-end
-
-
- -

+ See on GitHub + + + +

@@ -1152,7 +1153,8 @@

-

+ +

@@ -1176,7 +1178,8 @@

-

+ +

@@ -1200,7 +1203,8 @@

-

+ +

@@ -1224,7 +1228,8 @@

-

+ +

@@ -1248,7 +1253,8 @@

-

+ +

@@ -1272,7 +1278,8 @@

-

+ +

@@ -1296,7 +1303,8 @@

-

+ +

@@ -1316,22 +1324,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 279
+    def hash
+      utc.hash
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 279
-def hash
-  utc.hash
-end
-
-
- -

+ See on GitHub + + + +

@@ -1354,22 +1362,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 186
+    def httpdate
+      utc.httpdate
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 186
-def httpdate
-  utc.httpdate
-end
-
-
- -

+ See on GitHub + + + +

@@ -1393,7 +1401,8 @@

-

+ +

@@ -1413,23 +1422,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 77
+    def in_time_zone(new_zone = ::Time.zone)
+      return self if time_zone == new_zone
+      utc.in_time_zone(new_zone)
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 77
-def in_time_zone(new_zone = ::Time.zone)
-  return self if time_zone == new_zone
-  utc.in_time_zone(new_zone)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1452,22 +1461,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 140
+    def inspect
+      "#{time.strftime('%a, %d %b %Y %H:%M:%S.%9N')} #{zone} #{formatted_offset}"
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 140
-def inspect
-  "#{time.strftime('%a, %d %b %Y %H:%M:%S.%9N')} #{zone} #{formatted_offset}"
-end
-
-
- -

+ See on GitHub + + + +

@@ -1491,22 +1500,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 499
+    def is_a?(klass)
+      klass == ::Time || super
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 499
-def is_a?(klass)
-  klass == ::Time || super
-end
-
-
- -

+ See on GitHub + + + +

@@ -1530,7 +1539,8 @@

-

+ +

@@ -1554,7 +1564,8 @@

-

+ +

@@ -1578,7 +1589,8 @@

-

+ +

@@ -1602,22 +1614,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 83
+    def localtime(utc_offset = nil)
+      utc.getlocal(utc_offset)
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 83
-def localtime(utc_offset = nil)
-  utc.getlocal(utc_offset)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1637,22 +1649,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 515
+    def marshal_dump
+      [utc, time_zone.name, time]
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 515
-def marshal_dump
-  [utc, time_zone.name, time]
-end
-
-
- -

+ See on GitHub + + + +

@@ -1672,22 +1684,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 519
+    def marshal_load(variables)
+      initialize(variables[0].utc, ::Time.find_zone(variables[1]), variables[2].utc)
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 519
-def marshal_load(variables)
-  initialize(variables[0].utc, ::Time.find_zone(variables[1]), variables[2].utc)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1707,24 +1719,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 540
+    def method_missing(...)
+      wrap_with_time_zone time.__send__(...)
+    rescue NoMethodError => e
+      raise e, e.message.sub(time.inspect, inspect).sub("Time", "ActiveSupport::TimeWithZone"), e.backtrace
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 540
-def method_missing(...)
-  wrap_with_time_zone time.__send__(...)
-rescue NoMethodError => e
-  raise e, e.message.sub(time.inspect, inspect).sub("Time", "ActiveSupport::TimeWithZone"), e.backtrace
-end
-
-
- -

+ See on GitHub + + + +

@@ -1748,7 +1760,8 @@

-

+ +

@@ -1768,22 +1781,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 245
+    def past?
+      utc.past?
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 245
-def past?
-  utc.past?
-end
-
-
- -

+ See on GitHub + + + +

@@ -1803,22 +1816,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 72
+    def period
+      @period ||= time_zone.period_for_utc(@utc)
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 72
-def period
-  @period ||= time_zone.period_for_utc(@utc)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1842,7 +1855,8 @@

-

+ +

@@ -1862,24 +1876,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 525
+    def respond_to?(sym, include_priv = false)
+      # ensure that we're not going to throw and rescue from NoMethodError in method_missing which is slow
+      return false if sym.to_sym == :to_str
+      super
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 525
-def respond_to?(sym, include_priv = false)
-  # ensure that we're not going to throw and rescue from NoMethodError in method_missing which is slow
-  return false if sym.to_sym == :to_str
-  super
-end
-
-
- -

+ See on GitHub + + + +

@@ -1899,23 +1913,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 533
+    def respond_to_missing?(sym, include_priv)
+      return false if sym.to_sym == :acts_like_date?
+      time.respond_to?(sym, include_priv)
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 533
-def respond_to_missing?(sym, include_priv)
-  return false if sym.to_sym == :acts_like_date?
-  time.respond_to?(sym, include_priv)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1942,22 +1956,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 194
+    def rfc2822
+      to_fs(:rfc822)
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 194
-def rfc2822
-  to_fs(:rfc822)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1981,7 +1995,8 @@

-

+ +

@@ -2005,7 +2020,8 @@

-

+ +

@@ -2029,7 +2045,8 @@

-

+ +

@@ -2049,23 +2066,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 226
+    def strftime(format)
+      format = format.gsub(/((?:\A|[^%])(?:%%)*)%Z/, "\\1#{zone}")
+      getlocal(utc_offset).strftime(format)
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 226
-def strftime(format)
-  format = format.gsub(/((?:\A|[^%])(?:%%)*)%Z/, "\\1#{zone}")
-  getlocal(utc_offset).strftime(format)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2085,22 +2102,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 58
+    def time
+      @time ||= incorporate_utc_offset(@utc, utc_offset)
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 58
-def time
-  @time ||= incorporate_utc_offset(@utc, utc_offset)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2124,22 +2141,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 445
+    def to_a
+      [time.sec, time.min, time.hour, time.day, time.mon, time.year, time.wday, time.yday, dst?, zone]
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 445
-def to_a
-  [time.sec, time.min, time.hour, time.day, time.mon, time.year, time.wday, time.yday, dst?, zone]
-end
-
-
- -

+ See on GitHub + + + +

@@ -2163,22 +2180,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 478
+    def to_datetime
+      @to_datetime ||= utc.to_datetime.new_offset(Rational(utc_offset, 86_400))
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 478
-def to_datetime
-  @to_datetime ||= utc.to_datetime.new_offset(Rational(utc_offset, 86_400))
-end
-
-
- -

+ See on GitHub + + + +

@@ -2201,22 +2218,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 453
+    def to_f
+      utc.to_f
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 453
-def to_f
-  utc.to_f
-end
-
-
- -

+ See on GitHub + + + +

@@ -2240,7 +2257,8 @@

-

+ +

@@ -2275,29 +2293,29 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 212
+    def to_fs(format = :default)
+      if format == :db
+        utc.to_fs(format)
+      elsif formatter = ::Time::DATE_FORMATS[format]
+        formatter.respond_to?(:call) ? formatter.call(self).to_s : strftime(formatter)
+      else
+        # Change to to_s when deprecation is gone.
+        "#{time.strftime("%Y-%m-%d %H:%M:%S")} #{formatted_offset(false, 'UTC')}"
+      end
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 212
-def to_fs(format = :default)
-  if format == :db
-    utc.to_fs(format)
-  elsif formatter = ::Time::DATE_FORMATS[format]
-    formatter.respond_to?(:call) ? formatter.call(self).to_s : strftime(formatter)
-  else
-    # Change to to_s when deprecation is gone.
-    "#{time.strftime("%Y-%m-%d %H:%M:%S")} #{formatted_offset(false, 'UTC')}"
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -2324,22 +2342,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 461
+    def to_i
+      utc.to_i
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 461
-def to_i
-  utc.to_i
-end
-
-
- -

+ See on GitHub + + + +

@@ -2362,22 +2380,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 470
+    def to_r
+      utc.to_r
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 470
-def to_r
-  utc.to_r
-end
-
-
- -

+ See on GitHub + + + +

@@ -2397,22 +2415,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 200
+    def to_s
+      "#{time.strftime("%Y-%m-%d %H:%M:%S")} #{formatted_offset(false, 'UTC')}" # mimicking Ruby Time#to_s format
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 200
-def to_s
-  "#{time.strftime("%Y-%m-%d %H:%M:%S")} #{formatted_offset(false, 'UTC')}" # mimicking Ruby Time#to_s format
-end
-
-
- -

+ See on GitHub + + + +

@@ -2432,26 +2450,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 485
+    def to_time
+      if preserve_timezone
+        @to_time_with_instance_offset ||= getlocal(utc_offset)
+      else
+        @to_time_with_system_offset ||= getlocal
+      end
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 485
-def to_time
-  if preserve_timezone
-    @to_time_with_instance_offset ||= getlocal(utc_offset)
-  else
-    @to_time_with_system_offset ||= getlocal
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -2471,22 +2489,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 251
+    def today?
+      time.today?
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 251
-def today?
-  time.today?
-end
-
-
- -

+ See on GitHub + + + +

@@ -2510,22 +2528,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 257
+    def tomorrow?
+      time.tomorrow?
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 257
-def tomorrow?
-  time.tomorrow?
-end
-
-
- -

+ See on GitHub + + + +

@@ -2549,7 +2567,8 @@

-

+ +

@@ -2573,22 +2592,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 63
+    def utc
+      @utc ||= incorporate_utc_offset(@time, -utc_offset)
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 63
-def utc
-  @utc ||= incorporate_utc_offset(@time, -utc_offset)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2618,22 +2637,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 105
+    def utc?
+      zone == "UTC" || zone == "UCT"
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 105
-def utc?
-  zone == "UTC" || zone == "UCT"
-end
-
-
- -

+ See on GitHub + + + +

@@ -2657,22 +2676,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 111
+    def utc_offset
+      period.observed_utc_offset
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 111
-def utc_offset
-  period.observed_utc_offset
-end
-
-
- -

+ See on GitHub + + + +

@@ -2699,22 +2718,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 148
+    def xmlschema(fraction_digits = 0)
+      "#{time.strftime(PRECISIONS[fraction_digits.to_i])}#{formatted_offset(true, 'Z')}"
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 148
-def xmlschema(fraction_digits = 0)
-  "#{time.strftime(PRECISIONS[fraction_digits.to_i])}#{formatted_offset(true, 'Z')}"
-end
-
-
- -

+ See on GitHub + + + +

@@ -2738,22 +2757,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 264
+    def yesterday?
+      time.yesterday?
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 264
-def yesterday?
-  time.yesterday?
-end
-
-
- -

+ See on GitHub + + + +

@@ -2777,22 +2796,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/time_with_zone.rb, line 133
+    def zone
+      period.abbreviation
+    end
- -
-
# File activesupport/lib/active_support/time_with_zone.rb, line 133
-def zone
-  period.abbreviation
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/TimeZone.html b/src/classes/ActiveSupport/TimeZone.html index a23b264ed0..edb0a1df89 100644 --- a/src/classes/ActiveSupport/TimeZone.html +++ b/src/classes/ActiveSupport/TimeZone.html @@ -425,38 +425,38 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/values/time_zone.rb, line 232
+      def [](arg)
+        case arg
+        when self
+          arg
+        when String
+          begin
+            @lazy_zones_map[arg] ||= create(arg)
+          rescue TZInfo::InvalidTimezoneIdentifier
+            nil
+          end
+        when TZInfo::Timezone
+          @lazy_zones_map[arg.name] ||= create(arg.name, nil, arg)
+        when Numeric, ActiveSupport::Duration
+          arg *= 3600 if arg.abs <= 13
+          all.find { |z| z.utc_offset == arg.to_i }
+        else
+          raise ArgumentError, "invalid argument to TimeZone[]: #{arg.inspect}"
+        end
+      end
- -
-
# File activesupport/lib/active_support/values/time_zone.rb, line 232
-def [](arg)
-  case arg
-  when self
-    arg
-  when String
-    begin
-      @lazy_zones_map[arg] ||= create(arg)
-    rescue TZInfo::InvalidTimezoneIdentifier
-      nil
-    end
-  when TZInfo::Timezone
-    @lazy_zones_map[arg.name] ||= create(arg.name, nil, arg)
-  when Numeric, ActiveSupport::Duration
-    arg *= 3600 if arg.abs <= 13
-    all.find { |z| z.utc_offset == arg.to_i }
-  else
-    raise ArgumentError, "invalid argument to TimeZone[]: #{arg.inspect}"
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -476,22 +476,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/values/time_zone.rb, line 223
+      def all
+        @zones ||= zones_map.values.sort
+      end
- -
-
# File activesupport/lib/active_support/values/time_zone.rb, line 223
-def all
-  @zones ||= zones_map.values.sort
-end
-
-
- -

+ See on GitHub + + + +

@@ -511,23 +511,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/values/time_zone.rb, line 260
+      def country_zones(country_code)
+        code = country_code.to_s.upcase
+        @country_zones[code] ||= load_country_zones(code)
+      end
- -
-
# File activesupport/lib/active_support/values/time_zone.rb, line 260
-def country_zones(country_code)
-  code = country_code.to_s.upcase
-  @country_zones[code] ||= load_country_zones(code)
-end
-
-
- -

+ See on GitHub + + + +

@@ -551,7 +551,8 @@

-

+ +

@@ -571,22 +572,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/values/time_zone.rb, line 207
+      def find_tzinfo(name)
+        TZInfo::Timezone.get(MAPPING[name] || name)
+      end
- -
-
# File activesupport/lib/active_support/values/time_zone.rb, line 207
-def find_tzinfo(name)
-  TZInfo::Timezone.get(MAPPING[name] || name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -606,24 +607,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/values/time_zone.rb, line 303
+    def initialize(name, utc_offset = nil, tzinfo = nil)
+      @name = name
+      @utc_offset = utc_offset
+      @tzinfo = tzinfo || TimeZone.find_tzinfo(name)
+    end
- -
-
# File activesupport/lib/active_support/values/time_zone.rb, line 303
-def initialize(name, utc_offset = nil, tzinfo = nil)
-  @name = name
-  @utc_offset = utc_offset
-  @tzinfo = tzinfo || TimeZone.find_tzinfo(name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -647,22 +648,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/values/time_zone.rb, line 216
+      def new(name)
+        self[name]
+      end
- -
-
# File activesupport/lib/active_support/values/time_zone.rb, line 216
-def new(name)
-  self[name]
-end
-
-
- -

+ See on GitHub + + + +

@@ -685,26 +686,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/values/time_zone.rb, line 199
+      def seconds_to_utc_offset(seconds, colon = true)
+        format = colon ? UTC_OFFSET_WITH_COLON : UTC_OFFSET_WITHOUT_COLON
+        sign = (seconds < 0 ? "-" : "+")
+        hours = seconds.abs / 3600
+        minutes = (seconds.abs % 3600) / 60
+        format % [sign, hours, minutes]
+      end
- -
-
# File activesupport/lib/active_support/values/time_zone.rb, line 199
-def seconds_to_utc_offset(seconds, colon = true)
-  format = colon ? UTC_OFFSET_WITH_COLON : UTC_OFFSET_WITHOUT_COLON
-  sign = (seconds < 0 ? "-" : "+")
-  hours = seconds.abs / 3600
-  minutes = (seconds.abs % 3600) / 60
-  format % [sign, hours, minutes]
-end
-
-
- -

+ See on GitHub + + + +

@@ -724,22 +725,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/values/time_zone.rb, line 254
+      def us_zones
+        country_zones(:us)
+      end
- -
-
# File activesupport/lib/active_support/values/time_zone.rb, line 254
-def us_zones
-  country_zones(:us)
-end
-
-
- -

+ See on GitHub + + + + @@ -763,25 +764,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/values/time_zone.rb, line 326
+    def <=>(zone)
+      return unless zone.respond_to? :utc_offset
+      result = (utc_offset <=> zone.utc_offset)
+      result = (name <=> zone.name) if result == 0
+      result
+    end
- -
-
# File activesupport/lib/active_support/values/time_zone.rb, line 326
-def <=>(zone)
-  return unless zone.respond_to? :utc_offset
-  result = (utc_offset <=> zone.utc_offset)
-  result = (name <=> zone.name) if result == 0
-  result
-end
-
-
- - + See on GitHub + + + +

@@ -801,22 +802,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/values/time_zone.rb, line 335
+    def =~(re)
+      re === name || re === MAPPING[name]
+    end
- -
-
# File activesupport/lib/active_support/values/time_zone.rb, line 335
-def =~(re)
-  re === name || re === MAPPING[name]
-end
-
-
- -

+ See on GitHub + + + +

@@ -847,22 +848,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/values/time_zone.rb, line 372
+    def at(*args)
+      Time.at(*args).utc.in_time_zone(self)
+    end
- -
-
# File activesupport/lib/active_support/values/time_zone.rb, line 372
-def at(*args)
-  Time.at(*args).utc.in_time_zone(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -887,22 +888,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/values/time_zone.rb, line 320
+    def formatted_offset(colon = true, alternate_utc_string = nil)
+      utc_offset == 0 && alternate_utc_string || self.class.seconds_to_utc_offset(utc_offset, colon)
+    end
- -
-
# File activesupport/lib/active_support/values/time_zone.rb, line 320
-def formatted_offset(colon = true, alternate_utc_string = nil)
-  utc_offset == 0 && alternate_utc_string || self.class.seconds_to_utc_offset(utc_offset, colon)
-end
-
-
- -

+ See on GitHub + + + +

@@ -934,57 +935,57 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/values/time_zone.rb, line 389
+    def iso8601(str)
+      # Historically `Date._iso8601(nil)` returns `{}`, but in the `date` gem versions `3.2.1`, `3.1.2`, `3.0.2`,
+      # and `2.0.1`, `Date._iso8601(nil)` raises `TypeError` https://github.com/ruby/date/issues/39
+      # Future `date` releases are expected to revert back to the original behavior.
+      raise ArgumentError, "invalid date" if str.nil?
+
+      parts = Date._iso8601(str)
+
+      year = parts.fetch(:year)
+
+      if parts.key?(:yday)
+        ordinal_date = Date.ordinal(year, parts.fetch(:yday))
+        month = ordinal_date.month
+        day = ordinal_date.day
+      else
+        month = parts.fetch(:mon)
+        day = parts.fetch(:mday)
+      end
+
+      time = Time.new(
+        year,
+        month,
+        day,
+        parts.fetch(:hour, 0),
+        parts.fetch(:min, 0),
+        parts.fetch(:sec, 0) + parts.fetch(:sec_fraction, 0),
+        parts.fetch(:offset, 0)
+      )
+
+      if parts[:offset]
+        TimeWithZone.new(time.utc, self)
+      else
+        TimeWithZone.new(nil, self, time)
+      end
+
+    rescue Date::Error, KeyError
+      raise ArgumentError, "invalid date"
+    end
- -
-
# File activesupport/lib/active_support/values/time_zone.rb, line 389
-def iso8601(str)
-  # Historically `Date._iso8601(nil)` returns `{}`, but in the `date` gem versions `3.2.1`, `3.1.2`, `3.0.2`,
-  # and `2.0.1`, `Date._iso8601(nil)` raises `TypeError` https://github.com/ruby/date/issues/39
-  # Future `date` releases are expected to revert back to the original behavior.
-  raise ArgumentError, "invalid date" if str.nil?
-
-  parts = Date._iso8601(str)
-
-  year = parts.fetch(:year)
-
-  if parts.key?(:yday)
-    ordinal_date = Date.ordinal(year, parts.fetch(:yday))
-    month = ordinal_date.month
-    day = ordinal_date.day
-  else
-    month = parts.fetch(:mon)
-    day = parts.fetch(:mday)
-  end
-
-  time = Time.new(
-    year,
-    month,
-    day,
-    parts.fetch(:hour, 0),
-    parts.fetch(:min, 0),
-    parts.fetch(:sec, 0) + parts.fetch(:sec_fraction, 0),
-    parts.fetch(:offset, 0)
-  )
-
-  if parts[:offset]
-    TimeWithZone.new(time.utc, self)
-  else
-    TimeWithZone.new(nil, self, time)
-  end
-
-rescue Date::Error, KeyError
-  raise ArgumentError, "invalid date"
-end
-
-
- -

+ See on GitHub + + + +

@@ -1008,23 +1009,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/values/time_zone.rb, line 356
+    def local(*args)
+      time = Time.utc(*args)
+      ActiveSupport::TimeWithZone.new(nil, self, time)
+    end
- -
-
# File activesupport/lib/active_support/values/time_zone.rb, line 356
-def local(*args)
-  time = Time.utc(*args)
-  ActiveSupport::TimeWithZone.new(nil, self, time)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1044,22 +1045,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/values/time_zone.rb, line 544
+    def local_to_utc(time, dst = true)
+      tzinfo.local_to_utc(time, dst)
+    end
- -
-
# File activesupport/lib/active_support/values/time_zone.rb, line 544
-def local_to_utc(time, dst = true)
-  tzinfo.local_to_utc(time, dst)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1079,23 +1080,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/values/time_zone.rb, line 341
+    def match?(re)
+      (re == name) || (re == MAPPING[name]) ||
+        ((Regexp === re) && (re.match?(name) || re.match?(MAPPING[name])))
+    end
- -
-
# File activesupport/lib/active_support/values/time_zone.rb, line 341
-def match?(re)
-  (re == name) || (re == MAPPING[name]) ||
-    ((Regexp === re) && (re.match?(name) || re.match?(MAPPING[name])))
-end
-
-
- -

+ See on GitHub + + + +

@@ -1119,22 +1120,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/values/time_zone.rb, line 509
+    def now
+      time_now.utc.in_time_zone(self)
+    end
- -
-
# File activesupport/lib/active_support/values/time_zone.rb, line 509
-def now
-  time_now.utc.in_time_zone(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1171,22 +1172,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/values/time_zone.rb, line 446
+    def parse(str, now = now())
+      parts_to_time(Date._parse(str, false), now)
+    end
- -
-
# File activesupport/lib/active_support/values/time_zone.rb, line 446
-def parse(str, now = now())
-  parts_to_time(Date._parse(str, false), now)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1206,22 +1207,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/values/time_zone.rb, line 556
+    def period_for_local(time, dst = true)
+      tzinfo.period_for_local(time, dst) { |periods| periods.last }
+    end
- -
-
# File activesupport/lib/active_support/values/time_zone.rb, line 556
-def period_for_local(time, dst = true)
-  tzinfo.period_for_local(time, dst) { |periods| periods.last }
-end
-
-
- -

+ See on GitHub + + + +

@@ -1241,22 +1242,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/values/time_zone.rb, line 550
+    def period_for_utc(time)
+      tzinfo.period_for_utc(time)
+    end
- -
-
# File activesupport/lib/active_support/values/time_zone.rb, line 550
-def period_for_utc(time)
-  tzinfo.period_for_utc(time)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1286,36 +1287,36 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/values/time_zone.rb, line 462
+    def rfc3339(str)
+      parts = Date._rfc3339(str)
+
+      raise ArgumentError, "invalid date" if parts.empty?
+
+      time = Time.new(
+        parts.fetch(:year),
+        parts.fetch(:mon),
+        parts.fetch(:mday),
+        parts.fetch(:hour),
+        parts.fetch(:min),
+        parts.fetch(:sec) + parts.fetch(:sec_fraction, 0),
+        parts.fetch(:offset)
+      )
+
+      TimeWithZone.new(time.utc, self)
+    end
- -
-
# File activesupport/lib/active_support/values/time_zone.rb, line 462
-def rfc3339(str)
-  parts = Date._rfc3339(str)
-
-  raise ArgumentError, "invalid date" if parts.empty?
-
-  time = Time.new(
-    parts.fetch(:year),
-    parts.fetch(:mon),
-    parts.fetch(:mday),
-    parts.fetch(:hour),
-    parts.fetch(:min),
-    parts.fetch(:sec) + parts.fetch(:sec_fraction, 0),
-    parts.fetch(:offset)
-  )
-
-  TimeWithZone.new(time.utc, self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1352,22 +1353,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/values/time_zone.rb, line 500
+    def strptime(str, format, now = now())
+      parts_to_time(DateTime._strptime(str, format), now)
+    end
- -
-
# File activesupport/lib/active_support/values/time_zone.rb, line 500
-def strptime(str, format, now = now())
-  parts_to_time(DateTime._strptime(str, format), now)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1387,22 +1388,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/values/time_zone.rb, line 347
+    def to_s
+      "(GMT#{formatted_offset}) #{name}"
+    end
- -
-
# File activesupport/lib/active_support/values/time_zone.rb, line 347
-def to_s
-  "(GMT#{formatted_offset}) #{name}"
-end
-
-
- -

+ See on GitHub + + + +

@@ -1422,22 +1423,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/values/time_zone.rb, line 514
+    def today
+      tzinfo.now.to_date
+    end
- -
-
# File activesupport/lib/active_support/values/time_zone.rb, line 514
-def today
-  tzinfo.now.to_date
-end
-
-
- -

+ See on GitHub + + + +

@@ -1457,22 +1458,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/values/time_zone.rb, line 519
+    def tomorrow
+      today + 1
+    end
- -
-
# File activesupport/lib/active_support/values/time_zone.rb, line 519
-def tomorrow
-  today + 1
-end
-
-
- -

+ See on GitHub + + + +

@@ -1492,22 +1493,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/values/time_zone.rb, line 310
+    def utc_offset
+      @utc_offset || tzinfo&.current_period&.base_utc_offset
+    end
- -
-
# File activesupport/lib/active_support/values/time_zone.rb, line 310
-def utc_offset
-  @utc_offset || tzinfo&.current_period&.base_utc_offset
-end
-
-
- -

+ See on GitHub + + + +

@@ -1529,25 +1530,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/values/time_zone.rb, line 535
+    def utc_to_local(time)
+      tzinfo.utc_to_local(time).yield_self do |t|
+        ActiveSupport.utc_to_local_returns_utc_offset_times ?
+          t : Time.utc(t.year, t.month, t.day, t.hour, t.min, t.sec, t.sec_fraction * 1_000_000)
+      end
+    end
- -
-
# File activesupport/lib/active_support/values/time_zone.rb, line 535
-def utc_to_local(time)
-  tzinfo.utc_to_local(time).yield_self do |t|
-    ActiveSupport.utc_to_local_returns_utc_offset_times ?
-      t : Time.utc(t.year, t.month, t.day, t.hour, t.min, t.sec, t.sec_fraction * 1_000_000)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1567,22 +1568,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/values/time_zone.rb, line 524
+    def yesterday
+      today - 1
+    end
- -
-
# File activesupport/lib/active_support/values/time_zone.rb, line 524
-def yesterday
-  today - 1
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/XMLConverter/DisallowedType.html b/src/classes/ActiveSupport/XMLConverter/DisallowedType.html index ef732a1035..1e6890b1bc 100644 --- a/src/classes/ActiveSupport/XMLConverter/DisallowedType.html +++ b/src/classes/ActiveSupport/XMLConverter/DisallowedType.html @@ -86,22 +86,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/hash/conversions.rb, line 144
+      def initialize(type)
+        super "Disallowed type attribute: #{type.inspect}"
+      end
- -
-
# File activesupport/lib/active_support/core_ext/hash/conversions.rb, line 144
-def initialize(type)
-  super "Disallowed type attribute: #{type.inspect}"
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/ActiveSupport/XmlMini.html b/src/classes/ActiveSupport/XmlMini.html index 894b49042d..874b32ec2a 100644 --- a/src/classes/ActiveSupport/XmlMini.html +++ b/src/classes/ActiveSupport/XmlMini.html @@ -210,22 +210,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/xml_mini.rb, line 97
+    def backend
+      current_thread_backend || @backend
+    end
- -
-
# File activesupport/lib/active_support/xml_mini.rb, line 97
-def backend
-  current_thread_backend || @backend
-end
-
-
- - + See on GitHub + + + +

@@ -245,24 +245,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/xml_mini.rb, line 101
+    def backend=(name)
+      backend = name && cast_backend_name_to_module(name)
+      self.current_thread_backend = backend if current_thread_backend
+      @backend = backend
+    end
- -
-
# File activesupport/lib/active_support/xml_mini.rb, line 101
-def backend=(name)
-  backend = name && cast_backend_name_to_module(name)
-  self.current_thread_backend = backend if current_thread_backend
-  @backend = backend
-end
-
-
- -

+ See on GitHub + + + +

@@ -282,28 +282,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/xml_mini.rb, line 148
+    def rename_key(key, options = {})
+      camelize  = options[:camelize]
+      dasherize = !options.has_key?(:dasherize) || options[:dasherize]
+      if camelize
+        key = true == camelize ? key.camelize : key.camelize(camelize)
+      end
+      key = _dasherize(key) if dasherize
+      key
+    end
- -
-
# File activesupport/lib/active_support/xml_mini.rb, line 148
-def rename_key(key, options = {})
-  camelize  = options[:camelize]
-  dasherize = !options.has_key?(:dasherize) || options[:dasherize]
-  if camelize
-    key = true == camelize ? key.camelize : key.camelize(camelize)
-  end
-  key = _dasherize(key) if dasherize
-  key
-end
-
-
- -

+ See on GitHub + + + +

@@ -323,51 +323,51 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/xml_mini.rb, line 115
+    def to_tag(key, value, options)
+      type_name = options.delete(:type)
+      merged_options = options.merge(root: key, skip_instruct: true)
+
+      if value.is_a?(::Method) || value.is_a?(::Proc)
+        if value.arity == 1
+          value.call(merged_options)
+        else
+          value.call(merged_options, key.to_s.singularize)
+        end
+      elsif value.respond_to?(:to_xml)
+        value.to_xml(merged_options)
+      else
+        type_name ||= TYPE_NAMES[value.class.name]
+        type_name ||= value.class.name if value && !value.respond_to?(:to_str)
+        type_name   = type_name.to_s   if type_name
+        type_name   = "dateTime" if type_name == "datetime"
+
+        key = rename_key(key.to_s, options)
+
+        attributes = options[:skip_types] || type_name.nil? ? {} : { type: type_name }
+        attributes[:nil] = true if value.nil?
+
+        encoding = options[:encoding] || DEFAULT_ENCODINGS[type_name]
+        attributes[:encoding] = encoding if encoding
+
+        formatted_value = FORMATTING[type_name] && !value.nil? ?
+          FORMATTING[type_name].call(value) : value
+
+        options[:builder].tag!(key, formatted_value, attributes)
+      end
+    end
- -
-
# File activesupport/lib/active_support/xml_mini.rb, line 115
-def to_tag(key, value, options)
-  type_name = options.delete(:type)
-  merged_options = options.merge(root: key, skip_instruct: true)
-
-  if value.is_a?(::Method) || value.is_a?(::Proc)
-    if value.arity == 1
-      value.call(merged_options)
-    else
-      value.call(merged_options, key.to_s.singularize)
-    end
-  elsif value.respond_to?(:to_xml)
-    value.to_xml(merged_options)
-  else
-    type_name ||= TYPE_NAMES[value.class.name]
-    type_name ||= value.class.name if value && !value.respond_to?(:to_str)
-    type_name   = type_name.to_s   if type_name
-    type_name   = "dateTime" if type_name == "datetime"
-
-    key = rename_key(key.to_s, options)
-
-    attributes = options[:skip_types] || type_name.nil? ? {} : { type: type_name }
-    attributes[:nil] = true if value.nil?
-
-    encoding = options[:encoding] || DEFAULT_ENCODINGS[type_name]
-    attributes[:encoding] = encoding if encoding
-
-    formatted_value = FORMATTING[type_name] && !value.nil? ?
-      FORMATTING[type_name].call(value) : value
-
-    options[:builder].tag!(key, formatted_value, attributes)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -387,26 +387,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/xml_mini.rb, line 107
+    def with_backend(name)
+      old_backend = current_thread_backend
+      self.current_thread_backend = name && cast_backend_name_to_module(name)
+      yield
+    ensure
+      self.current_thread_backend = old_backend
+    end
- -
-
# File activesupport/lib/active_support/xml_mini.rb, line 107
-def with_backend(name)
-  old_backend = current_thread_backend
-  self.current_thread_backend = name && cast_backend_name_to_module(name)
-  yield
-ensure
-  self.current_thread_backend = old_backend
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/XmlMini_LibXMLSAX/HashBuilder.html b/src/classes/ActiveSupport/XmlMini_LibXMLSAX/HashBuilder.html index e4c29c164b..17c9883d8f 100644 --- a/src/classes/ActiveSupport/XmlMini_LibXMLSAX/HashBuilder.html +++ b/src/classes/ActiveSupport/XmlMini_LibXMLSAX/HashBuilder.html @@ -167,22 +167,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/xml_mini/libxmlsax.rb, line 21
+      def current_hash
+        @hash_stack.last
+      end
- -
-
# File activesupport/lib/active_support/xml_mini/libxmlsax.rb, line 21
-def current_hash
-  @hash_stack.last
-end
-
-
- - + See on GitHub + + + +

@@ -206,7 +206,8 @@

-

+ +

@@ -230,22 +231,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/xml_mini/libxmlsax.rb, line 55
+      def on_characters(string)
+        current_hash[CONTENT_KEY] << string
+      end
- -
-
# File activesupport/lib/active_support/xml_mini/libxmlsax.rb, line 55
-def on_characters(string)
-  current_hash[CONTENT_KEY] << string
-end
-
-
- -

+ See on GitHub + + + +

@@ -265,23 +266,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/xml_mini/libxmlsax.rb, line 30
+      def on_end_document
+        @hash = @hash_stack.pop
+        @hash.delete(CONTENT_KEY)
+      end
- -
-
# File activesupport/lib/active_support/xml_mini/libxmlsax.rb, line 30
-def on_end_document
-  @hash = @hash_stack.pop
-  @hash.delete(CONTENT_KEY)
-end
-
-
- -

+ See on GitHub + + + +

@@ -301,25 +302,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/xml_mini/libxmlsax.rb, line 48
+      def on_end_element(name)
+        if current_hash.length > current_hash.delete(HASH_SIZE_KEY) && current_hash[CONTENT_KEY].blank? || current_hash[CONTENT_KEY] == ""
+          current_hash.delete(CONTENT_KEY)
+        end
+        @hash_stack.pop
+      end
- -
-
# File activesupport/lib/active_support/xml_mini/libxmlsax.rb, line 48
-def on_end_element(name)
-  if current_hash.length > current_hash.delete(HASH_SIZE_KEY) && current_hash[CONTENT_KEY].blank? || current_hash[CONTENT_KEY] == ""
-    current_hash.delete(CONTENT_KEY)
-  end
-  @hash_stack.pop
-end
-
-
- -

+ See on GitHub + + + +

@@ -339,23 +340,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/xml_mini/libxmlsax.rb, line 25
+      def on_start_document
+        @hash = { CONTENT_KEY => +"" }
+        @hash_stack = [@hash]
+      end
- -
-
# File activesupport/lib/active_support/xml_mini/libxmlsax.rb, line 25
-def on_start_document
-  @hash = { CONTENT_KEY => +"" }
-  @hash_stack = [@hash]
-end
-
-
- -

+ See on GitHub + + + +

@@ -375,31 +376,31 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/xml_mini/libxmlsax.rb, line 35
+      def on_start_element(name, attrs = {})
+        new_hash = { CONTENT_KEY => +"" }.merge!(attrs)
+        new_hash[HASH_SIZE_KEY] = new_hash.size + 1
+
+        case current_hash[name]
+        when Array then current_hash[name] << new_hash
+        when Hash  then current_hash[name] = [current_hash[name], new_hash]
+        when nil   then current_hash[name] = new_hash
+        end
+
+        @hash_stack.push(new_hash)
+      end
- -
-
# File activesupport/lib/active_support/xml_mini/libxmlsax.rb, line 35
-def on_start_element(name, attrs = {})
-  new_hash = { CONTENT_KEY => +"" }.merge!(attrs)
-  new_hash[HASH_SIZE_KEY] = new_hash.size + 1
-
-  case current_hash[name]
-  when Array then current_hash[name] << new_hash
-  when Hash  then current_hash[name] = [current_hash[name], new_hash]
-  when nil   then current_hash[name] = new_hash
-  end
-
-  @hash_stack.push(new_hash)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ActiveSupport/XmlMini_NokogiriSAX/HashBuilder.html b/src/classes/ActiveSupport/XmlMini_NokogiriSAX/HashBuilder.html index 2efff3b02c..d3a0c337cd 100644 --- a/src/classes/ActiveSupport/XmlMini_NokogiriSAX/HashBuilder.html +++ b/src/classes/ActiveSupport/XmlMini_NokogiriSAX/HashBuilder.html @@ -163,7 +163,8 @@

- + +

@@ -187,22 +188,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/xml_mini/nokogirisax.rb, line 61
+      def characters(string)
+        current_hash[CONTENT_KEY] << string
+      end
- -
-
# File activesupport/lib/active_support/xml_mini/nokogirisax.rb, line 61
-def characters(string)
-  current_hash[CONTENT_KEY] << string
-end
-
-
- -

+ See on GitHub + + + +

@@ -222,22 +223,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/xml_mini/nokogirisax.rb, line 24
+      def current_hash
+        @hash_stack.last
+      end
- -
-
# File activesupport/lib/active_support/xml_mini/nokogirisax.rb, line 24
-def current_hash
-  @hash_stack.last
-end
-
-
- -

+ See on GitHub + + + +

@@ -257,22 +258,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/xml_mini/nokogirisax.rb, line 33
+      def end_document
+        raise "Parse stack not empty!" if @hash_stack.size > 1
+      end
- -
-
# File activesupport/lib/active_support/xml_mini/nokogirisax.rb, line 33
-def end_document
-  raise "Parse stack not empty!" if @hash_stack.size > 1
-end
-
-
- -

+ See on GitHub + + + +

@@ -292,25 +293,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/xml_mini/nokogirisax.rb, line 54
+      def end_element(name)
+        if current_hash.length > current_hash.delete(HASH_SIZE_KEY) && current_hash[CONTENT_KEY].blank? || current_hash[CONTENT_KEY] == ""
+          current_hash.delete(CONTENT_KEY)
+        end
+        @hash_stack.pop
+      end
- -
-
# File activesupport/lib/active_support/xml_mini/nokogirisax.rb, line 54
-def end_element(name)
-  if current_hash.length > current_hash.delete(HASH_SIZE_KEY) && current_hash[CONTENT_KEY].blank? || current_hash[CONTENT_KEY] == ""
-    current_hash.delete(CONTENT_KEY)
-  end
-  @hash_stack.pop
-end
-
-
- -

+ See on GitHub + + + +

@@ -330,22 +331,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/xml_mini/nokogirisax.rb, line 37
+      def error(error_message)
+        raise error_message
+      end
- -
-
# File activesupport/lib/active_support/xml_mini/nokogirisax.rb, line 37
-def error(error_message)
-  raise error_message
-end
-
-
- -

+ See on GitHub + + + +

@@ -365,23 +366,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/xml_mini/nokogirisax.rb, line 28
+      def start_document
+        @hash = {}
+        @hash_stack = [@hash]
+      end
- -
-
# File activesupport/lib/active_support/xml_mini/nokogirisax.rb, line 28
-def start_document
-  @hash = {}
-  @hash_stack = [@hash]
-end
-
-
- -

+ See on GitHub + + + +

@@ -401,31 +402,31 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/xml_mini/nokogirisax.rb, line 41
+      def start_element(name, attrs = [])
+        new_hash = { CONTENT_KEY => +"" }.merge!(Hash[attrs])
+        new_hash[HASH_SIZE_KEY] = new_hash.size + 1
+
+        case current_hash[name]
+        when Array then current_hash[name] << new_hash
+        when Hash  then current_hash[name] = [current_hash[name], new_hash]
+        when nil   then current_hash[name] = new_hash
+        end
+
+        @hash_stack.push(new_hash)
+      end
- -
-
# File activesupport/lib/active_support/xml_mini/nokogirisax.rb, line 41
-def start_element(name, attrs = [])
-  new_hash = { CONTENT_KEY => +"" }.merge!(Hash[attrs])
-  new_hash[HASH_SIZE_KEY] = new_hash.size + 1
-
-  case current_hash[name]
-  when Array then current_hash[name] << new_hash
-  when Hash  then current_hash[name] = [current_hash[name], new_hash]
-  when nil   then current_hash[name] = new_hash
-  end
-
-  @hash_stack.push(new_hash)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Arel.html b/src/classes/Arel.html index 856fca51e2..c8efe6d3d1 100644 --- a/src/classes/Arel.html +++ b/src/classes/Arel.html @@ -101,26 +101,26 @@

- -
+ +
+ + Source code + + +
# File activerecord/lib/arel.rb, line 48
+  def self.sql(sql_string, *positional_binds, **named_binds)
+    if positional_binds.empty? && named_binds.empty?
+      Arel::Nodes::SqlLiteral.new sql_string
+    else
+      Arel::Nodes::BoundSqlLiteral.new sql_string, positional_binds, named_binds
+    end
+  end
- -
-
# File activerecord/lib/arel.rb, line 48
-def self.sql(sql_string, *positional_binds, **named_binds)
-  if positional_binds.empty? && named_binds.empty?
-    Arel::Nodes::SqlLiteral.new sql_string
-  else
-    Arel::Nodes::BoundSqlLiteral.new sql_string, positional_binds, named_binds
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/Arel/Nodes.html b/src/classes/Arel/Nodes.html deleted file mode 100644 index 696d0707d1..0000000000 --- a/src/classes/Arel/Nodes.html +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: Arel::Nodes -layout: default ---- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/Array.html b/src/classes/Array.html index 7f54a5279e..ac5d2f5637 100644 --- a/src/classes/Array.html +++ b/src/classes/Array.html @@ -240,28 +240,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/array/wrap.rb, line 39
+  def self.wrap(object)
+    if object.nil?
+      []
+    elsif object.respond_to?(:to_ary)
+      object.to_ary || [object]
+    else
+      [object]
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/array/wrap.rb, line 39
-def self.wrap(object)
-  if object.nil?
-    []
-  elsif object.respond_to?(:to_ary)
-    object.to_ary || [object]
-  else
-    [object]
-  end
-end
-
-
- - + See on GitHub + + + + @@ -293,22 +293,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/deep_dup.rb, line 29
+  def deep_dup
+    map(&:deep_dup)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/deep_dup.rb, line 29
-def deep_dup
-  map(&:deep_dup)
-end
-
-
- - + See on GitHub + + + +

@@ -338,22 +338,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/array/access.rb, line 47
+  def excluding(*elements)
+    self - elements.flatten(1)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/array/access.rb, line 47
-def excluding(*elements)
-  self - elements.flatten(1)
-end
-
-
- -

+ See on GitHub + + + +

@@ -378,30 +378,30 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/array/extract.rb, line 10
+  def extract!
+    return to_enum(:extract!) { size } unless block_given?
+
+    extracted_elements = []
+
+    reject! do |element|
+      extracted_elements << element if yield(element)
+    end
+
+    extracted_elements
+  end
- -
-
# File activesupport/lib/active_support/core_ext/array/extract.rb, line 10
-def extract!
-  return to_enum(:extract!) { size } unless block_given?
-
-  extracted_elements = []
-
-  reject! do |element|
-    extracted_elements << element if yield(element)
-  end
-
-  extracted_elements
-end
-
-
- -

+ See on GitHub + + + +

@@ -429,26 +429,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/array/extract_options.rb, line 24
+  def extract_options!
+    if last.is_a?(Hash) && last.extractable_options?
+      pop
+    else
+      {}
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/array/extract_options.rb, line 24
-def extract_options!
-  if last.is_a?(Hash) && last.extractable_options?
-    pop
-  else
-    {}
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -471,22 +471,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/array/access.rb, line 76
+  def fifth
+    self[4]
+  end
- -
-
# File activesupport/lib/active_support/core_ext/array/access.rb, line 76
-def fifth
-  self[4]
-end
-
-
- -

+ See on GitHub + + + +

@@ -509,22 +509,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/array/access.rb, line 83
+  def forty_two
+    self[41]
+  end
- -
-
# File activesupport/lib/active_support/core_ext/array/access.rb, line 83
-def forty_two
-  self[41]
-end
-
-
- -

+ See on GitHub + + + +

@@ -547,22 +547,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/array/access.rb, line 69
+  def fourth
+    self[3]
+  end
- -
-
# File activesupport/lib/active_support/core_ext/array/access.rb, line 69
-def fourth
-  self[3]
-end
-
-
- -

+ See on GitHub + + + +

@@ -590,22 +590,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/array/access.rb, line 12
+  def from(position)
+    self[position, length] || []
+  end
- -
-
# File activesupport/lib/active_support/core_ext/array/access.rb, line 12
-def from(position)
-  self[position, length] || []
-end
-
-
- -

+ See on GitHub + + + +

@@ -641,44 +641,44 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/array/grouping.rb, line 62
+  def in_groups(number, fill_with = nil, &block)
+    # size.div number gives minor group size;
+    # size % number gives how many objects need extra accommodation;
+    # each group hold either division or division + 1 items.
+    division = size.div number
+    modulo = size % number
+
+    # create a new array avoiding dup
+    groups = []
+    start = 0
+
+    number.times do |index|
+      length = division + (modulo > 0 && modulo > index ? 1 : 0)
+      groups << last_group = slice(start, length)
+      last_group << fill_with if fill_with != false &&
+        modulo > 0 && length == division
+      start += length
+    end
+
+    if block_given?
+      groups.each(&block)
+    else
+      groups
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/array/grouping.rb, line 62
-def in_groups(number, fill_with = nil, &block)
-  # size.div number gives minor group size;
-  # size % number gives how many objects need extra accommodation;
-  # each group hold either division or division + 1 items.
-  division = size.div number
-  modulo = size % number
-
-  # create a new array avoiding dup
-  groups = []
-  start = 0
-
-  number.times do |index|
-    length = division + (modulo > 0 && modulo > index ? 1 : 0)
-    groups << last_group = slice(start, length)
-    last_group << fill_with if fill_with != false &&
-      modulo > 0 && length == division
-    start += length
-  end
-
-  if block_given?
-    groups.each(&block)
-  else
-    groups
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -715,41 +715,41 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/array/grouping.rb, line 22
+  def in_groups_of(number, fill_with = nil, &block)
+    if number.to_i <= 0
+      raise ArgumentError,
+        "Group size must be a positive integer, was #{number.inspect}"
+    end
+
+    if fill_with == false
+      collection = self
+    else
+      # size % number gives how many extra we have;
+      # subtracting from number gives how many to add;
+      # modulo number ensures we don't add group of just fill.
+      padding = (number - size % number) % number
+      collection = dup.concat(Array.new(padding, fill_with))
+    end
+
+    if block_given?
+      collection.each_slice(number, &block)
+    else
+      collection.each_slice(number).to_a
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/array/grouping.rb, line 22
-def in_groups_of(number, fill_with = nil, &block)
-  if number.to_i <= 0
-    raise ArgumentError,
-      "Group size must be a positive integer, was #{number.inspect}"
-  end
-
-  if fill_with == false
-    collection = self
-  else
-    # size % number gives how many extra we have;
-    # subtracting from number gives how many to add;
-    # modulo number ensures we don't add group of just fill.
-    padding = (number - size % number) % number
-    collection = dup.concat(Array.new(padding, fill_with))
-  end
-
-  if block_given?
-    collection.each_slice(number, &block)
-  else
-    collection.each_slice(number).to_a
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -773,22 +773,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/array/access.rb, line 36
+  def including(*elements)
+    self + elements.flatten(1)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/array/access.rb, line 36
-def including(*elements)
-  self + elements.flatten(1)
-end
-
-
- -

+ See on GitHub + + + +

@@ -817,22 +817,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/array/inquiry.rb, line 16
+  def inquiry
+    ActiveSupport::ArrayInquirer.new(self)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/array/inquiry.rb, line 16
-def inquiry
-  ActiveSupport::ArrayInquirer.new(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -855,22 +855,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/array/access.rb, line 55
+  def second
+    self[1]
+  end
- -
-
# File activesupport/lib/active_support/core_ext/array/access.rb, line 55
-def second
-  self[1]
-end
-
-
- -

+ See on GitHub + + + +

@@ -893,22 +893,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/array/access.rb, line 97
+  def second_to_last
+    self[-2]
+  end
- -
-
# File activesupport/lib/active_support/core_ext/array/access.rb, line 97
-def second_to_last
-  self[-2]
-end
-
-
- -

+ See on GitHub + + + +

@@ -932,35 +932,35 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/array/grouping.rb, line 93
+  def split(value = nil, &block)
+    arr = dup
+    result = []
+    if block_given?
+      while (idx = arr.index(&block))
+        result << arr.shift(idx)
+        arr.shift
+      end
+    else
+      while (idx = arr.index(value))
+        result << arr.shift(idx)
+        arr.shift
+      end
+    end
+    result << arr
+  end
- -
-
# File activesupport/lib/active_support/core_ext/array/grouping.rb, line 93
-def split(value = nil, &block)
-  arr = dup
-  result = []
-  if block_given?
-    while (idx = arr.index(&block))
-      result << arr.shift(idx)
-      arr.shift
-    end
-  else
-    while (idx = arr.index(value))
-      result << arr.shift(idx)
-      arr.shift
-    end
-  end
-  result << arr
-end
-
-
- -

+ See on GitHub + + + +

@@ -983,22 +983,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/array/access.rb, line 62
+  def third
+    self[2]
+  end
- -
-
# File activesupport/lib/active_support/core_ext/array/access.rb, line 62
-def third
-  self[2]
-end
-
-
- -

+ See on GitHub + + + +

@@ -1021,22 +1021,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/array/access.rb, line 90
+  def third_to_last
+    self[-3]
+  end
- -
-
# File activesupport/lib/active_support/core_ext/array/access.rb, line 90
-def third_to_last
-  self[-3]
-end
-
-
- -

+ See on GitHub + + + +

@@ -1064,26 +1064,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/array/access.rb, line 24
+  def to(position)
+    if position >= 0
+      take position + 1
+    else
+      self[0..position]
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/array/access.rb, line 24
-def to(position)
-  if position >= 0
-    take position + 1
-  else
-    self[0..position]
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1107,7 +1107,8 @@

-

+ +

@@ -1138,31 +1139,31 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/array/conversions.rb, line 94
+  def to_fs(format = :default)
+    case format
+    when :db
+      if empty?
+        "null"
+      else
+        collect(&:id).join(",")
+      end
+    else
+      to_s
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/array/conversions.rb, line 94
-def to_fs(format = :default)
-  case format
-  when :db
-    if empty?
-      "null"
-    else
-      collect(&:id).join(",")
-    end
-  else
-    to_s
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1182,22 +1183,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/to_query.rb, line 42
+  def to_param
+    collect(&:to_param).join "/"
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/to_query.rb, line 42
-def to_param
-  collect(&:to_param).join "/"
-end
-
-
- -

+ See on GitHub + + + +

@@ -1220,28 +1221,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/to_query.rb, line 50
+  def to_query(key)
+    prefix = "#{key}[]"
+
+    if empty?
+      nil.to_query(prefix)
+    else
+      collect { |value| value.to_query(prefix) }.join "&"
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/to_query.rb, line 50
-def to_query(key)
-  prefix = "#{key}[]"
-
-  if empty?
-    nil.to_query(prefix)
-  else
-    collect { |value| value.to_query(prefix) }.join "&"
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1309,44 +1310,44 @@

Examples

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/array/conversions.rb, line 60
+  def to_sentence(options = {})
+    options.assert_valid_keys(:words_connector, :two_words_connector, :last_word_connector, :locale)
+
+    default_connectors = {
+      words_connector: ", ",
+      two_words_connector: " and ",
+      last_word_connector: ", and "
+    }
+    if options[:locale] != false && defined?(I18n)
+      i18n_connectors = I18n.translate(:'support.array', locale: options[:locale], default: {})
+      default_connectors.merge!(i18n_connectors)
+    end
+    options = default_connectors.merge!(options)
+
+    case length
+    when 0
+      +""
+    when 1
+      +"#{self[0]}"
+    when 2
+      +"#{self[0]}#{options[:two_words_connector]}#{self[1]}"
+    else
+      +"#{self[0...-1].join(options[:words_connector])}#{options[:last_word_connector]}#{self[-1]}"
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/array/conversions.rb, line 60
-def to_sentence(options = {})
-  options.assert_valid_keys(:words_connector, :two_words_connector, :last_word_connector, :locale)
-
-  default_connectors = {
-    words_connector: ", ",
-    two_words_connector: " and ",
-    last_word_connector: ", and "
-  }
-  if options[:locale] != false && defined?(I18n)
-    i18n_connectors = I18n.translate(:'support.array', locale: options[:locale], default: {})
-    default_connectors.merge!(i18n_connectors)
-  end
-  options = default_connectors.merge!(options)
-
-  case length
-  when 0
-    +""
-  when 1
-    +"#{self[0]}"
-  when 2
-    +"#{self[0]}#{options[:two_words_connector]}#{self[1]}"
-  else
-    +"#{self[0...-1].join(options[:words_connector])}#{options[:last_word_connector]}#{self[-1]}"
-  end
-end
-
-
- -
+ See on GitHub + + + +

@@ -1439,49 +1440,49 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/array/conversions.rb, line 185
+  def to_xml(options = {})
+    require "active_support/builder" unless defined?(Builder::XmlMarkup)
+
+    options = options.dup
+    options[:indent]  ||= 2
+    options[:builder] ||= Builder::XmlMarkup.new(indent: options[:indent])
+    options[:root]    ||= \
+      if first.class != Hash && all?(first.class)
+        underscored = ActiveSupport::Inflector.underscore(first.class.name)
+        ActiveSupport::Inflector.pluralize(underscored).tr("/", "_")
+      else
+        "objects"
+      end
+
+    builder = options[:builder]
+    builder.instruct! unless options.delete(:skip_instruct)
+
+    root = ActiveSupport::XmlMini.rename_key(options[:root].to_s, options)
+    children = options.delete(:children) || root.singularize
+    attributes = options[:skip_types] ? {} : { type: "array" }
+
+    if empty?
+      builder.tag!(root, attributes)
+    else
+      builder.tag!(root, attributes) do
+        each { |value| ActiveSupport::XmlMini.to_tag(children, value, options) }
+        yield builder if block_given?
+      end
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/array/conversions.rb, line 185
-def to_xml(options = {})
-  require "active_support/builder" unless defined?(Builder::XmlMarkup)
-
-  options = options.dup
-  options[:indent]  ||= 2
-  options[:builder] ||= Builder::XmlMarkup.new(indent: options[:indent])
-  options[:root]    ||= \
-    if first.class != Hash && all?(first.class)
-      underscored = ActiveSupport::Inflector.underscore(first.class.name)
-      ActiveSupport::Inflector.pluralize(underscored).tr("/", "_")
-    else
-      "objects"
-    end
-
-  builder = options[:builder]
-  builder.instruct! unless options.delete(:skip_instruct)
-
-  root = ActiveSupport::XmlMini.rename_key(options[:root].to_s, options)
-  children = options.delete(:children) || root.singularize
-  attributes = options[:skip_types] ? {} : { type: "array" }
-
-  if empty?
-    builder.tag!(root, attributes)
-  else
-    builder.tag!(root, attributes) do
-      each { |value| ActiveSupport::XmlMini.to_tag(children, value, options) }
-      yield builder if block_given?
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1505,7 +1506,8 @@

-

+ + diff --git a/src/classes/Benchmark.html b/src/classes/Benchmark.html index e76d68d25d..1ee6ca1316 100644 --- a/src/classes/Benchmark.html +++ b/src/classes/Benchmark.html @@ -81,22 +81,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/benchmark.rb, line 13
+  def ms(&block)
+    1000 * realtime(&block)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/benchmark.rb, line 13
-def ms(&block)
-  1000 * realtime(&block)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/Class.html b/src/classes/Class.html index 0d8aae8b96..fb6ed4c753 100644 --- a/src/classes/Class.html +++ b/src/classes/Class.html @@ -173,65 +173,65 @@

Examples

- -
- - -
-
# File activesupport/lib/active_support/core_ext/class/attribute.rb, line 85
-  def class_attribute(*attrs, instance_accessor: true,
-    instance_reader: instance_accessor, instance_writer: instance_accessor, instance_predicate: true, default: nil)
-
-    class_methods, methods = [], []
-    attrs.each do |name|
-      unless name.is_a?(Symbol) || name.is_a?(String)
-        raise TypeError, "#{name.inspect} is not a symbol nor a string"
-      end
-
-      class_methods << <<~RUBY # In case the method exists and is not public
-        silence_redefinition_of_method def #{name}
+          
+            
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/class/attribute.rb, line 85
+  def class_attribute(*attrs, instance_accessor: true,
+    instance_reader: instance_accessor, instance_writer: instance_accessor, instance_predicate: true, default: nil)
+
+    class_methods, methods = [], []
+    attrs.each do |name|
+      unless name.is_a?(Symbol) || name.is_a?(String)
+        raise TypeError, "#{name.inspect} is not a symbol nor a string"
+      end
+
+      class_methods << <<~RUBY # In case the method exists and is not public
+        silence_redefinition_of_method def #{name}
         end
-      RUBY
+      RUBY
 
-      methods << <<~RUBY if instance_reader
-        silence_redefinition_of_method def #{name}
+      methods << <<~RUBY if instance_reader
+        silence_redefinition_of_method def #{name}
           defined?(@#{name}) ? @#{name} : self.class.#{name}
         end
-      RUBY
+      RUBY
 
-      class_methods << <<~RUBY
-        silence_redefinition_of_method def #{name}=(value)
+      class_methods << <<~RUBY
+        silence_redefinition_of_method def #{name}=(value)
           redefine_method(:#{name}) { value } if singleton_class?
           redefine_singleton_method(:#{name}) { value }
           value
         end
-      RUBY
+      RUBY
 
-      methods << <<~RUBY if instance_writer
-        silence_redefinition_of_method(:#{name}=)
+      methods << <<~RUBY if instance_writer
+        silence_redefinition_of_method(:#{name}=)
         attr_writer :#{name}
-      RUBY
-
-      if instance_predicate
-        class_methods << "silence_redefinition_of_method def #{name}?; !!self.#{name}; end"
-        if instance_reader
-          methods << "silence_redefinition_of_method def #{name}?; !!self.#{name}; end"
-        end
-      end
-    end
-
-    location = caller_locations(1, 1).first
-    class_eval(["class << self", *class_methods, "end", *methods].join(";").tr("\n", ";"), location.path, location.lineno)
-
-    attrs.each { |name| public_send("#{name}=", default) }
-  end
-
-
- - + RUBY + + if instance_predicate + class_methods << "silence_redefinition_of_method def #{name}?; !!self.#{name}; end" + if instance_reader + methods << "silence_redefinition_of_method def #{name}?; !!self.#{name}; end" + end + end + end + + location = caller_locations(1, 1).first + class_eval(["class << self", *class_methods, "end", *methods].join(";").tr("\n", ";"), location.path, location.lineno) + + attrs.each { |name| public_send("#{name}=", default) } + end + + See on GitHub + + + +

@@ -264,22 +264,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/class/subclasses.rb, line 21
+    def descendants
+      subclasses.concat(subclasses.flat_map(&:descendants))
+    end
- -
-
# File activesupport/lib/active_support/core_ext/class/subclasses.rb, line 21
-def descendants
-  subclasses.concat(subclasses.flat_map(&:descendants))
-end
-
-
- -

+ See on GitHub + + + +

@@ -306,22 +306,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/class/subclasses.rb, line 38
+    def subclasses
+      descendants.select { |descendant| descendant.superclass == self }
+    end
- -
-
# File activesupport/lib/active_support/core_ext/class/subclasses.rb, line 38
-def subclasses
-  descendants.select { |descendant| descendant.superclass == self }
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Complex.html b/src/classes/Complex.html deleted file mode 100644 index f5c8874938..0000000000 --- a/src/classes/Complex.html +++ /dev/null @@ -1,113 +0,0 @@ ---- -title: Complex -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - - -

Instance Public methods

- -
-

- - duplicable?() - -

- - -
-

Complexes are not duplicable:

- -
Complex(1).duplicable? # => false
-Complex(1).dup         # => TypeError: can't copy Complex
-
-
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/core_ext/object/duplicable.rb, line 137
-def duplicable?
-  false
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/Date.html b/src/classes/Date.html index b1a35f6f3f..3de2cae357 100644 --- a/src/classes/Date.html +++ b/src/classes/Date.html @@ -288,22 +288,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 19
+    def beginning_of_week
+      ::ActiveSupport::IsolatedExecutionState[:beginning_of_week] || beginning_of_week_default || :monday
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 19
-def beginning_of_week
-  ::ActiveSupport::IsolatedExecutionState[:beginning_of_week] || beginning_of_week_default || :monday
-end
-
-
- - + See on GitHub + + + +

@@ -325,22 +325,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 27
+    def beginning_of_week=(week_start)
+      ::ActiveSupport::IsolatedExecutionState[:beginning_of_week] = find_beginning_of_week!(week_start)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 27
-def beginning_of_week=(week_start)
-  ::ActiveSupport::IsolatedExecutionState[:beginning_of_week] = find_beginning_of_week!(week_start)
-end
-
-
- -

+ See on GitHub + + + +

@@ -360,22 +360,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 48
+    def current
+      ::Time.zone ? ::Time.zone.today : ::Date.today
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 48
-def current
-  ::Time.zone ? ::Time.zone.today : ::Date.today
-end
-
-
- -

+ See on GitHub + + + +

@@ -395,23 +395,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 32
+    def find_beginning_of_week!(week_start)
+      raise ArgumentError, "Invalid beginning of week: #{week_start}" unless ::Date::DAYS_INTO_WEEK.key?(week_start)
+      week_start
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 32
-def find_beginning_of_week!(week_start)
-  raise ArgumentError, "Invalid beginning of week: #{week_start}" unless ::Date::DAYS_INTO_WEEK.key?(week_start)
-  week_start
-end
-
-
- -

+ See on GitHub + + + +

@@ -431,22 +431,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 43
+    def tomorrow
+      ::Date.current.tomorrow
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 43
-def tomorrow
-  ::Date.current.tomorrow
-end
-
-
- -

+ See on GitHub + + + +

@@ -466,22 +466,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 38
+    def yesterday
+      ::Date.current.yesterday
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 38
-def yesterday
-  ::Date.current.yesterday
-end
-
-
- -

+ See on GitHub + + + + @@ -513,7 +513,8 @@

- + +

@@ -533,22 +534,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date/acts_like.rb, line 7
+  def acts_like_date?
+    true
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date/acts_like.rb, line 7
-def acts_like_date?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -580,29 +581,29 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 127
+  def advance(options)
+    d = self
+
+    d = d >> options[:years] * 12 if options[:years]
+    d = d >> options[:months] if options[:months]
+    d = d + options[:weeks] * 7 if options[:weeks]
+    d = d + options[:days] if options[:days]
+
+    d
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 127
-def advance(options)
-  d = self
-
-  d = d >> options[:years] * 12 if options[:years]
-  d = d >> options[:months] if options[:months]
-  d = d + options[:weeks] * 7 if options[:weeks]
-  d = d + options[:days] if options[:days]
-
-  d
-end
-
-
- -

+ See on GitHub + + + +

@@ -622,22 +623,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 55
+  def ago(seconds)
+    in_time_zone.since(-seconds)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 55
-def ago(seconds)
-  in_time_zone.since(-seconds)
-end
-
-
- -

+ See on GitHub + + + +

@@ -661,7 +662,8 @@

-

+ +

@@ -685,7 +687,8 @@

-

+ +

@@ -709,7 +712,8 @@

-

+ +

@@ -733,7 +737,8 @@

-

+ +

@@ -757,7 +762,8 @@

-

+ +

@@ -781,7 +787,8 @@

-

+ +

@@ -805,22 +812,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 67
+  def beginning_of_day
+    in_time_zone
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 67
-def beginning_of_day
-  in_time_zone
-end
-
-
- -

+ See on GitHub + + + +

@@ -844,26 +851,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 143
+  def change(options)
+    ::Date.new(
+      options.fetch(:year, year),
+      options.fetch(:month, month),
+      options.fetch(:day, day)
+    )
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 143
-def change(options)
-  ::Date.new(
-    options.fetch(:year, year),
-    options.fetch(:month, month),
-    options.fetch(:day, day)
-  )
-end
-
-
- -

+ See on GitHub + + + +

@@ -887,26 +894,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 152
+  def compare_with_coercion(other)
+    if other.is_a?(Time)
+      to_datetime <=> other
+    else
+      compare_without_coercion(other)
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 152
-def compare_with_coercion(other)
-  if other.is_a?(Time)
-    to_datetime <=> other
-  else
-    compare_without_coercion(other)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -930,7 +937,8 @@

-

+ +

@@ -954,7 +962,8 @@

-

+ +

@@ -978,22 +987,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 85
+  def end_of_day
+    in_time_zone.end_of_day
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 85
-def end_of_day
-  in_time_zone.end_of_day
-end
-
-
- -

+ See on GitHub + + + +

@@ -1017,7 +1026,8 @@

-

+ +

@@ -1045,7 +1055,8 @@

-

+ +

@@ -1069,7 +1080,8 @@

-

+ +

@@ -1093,22 +1105,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 75
+  def middle_of_day
+    in_time_zone.middle_of_day
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 75
-def middle_of_day
-  in_time_zone.middle_of_day
-end
-
-
- -

+ See on GitHub + + + +

@@ -1132,7 +1144,8 @@

-

+ +

@@ -1156,7 +1169,8 @@

-

+ +

@@ -1180,22 +1194,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date/conversions.rb, line 63
+  def readable_inspect
+    strftime("%a, %d %b %Y")
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date/conversions.rb, line 63
-def readable_inspect
-  strftime("%a, %d %b %Y")
-end
-
-
- -

+ See on GitHub + + + +

@@ -1219,22 +1233,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 61
+  def since(seconds)
+    in_time_zone.since(seconds)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 61
-def since(seconds)
-  in_time_zone.since(seconds)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1258,7 +1272,8 @@

-

+ +

@@ -1306,30 +1321,30 @@

Adding your - -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date/conversions.rb, line 47
+  def to_fs(format = :default)
+    if formatter = DATE_FORMATS[format]
+      if formatter.respond_to?(:call)
+        formatter.call(self).to_s
+      else
+        strftime(formatter)
+      end
+    else
+      to_default_s
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date/conversions.rb, line 47
-def to_fs(format = :default)
-  if formatter = DATE_FORMATS[format]
-    if formatter.respond_to?(:call)
-      formatter.call(self).to_s
-    else
-      strftime(formatter)
-    end
-  else
-    to_default_s
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1359,23 +1374,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date/conversions.rb, line 83
+  def to_time(form = :local)
+    raise ArgumentError, "Expected :local or :utc, got #{form.inspect}." unless [:local, :utc].include?(form)
+    ::Time.public_send(form, year, month, day)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date/conversions.rb, line 83
-def to_time(form = :local)
-  raise ArgumentError, "Expected :local or :utc, got #{form.inspect}." unless [:local, :utc].include?(form)
-  ::Time.public_send(form, year, month, day)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1399,22 +1414,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date/conversions.rb, line 95
+  def xmlschema
+    in_time_zone.xmlschema
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date/conversions.rb, line 95
-def xmlschema
-  in_time_zone.xmlschema
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/DateAndTime/Calculations.html b/src/classes/DateAndTime/Calculations.html index fc0f7f357f..8e3614f327 100644 --- a/src/classes/DateAndTime/Calculations.html +++ b/src/classes/DateAndTime/Calculations.html @@ -345,22 +345,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 72
+    def after?(date_or_time)
+      self > date_or_time
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 72
-def after?(date_or_time)
-  self > date_or_time
-end
-
-
- - + See on GitHub + + + +

@@ -380,22 +380,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 310
+    def all_day
+      beginning_of_day..end_of_day
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 310
-def all_day
-  beginning_of_day..end_of_day
-end
-
-
- -

+ See on GitHub + + + +

@@ -415,22 +415,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 321
+    def all_month
+      beginning_of_month..end_of_month
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 321
-def all_month
-  beginning_of_month..end_of_month
-end
-
-
- -

+ See on GitHub + + + +

@@ -450,22 +450,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 326
+    def all_quarter
+      beginning_of_quarter..end_of_quarter
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 326
-def all_quarter
-  beginning_of_quarter..end_of_quarter
-end
-
-
- -

+ See on GitHub + + + +

@@ -485,22 +485,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 316
+    def all_week(start_day = Date.beginning_of_week)
+      beginning_of_week(start_day)..end_of_week(start_day)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 316
-def all_week(start_day = Date.beginning_of_week)
-  beginning_of_week(start_day)..end_of_week(start_day)
-end
-
-
- -

+ See on GitHub + + + +

@@ -520,22 +520,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 331
+    def all_year
+      beginning_of_year..end_of_year
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 331
-def all_year
-  beginning_of_year..end_of_year
-end
-
-
- -

+ See on GitHub + + + +

@@ -559,7 +559,8 @@

-

+ +

@@ -583,7 +584,8 @@

-

+ +

@@ -607,7 +609,8 @@

-

+ +

@@ -631,7 +634,8 @@

-

+ +

@@ -655,7 +659,8 @@

-

+ +

@@ -679,7 +684,8 @@

-

+ +

@@ -703,7 +709,8 @@

-

+ +

@@ -727,7 +734,8 @@

-

+ +

@@ -747,22 +755,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 67
+    def before?(date_or_time)
+      self < date_or_time
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 67
-def before?(date_or_time)
-  self < date_or_time
-end
-
-
- -

+ See on GitHub + + + +

@@ -796,22 +804,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 125
+    def beginning_of_month
+      first_hour(change(day: 1))
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 125
-def beginning_of_month
-  first_hour(change(day: 1))
-end
-
-
- -

+ See on GitHub + + + +

@@ -845,23 +853,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 139
+    def beginning_of_quarter
+      first_quarter_month = month - (2 + month) % 3
+      beginning_of_month.change(month: first_quarter_month)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 139
-def beginning_of_quarter
-  first_quarter_month = month - (2 + month) % 3
-  beginning_of_month.change(month: first_quarter_month)
-end
-
-
- -

+ See on GitHub + + + +

@@ -885,23 +893,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 267
+    def beginning_of_week(start_day = Date.beginning_of_week)
+      result = days_ago(days_to_week_start(start_day))
+      acts_like?(:time) ? result.midnight : result
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 267
-def beginning_of_week(start_day = Date.beginning_of_week)
-  result = days_ago(days_to_week_start(start_day))
-  acts_like?(:time) ? result.midnight : result
-end
-
-
- -

+ See on GitHub + + + +

@@ -935,22 +943,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 179
+    def beginning_of_year
+      change(month: 1).beginning_of_month
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 179
-def beginning_of_year
-  change(month: 1).beginning_of_month
-end
-
-
- -

+ See on GitHub + + + +

@@ -970,22 +978,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 77
+    def days_ago(days)
+      advance(days: -days)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 77
-def days_ago(days)
-  advance(days: -days)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1005,22 +1013,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 82
+    def days_since(days)
+      advance(days: days)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 82
-def days_since(days)
-  advance(days: days)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1040,23 +1048,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 258
+    def days_to_week_start(start_day = Date.beginning_of_week)
+      start_day_number = DAYS_INTO_WEEK.fetch(start_day)
+      (wday - start_day_number) % 7
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 258
-def days_to_week_start(start_day = Date.beginning_of_week)
-  start_day_number = DAYS_INTO_WEEK.fetch(start_day)
-  (wday - start_day_number) % 7
-end
-
-
- -

+ See on GitHub + + + +

@@ -1080,23 +1088,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 296
+    def end_of_month
+      last_day = ::Time.days_in_month(month, year)
+      last_hour(days_since(last_day - day))
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 296
-def end_of_month
-  last_day = ::Time.days_in_month(month, year)
-  last_hour(days_since(last_day - day))
-end
-
-
- -

+ See on GitHub + + + +

@@ -1130,23 +1138,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 154
+    def end_of_quarter
+      last_quarter_month = month + (12 - month) % 3
+      beginning_of_month.change(month: last_quarter_month).end_of_month
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 154
-def end_of_quarter
-  last_quarter_month = month + (12 - month) % 3
-  beginning_of_month.change(month: last_quarter_month).end_of_month
-end
-
-
- -

+ See on GitHub + + + +

@@ -1170,22 +1178,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 283
+    def end_of_week(start_day = Date.beginning_of_week)
+      last_hour(days_since(6 - days_to_week_start(start_day)))
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 283
-def end_of_week(start_day = Date.beginning_of_week)
-  last_hour(days_since(6 - days_to_week_start(start_day)))
-end
-
-
- -

+ See on GitHub + + + +

@@ -1209,22 +1217,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 304
+    def end_of_year
+      change(month: 12).end_of_month
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 304
-def end_of_year
-  change(month: 12).end_of_month
-end
-
-
- -

+ See on GitHub + + + +

@@ -1244,22 +1252,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 52
+    def future?
+      self > self.class.current
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 52
-def future?
-  self > self.class.current
-end
-
-
- -

+ See on GitHub + + + +

@@ -1279,22 +1287,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 240
+    def last_month
+      months_ago(1)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 240
-def last_month
-  months_ago(1)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1318,7 +1326,8 @@

-

+ +

@@ -1342,7 +1351,8 @@

-

+ +

@@ -1366,7 +1376,8 @@

-

+ +

@@ -1386,22 +1397,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 251
+    def last_year
+      years_ago(1)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 251
-def last_year
-  years_ago(1)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1421,22 +1432,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 275
+    def monday
+      beginning_of_week(:monday)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 275
-def monday
-  beginning_of_week(:monday)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1456,22 +1467,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 97
+    def months_ago(months)
+      advance(months: -months)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 97
-def months_ago(months)
-  advance(months: -months)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1491,22 +1502,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 102
+    def months_since(months)
+      advance(months: months)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 102
-def months_since(months)
-  advance(months: months)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1530,7 +1541,8 @@

-

+ +

@@ -1555,24 +1567,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 340
+    def next_occurring(day_of_week)
+      from_now = DAYS_INTO_WEEK.fetch(day_of_week) - wday
+      from_now += 7 unless from_now > 0
+      advance(days: from_now)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 340
-def next_occurring(day_of_week)
-  from_now = DAYS_INTO_WEEK.fetch(day_of_week) - wday
-  from_now += 7 unless from_now > 0
-  advance(days: from_now)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1592,22 +1604,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 215
+    def next_quarter
+      months_since(3)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 215
-def next_quarter
-  months_since(3)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1643,23 +1655,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 200
+    def next_week(given_day_in_next_week = Date.beginning_of_week, same_time: false)
+      result = first_hour(weeks_since(1).beginning_of_week.days_since(days_span(given_day_in_next_week)))
+      same_time ? copy_time_to(result) : result
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 200
-def next_week(given_day_in_next_week = Date.beginning_of_week, same_time: false)
-  result = first_hour(weeks_since(1).beginning_of_week.days_since(days_span(given_day_in_next_week)))
-  same_time ? copy_time_to(result) : result
-end
-
-
- -

+ See on GitHub + + + +

@@ -1679,26 +1691,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 206
+    def next_weekday
+      if next_day.on_weekend?
+        next_week(:monday, same_time: true)
+      else
+        next_day
+      end
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 206
-def next_weekday
-  if next_day.on_weekend?
-    next_week(:monday, same_time: true)
-  else
-    next_day
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1718,22 +1730,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 62
+    def on_weekday?
+      !WEEKEND_DAYS.include?(wday)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 62
-def on_weekday?
-  !WEEKEND_DAYS.include?(wday)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1753,22 +1765,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 57
+    def on_weekend?
+      WEEKEND_DAYS.include?(wday)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 57
-def on_weekend?
-  WEEKEND_DAYS.include?(wday)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1788,22 +1800,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 47
+    def past?
+      self < self.class.current
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 47
-def past?
-  self < self.class.current
-end
-
-
- -

+ See on GitHub + + + +

@@ -1827,7 +1839,8 @@

-

+ +

@@ -1852,24 +1865,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 351
+    def prev_occurring(day_of_week)
+      ago = wday - DAYS_INTO_WEEK.fetch(day_of_week)
+      ago += 7 unless ago > 0
+      advance(days: -ago)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 351
-def prev_occurring(day_of_week)
-  ago = wday - DAYS_INTO_WEEK.fetch(day_of_week)
-  ago += 7 unless ago > 0
-  advance(days: -ago)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1893,22 +1906,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 245
+    def prev_quarter
+      months_ago(3)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 245
-def prev_quarter
-  months_ago(3)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1932,23 +1945,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 223
+    def prev_week(start_day = Date.beginning_of_week, same_time: false)
+      result = first_hour(weeks_ago(1).beginning_of_week.days_since(days_span(start_day)))
+      same_time ? copy_time_to(result) : result
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 223
-def prev_week(start_day = Date.beginning_of_week, same_time: false)
-  result = first_hour(weeks_ago(1).beginning_of_week.days_since(days_span(start_day)))
-  same_time ? copy_time_to(result) : result
-end
-
-
- -

+ See on GitHub + + + +

@@ -1972,26 +1985,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 230
+    def prev_weekday
+      if prev_day.on_weekend?
+        copy_time_to(beginning_of_week(:friday))
+      else
+        prev_day
+      end
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 230
-def prev_weekday
-  if prev_day.on_weekend?
-    copy_time_to(beginning_of_week(:friday))
-  else
-    prev_day
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -2017,22 +2030,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 166
+    def quarter
+      (month / 3.0).ceil
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 166
-def quarter
-  (month / 3.0).ceil
-end
-
-
- -

+ See on GitHub + + + +

@@ -2052,22 +2065,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 290
+    def sunday
+      end_of_week(:monday)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 290
-def sunday
-  end_of_week(:monday)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2087,22 +2100,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 30
+    def today?
+      to_date == ::Date.current
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 30
-def today?
-  to_date == ::Date.current
-end
-
-
- -

+ See on GitHub + + + +

@@ -2122,22 +2135,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 25
+    def tomorrow
+      advance(days: 1)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 25
-def tomorrow
-  advance(days: 1)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2161,22 +2174,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 35
+    def tomorrow?
+      to_date == ::Date.current.tomorrow
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 35
-def tomorrow?
-  to_date == ::Date.current.tomorrow
-end
-
-
- -

+ See on GitHub + + + +

@@ -2196,22 +2209,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 87
+    def weeks_ago(weeks)
+      advance(weeks: -weeks)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 87
-def weeks_ago(weeks)
-  advance(weeks: -weeks)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2231,22 +2244,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 92
+    def weeks_since(weeks)
+      advance(weeks: weeks)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 92
-def weeks_since(weeks)
-  advance(weeks: weeks)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2266,22 +2279,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 107
+    def years_ago(years)
+      advance(years: -years)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 107
-def years_ago(years)
-  advance(years: -years)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2301,22 +2314,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 112
+    def years_since(years)
+      advance(years: years)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 112
-def years_since(years)
-  advance(years: years)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2336,22 +2349,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 20
+    def yesterday
+      advance(days: -1)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 20
-def yesterday
-  advance(days: -1)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2375,22 +2388,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 41
+    def yesterday?
+      to_date == ::Date.current.yesterday
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 41
-def yesterday?
-  to_date == ::Date.current.yesterday
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/DateAndTime/Zones.html b/src/classes/DateAndTime/Zones.html index 9a5b15cf08..cbd275d9de 100644 --- a/src/classes/DateAndTime/Zones.html +++ b/src/classes/DateAndTime/Zones.html @@ -88,29 +88,29 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_and_time/zones.rb, line 20
+    def in_time_zone(zone = ::Time.zone)
+      time_zone = ::Time.find_zone! zone
+      time = acts_like?(:time) ? self : nil
+
+      if time_zone
+        time_with_zone(time, time_zone)
+      else
+        time || to_time
+      end
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_and_time/zones.rb, line 20
-def in_time_zone(zone = ::Time.zone)
-  time_zone = ::Time.find_zone! zone
-  time = acts_like?(:time) ? self : nil
-
-  if time_zone
-    time_with_zone(time, time_zone)
-  else
-    time || to_time
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/DateTime.html b/src/classes/DateTime.html index 89a1827d1b..7adc137091 100644 --- a/src/classes/DateTime.html +++ b/src/classes/DateTime.html @@ -314,27 +314,27 @@

- -
- - -
-
# File activesupport/lib/active_support/core_ext/date_time/conversions.rb, line 73
-def self.civil_from_format(utc_or_local, year, month = 1, day = 1, hour = 0, min = 0, sec = 0)
-  if utc_or_local.to_sym == :local
-    offset = ::Time.local(year, month, day).utc_offset.to_r / 86400
-  else
-    offset = 0
-  end
-  civil(year, month, day, hour, min, sec, offset)
-end
-
-
- - + +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_time/conversions.rb, line 73
+  def self.civil_from_format(utc_or_local, year, month = 1, day = 1, hour = 0, min = 0, sec = 0)
+    if utc_or_local.to_sym == :local
+      offset = ::Time.local(year, month, day).utc_offset.to_r / 86400
+    else
+      offset = 0
+    end
+    civil(year, month, day, hour, min, sec, offset)
+  end
+ + See on GitHub + +
+ +

@@ -354,22 +354,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 10
+    def current
+      ::Time.zone ? ::Time.zone.now.to_datetime : ::Time.now.to_datetime
+    end
- -
-
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 10
-def current
-  ::Time.zone ? ::Time.zone.now.to_datetime : ::Time.now.to_datetime
-end
-
-
- -

+ See on GitHub + + + + @@ -393,26 +393,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 208
+  def <=>(other)
+    if other.respond_to? :to_datetime
+      super other.to_datetime rescue nil
+    else
+      super
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 208
-def <=>(other)
-  if other.respond_to? :to_datetime
-    super other.to_datetime rescue nil
-  else
-    super
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -432,22 +432,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_time/acts_like.rb, line 8
+  def acts_like_date?
+    true
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date_time/acts_like.rb, line 8
-def acts_like_date?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -467,22 +467,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_time/acts_like.rb, line 13
+  def acts_like_time?
+    true
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date_time/acts_like.rb, line 13
-def acts_like_time?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -504,43 +504,43 @@

- -
- - -
-
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 82
-def advance(options)
-  unless options[:weeks].nil?
-    options[:weeks], partial_weeks = options[:weeks].divmod(1)
-    options[:days] = options.fetch(:days, 0) + 7 * partial_weeks
-  end
+          
+            
+ + Source code + - unless options[:days].nil? - options[:days], partial_days = options[:days].divmod(1) - options[:hours] = options.fetch(:hours, 0) + 24 * partial_days - end +
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 82
+  def advance(options)
+    unless options[:weeks].nil?
+      options[:weeks], partial_weeks = options[:weeks].divmod(1)
+      options[:days] = options.fetch(:days, 0) + 7 * partial_weeks
+    end
 
-  d = to_date.advance(options)
-  datetime_advanced_by_date = change(year: d.year, month: d.month, day: d.day)
-  seconds_to_advance = \
-    options.fetch(:seconds, 0) +
-    options.fetch(:minutes, 0) * 60 +
-    options.fetch(:hours, 0) * 3600
+    unless options[:days].nil?
+      options[:days], partial_days = options[:days].divmod(1)
+      options[:hours] = options.fetch(:hours, 0) + 24 * partial_days
+    end
 
-  if seconds_to_advance.zero?
-    datetime_advanced_by_date
-  else
-    datetime_advanced_by_date.since(seconds_to_advance)
-  end
-end
-
-
- -

+ d = to_date.advance(options) + datetime_advanced_by_date = change(year: d.year, month: d.month, day: d.day) + seconds_to_advance = \ + options.fetch(:seconds, 0) + + options.fetch(:minutes, 0) * 60 + + options.fetch(:hours, 0) * 3600 + + if seconds_to_advance.zero? + datetime_advanced_by_date + else + datetime_advanced_by_date.since(seconds_to_advance) + end + end + + See on GitHub + + + +

@@ -560,22 +560,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 109
+  def ago(seconds)
+    since(-seconds)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 109
-def ago(seconds)
-  since(-seconds)
-end
-
-
- -

+ See on GitHub + + + +

@@ -599,7 +599,8 @@

-

+ +

@@ -623,7 +624,8 @@

-

+ +

@@ -647,7 +649,8 @@

-

+ +

@@ -671,7 +674,8 @@

-

+ +

@@ -695,7 +699,8 @@

-

+ +

@@ -719,7 +724,8 @@

-

+ +

@@ -743,7 +749,8 @@

-

+ +

@@ -767,7 +774,8 @@

-

+ +

@@ -791,7 +799,8 @@

-

+ +

@@ -815,7 +824,8 @@

-

+ +

@@ -839,22 +849,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 122
+  def beginning_of_day
+    change(hour: 0)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 122
-def beginning_of_day
-  change(hour: 0)
-end
-
-
- -

+ See on GitHub + + + +

@@ -878,22 +888,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 146
+  def beginning_of_hour
+    change(min: 0)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 146
-def beginning_of_hour
-  change(min: 0)
-end
-
-
- -

+ See on GitHub + + + +

@@ -917,22 +927,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 158
+  def beginning_of_minute
+    change(sec: 0)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 158
-def beginning_of_minute
-  change(sec: 0)
-end
-
-
- -

+ See on GitHub + + + +

@@ -957,41 +967,41 @@

- -
- - -
-
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 51
-def change(options)
-  if new_nsec = options[:nsec]
-    raise ArgumentError, "Can't change both :nsec and :usec at the same time: #{options.inspect}" if options[:usec]
-    new_fraction = Rational(new_nsec, 1000000000)
-  else
-    new_usec = options.fetch(:usec, (options[:hour] || options[:min] || options[:sec]) ? 0 : Rational(nsec, 1000))
-    new_fraction = Rational(new_usec, 1000000)
-  end
+          
+            
+ + Source code + - raise ArgumentError, "argument out of range" if new_fraction >= 1 +
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 51
+  def change(options)
+    if new_nsec = options[:nsec]
+      raise ArgumentError, "Can't change both :nsec and :usec at the same time: #{options.inspect}" if options[:usec]
+      new_fraction = Rational(new_nsec, 1000000000)
+    else
+      new_usec = options.fetch(:usec, (options[:hour] || options[:min] || options[:sec]) ? 0 : Rational(nsec, 1000))
+      new_fraction = Rational(new_usec, 1000000)
+    end
 
-  ::DateTime.civil(
-    options.fetch(:year, year),
-    options.fetch(:month, month),
-    options.fetch(:day, day),
-    options.fetch(:hour, hour),
-    options.fetch(:min, options[:hour] ? 0 : min),
-    options.fetch(:sec, (options[:hour] || options[:min]) ? 0 : sec) + new_fraction,
-    options.fetch(:offset, offset),
-    options.fetch(:start, start)
-  )
-end
-
-
- -

+ raise ArgumentError, "argument out of range" if new_fraction >= 1 + + ::DateTime.civil( + options.fetch(:year, year), + options.fetch(:month, month), + options.fetch(:day, day), + options.fetch(:hour, hour), + options.fetch(:min, options[:hour] ? 0 : min), + options.fetch(:sec, (options[:hour] || options[:min]) ? 0 : sec) + new_fraction, + options.fetch(:offset, offset), + options.fetch(:start, start) + ) + end + + See on GitHub + + + +

@@ -1015,7 +1025,8 @@

-

+ +

@@ -1039,22 +1050,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 140
+  def end_of_day
+    change(hour: 23, min: 59, sec: 59, usec: Rational(999999999, 1000))
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 140
-def end_of_day
-  change(hour: 23, min: 59, sec: 59, usec: Rational(999999999, 1000))
-end
-
-
- -

+ See on GitHub + + + +

@@ -1078,22 +1089,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 152
+  def end_of_hour
+    change(min: 59, sec: 59, usec: Rational(999999999, 1000))
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 152
-def end_of_hour
-  change(min: 59, sec: 59, usec: Rational(999999999, 1000))
-end
-
-
- -

+ See on GitHub + + + +

@@ -1117,22 +1128,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 164
+  def end_of_minute
+    change(sec: 59, usec: Rational(999999999, 1000))
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 164
-def end_of_minute
-  change(sec: 59, usec: Rational(999999999, 1000))
-end
-
-
- -

+ See on GitHub + + + +

@@ -1157,22 +1168,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_time/conversions.rb, line 55
+  def formatted_offset(colon = true, alternate_utc_string = nil)
+    utc? && alternate_utc_string || ActiveSupport::TimeZone.seconds_to_utc_offset(utc_offset, colon)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date_time/conversions.rb, line 55
-def formatted_offset(colon = true, alternate_utc_string = nil)
-  utc? && alternate_utc_string || ActiveSupport::TimeZone.seconds_to_utc_offset(utc_offset, colon)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1196,7 +1207,8 @@

-

+ +

@@ -1220,7 +1232,8 @@

-

+ +

@@ -1244,7 +1257,8 @@

-

+ +

@@ -1268,7 +1282,8 @@

-

+ +

@@ -1292,7 +1307,8 @@

-

+ +

@@ -1320,7 +1336,8 @@

-

+ +

@@ -1344,27 +1361,27 @@

- -
- - -
-
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 170
-def localtime(utc_offset = nil)
-  utc = new_offset(0)
+          
+            
+ + Source code + - Time.utc( - utc.year, utc.month, utc.day, - utc.hour, utc.min, utc.sec + utc.sec_fraction - ).getlocal(utc_offset) -end
-
-
- -

+
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 170
+  def localtime(utc_offset = nil)
+    utc = new_offset(0)
+
+    Time.utc(
+      utc.year, utc.month, utc.day,
+      utc.hour, utc.min, utc.sec + utc.sec_fraction
+    ).getlocal(utc_offset)
+  end
+ + See on GitHub + + + +

@@ -1388,7 +1405,8 @@

-

+ +

@@ -1412,22 +1430,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 130
+  def middle_of_day
+    change(hour: 12)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 130
-def middle_of_day
-  change(hour: 12)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1451,7 +1469,8 @@

-

+ +

@@ -1475,7 +1494,8 @@

-

+ +

@@ -1495,22 +1515,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_time/conversions.rb, line 98
+  def nsec
+    (sec_fraction * 1_000_000_000).to_i
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date_time/conversions.rb, line 98
-def nsec
-  (sec_fraction * 1_000_000_000).to_i
-end
-
-
- -

+ See on GitHub + + + +

@@ -1534,22 +1554,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_time/conversions.rb, line 60
+  def readable_inspect
+    to_fs(:rfc822)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date_time/conversions.rb, line 60
-def readable_inspect
-  to_fs(:rfc822)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1574,22 +1594,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 20
+  def seconds_since_midnight
+    sec + (min * 60) + (hour * 3600)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 20
-def seconds_since_midnight
-  sec + (min * 60) + (hour * 3600)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1614,22 +1634,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 29
+  def seconds_until_end_of_day
+    end_of_day.to_i - to_i
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 29
-def seconds_until_end_of_day
-  end_of_day.to_i - to_i
-end
-
-
- -

+ See on GitHub + + + +

@@ -1653,22 +1673,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 116
+  def since(seconds)
+    self + Rational(seconds, 86400)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 116
-def since(seconds)
-  self + Rational(seconds, 86400)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1691,22 +1711,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 36
+  def subsec
+    sec_fraction
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 36
-def subsec
-  sec_fraction
-end
-
-
- -

+ See on GitHub + + + +

@@ -1726,22 +1746,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_time/conversions.rb, line 83
+  def to_f
+    seconds_since_unix_epoch.to_f + sec_fraction
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date_time/conversions.rb, line 83
-def to_f
-  seconds_since_unix_epoch.to_f + sec_fraction
-end
-
-
- -

+ See on GitHub + + + +

@@ -1765,7 +1785,8 @@

-

+ +

@@ -1814,26 +1835,26 @@

Adding y - -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_time/conversions.rb, line 35
+  def to_fs(format = :default)
+    if formatter = ::Time::DATE_FORMATS[format]
+      formatter.respond_to?(:call) ? formatter.call(self).to_s : strftime(formatter)
+    else
+      to_s
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date_time/conversions.rb, line 35
-def to_fs(format = :default)
-  if formatter = ::Time::DATE_FORMATS[format]
-    formatter.respond_to?(:call) ? formatter.call(self).to_s : strftime(formatter)
-  else
-    to_s
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1853,22 +1874,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_time/conversions.rb, line 88
+  def to_i
+    seconds_since_unix_epoch.to_i
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date_time/conversions.rb, line 88
-def to_i
-  seconds_since_unix_epoch.to_i
-end
-
-
- -

+ See on GitHub + + + +

@@ -1888,22 +1909,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_time/compatibility.rb, line 15
+  def to_time
+    preserve_timezone ? getlocal(utc_offset) : getlocal
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date_time/compatibility.rb, line 15
-def to_time
-  preserve_timezone ? getlocal(utc_offset) : getlocal
-end
-
-
- -

+ See on GitHub + + + +

@@ -1923,22 +1944,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_time/conversions.rb, line 93
+  def usec
+    (sec_fraction * 1_000_000).to_i
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date_time/conversions.rb, line 93
-def usec
-  (sec_fraction * 1_000_000).to_i
-end
-
-
- -

+ See on GitHub + + + +

@@ -1966,27 +1987,27 @@

- -
- - -
-
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 184
-def utc
-  utc = new_offset(0)
+          
+            
+ + Source code + - Time.utc( - utc.year, utc.month, utc.day, - utc.hour, utc.min, utc.sec + utc.sec_fraction - ) -end
-
-
- -

+
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 184
+  def utc
+    utc = new_offset(0)
+
+    Time.utc(
+      utc.year, utc.month, utc.day,
+      utc.hour, utc.min, utc.sec + utc.sec_fraction
+    )
+  end
+ + See on GitHub + + + +

@@ -2006,22 +2027,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 197
+  def utc?
+    offset == 0
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 197
-def utc?
-  offset == 0
-end
-
-
- -

+ See on GitHub + + + +

@@ -2041,22 +2062,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 202
+  def utc_offset
+    (offset * 86400).to_i
+  end
- -
-
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 202
-def utc_offset
-  (offset * 86400).to_i
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Delegator.html b/src/classes/Delegator.html index 9f3dbb5fd7..6a70a00130 100644 --- a/src/classes/Delegator.html +++ b/src/classes/Delegator.html @@ -86,20 +86,10 @@

- -
- - -
-
# File activesupport/lib/active_support/core_ext/object/try.rb, line 121
-  
-
-
- - + + See on GitHub + +

@@ -120,20 +110,10 @@

- -
- - -
-
# File activesupport/lib/active_support/core_ext/object/try.rb, line 129
-
-
-
- -

+ + See on GitHub + + diff --git a/src/classes/Digest/UUID.html b/src/classes/Digest/UUID.html index 238ead8b18..b23e6f116e 100644 --- a/src/classes/Digest/UUID.html +++ b/src/classes/Digest/UUID.html @@ -90,40 +90,40 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/digest/uuid.rb, line 19
+    def self.uuid_from_hash(hash_class, namespace, name)
+      if hash_class == Digest::MD5 || hash_class == OpenSSL::Digest::MD5
+        version = 3
+      elsif hash_class == Digest::SHA1 || hash_class == OpenSSL::Digest::SHA1
+        version = 5
+      else
+        raise ArgumentError, "Expected OpenSSL::Digest::SHA1 or OpenSSL::Digest::MD5, got #{hash_class.name}."
+      end
+
+      uuid_namespace = pack_uuid_namespace(namespace)
+
+      hash = hash_class.new
+      hash.update(uuid_namespace)
+      hash.update(name)
+
+      ary = hash.digest.unpack("NnnnnN")
+      ary[2] = (ary[2] & 0x0FFF) | (version << 12)
+      ary[3] = (ary[3] & 0x3FFF) | 0x8000
+
+      "%08x-%04x-%04x-%04x-%04x%08x" % ary
+    end
- -
-
# File activesupport/lib/active_support/core_ext/digest/uuid.rb, line 19
-def self.uuid_from_hash(hash_class, namespace, name)
-  if hash_class == Digest::MD5 || hash_class == OpenSSL::Digest::MD5
-    version = 3
-  elsif hash_class == Digest::SHA1 || hash_class == OpenSSL::Digest::SHA1
-    version = 5
-  else
-    raise ArgumentError, "Expected OpenSSL::Digest::SHA1 or OpenSSL::Digest::MD5, got #{hash_class.name}."
-  end
-
-  uuid_namespace = pack_uuid_namespace(namespace)
-
-  hash = hash_class.new
-  hash.update(uuid_namespace)
-  hash.update(name)
-
-  ary = hash.digest.unpack("NnnnnN")
-  ary[2] = (ary[2] & 0x0FFF) | (version << 12)
-  ary[3] = (ary[3] & 0x3FFF) | 0x8000
-
-  "%08x-%04x-%04x-%04x-%04x%08x" % ary
-end
-
-
- - + See on GitHub + + + +

@@ -143,22 +143,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/digest/uuid.rb, line 42
+    def self.uuid_v3(uuid_namespace, name)
+      uuid_from_hash(OpenSSL::Digest::MD5, uuid_namespace, name)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/digest/uuid.rb, line 42
-def self.uuid_v3(uuid_namespace, name)
-  uuid_from_hash(OpenSSL::Digest::MD5, uuid_namespace, name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -178,22 +178,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/digest/uuid.rb, line 52
+    def self.uuid_v4
+      SecureRandom.uuid
+    end
- -
-
# File activesupport/lib/active_support/core_ext/digest/uuid.rb, line 52
-def self.uuid_v4
-  SecureRandom.uuid
-end
-
-
- -

+ See on GitHub + + + +

@@ -213,22 +213,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/digest/uuid.rb, line 47
+    def self.uuid_v5(uuid_namespace, name)
+      uuid_from_hash(OpenSSL::Digest::SHA1, uuid_namespace, name)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/digest/uuid.rb, line 47
-def self.uuid_v5(uuid_namespace, name)
-  uuid_from_hash(OpenSSL::Digest::SHA1, uuid_namespace, name)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/ERB/Util.html b/src/classes/ERB/Util.html index f380b1ac1a..39a01e485d 100644 --- a/src/classes/ERB/Util.html +++ b/src/classes/ERB/Util.html @@ -193,22 +193,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/erb/util.rb, line 63
+    def html_escape_once(s)
+      ActiveSupport::Multibyte::Unicode.tidy_bytes(s.to_s).gsub(HTML_ESCAPE_ONCE_REGEXP, HTML_ESCAPE).html_safe
+    end
- -
-
# File activesupport/lib/active_support/core_ext/erb/util.rb, line 63
-def html_escape_once(s)
-  ActiveSupport::Multibyte::Unicode.tidy_bytes(s.to_s).gsub(HTML_ESCAPE_ONCE_REGEXP, HTML_ESCAPE).html_safe
-end
-
-
- - + See on GitHub + + + +

@@ -260,28 +260,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/erb/util.rb, line 124
+    def json_escape(s)
+      result = s.to_s.dup
+      result.gsub!(">", '\u003e')
+      result.gsub!("<", '\u003c')
+      result.gsub!("&", '\u0026')
+      result.gsub!("\u2028", '\u2028')
+      result.gsub!("\u2029", '\u2029')
+      s.html_safe? ? result.html_safe : result
+    end
- -
-
# File activesupport/lib/active_support/core_ext/erb/util.rb, line 124
-def json_escape(s)
-  result = s.to_s.dup
-  result.gsub!(">", '\u003e')
-  result.gsub!("<", '\u003c')
-  result.gsub!("&", '\u0026')
-  result.gsub!("\u2028", '\u2028')
-  result.gsub!("\u2029", '\u2029')
-  s.html_safe? ? result.html_safe : result
-end
-
-
- -

+ See on GitHub + + + +

@@ -307,34 +307,34 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/erb/util.rb, line 142
+    def xml_name_escape(name)
+      name = name.to_s
+      return "" if name.blank?
+      return name if name.match?(SAFE_XML_TAG_NAME_REGEXP)
+
+      starting_char = name[0]
+      starting_char.gsub!(INVALID_TAG_NAME_START_REGEXP, TAG_NAME_REPLACEMENT_CHAR)
+
+      return starting_char if name.size == 1
+
+      following_chars = name[1..-1]
+      following_chars.gsub!(INVALID_TAG_NAME_FOLLOWING_REGEXP, TAG_NAME_REPLACEMENT_CHAR)
+
+      starting_char << following_chars
+    end
- -
-
# File activesupport/lib/active_support/core_ext/erb/util.rb, line 142
-def xml_name_escape(name)
-  name = name.to_s
-  return "" if name.blank?
-  return name if name.match?(SAFE_XML_TAG_NAME_REGEXP)
-
-  starting_char = name[0]
-  starting_char.gsub!(INVALID_TAG_NAME_START_REGEXP, TAG_NAME_REPLACEMENT_CHAR)
-
-  return starting_char if name.size == 1
-
-  following_chars = name[1..-1]
-  following_chars.gsub!(INVALID_TAG_NAME_FOLLOWING_REGEXP, TAG_NAME_REPLACEMENT_CHAR)
-
-  starting_char << following_chars
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Enumerable.html b/src/classes/Enumerable.html index fd778a99ce..a974d514c1 100644 --- a/src/classes/Enumerable.html +++ b/src/classes/Enumerable.html @@ -155,22 +155,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/enumerable.rb, line 184
+  def compact_blank
+    reject(&:blank?)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/enumerable.rb, line 184
-def compact_blank
-  reject(&:blank?)
-end
-
-
- - + See on GitHub + + + +

@@ -190,22 +190,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/enumerable.rb, line 118
+  def exclude?(object)
+    !include?(object)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/enumerable.rb, line 118
-def exclude?(object)
-  !include?(object)
-end
-
-
- -

+ See on GitHub + + + +

@@ -239,23 +239,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/enumerable.rb, line 132
+  def excluding(*elements)
+    elements.flatten!(1)
+    reject { |element| elements.include?(element) }
+  end
- -
-
# File activesupport/lib/active_support/core_ext/enumerable.rb, line 132
-def excluding(*elements)
-  elements.flatten!(1)
-  reject { |element| elements.include?(element) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -281,22 +281,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/enumerable.rb, line 196
+  def in_order_of(key, series)
+    group_by(&key).values_at(*series).flatten(1).compact
+  end
- -
-
# File activesupport/lib/active_support/core_ext/enumerable.rb, line 196
-def in_order_of(key, series)
-  group_by(&key).values_at(*series).flatten(1).compact
-end
-
-
- -

+ See on GitHub + + + +

@@ -323,22 +323,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/enumerable.rb, line 112
+  def including(*elements)
+    to_a.including(*elements)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/enumerable.rb, line 112
-def including(*elements)
-  to_a.including(*elements)
-end
-
-
- -

+ See on GitHub + + + +

@@ -365,28 +365,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/enumerable.rb, line 52
+  def index_by
+    if block_given?
+      result = {}
+      each { |elem| result[yield(elem)] = elem }
+      result
+    else
+      to_enum(:index_by) { size if respond_to?(:size) }
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/enumerable.rb, line 52
-def index_by
-  if block_given?
-    result = {}
-    each { |elem| result[yield(elem)] = elem }
-    result
-  else
-    to_enum(:index_by) { size if respond_to?(:size) }
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -418,32 +418,32 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/enumerable.rb, line 75
+  def index_with(default = (no_default = true))
+    if block_given?
+      result = {}
+      each { |elem| result[elem] = yield(elem) }
+      result
+    elsif no_default
+      to_enum(:index_with) { size if respond_to?(:size) }
+    else
+      result = {}
+      each { |elem| result[elem] = default }
+      result
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/enumerable.rb, line 75
-def index_with(default = (no_default = true))
-  if block_given?
-    result = {}
-    each { |elem| result[elem] = yield(elem) }
-    result
-  elsif no_default
-    to_enum(:index_with) { size if respond_to?(:size) }
-  else
-    result = {}
-    each { |elem| result[elem] = default }
-    result
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -463,30 +463,30 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/enumerable.rb, line 93
+  def many?
+    cnt = 0
+    if block_given?
+      any? do |*args|
+        cnt += 1 if yield(*args)
+        cnt > 1
+      end
+    else
+      any? { (cnt += 1) > 1 }
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/enumerable.rb, line 93
-def many?
-  cnt = 0
-  if block_given?
-    any? do |*args|
-      cnt += 1 if yield(*args)
-      cnt > 1
-    end
-  else
-    any? { (cnt += 1) > 1 }
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -510,22 +510,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/enumerable.rb, line 40
+  def maximum(key)
+    map(&key).max
+  end
- -
-
# File activesupport/lib/active_support/core_ext/enumerable.rb, line 40
-def maximum(key)
-  map(&key).max
-end
-
-
- -

+ See on GitHub + + + +

@@ -549,22 +549,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/enumerable.rb, line 32
+  def minimum(key)
+    map(&key).min
+  end
- -
-
# File activesupport/lib/active_support/core_ext/enumerable.rb, line 32
-def minimum(key)
-  map(&key).min
-end
-
-
- -

+ See on GitHub + + + +

@@ -591,28 +591,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/enumerable.rb, line 161
+  def pick(*keys)
+    return if none?
+
+    if keys.many?
+      keys.map { |key| first[key] }
+    else
+      first[keys.first]
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/enumerable.rb, line 161
-def pick(*keys)
-  return if none?
-
-  if keys.many?
-    keys.map { |key| first[key] }
-  else
-    first[keys.first]
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -639,27 +639,27 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/enumerable.rb, line 145
+  def pluck(*keys)
+    if keys.many?
+      map { |element| keys.map { |key| element[key] } }
+    else
+      key = keys.first
+      map { |element| element[key] }
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/enumerable.rb, line 145
-def pluck(*keys)
-  if keys.many?
-    map { |element| keys.map { |key| element[key] } }
-  else
-    key = keys.first
-    map { |element| element[key] }
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -684,26 +684,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/enumerable.rb, line 206
+  def sole
+    case count
+    when 1   then return first # rubocop:disable Style/RedundantReturn
+    when 0   then raise ActiveSupport::EnumerableCoreExt::SoleItemExpectedError, "no item found"
+    when 2.. then raise ActiveSupport::EnumerableCoreExt::SoleItemExpectedError, "multiple items found"
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/enumerable.rb, line 206
-def sole
-  case count
-  when 1   then return first # rubocop:disable Style/RedundantReturn
-  when 0   then raise ActiveSupport::EnumerableCoreExt::SoleItemExpectedError, "no item found"
-  when 2.. then raise ActiveSupport::EnumerableCoreExt::SoleItemExpectedError, "multiple items found"
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -727,7 +727,8 @@

-

+ + diff --git a/src/classes/Exception.html b/src/classes/Exception.html index 3092c9a791..404a7bc72a 100644 --- a/src/classes/Exception.html +++ b/src/classes/Exception.html @@ -81,22 +81,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/json.rb, line 249
+  def as_json(options = nil)
+    to_s
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/json.rb, line 249
-def as_json(options = nil)
-  to_s
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/FalseClass.html b/src/classes/FalseClass.html index b0a46bf99d..71249cc0fa 100644 --- a/src/classes/FalseClass.html +++ b/src/classes/FalseClass.html @@ -94,22 +94,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/blank.rb, line 67
+  def blank?
+    true
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/blank.rb, line 67
-def blank?
-  true
-end
-
-
- - + See on GitHub + + + +

@@ -129,22 +129,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/to_query.rb, line 34
+  def to_param
+    self
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/to_query.rb, line 34
-def to_param
-  self
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/File.html b/src/classes/File.html index 3ba065dd02..9343fbd667 100644 --- a/src/classes/File.html +++ b/src/classes/File.html @@ -96,52 +96,52 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/file/atomic.rb, line 21
+  def self.atomic_write(file_name, temp_dir = dirname(file_name))
+    require "tempfile" unless defined?(Tempfile)
+
+    Tempfile.open(".#{basename(file_name)}", temp_dir) do |temp_file|
+      temp_file.binmode
+      return_val = yield temp_file
+      temp_file.close
+
+      old_stat = if exist?(file_name)
+        # Get original file permissions
+        stat(file_name)
+      else
+        # If not possible, probe which are the default permissions in the
+        # destination directory.
+        probe_stat_in(dirname(file_name))
+      end
+
+      if old_stat
+        # Set correct permissions on new file
+        begin
+          chown(old_stat.uid, old_stat.gid, temp_file.path)
+          # This operation will affect filesystem ACL's
+          chmod(old_stat.mode, temp_file.path)
+        rescue Errno::EPERM, Errno::EACCES
+          # Changing file ownership failed, moving on.
+        end
+      end
+
+      # Overwrite original file with temp file
+      rename(temp_file.path, file_name)
+      return_val
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/file/atomic.rb, line 21
-def self.atomic_write(file_name, temp_dir = dirname(file_name))
-  require "tempfile" unless defined?(Tempfile)
-
-  Tempfile.open(".#{basename(file_name)}", temp_dir) do |temp_file|
-    temp_file.binmode
-    return_val = yield temp_file
-    temp_file.close
-
-    old_stat = if exist?(file_name)
-      # Get original file permissions
-      stat(file_name)
-    else
-      # If not possible, probe which are the default permissions in the
-      # destination directory.
-      probe_stat_in(dirname(file_name))
-    end
-
-    if old_stat
-      # Set correct permissions on new file
-      begin
-        chown(old_stat.uid, old_stat.gid, temp_file.path)
-        # This operation will affect filesystem ACL's
-        chmod(old_stat.mode, temp_file.path)
-      rescue Errno::EPERM, Errno::EACCES
-        # Changing file ownership failed, moving on.
-      end
-    end
-
-    # Overwrite original file with temp file
-    rename(temp_file.path, file_name)
-    return_val
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/Hash.html b/src/classes/Hash.html index e208f37e12..7afbf9515f 100644 --- a/src/classes/Hash.html +++ b/src/classes/Hash.html @@ -242,22 +242,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/hash/conversions.rb, line 133
+    def from_trusted_xml(xml)
+      from_xml xml, []
+    end
- -
-
# File activesupport/lib/active_support/core_ext/hash/conversions.rb, line 133
-def from_trusted_xml(xml)
-  from_xml xml, []
-end
-
-
- - + See on GitHub + + + +

@@ -307,22 +307,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/hash/conversions.rb, line 128
+    def from_xml(xml, disallowed_types = nil)
+      ActiveSupport::XMLConverter.new(xml, disallowed_types).to_h
+    end
- -
-
# File activesupport/lib/active_support/core_ext/hash/conversions.rb, line 128
-def from_xml(xml, disallowed_types = nil)
-  ActiveSupport::XMLConverter.new(xml, disallowed_types).to_h
-end
-
-
- -

+ See on GitHub + + + + @@ -353,27 +353,27 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/hash/keys.rb, line 48
+  def assert_valid_keys(*valid_keys)
+    valid_keys.flatten!
+    each_key do |k|
+      unless valid_keys.include?(k)
+        raise ArgumentError.new("Unknown key: #{k.inspect}. Valid keys are: #{valid_keys.map(&:inspect).join(', ')}")
+      end
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/hash/keys.rb, line 48
-def assert_valid_keys(*valid_keys)
-  valid_keys.flatten!
-  each_key do |k|
-    unless valid_keys.include?(k)
-      raise ArgumentError.new("Unknown key: #{k.inspect}. Valid keys are: #{valid_keys.map(&:inspect).join(', ')}")
-    end
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -398,23 +398,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/enumerable.rb, line 227
+  def compact_blank!
+    # use delete_if rather than reject! because it always returns self even if nothing changed
+    delete_if { |_k, v| v.blank? }
+  end
- -
-
# File activesupport/lib/active_support/core_ext/enumerable.rb, line 227
-def compact_blank!
-  # use delete_if rather than reject! because it always returns self even if nothing changed
-  delete_if { |_k, v| v.blank? }
-end
-
-
- -

+ See on GitHub + + + +

@@ -442,31 +442,31 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/deep_dup.rb, line 43
+  def deep_dup
+    hash = dup
+    each_pair do |key, value|
+      if ::String === key || ::Symbol === key
+        hash[key] = value.deep_dup
+      else
+        hash.delete(key)
+        hash[key.deep_dup] = value.deep_dup
+      end
+    end
+    hash
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/deep_dup.rb, line 43
-def deep_dup
-  hash = dup
-  each_pair do |key, value|
-    if ::String === key || ::Symbol === key
-      hash[key] = value.deep_dup
-    else
-      hash.delete(key)
-      hash[key.deep_dup] = value.deep_dup
-    end
-  end
-  hash
-end
-
-
- -

+ See on GitHub + + + +

@@ -501,20 +501,10 @@

- -
- - -
-
# File activesupport/lib/active_support/core_ext/hash/deep_merge.rb, line 9
-  
-
-
- -

+ + See on GitHub + +

@@ -540,22 +530,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/hash/keys.rb, line 84
+  def deep_stringify_keys
+    deep_transform_keys(&:to_s)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/hash/keys.rb, line 84
-def deep_stringify_keys
-  deep_transform_keys(&:to_s)
-end
-
-
- -

+ See on GitHub + + + +

@@ -575,22 +565,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/hash/keys.rb, line 91
+  def deep_stringify_keys!
+    deep_transform_keys!(&:to_s)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/hash/keys.rb, line 91
-def deep_stringify_keys!
-  deep_transform_keys!(&:to_s)
-end
-
-
- -

+ See on GitHub + + + +

@@ -616,22 +606,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/hash/keys.rb, line 103
+  def deep_symbolize_keys
+    deep_transform_keys { |key| key.to_sym rescue key }
+  end
- -
-
# File activesupport/lib/active_support/core_ext/hash/keys.rb, line 103
-def deep_symbolize_keys
-  deep_transform_keys { |key| key.to_sym rescue key }
-end
-
-
- -

+ See on GitHub + + + +

@@ -651,22 +641,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/hash/keys.rb, line 110
+  def deep_symbolize_keys!
+    deep_transform_keys! { |key| key.to_sym rescue key }
+  end
- -
-
# File activesupport/lib/active_support/core_ext/hash/keys.rb, line 110
-def deep_symbolize_keys!
-  deep_transform_keys! { |key| key.to_sym rescue key }
-end
-
-
- -

+ See on GitHub + + + +

@@ -692,22 +682,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/hash/keys.rb, line 65
+  def deep_transform_keys(&block)
+    _deep_transform_keys_in_object(self, &block)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/hash/keys.rb, line 65
-def deep_transform_keys(&block)
-  _deep_transform_keys_in_object(self, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -727,22 +717,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/hash/keys.rb, line 72
+  def deep_transform_keys!(&block)
+    _deep_transform_keys_in_object!(self, &block)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/hash/keys.rb, line 72
-def deep_transform_keys!(&block)
-  _deep_transform_keys_in_object!(self, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -768,22 +758,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/hash/deep_transform_values.rb, line 12
+  def deep_transform_values(&block)
+    _deep_transform_values_in_object(self, &block)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/hash/deep_transform_values.rb, line 12
-def deep_transform_values(&block)
-  _deep_transform_values_in_object(self, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -803,22 +793,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/hash/deep_transform_values.rb, line 19
+  def deep_transform_values!(&block)
+    _deep_transform_values_in_object!(self, &block)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/hash/deep_transform_values.rb, line 19
-def deep_transform_values!(&block)
-  _deep_transform_values_in_object!(self, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -849,22 +839,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/hash/except.rb, line 12
+  def except(*keys)
+    slice(*self.keys - keys)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/hash/except.rb, line 12
-def except(*keys)
-  slice(*self.keys - keys)
-end
-
-
- -

+ See on GitHub + + + +

@@ -889,23 +879,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/hash/except.rb, line 20
+  def except!(*keys)
+    keys.each { |key| delete(key) }
+    self
+  end
- -
-
# File activesupport/lib/active_support/core_ext/hash/except.rb, line 20
-def except!(*keys)
-  keys.each { |key| delete(key) }
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -930,22 +920,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/hash/slice.rb, line 24
+  def extract!(*keys)
+    keys.each_with_object(self.class.new) { |key, result| result[key] = delete(key) if has_key?(key) }
+  end
- -
-
# File activesupport/lib/active_support/core_ext/hash/slice.rb, line 24
-def extract!(*keys)
-  keys.each_with_object(self.class.new) { |key, result| result[key] = delete(key) if has_key?(key) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -965,22 +955,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/array/extract_options.rb, line 9
+  def extractable_options?
+    instance_of?(Hash)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/array/extract_options.rb, line 9
-def extractable_options?
-  instance_of?(Hash)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1009,7 +999,8 @@

-

+ +

@@ -1043,22 +1034,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/hash/reverse_merge.rb, line 14
+  def reverse_merge(other_hash)
+    other_hash.merge(self)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/hash/reverse_merge.rb, line 14
-def reverse_merge(other_hash)
-  other_hash.merge(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1082,22 +1073,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/hash/reverse_merge.rb, line 20
+  def reverse_merge!(other_hash)
+    replace(reverse_merge(other_hash))
+  end
- -
-
# File activesupport/lib/active_support/core_ext/hash/reverse_merge.rb, line 20
-def reverse_merge!(other_hash)
-  replace(reverse_merge(other_hash))
-end
-
-
- -

+ See on GitHub + + + +

@@ -1121,7 +1112,8 @@

-

+ +

@@ -1146,27 +1138,27 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/hash/slice.rb, line 10
+  def slice!(*keys)
+    omit = slice(*self.keys - keys)
+    hash = slice(*keys)
+    hash.default      = default
+    hash.default_proc = default_proc if default_proc
+    replace(hash)
+    omit
+  end
- -
-
# File activesupport/lib/active_support/core_ext/hash/slice.rb, line 10
-def slice!(*keys)
-  omit = slice(*self.keys - keys)
-  hash = slice(*keys)
-  hash.default      = default
-  hash.default_proc = default_proc if default_proc
-  replace(hash)
-  omit
-end
-
-
- -

+ See on GitHub + + + +

@@ -1192,22 +1184,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/hash/keys.rb, line 10
+  def stringify_keys
+    transform_keys(&:to_s)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/hash/keys.rb, line 10
-def stringify_keys
-  transform_keys(&:to_s)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1227,22 +1219,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/hash/keys.rb, line 16
+  def stringify_keys!
+    transform_keys!(&:to_s)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/hash/keys.rb, line 16
-def stringify_keys!
-  transform_keys!(&:to_s)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1272,22 +1264,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/hash/keys.rb, line 27
+  def symbolize_keys
+    transform_keys { |key| key.to_sym rescue key }
+  end
- -
-
# File activesupport/lib/active_support/core_ext/hash/keys.rb, line 27
-def symbolize_keys
-  transform_keys { |key| key.to_sym rescue key }
-end
-
-
- -

+ See on GitHub + + + +

@@ -1311,22 +1303,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/hash/keys.rb, line 34
+  def symbolize_keys!
+    transform_keys! { |key| key.to_sym rescue key }
+  end
- -
-
# File activesupport/lib/active_support/core_ext/hash/keys.rb, line 34
-def symbolize_keys!
-  transform_keys! { |key| key.to_sym rescue key }
-end
-
-
- -

+ See on GitHub + + + +

@@ -1350,7 +1342,8 @@

-

+ +

@@ -1374,7 +1367,8 @@

-

+ +

@@ -1398,7 +1392,8 @@

-

+ +

@@ -1434,29 +1429,29 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/to_query.rb, line 75
+  def to_query(namespace = nil)
+    query = filter_map do |key, value|
+      unless (value.is_a?(Hash) || value.is_a?(Array)) && value.empty?
+        value.to_query(namespace ? "#{namespace}[#{key}]" : key)
+      end
+    end
+
+    query.sort! unless namespace.to_s.include?("[]")
+    query.join("&")
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/to_query.rb, line 75
-def to_query(namespace = nil)
-  query = filter_map do |key, value|
-    unless (value.is_a?(Hash) || value.is_a?(Array)) && value.empty?
-      value.to_query(namespace ? "#{namespace}[#{key}]" : key)
-    end
-  end
-
-  query.sort! unless namespace.to_s.include?("[]")
-  query.join("&")
-end
-
-
- -

+ See on GitHub + + + +

@@ -1532,37 +1527,37 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/hash/conversions.rb, line 74
+  def to_xml(options = {})
+    require "active_support/builder" unless defined?(Builder::XmlMarkup)
+
+    options = options.dup
+    options[:indent]  ||= 2
+    options[:root]    ||= "hash"
+    options[:builder] ||= Builder::XmlMarkup.new(indent: options[:indent])
+
+    builder = options[:builder]
+    builder.instruct! unless options.delete(:skip_instruct)
+
+    root = ActiveSupport::XmlMini.rename_key(options[:root].to_s, options)
+
+    builder.tag!(root) do
+      each { |key, value| ActiveSupport::XmlMini.to_tag(key, value, options) }
+      yield builder if block_given?
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/hash/conversions.rb, line 74
-def to_xml(options = {})
-  require "active_support/builder" unless defined?(Builder::XmlMarkup)
-
-  options = options.dup
-  options[:indent]  ||= 2
-  options[:root]    ||= "hash"
-  options[:builder] ||= Builder::XmlMarkup.new(indent: options[:indent])
-
-  builder = options[:builder]
-  builder.instruct! unless options.delete(:skip_instruct)
-
-  root = ActiveSupport::XmlMini.rename_key(options[:root].to_s, options)
-
-  builder.tag!(root) do
-    each { |key, value| ActiveSupport::XmlMini.to_tag(key, value, options) }
-    yield builder if block_given?
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1586,7 +1581,8 @@

-

+ +

@@ -1610,7 +1606,8 @@

-

+ +

@@ -1637,22 +1634,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/hash/indifferent_access.rb, line 9
+  def with_indifferent_access
+    ActiveSupport::HashWithIndifferentAccess.new(self)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/hash/indifferent_access.rb, line 9
-def with_indifferent_access
-  ActiveSupport::HashWithIndifferentAccess.new(self)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Integer.html b/src/classes/Integer.html index 1a5fb57c91..48fdb00500 100644 --- a/src/classes/Integer.html +++ b/src/classes/Integer.html @@ -113,7 +113,8 @@

- + +

@@ -140,22 +141,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/integer/time.rb, line 10
+  def months
+    ActiveSupport::Duration.months(self)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/integer/time.rb, line 10
-def months
-  ActiveSupport::Duration.months(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -180,22 +181,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/integer/multiple.rb, line 9
+  def multiple_of?(number)
+    number == 0 ? self == 0 : self % number == 0
+  end
- -
-
# File activesupport/lib/active_support/core_ext/integer/multiple.rb, line 9
-def multiple_of?(number)
-  number == 0 ? self == 0 : self % number == 0
-end
-
-
- -

+ See on GitHub + + + +

@@ -223,22 +224,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/integer/inflections.rb, line 28
+  def ordinal
+    ActiveSupport::Inflector.ordinal(self)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/integer/inflections.rb, line 28
-def ordinal
-  ActiveSupport::Inflector.ordinal(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -266,22 +267,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/integer/inflections.rb, line 15
+  def ordinalize
+    ActiveSupport::Inflector.ordinalize(self)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/integer/inflections.rb, line 15
-def ordinalize
-  ActiveSupport::Inflector.ordinalize(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -305,7 +306,8 @@

-

+ +

@@ -332,22 +334,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/integer/time.rb, line 18
+  def years
+    ActiveSupport::Duration.years(self)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/integer/time.rb, line 18
-def years
-  ActiveSupport::Duration.years(self)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Kernel.html b/src/classes/Kernel.html index 09d4572912..b626bd1e4c 100644 --- a/src/classes/Kernel.html +++ b/src/classes/Kernel.html @@ -99,22 +99,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/kernel/singleton_class.rb, line 5
+  def class_eval(*args, &block)
+    singleton_class.class_eval(*args, &block)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/kernel/singleton_class.rb, line 5
-def class_eval(*args, &block)
-  singleton_class.class_eval(*args, &block)
-end
-
-
- - + See on GitHub + + + +

@@ -136,22 +136,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/kernel/concern.rb, line 11
+  def concern(topic, &module_definition)
+    Object.concern topic, &module_definition
+  end
- -
-
# File activesupport/lib/active_support/core_ext/kernel/concern.rb, line 11
-def concern(topic, &module_definition)
-  Object.concern topic, &module_definition
-end
-
-
- -

+ See on GitHub + + + +

@@ -171,22 +171,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/kernel/reporting.rb, line 20
+  def enable_warnings(&block)
+    with_warnings(true, &block)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/kernel/reporting.rb, line 20
-def enable_warnings(&block)
-  with_warnings(true, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -213,22 +213,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/kernel/reporting.rb, line 14
+  def silence_warnings(&block)
+    with_warnings(nil, &block)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/kernel/reporting.rb, line 14
-def silence_warnings(&block)
-  with_warnings(nil, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -256,23 +256,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/kernel/reporting.rb, line 41
+  def suppress(*exception_classes)
+    yield
+  rescue *exception_classes
+  end
- -
-
# File activesupport/lib/active_support/core_ext/kernel/reporting.rb, line 41
-def suppress(*exception_classes)
-  yield
-rescue *exception_classes
-end
-
-
- -

+ See on GitHub + + + +

@@ -292,25 +292,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/kernel/reporting.rb, line 26
+  def with_warnings(flag)
+    old_verbose, $VERBOSE = $VERBOSE, flag
+    yield
+  ensure
+    $VERBOSE = old_verbose
+  end
- -
-
# File activesupport/lib/active_support/core_ext/kernel/reporting.rb, line 26
-def with_warnings(flag)
-  old_verbose, $VERBOSE = $VERBOSE, flag
-  yield
-ensure
-  $VERBOSE = old_verbose
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/LoadError.html b/src/classes/LoadError.html index 815a7c6403..89d579815f 100644 --- a/src/classes/LoadError.html +++ b/src/classes/LoadError.html @@ -81,22 +81,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/load_error.rb, line 6
+  def is_missing?(location)
+    location.delete_suffix(".rb") == path.to_s.delete_suffix(".rb")
+  end
- -
-
# File activesupport/lib/active_support/core_ext/load_error.rb, line 6
-def is_missing?(location)
-  location.delete_suffix(".rb") == path.to_s.delete_suffix(".rb")
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/LoggerSilence.html b/src/classes/LoggerSilence.html deleted file mode 100644 index 71207a3b92..0000000000 --- a/src/classes/LoggerSilence.html +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: LoggerSilence -layout: default ---- -
- -
-
- - - - - - - - - - - - - - -

Included Modules

- - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/Mail.html b/src/classes/Mail.html index ec77d85b76..91376fd931 100644 --- a/src/classes/Mail.html +++ b/src/classes/Mail.html @@ -103,22 +103,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/mail_ext/from_source.rb, line 4
+  def self.from_source(source)
+    Mail.new Mail::Utilities.binary_unsafe_to_crlf(source.to_s)
+  end
- -
-
# File actionmailbox/lib/action_mailbox/mail_ext/from_source.rb, line 4
-def self.from_source(source)
-  Mail.new Mail::Utilities.binary_unsafe_to_crlf(source.to_s)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/Mail/Address.html b/src/classes/Mail/Address.html index e1ca489acf..9b1b8a8166 100644 --- a/src/classes/Mail/Address.html +++ b/src/classes/Mail/Address.html @@ -86,22 +86,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/mail_ext/address_wrapping.rb, line 5
+    def self.wrap(address)
+      address.is_a?(Mail::Address) ? address : Mail::Address.new(address)
+    end
- -
-
# File actionmailbox/lib/action_mailbox/mail_ext/address_wrapping.rb, line 5
-def self.wrap(address)
-  address.is_a?(Mail::Address) ? address : Mail::Address.new(address)
-end
-
-
- - + See on GitHub + + + + @@ -125,22 +125,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/mail_ext/address_equality.rb, line 5
+    def ==(other_address)
+      other_address.is_a?(Mail::Address) && to_s == other_address.to_s
+    end
- -
-
# File actionmailbox/lib/action_mailbox/mail_ext/address_equality.rb, line 5
-def ==(other_address)
-  other_address.is_a?(Mail::Address) && to_s == other_address.to_s
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/Mail/Message.html b/src/classes/Mail/Message.html index c1059d13b5..354f178594 100644 --- a/src/classes/Mail/Message.html +++ b/src/classes/Mail/Message.html @@ -111,22 +111,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/mail_ext/addresses.rb, line 21
+    def bcc_addresses
+      Array(address_list(header[:bcc])&.addresses)
+    end
- -
-
# File actionmailbox/lib/action_mailbox/mail_ext/addresses.rb, line 21
-def bcc_addresses
-  Array(address_list(header[:bcc])&.addresses)
-end
-
-
- - + See on GitHub + + + +

@@ -146,22 +146,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/mail_ext/addresses.rb, line 17
+    def cc_addresses
+      Array(address_list(header[:cc])&.addresses)
+    end
- -
-
# File actionmailbox/lib/action_mailbox/mail_ext/addresses.rb, line 17
-def cc_addresses
-  Array(address_list(header[:cc])&.addresses)
-end
-
-
- -

+ See on GitHub + + + +

@@ -181,22 +181,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/mail_ext/addresses.rb, line 5
+    def from_address
+      address_list(header[:from])&.addresses&.first
+    end
- -
-
# File actionmailbox/lib/action_mailbox/mail_ext/addresses.rb, line 5
-def from_address
-  address_list(header[:from])&.addresses&.first
-end
-
-
- -

+ See on GitHub + + + +

@@ -216,23 +216,23 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/mail_ext/recipients.rb, line 5
+    def recipients
+      Array(to) + Array(cc) + Array(bcc) + Array(header[:x_original_to]).map(&:to_s) +
+        Array(header[:x_forwarded_to]).map(&:to_s)
+    end
- -
-
# File actionmailbox/lib/action_mailbox/mail_ext/recipients.rb, line 5
-def recipients
-  Array(to) + Array(cc) + Array(bcc) + Array(header[:x_original_to]).map(&:to_s) +
-    Array(header[:x_forwarded_to]).map(&:to_s)
-end
-
-
- -

+ See on GitHub + + + +

@@ -252,22 +252,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/mail_ext/addresses.rb, line 9
+    def recipients_addresses
+      to_addresses + cc_addresses + bcc_addresses + x_original_to_addresses + x_forwarded_to_addresses
+    end
- -
-
# File actionmailbox/lib/action_mailbox/mail_ext/addresses.rb, line 9
-def recipients_addresses
-  to_addresses + cc_addresses + bcc_addresses + x_original_to_addresses + x_forwarded_to_addresses
-end
-
-
- -

+ See on GitHub + + + +

@@ -287,22 +287,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/mail_ext/addresses.rb, line 13
+    def to_addresses
+      Array(address_list(header[:to])&.addresses)
+    end
- -
-
# File actionmailbox/lib/action_mailbox/mail_ext/addresses.rb, line 13
-def to_addresses
-  Array(address_list(header[:to])&.addresses)
-end
-
-
- -

+ See on GitHub + + + +

@@ -322,22 +322,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/mail_ext/addresses.rb, line 29
+    def x_forwarded_to_addresses
+      Array(header[:x_forwarded_to]).collect { |header| Mail::Address.new header.to_s }
+    end
- -
-
# File actionmailbox/lib/action_mailbox/mail_ext/addresses.rb, line 29
-def x_forwarded_to_addresses
-  Array(header[:x_forwarded_to]).collect { |header| Mail::Address.new header.to_s }
-end
-
-
- -

+ See on GitHub + + + +

@@ -357,22 +357,22 @@

- -
+ +
+ + Source code + + +
# File actionmailbox/lib/action_mailbox/mail_ext/addresses.rb, line 25
+    def x_original_to_addresses
+      Array(header[:x_original_to]).collect { |header| Mail::Address.new header.to_s }
+    end
- -
-
# File actionmailbox/lib/action_mailbox/mail_ext/addresses.rb, line 25
-def x_original_to_addresses
-  Array(header[:x_original_to]).collect { |header| Mail::Address.new header.to_s }
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Method.html b/src/classes/Method.html index fb58d982d7..7c408268e0 100644 --- a/src/classes/Method.html +++ b/src/classes/Method.html @@ -85,22 +85,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/duplicable.rb, line 36
+  def duplicable?
+    false
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/duplicable.rb, line 36
-def duplicable?
-  false
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/Mime.html b/src/classes/Mime.html index 2a810d8d9f..8a8c95711c 100644 --- a/src/classes/Mime.html +++ b/src/classes/Mime.html @@ -161,23 +161,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 49
+    def [](type)
+      return type if type.is_a?(Type)
+      Type.lookup_by_extension(type)
+    end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 49
-def [](type)
-  return type if type.is_a?(Type)
-  Type.lookup_by_extension(type)
-end
-
-
- - + See on GitHub + + + +

@@ -197,23 +197,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 62
+    def fetch(type, &block)
+      return type if type.is_a?(Type)
+      EXTENSION_LOOKUP.fetch(type.to_s, &block)
+    end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 62
-def fetch(type, &block)
-  return type if type.is_a?(Type)
-  EXTENSION_LOOKUP.fetch(type.to_s, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -233,22 +233,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 54
+    def symbols
+      SET.symbols
+    end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 54
-def symbols
-  SET.symbols
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Mime/AllType.html b/src/classes/Mime/AllType.html index 70ecb2b940..58c081f21b 100644 --- a/src/classes/Mime/AllType.html +++ b/src/classes/Mime/AllType.html @@ -102,22 +102,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 345
+    def initialize
+      super "*/*", nil
+    end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 345
-def initialize
-  super "*/*", nil
-end
-
-
- - + See on GitHub + + + + @@ -141,20 +141,20 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 349
+    def all?; true; end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 349
-def all?; true; end
-
-
- - + See on GitHub + + + +

@@ -174,20 +174,20 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 350
+    def html?; true; end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 350
-def html?; true; end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Mime/Mimes.html b/src/classes/Mime/Mimes.html index 91d5e1c62c..576a0cd22b 100644 --- a/src/classes/Mime/Mimes.html +++ b/src/classes/Mime/Mimes.html @@ -124,24 +124,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 11
+    def initialize
+      @mimes = []
+      @symbols = []
+      @symbols_set = Set.new
+    end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 11
-def initialize
-  @mimes = []
-  @symbols = []
-  @symbols_set = Set.new
-end
-
-
- - + See on GitHub + + + + @@ -165,25 +165,25 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 21
+    def <<(type)
+      @mimes << type
+      sym_type = type.to_sym
+      @symbols << sym_type
+      @symbols_set << sym_type
+    end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 21
-def <<(type)
-  @mimes << type
-  sym_type = type.to_sym
-  @symbols << sym_type
-  @symbols_set << sym_type
-end
-
-
- - + See on GitHub + + + +

@@ -203,29 +203,29 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 28
+    def delete_if
+      @mimes.delete_if do |x|
+        if yield x
+          sym_type = x.to_sym
+          @symbols.delete(sym_type)
+          @symbols_set.delete(sym_type)
+          true
+        end
+      end
+    end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 28
-def delete_if
-  @mimes.delete_if do |x|
-    if yield x
-      sym_type = x.to_sym
-      @symbols.delete(sym_type)
-      @symbols_set.delete(sym_type)
-      true
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -245,22 +245,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 17
+    def each(&block)
+      @mimes.each(&block)
+    end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 17
-def each(&block)
-  @mimes.each(&block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -280,22 +280,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 39
+    def valid_symbols?(symbols) # :nodoc
+      symbols.all? { |s| @symbols_set.include?(s) }
+    end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 39
-def valid_symbols?(symbols) # :nodoc
-  symbols.all? { |s| @symbols_set.include?(s) }
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Mime/NullType.html b/src/classes/Mime/NullType.html index dbcc3dc50a..7aff57d042 100644 --- a/src/classes/Mime/NullType.html +++ b/src/classes/Mime/NullType.html @@ -103,22 +103,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 361
+    def nil?
+      true
+    end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 361
-def nil?
-  true
-end
-
-
- - + See on GitHub + + + +

@@ -138,20 +138,20 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 369
+    def ref; end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 369
-def ref; end
-
-
- -

+ See on GitHub + + + +

@@ -171,22 +171,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 365
+    def to_s
+      ""
+    end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 365
-def to_s
-  ""
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Mime/Type.html b/src/classes/Mime/Type.html index 37ea7d81a8..89c5613786 100644 --- a/src/classes/Mime/Type.html +++ b/src/classes/Mime/Type.html @@ -320,23 +320,23 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 164
+      def lookup(string)
+        # fallback to the media-type without parameters if it was not found
+        LOOKUP[string] || LOOKUP[string.split(";", 2)[0]&.rstrip] || Type.new(string)
+      end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 164
-def lookup(string)
-  # fallback to the media-type without parameters if it was not found
-  LOOKUP[string] || LOOKUP[string.split(";", 2)[0]&.rstrip] || Type.new(string)
-end
-
-
- - + See on GitHub + + + +

@@ -356,22 +356,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 169
+      def lookup_by_extension(extension)
+        EXTENSION_LOOKUP[extension.to_s]
+      end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 169
-def lookup_by_extension(extension)
-  EXTENSION_LOOKUP[extension.to_s]
-end
-
-
- -

+ See on GitHub + + + +

@@ -391,27 +391,27 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 257
+    def initialize(string, symbol = nil, synonyms = [])
+      unless MIME_REGEXP.match?(string)
+        raise InvalidMimeType, "#{string.inspect} is not a valid MIME type"
+      end
+      @symbol, @synonyms = symbol, synonyms
+      @string = string
+      @hash = [@string, @synonyms, @symbol].hash
+    end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 257
-def initialize(string, symbol = nil, synonyms = [])
-  unless MIME_REGEXP.match?(string)
-    raise InvalidMimeType, "#{string.inspect} is not a valid MIME type"
-  end
-  @symbol, @synonyms = symbol, synonyms
-  @string = string
-  @hash = [@string, @synonyms, @symbol].hash
-end
-
-
- -

+ See on GitHub + + + +

@@ -431,45 +431,45 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 193
+      def parse(accept_header)
+        if !accept_header.include?(",")
+          if (index = accept_header.index(PARAMETER_SEPARATOR_REGEXP))
+            accept_header = accept_header[0, index]
+          end
+          return [] if accept_header.blank?
+          parse_trailing_star(accept_header) || Array(Mime::Type.lookup(accept_header))
+        else
+          list, index = [], 0
+          accept_header.scan(ACCEPT_HEADER_REGEXP).each do |header|
+            params, q = header.split(PARAMETER_SEPARATOR_REGEXP)
+
+            next unless params
+            params.strip!
+            next if params.empty?
+
+            params = parse_trailing_star(params) || [params]
+
+            params.each do |m|
+              list << AcceptItem.new(index, m.to_s, q)
+              index += 1
+            end
+          end
+          AcceptList.sort! list
+        end
+      end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 193
-def parse(accept_header)
-  if !accept_header.include?(",")
-    if (index = accept_header.index(PARAMETER_SEPARATOR_REGEXP))
-      accept_header = accept_header[0, index]
-    end
-    return [] if accept_header.blank?
-    parse_trailing_star(accept_header) || Array(Mime::Type.lookup(accept_header))
-  else
-    list, index = [], 0
-    accept_header.scan(ACCEPT_HEADER_REGEXP).each do |header|
-      params, q = header.split(PARAMETER_SEPARATOR_REGEXP)
-
-      next unless params
-      params.strip!
-      next if params.empty?
-
-      params = parse_trailing_star(params) || [params]
-
-      params.each do |m|
-        list << AcceptItem.new(index, m.to_s, q)
-        index += 1
-      end
-    end
-    AcceptList.sort! list
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -491,22 +491,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 229
+      def parse_data_with_trailing_star(type)
+        Mime::SET.select { |m| m.match?(type) }
+      end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 229
-def parse_data_with_trailing_star(type)
-  Mime::SET.select { |m| m.match?(type) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -526,22 +526,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 220
+      def parse_trailing_star(accept_header)
+        parse_data_with_trailing_star($1) if accept_header =~ TRAILING_STAR_REGEXP
+      end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 220
-def parse_trailing_star(accept_header)
-  parse_data_with_trailing_star($1) if accept_header =~ TRAILING_STAR_REGEXP
-end
-
-
- -

+ See on GitHub + + + +

@@ -561,32 +561,32 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 179
+      def register(string, symbol, mime_type_synonyms = [], extension_synonyms = [], skip_lookup = false)
+        new_mime = Type.new(string, symbol, mime_type_synonyms)
+
+        SET << new_mime
+
+        ([string] + mime_type_synonyms).each { |str| LOOKUP[str] = new_mime } unless skip_lookup
+        ([symbol] + extension_synonyms).each { |ext| EXTENSION_LOOKUP[ext.to_s] = new_mime }
+
+        @register_callbacks.each do |callback|
+          callback.call(new_mime)
+        end
+        new_mime
+      end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 179
-def register(string, symbol, mime_type_synonyms = [], extension_synonyms = [], skip_lookup = false)
-  new_mime = Type.new(string, symbol, mime_type_synonyms)
-
-  SET << new_mime
-
-  ([string] + mime_type_synonyms).each { |str| LOOKUP[str] = new_mime } unless skip_lookup
-  ([symbol] + extension_synonyms).each { |ext| EXTENSION_LOOKUP[ext.to_s] = new_mime }
-
-  @register_callbacks.each do |callback|
-    callback.call(new_mime)
-  end
-  new_mime
-end
-
-
- -

+ See on GitHub + + + +

@@ -606,22 +606,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 175
+      def register_alias(string, symbol, extension_synonyms = [])
+        register(string, symbol, [], extension_synonyms, true)
+      end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 175
-def register_alias(string, symbol, extension_synonyms = [])
-  register(string, symbol, [], extension_synonyms, true)
-end
-
-
- -

+ See on GitHub + + + +

@@ -641,22 +641,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 160
+      def register_callback(&block)
+        @register_callbacks << block
+      end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 160
-def register_callback(&block)
-  @register_callbacks << block
-end
-
-
- -

+ See on GitHub + + + +

@@ -681,27 +681,27 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 238
+      def unregister(symbol)
+        symbol = symbol.downcase
+        if mime = Mime[symbol]
+          SET.delete_if { |v| v.eql?(mime) }
+          LOOKUP.delete_if { |_, v| v.eql?(mime) }
+          EXTENSION_LOOKUP.delete_if { |_, v| v.eql?(mime) }
+        end
+      end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 238
-def unregister(symbol)
-  symbol = symbol.downcase
-  if mime = Mime[symbol]
-    SET.delete_if { |v| v.eql?(mime) }
-    LOOKUP.delete_if { |_, v| v.eql?(mime) }
-    EXTENSION_LOOKUP.delete_if { |_, v| v.eql?(mime) }
-  end
-end
-
-
- -

+ See on GitHub + + + + @@ -725,25 +725,25 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 290
+    def ==(mime_type)
+      return false unless mime_type
+      (@synonyms + [ self ]).any? do |synonym|
+        synonym.to_s == mime_type.to_s || synonym.to_sym == mime_type.to_sym
+      end
+    end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 290
-def ==(mime_type)
-  return false unless mime_type
-  (@synonyms + [ self ]).any? do |synonym|
-    synonym.to_s == mime_type.to_s || synonym.to_sym == mime_type.to_sym
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -763,26 +763,26 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 282
+    def ===(list)
+      if list.is_a?(Array)
+        (@synonyms + [ self ]).any? { |synonym| list.include?(synonym) }
+      else
+        super
+      end
+    end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 282
-def ===(list)
-  if list.is_a?(Array)
-    (@synonyms + [ self ]).any? { |synonym| list.include?(synonym) }
-  else
-    super
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -802,24 +802,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 304
+    def =~(mime_type)
+      return false unless mime_type
+      regexp = Regexp.new(Regexp.quote(mime_type.to_s))
+      @synonyms.any? { |synonym| synonym.to_s =~ regexp } || @string =~ regexp
+    end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 304
-def =~(mime_type)
-  return false unless mime_type
-  regexp = Regexp.new(Regexp.quote(mime_type.to_s))
-  @synonyms.any? { |synonym| synonym.to_s =~ regexp } || @string =~ regexp
-end
-
-
- -

+ See on GitHub + + + +

@@ -839,20 +839,20 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 320
+    def all?; false; end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 320
-def all?; false; end
-
-
- -

+ See on GitHub + + + +

@@ -872,25 +872,25 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 297
+    def eql?(other)
+      super || (self.class == other.class &&
+                @string    == other.string &&
+                @synonyms  == other.synonyms &&
+                @symbol    == other.symbol)
+    end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 297
-def eql?(other)
-  super || (self.class == other.class &&
-            @string    == other.string &&
-            @synonyms  == other.synonyms &&
-            @symbol    == other.symbol)
-end
-
-
- -

+ See on GitHub + + + +

@@ -910,22 +910,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 316
+    def html?
+      (symbol == :html) || @string.include?("html")
+    end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 316
-def html?
-  (symbol == :html) || @string.include?("html")
-end
-
-
- -

+ See on GitHub + + + +

@@ -945,24 +945,24 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 310
+    def match?(mime_type)
+      return false unless mime_type
+      regexp = Regexp.new(Regexp.quote(mime_type.to_s))
+      @synonyms.any? { |synonym| synonym.to_s.match?(regexp) } || @string.match?(regexp)
+    end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 310
-def match?(mime_type)
-  return false unless mime_type
-  regexp = Regexp.new(Regexp.quote(mime_type.to_s))
-  @synonyms.any? { |synonym| synonym.to_s.match?(regexp) } || @string.match?(regexp)
-end
-
-
- -

+ See on GitHub + + + +

@@ -982,22 +982,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 278
+    def ref
+      symbol || to_s
+    end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 278
-def ref
-  symbol || to_s
-end
-
-
- -

+ See on GitHub + + + +

@@ -1017,22 +1017,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 266
+    def to_s
+      @string
+    end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 266
-def to_s
-  @string
-end
-
-
- -

+ See on GitHub + + + +

@@ -1052,22 +1052,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 270
+    def to_str
+      to_s
+    end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 270
-def to_str
-  to_s
-end
-
-
- -

+ See on GitHub + + + +

@@ -1087,22 +1087,22 @@

- -
+ +
+ + Source code + + +
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 274
+    def to_sym
+      @symbol
+    end
- -
-
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 274
-def to_sym
-  @symbol
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Minitest.html b/src/classes/Minitest.html index 9c19fab706..a93e7b7fae 100644 --- a/src/classes/Minitest.html +++ b/src/classes/Minitest.html @@ -95,42 +95,42 @@

- -
+ +
+ + Source code + + +
# File railties/lib/minitest/rails_plugin.rb, line 111
+  def self.plugin_rails_init(options)
+    unless options[:full_backtrace] || ENV["BACKTRACE"]
+      # Plugin can run without Rails loaded, check before filtering.
+      if ::Rails.respond_to?(:backtrace_cleaner)
+        Minitest.backtrace_filter = BacktraceFilterWithFallback.new(::Rails.backtrace_cleaner, Minitest.backtrace_filter)
+      end
+    end
+
+    # Suppress summary reports when outputting inline rerun snippets.
+    if reporter.reporters.reject! { |reporter| reporter.kind_of?(SummaryReporter) }
+      reporter << SuppressedSummaryReporter.new(options[:io], options)
+    end
+
+    # Replace progress reporter for colors.
+    if reporter.reporters.reject! { |reporter| reporter.kind_of?(ProgressReporter) }
+      reporter << ::Rails::TestUnitReporter.new(options[:io], options)
+    end
+
+    # Add slowest tests reporter at the end.
+    if options[:profile]
+      reporter << ProfileReporter.new(options[:io], options)
+    end
+  end
- -
-
# File railties/lib/minitest/rails_plugin.rb, line 111
-def self.plugin_rails_init(options)
-  unless options[:full_backtrace] || ENV["BACKTRACE"]
-    # Plugin can run without Rails loaded, check before filtering.
-    if ::Rails.respond_to?(:backtrace_cleaner)
-      Minitest.backtrace_filter = BacktraceFilterWithFallback.new(::Rails.backtrace_cleaner, Minitest.backtrace_filter)
-    end
-  end
-
-  # Suppress summary reports when outputting inline rerun snippets.
-  if reporter.reporters.reject! { |reporter| reporter.kind_of?(SummaryReporter) }
-    reporter << SuppressedSummaryReporter.new(options[:io], options)
-  end
-
-  # Replace progress reporter for colors.
-  if reporter.reporters.reject! { |reporter| reporter.kind_of?(ProgressReporter) }
-    reporter << ::Rails::TestUnitReporter.new(options[:io], options)
-  end
-
-  # Add slowest tests reporter at the end.
-  if options[:profile]
-    reporter << ProfileReporter.new(options[:io], options)
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -150,59 +150,59 @@

- -
+ +
+ + Source code + + +
# File railties/lib/minitest/rails_plugin.rb, line 68
+  def self.plugin_rails_options(opts, options)
+    ::Rails::TestUnit::Runner.attach_before_load_options(opts)
+
+    opts.on("-b", "--backtrace", "Show the complete backtrace") do
+      options[:full_backtrace] = true
+    end
+
+    opts.on("-d", "--defer-output", "Output test failures and errors after the test run") do
+      options[:output_inline] = false
+    end
+
+    opts.on("-f", "--fail-fast", "Abort test run on first failure or error") do
+      options[:fail_fast] = true
+    end
+
+    opts.on("-c", "--[no-]color", "Enable color in the output") do |value|
+      options[:color] = value
+    end
+
+    opts.on("--profile [COUNT]", "Enable profiling of tests and list the slowest test cases (default: 10)") do |value|
+      default_count = 10
+
+      if value.nil?
+        count = default_count
+      else
+        count = Integer(value, exception: false)
+        if count.nil?
+          warn("Non integer specified as profile count, separate " \
+               "your path from options with -- e.g. " \
+               "`bin/test --profile -- #{value}`")
+          count = default_count
+        end
+      end
+
+      options[:profile] = count
+    end
+
+    options[:color] = true
+    options[:output_inline] = true
+  end
- -
-
# File railties/lib/minitest/rails_plugin.rb, line 68
-def self.plugin_rails_options(opts, options)
-  ::Rails::TestUnit::Runner.attach_before_load_options(opts)
-
-  opts.on("-b", "--backtrace", "Show the complete backtrace") do
-    options[:full_backtrace] = true
-  end
-
-  opts.on("-d", "--defer-output", "Output test failures and errors after the test run") do
-    options[:output_inline] = false
-  end
-
-  opts.on("-f", "--fail-fast", "Abort test run on first failure or error") do
-    options[:fail_fast] = true
-  end
-
-  opts.on("-c", "--[no-]color", "Enable color in the output") do |value|
-    options[:color] = value
-  end
-
-  opts.on("--profile [COUNT]", "Enable profiling of tests and list the slowest test cases (default: 10)") do |value|
-    default_count = 10
-
-    if value.nil?
-      count = default_count
-    else
-      count = Integer(value, exception: false)
-      if count.nil?
-        warn("Non integer specified as profile count, separate " \
-             "your path from options with -- e.g. " \
-             "`bin/test --profile -- #{value}`")
-        count = default_count
-      end
-    end
-
-    options[:profile] = count
-  end
-
-  options[:color] = true
-  options[:output_inline] = true
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Minitest/BacktraceFilterWithFallback.html b/src/classes/Minitest/BacktraceFilterWithFallback.html index 14111fc1a4..c3ef527d27 100644 --- a/src/classes/Minitest/BacktraceFilterWithFallback.html +++ b/src/classes/Minitest/BacktraceFilterWithFallback.html @@ -84,23 +84,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/minitest/rails_plugin.rb, line 9
+    def initialize(preferred, fallback)
+      @preferred = preferred
+      @fallback = fallback
+    end
- -
-
# File railties/lib/minitest/rails_plugin.rb, line 9
-def initialize(preferred, fallback)
-  @preferred = preferred
-  @fallback = fallback
-end
-
-
- - + See on GitHub + + + + @@ -124,24 +124,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/minitest/rails_plugin.rb, line 14
+    def filter(backtrace)
+      filtered = @preferred.filter(backtrace)
+      filtered = @fallback.filter(backtrace) if filtered.empty?
+      filtered
+    end
- -
-
# File railties/lib/minitest/rails_plugin.rb, line 14
-def filter(backtrace)
-  filtered = @preferred.filter(backtrace)
-  filtered = @fallback.filter(backtrace) if filtered.empty?
-  filtered
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/Minitest/ProfileReporter.html b/src/classes/Minitest/ProfileReporter.html index 82a548e889..acbd967fb9 100644 --- a/src/classes/Minitest/ProfileReporter.html +++ b/src/classes/Minitest/ProfileReporter.html @@ -88,24 +88,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/minitest/rails_plugin.rb, line 29
+    def initialize(io = $stdout, options = {})
+      super
+      @results = []
+      @count = options[:profile]
+    end
- -
-
# File railties/lib/minitest/rails_plugin.rb, line 29
-def initialize(io = $stdout, options = {})
-  super
-  @results = []
-  @count = options[:profile]
-end
-
-
- - + See on GitHub + + + + @@ -129,22 +129,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/minitest/rails_plugin.rb, line 35
+    def record(result)
+      @results << result
+    end
- -
-
# File railties/lib/minitest/rails_plugin.rb, line 35
-def record(result)
-  @results << result
-end
-
-
- - + See on GitHub + + + +

@@ -164,34 +164,34 @@

- -
+ +
+ + Source code + + +
# File railties/lib/minitest/rails_plugin.rb, line 39
+    def report
+      total_time = @results.sum(&:time)
+
+      @results.sort! { |a, b| b.time <=> a.time }
+      slow_results = @results.take(@count)
+      slow_tests_total_time = slow_results.sum(&:time)
+
+      ratio = (total_time == 0) ? 0.0 : (slow_tests_total_time / total_time) * 100
+
+      io.puts("\nTop %d slowest tests (%.2f seconds, %.1f%% of total time):\n" % [slow_results.size, slow_tests_total_time, ratio])
+      slow_results.each do |result|
+        io.puts("  %s\n    %.4f seconds %s\n" % [result.location, result.time, source_location(result)])
+      end
+      io.puts("\n")
+    end
- -
-
# File railties/lib/minitest/rails_plugin.rb, line 39
-def report
-  total_time = @results.sum(&:time)
-
-  @results.sort! { |a, b| b.time <=> a.time }
-  slow_results = @results.take(@count)
-  slow_tests_total_time = slow_results.sum(&:time)
-
-  ratio = (total_time == 0) ? 0.0 : (slow_tests_total_time / total_time) * 100
-
-  io.puts("\nTop %d slowest tests (%.2f seconds, %.1f%% of total time):\n" % [slow_results.size, slow_tests_total_time, ratio])
-  slow_results.each do |result|
-    io.puts("  %s\n    %.4f seconds %s\n" % [result.location, result.time, source_location(result)])
-  end
-  io.puts("\n")
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Minitest/SuppressedSummaryReporter.html b/src/classes/Minitest/SuppressedSummaryReporter.html index a18b9cbb9a..c8ebcb7835 100644 --- a/src/classes/Minitest/SuppressedSummaryReporter.html +++ b/src/classes/Minitest/SuppressedSummaryReporter.html @@ -81,22 +81,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/minitest/rails_plugin.rb, line 23
+    def aggregated_results(*)
+      super unless options[:output_inline]
+    end
- -
-
# File railties/lib/minitest/rails_plugin.rb, line 23
-def aggregated_results(*)
-  super unless options[:output_inline]
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/Module.html b/src/classes/Module.html index 4c6b30e911..a6c5762e4b 100644 --- a/src/classes/Module.html +++ b/src/classes/Module.html @@ -331,29 +331,29 @@

- -
- - -
-
# File activesupport/lib/active_support/core_ext/module/aliasing.rb, line 21
-  def alias_attribute(new_name, old_name)
-    # The following reader methods use an explicit `self` receiver in order to
-    # support aliases that start with an uppercase letter. Otherwise, they would
-    # be resolved as constants instead.
-    module_eval <<-STR, __FILE__, __LINE__ + 1
-      def #{new_name}; self.#{old_name}; end          # def subject; self.title; end
+          
+            
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/module/aliasing.rb, line 21
+  def alias_attribute(new_name, old_name)
+    # The following reader methods use an explicit `self` receiver in order to
+    # support aliases that start with an uppercase letter. Otherwise, they would
+    # be resolved as constants instead.
+    module_eval <<-STR, __FILE__, __LINE__ + 1
+      def #{new_name}; self.#{old_name}; end          # def subject; self.title; end
       def #{new_name}?; self.#{old_name}?; end        # def subject?; self.title?; end
       def #{new_name}=(v); self.#{old_name} = v; end  # def subject=(v); self.title = v; end
-    STR
-  end
-
-
- - + STR + end + + See on GitHub + + + +

@@ -397,22 +397,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/module/anonymous.rb, line 27
+  def anonymous?
+    name.nil?
+  end
- -
-
# File activesupport/lib/active_support/core_ext/module/anonymous.rb, line 27
-def anonymous?
-  name.nil?
-end
-
-
- -

+ See on GitHub + + + +

@@ -436,7 +436,8 @@

-

+ +

@@ -460,23 +461,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/module/attr_internal.rb, line 16
+  def attr_internal_accessor(*attrs)
+    attr_internal_reader(*attrs)
+    attr_internal_writer(*attrs)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/module/attr_internal.rb, line 16
-def attr_internal_accessor(*attrs)
-  attr_internal_reader(*attrs)
-  attr_internal_writer(*attrs)
-end
-
-
- -

+ See on GitHub + + + +

@@ -496,22 +497,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/module/attr_internal.rb, line 5
+  def attr_internal_reader(*attrs)
+    attrs.each { |attr_name| attr_internal_define(attr_name, :reader) }
+  end
- -
-
# File activesupport/lib/active_support/core_ext/module/attr_internal.rb, line 5
-def attr_internal_reader(*attrs)
-  attrs.each { |attr_name| attr_internal_define(attr_name, :reader) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -531,22 +532,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/module/attr_internal.rb, line 10
+  def attr_internal_writer(*attrs)
+    attrs.each { |attr_name| attr_internal_define(attr_name, :writer) }
+  end
- -
-
# File activesupport/lib/active_support/core_ext/module/attr_internal.rb, line 10
-def attr_internal_writer(*attrs)
-  attrs.each { |attr_name| attr_internal_define(attr_name, :writer) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -570,7 +571,8 @@

-

+ +

@@ -594,7 +596,8 @@

-

+ +

@@ -618,7 +621,8 @@

-

+ +

@@ -643,26 +647,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/deep_dup.rb, line 64
+  def deep_dup
+    if name.nil?
+      super
+    else
+      self
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/deep_dup.rb, line 64
-def deep_dup
-  if name.nil?
-    super
-  else
-    self
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -836,119 +840,119 @@

Options

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/module/delegation.rb, line 171
+  def delegate(*methods, to: nil, prefix: nil, allow_nil: nil, private: nil)
+    unless to
+      raise ArgumentError, "Delegation needs a target. Supply a keyword argument 'to' (e.g. delegate :hello, to: :greeter)."
+    end
+
+    if prefix == true && /^[^a-z_]/.match?(to)
+      raise ArgumentError, "Can only automatically set the delegation prefix when delegating to a method."
+    end
+
+    method_prefix = \
+      if prefix
+        "#{prefix == true ? to : prefix}_"
+      else
+        ""
+      end
+
+    location = caller_locations(1, 1).first
+    file, line = location.path, location.lineno
+
+    receiver = to.to_s
+    receiver = "self.#{receiver}" if DELEGATION_RESERVED_METHOD_NAMES.include?(receiver)
+
+    method_def = []
+    method_names = []
+
+    method_def << "self.private" if private
+
+    methods.each do |method|
+      method_name = prefix ? "#{method_prefix}#{method}" : method
+      method_names << method_name.to_sym
+
+      # Attribute writer methods only accept one argument. Makes sure []=
+      # methods still accept two arguments.
+      definition = \
+        if /[^\]]=\z/.match?(method)
+          "arg"
+        else
+          method_object =
+            begin
+              if to.is_a?(Module)
+                to.method(method)
+              elsif receiver == "self.class"
+                method(method)
+              end
+            rescue NameError
+              # Do nothing. Fall back to `"..."`
+            end
+
+          if method_object
+            parameters = method_object.parameters
+
+            if (parameters.map(&:first) & [:opt, :rest, :keyreq, :key, :keyrest]).any?
+              "..."
+            else
+              defn = parameters.filter_map { |type, arg| arg if type == :req }
+              defn << "&block"
+              defn.join(", ")
+            end
+          else
+            "..."
+          end
+        end
+
+      # The following generated method calls the target exactly once, storing
+      # the returned value in a dummy variable.
+      #
+      # Reason is twofold: On one hand doing less calls is in general better.
+      # On the other hand it could be that the target has side-effects,
+      # whereas conceptually, from the user point of view, the delegator should
+      # be doing one call.
+      if allow_nil
+        method = method.to_s
+
+        method_def <<
+          "def #{method_name}(#{definition})" <<
+          "  _ = #{receiver}" <<
+          "  if !_.nil? || nil.respond_to?(:#{method})" <<
+          "    _.#{method}(#{definition})" <<
+          "  end" <<
+          "end"
+      else
+        method = method.to_s
+        method_name = method_name.to_s
+
+        method_def <<
+          "def #{method_name}(#{definition})" <<
+          "  _ = #{receiver}" <<
+          "  _.#{method}(#{definition})" <<
+          "rescue NoMethodError => e" <<
+          "  if _.nil? && e.name == :#{method}" <<
+          %(   raise DelegationError, "#{self}##{method_name} delegated to #{receiver}.#{method}, but #{receiver} is nil: \#{self.inspect}") <<
+          "  else" <<
+          "    raise" <<
+          "  end" <<
+          "end"
+      end
+    end
+    module_eval(method_def.join(";"), file, line)
+    method_names
+  end
- -
-
# File activesupport/lib/active_support/core_ext/module/delegation.rb, line 171
-def delegate(*methods, to: nil, prefix: nil, allow_nil: nil, private: nil)
-  unless to
-    raise ArgumentError, "Delegation needs a target. Supply a keyword argument 'to' (e.g. delegate :hello, to: :greeter)."
-  end
-
-  if prefix == true && /^[^a-z_]/.match?(to)
-    raise ArgumentError, "Can only automatically set the delegation prefix when delegating to a method."
-  end
-
-  method_prefix = \
-    if prefix
-      "#{prefix == true ? to : prefix}_"
-    else
-      ""
-    end
-
-  location = caller_locations(1, 1).first
-  file, line = location.path, location.lineno
-
-  receiver = to.to_s
-  receiver = "self.#{receiver}" if DELEGATION_RESERVED_METHOD_NAMES.include?(receiver)
-
-  method_def = []
-  method_names = []
-
-  method_def << "self.private" if private
-
-  methods.each do |method|
-    method_name = prefix ? "#{method_prefix}#{method}" : method
-    method_names << method_name.to_sym
-
-    # Attribute writer methods only accept one argument. Makes sure []=
-    # methods still accept two arguments.
-    definition = \
-      if /[^\]]=\z/.match?(method)
-        "arg"
-      else
-        method_object =
-          begin
-            if to.is_a?(Module)
-              to.method(method)
-            elsif receiver == "self.class"
-              method(method)
-            end
-          rescue NameError
-            # Do nothing. Fall back to `"..."`
-          end
-
-        if method_object
-          parameters = method_object.parameters
-
-          if (parameters.map(&:first) & [:opt, :rest, :keyreq, :key, :keyrest]).any?
-            "..."
-          else
-            defn = parameters.filter_map { |type, arg| arg if type == :req }
-            defn << "&block"
-            defn.join(", ")
-          end
-        else
-          "..."
-        end
-      end
-
-    # The following generated method calls the target exactly once, storing
-    # the returned value in a dummy variable.
-    #
-    # Reason is twofold: On one hand doing less calls is in general better.
-    # On the other hand it could be that the target has side-effects,
-    # whereas conceptually, from the user point of view, the delegator should
-    # be doing one call.
-    if allow_nil
-      method = method.to_s
-
-      method_def <<
-        "def #{method_name}(#{definition})" <<
-        "  _ = #{receiver}" <<
-        "  if !_.nil? || nil.respond_to?(:#{method})" <<
-        "    _.#{method}(#{definition})" <<
-        "  end" <<
-        "end"
-    else
-      method = method.to_s
-      method_name = method_name.to_s
-
-      method_def <<
-        "def #{method_name}(#{definition})" <<
-        "  _ = #{receiver}" <<
-        "  _.#{method}(#{definition})" <<
-        "rescue NoMethodError => e" <<
-        "  if _.nil? && e.name == :#{method}" <<
-        %(   raise DelegationError, "#{self}##{method_name} delegated to #{receiver}.#{method}, but #{receiver} is nil: \#{self.inspect}") <<
-        "  else" <<
-        "    raise" <<
-        "  end" <<
-        "end"
-    end
-  end
-  module_eval(method_def.join(";"), file, line)
-  method_names
-end
-
-
- -
+ See on GitHub + + + +

@@ -1009,21 +1013,19 @@

- -
- - -
-
# File activesupport/lib/active_support/core_ext/module/delegation.rb, line 318
-  def delegate_missing_to(target, allow_nil: nil)
-    target = target.to_s
-    target = "self.#{target}" if DELEGATION_RESERVED_METHOD_NAMES.include?(target)
-
-    module_eval <<-RUBY, __FILE__, __LINE__ + 1
-      def respond_to_missing?(name, include_private = false)
+          
+            
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/module/delegation.rb, line 318
+  def delegate_missing_to(target, allow_nil: nil)
+    target = target.to_s
+    target = "self.#{target}" if DELEGATION_RESERVED_METHOD_NAMES.include?(target)
+
+    module_eval <<-RUBY, __FILE__, __LINE__ + 1
+      def respond_to_missing?(name, include_private = false)
         # It may look like an oversight, but we deliberately do not pass
         # +include_private+, because they do not get delegated.
 
@@ -1031,9 +1033,9 @@ 

#{target}.respond_to?(name) || super end - def method_missing(method, *args, &block) + def method_missing(method, *args, &block) if #{target}.respond_to?(method) - #{target}.public_send(method, *args, &block) + #{target}.public_send(method, *args, &block) else begin super @@ -1042,7 +1044,7 @@

if #{allow_nil == true} nil else - raise DelegationError, "\#{method} delegated to #{target}, but #{target} is nil" + raise DelegationError, "\#{method} delegated to #{target}, but #{target} is nil" end else raise @@ -1051,12 +1053,14 @@

end end ruby2_keywords(:method_missing) - RUBY - end

-
-
- -

+ RUBY + end + + See on GitHub + + + +

@@ -1088,30 +1092,30 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/module/deprecation.rb, line 17
+  def deprecate(*method_names, deprecator: nil, **options)
+    if deprecator.is_a?(ActiveSupport::Deprecation)
+      deprecator.deprecate_methods(self, *method_names, **options)
+    elsif deprecator
+      # we just need any instance to call deprecate_methods, but the deprecation will be emitted by deprecator
+      ActiveSupport.deprecator.deprecate_methods(self, *method_names, **options, deprecator: deprecator)
+    else
+      ActiveSupport.deprecator.warn("Module.deprecate without a deprecator is deprecated")
+      ActiveSupport::Deprecation._instance.deprecate_methods(self, *method_names, **options)
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/module/deprecation.rb, line 17
-def deprecate(*method_names, deprecator: nil, **options)
-  if deprecator.is_a?(ActiveSupport::Deprecation)
-    deprecator.deprecate_methods(self, *method_names, **options)
-  elsif deprecator
-    # we just need any instance to call deprecate_methods, but the deprecation will be emitted by deprecator
-    ActiveSupport.deprecator.deprecate_methods(self, *method_names, **options, deprecator: deprecator)
-  else
-    ActiveSupport.deprecator.warn("Module.deprecate without a deprecator is deprecated")
-    ActiveSupport::Deprecation._instance.deprecate_methods(self, *method_names, **options)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1200,24 +1204,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/module/attribute_accessors.rb, line 208
+  def mattr_accessor(*syms, instance_reader: true, instance_writer: true, instance_accessor: true, default: nil, &blk)
+    location = caller_locations(1, 1).first
+    mattr_reader(*syms, instance_reader: instance_reader, instance_accessor: instance_accessor, default: default, location: location, &blk)
+    mattr_writer(*syms, instance_writer: instance_writer, instance_accessor: instance_accessor, default: default, location: location)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/module/attribute_accessors.rb, line 208
-def mattr_accessor(*syms, instance_reader: true, instance_writer: true, instance_accessor: true, default: nil, &blk)
-  location = caller_locations(1, 1).first
-  mattr_reader(*syms, instance_reader: instance_reader, instance_accessor: instance_accessor, default: default, location: location, &blk)
-  mattr_writer(*syms, instance_writer: instance_writer, instance_accessor: instance_accessor, default: default, location: location)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1286,39 +1290,39 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/module/attribute_accessors.rb, line 55
+  def mattr_reader(*syms, instance_reader: true, instance_accessor: true, default: nil, location: nil)
+    raise TypeError, "module attributes should be defined directly on class, not singleton" if singleton_class?
+    location ||= caller_locations(1, 1).first
+
+    definition = []
+    syms.each do |sym|
+      raise NameError.new("invalid attribute name: #{sym}") unless /\A[_A-Za-z]\w*\z/.match?(sym)
+
+      definition << "def self.#{sym}; @@#{sym}; end"
+
+      if instance_reader && instance_accessor
+        definition << "def #{sym}; @@#{sym}; end"
+      end
+
+      sym_default_value = (block_given? && default.nil?) ? yield : default
+      class_variable_set("@@#{sym}", sym_default_value) unless sym_default_value.nil? && class_variable_defined?("@@#{sym}")
+    end
+
+    module_eval(definition.join(";"), location.path, location.lineno)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/module/attribute_accessors.rb, line 55
-def mattr_reader(*syms, instance_reader: true, instance_accessor: true, default: nil, location: nil)
-  raise TypeError, "module attributes should be defined directly on class, not singleton" if singleton_class?
-  location ||= caller_locations(1, 1).first
-
-  definition = []
-  syms.each do |sym|
-    raise NameError.new("invalid attribute name: #{sym}") unless /\A[_A-Za-z]\w*\z/.match?(sym)
-
-    definition << "def self.#{sym}; @@#{sym}; end"
-
-    if instance_reader && instance_accessor
-      definition << "def #{sym}; @@#{sym}; end"
-    end
-
-    sym_default_value = (block_given? && default.nil?) ? yield : default
-    class_variable_set("@@#{sym}", sym_default_value) unless sym_default_value.nil? && class_variable_defined?("@@#{sym}")
-  end
-
-  module_eval(definition.join(";"), location.path, location.lineno)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1384,38 +1388,38 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/module/attribute_accessors.rb, line 121
+  def mattr_writer(*syms, instance_writer: true, instance_accessor: true, default: nil, location: nil)
+    raise TypeError, "module attributes should be defined directly on class, not singleton" if singleton_class?
+    location ||= caller_locations(1, 1).first
+
+    definition = []
+    syms.each do |sym|
+      raise NameError.new("invalid attribute name: #{sym}") unless /\A[_A-Za-z]\w*\z/.match?(sym)
+      definition << "def self.#{sym}=(val); @@#{sym} = val; end"
+
+      if instance_writer && instance_accessor
+        definition << "def #{sym}=(val); @@#{sym} = val; end"
+      end
+
+      sym_default_value = (block_given? && default.nil?) ? yield : default
+      class_variable_set("@@#{sym}", sym_default_value) unless sym_default_value.nil? && class_variable_defined?("@@#{sym}")
+    end
+
+    module_eval(definition.join(";"), location.path, location.lineno)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/module/attribute_accessors.rb, line 121
-def mattr_writer(*syms, instance_writer: true, instance_accessor: true, default: nil, location: nil)
-  raise TypeError, "module attributes should be defined directly on class, not singleton" if singleton_class?
-  location ||= caller_locations(1, 1).first
-
-  definition = []
-  syms.each do |sym|
-    raise NameError.new("invalid attribute name: #{sym}") unless /\A[_A-Za-z]\w*\z/.match?(sym)
-    definition << "def self.#{sym}=(val); @@#{sym} = val; end"
-
-    if instance_writer && instance_accessor
-      definition << "def #{sym}=(val); @@#{sym} = val; end"
-    end
-
-    sym_default_value = (block_given? && default.nil?) ? yield : default
-    class_variable_set("@@#{sym}", sym_default_value) unless sym_default_value.nil? && class_variable_defined?("@@#{sym}")
-  end
-
-  module_eval(definition.join(";"), location.path, location.lineno)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1451,22 +1455,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/module/introspection.rb, line 34
+  def module_parent
+    module_parent_name ? ActiveSupport::Inflector.constantize(module_parent_name) : Object
+  end
- -
-
# File activesupport/lib/active_support/core_ext/module/introspection.rb, line 34
-def module_parent
-  module_parent_name ? ActiveSupport::Inflector.constantize(module_parent_name) : Object
-end
-
-
- -

+ See on GitHub + + + +

@@ -1489,28 +1493,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/module/introspection.rb, line 9
+  def module_parent_name
+    if defined?(@parent_name)
+      @parent_name
+    else
+      parent_name = name =~ /::[^:]+\z/ ? -$` : nil
+      @parent_name = parent_name unless frozen?
+      parent_name
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/module/introspection.rb, line 9
-def module_parent_name
-  if defined?(@parent_name)
-    @parent_name
-  else
-    parent_name = name =~ /::[^:]+\z/ ? -$` : nil
-    @parent_name = parent_name unless frozen?
-    parent_name
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1541,31 +1545,31 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/module/introspection.rb, line 50
+  def module_parents
+    parents = []
+    if module_parent_name
+      parts = module_parent_name.split("::")
+      until parts.empty?
+        parents << ActiveSupport::Inflector.constantize(parts * "::")
+        parts.pop
+      end
+    end
+    parents << Object unless parents.include? Object
+    parents
+  end
- -
-
# File activesupport/lib/active_support/core_ext/module/introspection.rb, line 50
-def module_parents
-  parents = []
-  if module_parent_name
-    parts = module_parent_name.split("::")
-    until parts.empty?
-      parents << ActiveSupport::Inflector.constantize(parts * "::")
-      parts.pop
-    end
-  end
-  parents << Object unless parents.include? Object
-  parents
-end
-
-
- -

+ See on GitHub + + + +

@@ -1585,25 +1589,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/module/redefine_method.rb, line 17
+  def redefine_method(method, &block)
+    visibility = method_visibility(method)
+    silence_redefinition_of_method(method)
+    define_method(method, &block)
+    send(visibility, method)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/module/redefine_method.rb, line 17
-def redefine_method(method, &block)
-  visibility = method_visibility(method)
-  silence_redefinition_of_method(method)
-  define_method(method, &block)
-  send(visibility, method)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1623,22 +1627,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/module/redefine_method.rb, line 26
+  def redefine_singleton_method(method, &block)
+    singleton_class.redefine_method(method, &block)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/module/redefine_method.rb, line 26
-def redefine_singleton_method(method, &block)
-  singleton_class.redefine_method(method, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1658,24 +1662,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/module/remove_method.rb, line 7
+  def remove_possible_method(method)
+    if method_defined?(method) || private_method_defined?(method)
+      undef_method(method)
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/module/remove_method.rb, line 7
-def remove_possible_method(method)
-  if method_defined?(method) || private_method_defined?(method)
-    undef_method(method)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1695,22 +1699,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/module/remove_method.rb, line 14
+  def remove_possible_singleton_method(method)
+    singleton_class.remove_possible_method(method)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/module/remove_method.rb, line 14
-def remove_possible_singleton_method(method)
-  singleton_class.remove_possible_method(method)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1730,26 +1734,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/module/redefine_method.rb, line 7
+  def silence_redefinition_of_method(method)
+    if method_defined?(method) || private_method_defined?(method)
+      # This suppresses the "method redefined" warning; the self-alias
+      # looks odd, but means we don't need to generate a unique name
+      alias_method method, method
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/module/redefine_method.rb, line 7
-def silence_redefinition_of_method(method)
-  if method_defined?(method) || private_method_defined?(method)
-    # This suppresses the "method redefined" warning; the self-alias
-    # looks odd, but means we don't need to generate a unique name
-    alias_method method, method
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1773,7 +1777,8 @@

-

+ +

@@ -1840,23 +1845,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb, line 170
+  def thread_mattr_accessor(*syms, instance_reader: true, instance_writer: true, instance_accessor: true, default: nil)
+    thread_mattr_reader(*syms, instance_reader: instance_reader, instance_accessor: instance_accessor, default: default)
+    thread_mattr_writer(*syms, instance_writer: instance_writer, instance_accessor: instance_accessor)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb, line 170
-def thread_mattr_accessor(*syms, instance_reader: true, instance_writer: true, instance_accessor: true, default: nil)
-  thread_mattr_reader(*syms, instance_reader: instance_reader, instance_accessor: instance_accessor, default: default)
-  thread_mattr_writer(*syms, instance_writer: instance_writer, instance_accessor: instance_accessor)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Module/Concerning.html b/src/classes/Module/Concerning.html index 9fb7c6b140..8548ad5d0b 100644 --- a/src/classes/Module/Concerning.html +++ b/src/classes/Module/Concerning.html @@ -200,25 +200,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/module/concerning.rb, line 132
+    def concern(topic, &module_definition)
+      const_set topic, Module.new {
+        extend ::ActiveSupport::Concern
+        module_eval(&module_definition)
+      }
+    end
- -
-
# File activesupport/lib/active_support/core_ext/module/concerning.rb, line 132
-def concern(topic, &module_definition)
-  const_set topic, Module.new {
-    extend ::ActiveSupport::Concern
-    module_eval(&module_definition)
-  }
-end
-
-
- - + See on GitHub + + + +

@@ -238,23 +238,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/module/concerning.rb, line 114
+    def concerning(topic, prepend: false, &block)
+      method = prepend ? :prepend : :include
+      __send__(method, concern(topic, &block))
+    end
- -
-
# File activesupport/lib/active_support/core_ext/module/concerning.rb, line 114
-def concerning(topic, prepend: false, &block)
-  method = prepend ? :prepend : :include
-  __send__(method, concern(topic, &block))
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/NameError.html b/src/classes/NameError.html index 5cd5070452..aa8a099351 100644 --- a/src/classes/NameError.html +++ b/src/classes/NameError.html @@ -93,42 +93,42 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/name_error.rb, line 12
+  def missing_name
+    # Since ruby v2.3.0 `did_you_mean` gem is loaded by default.
+    # It extends NameError#message with spell corrections which are SLOW.
+    # We should use original_message message instead.
+    message = respond_to?(:original_message) ? original_message : self.message
+    return unless message.start_with?("uninitialized constant ")
+
+    receiver = begin
+      self.receiver
+    rescue ArgumentError
+      nil
+    end
+
+    if receiver == Object
+      name.to_s
+    elsif receiver
+      "#{real_mod_name(receiver)}::#{self.name}"
+    else
+      if match = message.match(/((::)?([A-Z]\w*)(::[A-Z]\w*)*)$/)
+        match[1]
+      end
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/name_error.rb, line 12
-def missing_name
-  # Since ruby v2.3.0 `did_you_mean` gem is loaded by default.
-  # It extends NameError#message with spell corrections which are SLOW.
-  # We should use original_message message instead.
-  message = respond_to?(:original_message) ? original_message : self.message
-  return unless message.start_with?("uninitialized constant ")
-
-  receiver = begin
-    self.receiver
-  rescue ArgumentError
-    nil
-  end
-
-  if receiver == Object
-    name.to_s
-  elsif receiver
-    "#{real_mod_name(receiver)}::#{self.name}"
-  else
-    if match = message.match(/((::)?([A-Z]\w*)(::[A-Z]\w*)*)$/)
-      match[1]
-    end
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -156,26 +156,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/name_error.rb, line 44
+  def missing_name?(name)
+    if name.is_a? Symbol
+      self.name == name
+    else
+      missing_name == name.to_s
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/name_error.rb, line 44
-def missing_name?(name)
-  if name.is_a? Symbol
-    self.name == name
-  else
-    missing_name == name.to_s
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/NilClass.html b/src/classes/NilClass.html index 3d659acb8d..3dc7ed3717 100644 --- a/src/classes/NilClass.html +++ b/src/classes/NilClass.html @@ -104,22 +104,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/blank.rb, line 56
+  def blank?
+    true
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/blank.rb, line 56
-def blank?
-  true
-end
-
-
- - + See on GitHub + + + +

@@ -139,22 +139,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/to_query.rb, line 20
+  def to_param
+    self
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/to_query.rb, line 20
-def to_param
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -187,22 +187,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/try.rb, line 148
+  def try(*)
+    nil
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/try.rb, line 148
-def try(*)
-  nil
-end
-
-
- -

+ See on GitHub + + + +

@@ -225,22 +225,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/try.rb, line 155
+  def try!(*)
+    nil
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/try.rb, line 155
-def try!(*)
-  nil
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Numeric.html b/src/classes/Numeric.html index e6a31a6d09..4de4e147e9 100644 --- a/src/classes/Numeric.html +++ b/src/classes/Numeric.html @@ -299,7 +299,8 @@

- + +

@@ -326,22 +327,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/numeric/bytes.rb, line 15
+  def bytes
+    self
+  end
- -
-
# File activesupport/lib/active_support/core_ext/numeric/bytes.rb, line 15
-def bytes
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -365,7 +366,8 @@

-

+ +

@@ -392,22 +394,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/numeric/time.rb, line 37
+  def days
+    ActiveSupport::Duration.days(self)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/numeric/time.rb, line 37
-def days
-  ActiveSupport::Duration.days(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -431,7 +433,8 @@

-

+ +

@@ -458,22 +461,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/numeric/bytes.rb, line 63
+  def exabytes
+    self * EXABYTE
+  end
- -
-
# File activesupport/lib/active_support/core_ext/numeric/bytes.rb, line 63
-def exabytes
-  self * EXABYTE
-end
-
-
- -

+ See on GitHub + + + +

@@ -497,7 +500,8 @@

-

+ +

@@ -524,22 +528,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/numeric/time.rb, line 53
+  def fortnights
+    ActiveSupport::Duration.weeks(self * 2)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/numeric/time.rb, line 53
-def fortnights
-  ActiveSupport::Duration.weeks(self * 2)
-end
-
-
- -

+ See on GitHub + + + +

@@ -563,7 +567,8 @@

-

+ +

@@ -590,22 +595,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/numeric/bytes.rb, line 39
+  def gigabytes
+    self * GIGABYTE
+  end
- -
-
# File activesupport/lib/active_support/core_ext/numeric/bytes.rb, line 39
-def gigabytes
-  self * GIGABYTE
-end
-
-
- -

+ See on GitHub + + + +

@@ -629,7 +634,8 @@

-

+ +

@@ -656,22 +662,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/numeric/time.rb, line 29
+  def hours
+    ActiveSupport::Duration.hours(self)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/numeric/time.rb, line 29
-def hours
-  ActiveSupport::Duration.hours(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -691,22 +697,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 13
+  def html_safe?
+    true
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 13
-def html_safe?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -730,22 +736,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/numeric/time.rb, line 63
+  def in_milliseconds
+    self * 1000
+  end
- -
-
# File activesupport/lib/active_support/core_ext/numeric/time.rb, line 63
-def in_milliseconds
-  self * 1000
-end
-
-
- -

+ See on GitHub + + + +

@@ -769,7 +775,8 @@

-

+ +

@@ -796,22 +803,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/numeric/bytes.rb, line 23
+  def kilobytes
+    self * KILOBYTE
+  end
- -
-
# File activesupport/lib/active_support/core_ext/numeric/bytes.rb, line 23
-def kilobytes
-  self * KILOBYTE
-end
-
-
- -

+ See on GitHub + + + +

@@ -835,7 +842,8 @@

-

+ +

@@ -862,22 +870,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/numeric/bytes.rb, line 31
+  def megabytes
+    self * MEGABYTE
+  end
- -
-
# File activesupport/lib/active_support/core_ext/numeric/bytes.rb, line 31
-def megabytes
-  self * MEGABYTE
-end
-
-
- -

+ See on GitHub + + + +

@@ -901,7 +909,8 @@

-

+ +

@@ -928,22 +937,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/numeric/time.rb, line 21
+  def minutes
+    ActiveSupport::Duration.minutes(self)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/numeric/time.rb, line 21
-def minutes
-  ActiveSupport::Duration.minutes(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -967,7 +976,8 @@

-

+ +

@@ -994,22 +1004,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/numeric/bytes.rb, line 55
+  def petabytes
+    self * PETABYTE
+  end
- -
-
# File activesupport/lib/active_support/core_ext/numeric/bytes.rb, line 55
-def petabytes
-  self * PETABYTE
-end
-
-
- -

+ See on GitHub + + + +

@@ -1033,7 +1043,8 @@

-

+ +

@@ -1060,22 +1071,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/numeric/time.rb, line 13
+  def seconds
+    ActiveSupport::Duration.seconds(self)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/numeric/time.rb, line 13
-def seconds
-  ActiveSupport::Duration.seconds(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1099,7 +1110,8 @@

-

+ +

@@ -1126,22 +1138,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/numeric/bytes.rb, line 47
+  def terabytes
+    self * TERABYTE
+  end
- -
-
# File activesupport/lib/active_support/core_ext/numeric/bytes.rb, line 47
-def terabytes
-  self * TERABYTE
-end
-
-
- -

+ See on GitHub + + + +

@@ -1165,7 +1177,8 @@

-

+ +

@@ -1192,22 +1205,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/numeric/time.rb, line 45
+  def weeks
+    ActiveSupport::Duration.weeks(self)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/numeric/time.rb, line 45
-def weeks
-  ActiveSupport::Duration.weeks(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1231,7 +1244,8 @@

-

+ +

@@ -1258,22 +1272,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/numeric/bytes.rb, line 71
+  def zettabytes
+    self * ZETTABYTE
+  end
- -
-
# File activesupport/lib/active_support/core_ext/numeric/bytes.rb, line 71
-def zettabytes
-  self * ZETTABYTE
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Object.html b/src/classes/Object.html index 8610e65dc3..5df2c0b121 100644 --- a/src/classes/Object.html +++ b/src/classes/Object.html @@ -224,31 +224,31 @@

+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/acts_like.rb, line 33
+  def acts_like?(duck)
+    case duck
+    when :time
+      respond_to? :acts_like_time?
+    when :date
+      respond_to? :acts_like_date?
+    when :string
+      respond_to? :acts_like_string?
+    else
+      respond_to? :"acts_like_#{duck}?"
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/acts_like.rb, line 33
-def acts_like?(duck)
-  case duck
-  when :time
-    respond_to? :acts_like_time?
-  when :date
-    respond_to? :acts_like_date?
-  when :string
-    respond_to? :acts_like_string?
-  else
-    respond_to? :"acts_like_#{duck}?"
-  end
-end
-
- - - + See on GitHub + +
+ +

@@ -280,22 +280,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/blank.rb, line 18
+  def blank?
+    respond_to?(:empty?) ? !!empty? : !self
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/blank.rb, line 18
-def blank?
-  respond_to?(:empty?) ? !!empty? : !self
-end
-
-
- -

+ See on GitHub + + + +

@@ -323,22 +323,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/deep_dup.rb, line 15
+  def deep_dup
+    duplicable? ? dup : self
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/deep_dup.rb, line 15
-def deep_dup
-  duplicable? ? dup : self
-end
-
-
- -

+ See on GitHub + + + +

@@ -360,22 +360,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/duplicable.rb, line 26
+  def duplicable?
+    true
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/duplicable.rb, line 26
-def duplicable?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -395,22 +395,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 7
+  def html_safe?
+    false
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 7
-def html_safe?
-  false
-end
-
-
- -

+ See on GitHub + + + +

@@ -438,29 +438,29 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/inclusion.rb, line 15
+  def in?(another_object)
+    case another_object
+    when Range
+      another_object.cover?(self)
+    else
+      another_object.include?(self)
+    end
+  rescue NoMethodError
+    raise ArgumentError.new("The parameter passed to #in? must respond to #include?")
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/inclusion.rb, line 15
-def in?(another_object)
-  case another_object
-  when Range
-    another_object.cover?(self)
-  else
-    another_object.include?(self)
-  end
-rescue NoMethodError
-  raise ArgumentError.new("The parameter passed to #in? must respond to #include?")
-end
-
-
- -

+ See on GitHub + + + +

@@ -489,24 +489,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/instance_variables.rb, line 14
+  def instance_values
+    instance_variables.to_h do |ivar|
+      [ivar[1..-1].freeze, instance_variable_get(ivar)]
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/instance_variables.rb, line 14
-def instance_values
-  instance_variables.to_h do |ivar|
-    [ivar[1..-1].freeze, instance_variable_get(ivar)]
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -535,22 +535,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/instance_variables.rb, line 30
+    def instance_variable_names
+      instance_variables.map(&:name)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/object/instance_variables.rb, line 30
-def instance_variable_names
-  instance_variables.map(&:name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -587,22 +587,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/blank.rb, line 45
+  def presence
+    self if present?
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/blank.rb, line 45
-def presence
-  self if present?
-end
-
-
- -

+ See on GitHub + + + +

@@ -629,22 +629,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/inclusion.rb, line 34
+  def presence_in(another_object)
+    in?(another_object) ? self : nil
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/inclusion.rb, line 34
-def presence_in(another_object)
-  in?(another_object) ? self : nil
-end
-
-
- -

+ See on GitHub + + + +

@@ -666,22 +666,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/blank.rb, line 25
+  def present?
+    !blank?
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/blank.rb, line 25
-def present?
-  !blank?
-end
-
-
- -

+ See on GitHub + + + +

@@ -701,22 +701,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/to_query.rb, line 7
+  def to_param
+    to_s
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/to_query.rb, line 7
-def to_param
-  to_s
-end
-
-
- -

+ See on GitHub + + + +

@@ -736,22 +736,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/to_query.rb, line 13
+  def to_query(key)
+    "#{CGI.escape(key.to_param)}=#{CGI.escape(to_param.to_s)}"
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/to_query.rb, line 13
-def to_query(key)
-  "#{CGI.escape(key.to_param)}=#{CGI.escape(to_param.to_s)}"
-end
-
-
- -

+ See on GitHub + + + +

@@ -830,20 +830,10 @@

- -
- - -
-
# File activesupport/lib/active_support/core_ext/object/try.rb, line 39
-  
-
-
- -

+ + See on GitHub + +

@@ -869,20 +859,10 @@

- -
- - -
-
# File activesupport/lib/active_support/core_ext/object/try.rb, line 104
-
-
-
- -

+ + See on GitHub + +

@@ -922,33 +902,33 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/with.rb, line 24
+  def with(**attributes)
+    old_values = {}
+    begin
+      attributes.each do |key, value|
+        old_values[key] = public_send(key)
+        public_send("#{key}=", value)
+      end
+      yield
+    ensure
+      old_values.each do |key, old_value|
+        public_send("#{key}=", old_value)
+      end
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/with.rb, line 24
-def with(**attributes)
-  old_values = {}
-  begin
-    attributes.each do |key, value|
-      old_values[key] = public_send(key)
-      public_send("#{key}=", value)
-    end
-    yield
-  ensure
-    old_values.each do |key, old_value|
-      public_send("#{key}=", old_value)
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1054,28 +1034,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/with_options.rb, line 92
+  def with_options(options, &block)
+    option_merger = ActiveSupport::OptionMerger.new(self, options)
+
+    if block
+      block.arity.zero? ? option_merger.instance_eval(&block) : block.call(option_merger)
+    else
+      option_merger
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/with_options.rb, line 92
-def with_options(options, &block)
-  option_merger = ActiveSupport::OptionMerger.new(self, options)
-
-  if block
-    block.arity.zero? ? option_merger.instance_eval(&block) : block.call(option_merger)
-  else
-    option_merger
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/PG.html b/src/classes/PG.html deleted file mode 100644 index 86cd7b6c34..0000000000 --- a/src/classes/PG.html +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: PG -layout: default ---- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/PG/Connection.html b/src/classes/PG/Connection.html deleted file mode 100644 index ac8fd680c5..0000000000 --- a/src/classes/PG/Connection.html +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: PG::Connection -layout: default ---- -
- -
-
- -
- -

Use async_exec instead of exec_params on pg versions before 1.1

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/Pathname.html b/src/classes/Pathname.html index 7c4f4f5686..27b56e299a 100644 --- a/src/classes/Pathname.html +++ b/src/classes/Pathname.html @@ -96,22 +96,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/pathname/blank.rb, line 13
+  def blank?
+    to_s.empty?
+  end
- -
-
# File activesupport/lib/active_support/core_ext/pathname/blank.rb, line 13
-def blank?
-  to_s.empty?
-end
-
-
- - + See on GitHub + + + +

@@ -146,22 +146,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/pathname/existence.rb, line 20
+  def existence
+    self if exist?
+  end
- -
-
# File activesupport/lib/active_support/core_ext/pathname/existence.rb, line 20
-def existence
-  self if exist?
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails.html b/src/classes/Rails.html index 8a767d323b..33d37c3bd3 100644 --- a/src/classes/Rails.html +++ b/src/classes/Rails.html @@ -491,22 +491,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails.rb, line 43
+    def application
+      @application ||= (app_class.instance if app_class)
+    end
- -
-
# File railties/lib/rails.rb, line 43
-def application
-  @application ||= (app_class.instance if app_class)
-end
-
-
- - + See on GitHub + + + +

@@ -526,22 +526,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails.rb, line 123
+    def autoloaders
+      application.autoloaders
+    end
- -
-
# File railties/lib/rails.rb, line 123
-def autoloaders
-  application.autoloaders
-end
-
-
- -

+ See on GitHub + + + +

@@ -561,22 +561,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails.rb, line 54
+    def backtrace_cleaner
+      @backtrace_cleaner ||= Rails::BacktraceCleaner.new
+    end
- -
-
# File railties/lib/rails.rb, line 54
-def backtrace_cleaner
-  @backtrace_cleaner ||= Rails::BacktraceCleaner.new
-end
-
-
- -

+ See on GitHub + + + +

@@ -596,22 +596,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails.rb, line 50
+    def configuration
+      application.config
+    end
- -
-
# File railties/lib/rails.rb, line 50
-def configuration
-  application.config
-end
-
-
- -

+ See on GitHub + + + +

@@ -636,22 +636,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails.rb, line 72
+    def env
+      @_env ||= ActiveSupport::EnvironmentInquirer.new(ENV["RAILS_ENV"].presence || ENV["RACK_ENV"].presence || "development")
+    end
- -
-
# File railties/lib/rails.rb, line 72
-def env
-  @_env ||= ActiveSupport::EnvironmentInquirer.new(ENV["RAILS_ENV"].presence || ENV["RACK_ENV"].presence || "development")
-end
-
-
- -

+ See on GitHub + + + +

@@ -674,22 +674,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails.rb, line 79
+    def env=(environment)
+      @_env = ActiveSupport::EnvironmentInquirer.new(environment)
+    end
- -
-
# File railties/lib/rails.rb, line 79
-def env=(environment)
-  @_env = ActiveSupport::EnvironmentInquirer.new(environment)
-end
-
-
- -

+ See on GitHub + + + +

@@ -715,22 +715,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails.rb, line 90
+    def error
+      ActiveSupport.error_reporter
+    end
- -
-
# File railties/lib/rails.rb, line 90
-def error
-  ActiveSupport.error_reporter
-end
-
-
- -

+ See on GitHub + + + +

@@ -750,22 +750,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/gem_version.rb, line 5
+  def self.gem_version
+    Gem::Version.new VERSION::STRING
+  end
- -
-
# File railties/lib/rails/gem_version.rb, line 5
-def self.gem_version
-  Gem::Version.new VERSION::STRING
-end
-
-
- -

+ See on GitHub + + + +

@@ -797,29 +797,29 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails.rb, line 103
+    def groups(*groups)
+      hash = groups.extract_options!
+      env = Rails.env
+      groups.unshift(:default, env)
+      groups.concat ENV["RAILS_GROUPS"].to_s.split(",")
+      groups.concat hash.map { |k, v| k if v.map(&:to_s).include?(env) }
+      groups.compact!
+      groups.uniq!
+      groups
+    end
- -
-
# File railties/lib/rails.rb, line 103
-def groups(*groups)
-  hash = groups.extract_options!
-  env = Rails.env
-  groups.unshift(:default, env)
-  groups.concat ENV["RAILS_GROUPS"].to_s.split(",")
-  groups.concat hash.map { |k, v| k if v.map(&:to_s).include?(env) }
-  groups.compact!
-  groups.uniq!
-  groups
-end
-
-
- -

+ See on GitHub + + + +

@@ -843,22 +843,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails.rb, line 119
+    def public_path
+      application && Pathname.new(application.paths["public"].first)
+    end
- -
-
# File railties/lib/rails.rb, line 119
-def public_path
-  application && Pathname.new(application.paths["public"].first)
-end
-
-
- -

+ See on GitHub + + + +

@@ -882,22 +882,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails.rb, line 63
+    def root
+      application && application.config.root
+    end
- -
-
# File railties/lib/rails.rb, line 63
-def root
-  application && application.config.root
-end
-
-
- -

+ See on GitHub + + + +

@@ -917,22 +917,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/version.rb, line 7
+  def self.version
+    VERSION::STRING
+  end
- -
-
# File railties/lib/rails/version.rb, line 7
-def self.version
-  VERSION::STRING
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/API/EdgeTask.html b/src/classes/Rails/API/EdgeTask.html index 3f27277594..e1a5c4af3c 100644 --- a/src/classes/Rails/API/EdgeTask.html +++ b/src/classes/Rails/API/EdgeTask.html @@ -89,22 +89,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/api/task.rb, line 210
+      def badge_version
+        "edge"
+      end
- -
-
# File railties/lib/rails/api/task.rb, line 210
-def badge_version
-  "edge"
-end
-
-
- - + See on GitHub + + + +

@@ -124,22 +124,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/api/task.rb, line 214
+      def canonical_url
+        "https://edgeapi.rubyonrails.org"
+      end
- -
-
# File railties/lib/rails/api/task.rb, line 214
-def canonical_url
-  "https://edgeapi.rubyonrails.org"
-end
-
-
- -

+ See on GitHub + + + +

@@ -159,22 +159,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/api/task.rb, line 206
+      def rails_version
+        "main@#{`git rev-parse HEAD`[0, 7]}"
+      end
- -
-
# File railties/lib/rails/api/task.rb, line 206
-def rails_version
-  "main@#{`git rev-parse HEAD`[0, 7]}"
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/API/RepoTask.html b/src/classes/Rails/API/RepoTask.html index 4dea4932d7..473e5fd53a 100644 --- a/src/classes/Rails/API/RepoTask.html +++ b/src/classes/Rails/API/RepoTask.html @@ -89,22 +89,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/api/task.rb, line 200
+      def api_dir
+        "doc/rdoc"
+      end
- -
-
# File railties/lib/rails/api/task.rb, line 200
-def api_dir
-  "doc/rdoc"
-end
-
-
- - + See on GitHub + + + +

@@ -124,22 +124,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/api/task.rb, line 196
+      def component_root_dir(component)
+        component
+      end
- -
-
# File railties/lib/rails/api/task.rb, line 196
-def component_root_dir(component)
-  component
-end
-
-
- -

+ See on GitHub + + + +

@@ -159,23 +159,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/api/task.rb, line 191
+      def configure_sdoc
+        super
+        options << "-g" # link to GitHub, SDoc flag
+      end
- -
-
# File railties/lib/rails/api/task.rb, line 191
-def configure_sdoc
-  super
-  options << "-g" # link to GitHub, SDoc flag
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/API/StableTask.html b/src/classes/Rails/API/StableTask.html index d944986aec..b5d866fd86 100644 --- a/src/classes/Rails/API/StableTask.html +++ b/src/classes/Rails/API/StableTask.html @@ -89,22 +89,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/api/task.rb, line 224
+      def badge_version
+        "v#{rails_version}"
+      end
- -
-
# File railties/lib/rails/api/task.rb, line 224
-def badge_version
-  "v#{rails_version}"
-end
-
-
- - + See on GitHub + + + +

@@ -124,22 +124,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/api/task.rb, line 228
+      def canonical_url
+        "https://api.rubyonrails.org/#{badge_version}"
+      end
- -
-
# File railties/lib/rails/api/task.rb, line 228
-def canonical_url
-  "https://api.rubyonrails.org/#{badge_version}"
-end
-
-
- -

+ See on GitHub + + + +

@@ -159,22 +159,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/api/task.rb, line 220
+      def rails_version
+        File.read("RAILS_VERSION").strip
+      end
- -
-
# File railties/lib/rails/api/task.rb, line 220
-def rails_version
-  File.read("RAILS_VERSION").strip
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/API/Task.html b/src/classes/Rails/API/Task.html index a9287e6438..d78e561056 100644 --- a/src/classes/Rails/API/Task.html +++ b/src/classes/Rails/API/Task.html @@ -222,31 +222,31 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/api/task.rb, line 119
+      def initialize(name)
+        super
+
+        # Every time rake runs this task is instantiated as all the rest.
+        # Be lazy computing stuff to have as light impact as possible to
+        # the rest of tasks.
+        before_running_rdoc do
+          configure_sdoc
+          configure_rdoc_files
+          setup_horo_variables
+        end
+      end
- -
-
# File railties/lib/rails/api/task.rb, line 119
-def initialize(name)
-  super
-
-  # Every time rake runs this task is instantiated as all the rest.
-  # Be lazy computing stuff to have as light impact as possible to
-  # the rest of tasks.
-  before_running_rdoc do
-    configure_sdoc
-    configure_rdoc_files
-    setup_horo_variables
-  end
-end
-
-
- - + See on GitHub + + + + @@ -270,22 +270,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/api/task.rb, line 185
+      def api_main
+        component_root_dir("railties") + "/RDOC_MAIN.md"
+      end
- -
-
# File railties/lib/rails/api/task.rb, line 185
-def api_main
-  component_root_dir("railties") + "/RDOC_MAIN.md"
-end
-
-
- - + See on GitHub + + + +

@@ -305,47 +305,47 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/api/task.rb, line 148
+      def configure_rdoc_files
+        rdoc_files.include(api_main)
+
+        RDOC_FILES.each do |component, cfg|
+          cdr = component_root_dir(component)
+
+          Array(cfg[:include]).each do |pattern|
+            rdoc_files.include("#{cdr}/#{pattern}")
+          end
+
+          Array(cfg[:exclude]).each do |pattern|
+            rdoc_files.exclude("#{cdr}/#{pattern}")
+          end
+        end
+
+        # Only generate documentation for files that have been
+        # changed since the API was generated.
+        if Dir.exist?(api_dir) && !ENV["ALL"]
+          last_generation = DateTime.rfc2822(File.open("#{api_dir}/created.rid", &:readline))
+
+          rdoc_files.keep_if do |file|
+            File.mtime(file).to_datetime > last_generation
+          end
+
+          # Nothing to do
+          exit(0) if rdoc_files.empty?
+        end
+      end
- -
-
# File railties/lib/rails/api/task.rb, line 148
-def configure_rdoc_files
-  rdoc_files.include(api_main)
-
-  RDOC_FILES.each do |component, cfg|
-    cdr = component_root_dir(component)
-
-    Array(cfg[:include]).each do |pattern|
-      rdoc_files.include("#{cdr}/#{pattern}")
-    end
-
-    Array(cfg[:exclude]).each do |pattern|
-      rdoc_files.exclude("#{cdr}/#{pattern}")
-    end
-  end
-
-  # Only generate documentation for files that have been
-  # changed since the API was generated.
-  if Dir.exist?(api_dir) && !ENV["ALL"]
-    last_generation = DateTime.rfc2822(File.open("#{api_dir}/created.rid", &:readline))
-
-    rdoc_files.keep_if do |file|
-      File.mtime(file).to_datetime > last_generation
-    end
-
-    # Nothing to do
-    exit(0) if rdoc_files.empty?
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -365,29 +365,29 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/api/task.rb, line 137
+      def configure_sdoc
+        self.title    = "Ruby on Rails API"
+        self.rdoc_dir = api_dir
+
+        options << "-m"  << api_main
+        options << "-e"  << "UTF-8"
+
+        options << "-f"  << "api"
+        options << "-T"  << "rails"
+      end
- -
-
# File railties/lib/rails/api/task.rb, line 137
-def configure_sdoc
-  self.title    = "Ruby on Rails API"
-  self.rdoc_dir = api_dir
-
-  options << "-m"  << api_main
-  options << "-e"  << "UTF-8"
-
-  options << "-f"  << "api"
-  options << "-T"  << "rails"
-end
-
-
- -

+ See on GitHub + + + +

@@ -407,22 +407,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/api/task.rb, line 133
+      def desc(description)
+        # no-op
+      end
- -
-
# File railties/lib/rails/api/task.rb, line 133
-def desc(description)
-  # no-op
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/AppBuilder.html b/src/classes/Rails/AppBuilder.html index 4fcac44b7f..8107b95ebb 100644 --- a/src/classes/Rails/AppBuilder.html +++ b/src/classes/Rails/AppBuilder.html @@ -210,27 +210,27 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 91
-def app
-  directory "app"
-
-  empty_directory_with_keep_file "app/assets/images"
-
-  keep_file  "app/controllers/concerns"
-  keep_file  "app/models/concerns"
-end
-
-
- - + +
+ + Source code + + +
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 91
+    def app
+      directory "app"
+
+      empty_directory_with_keep_file "app/assets/images"
+
+      keep_file  "app/controllers/concerns"
+      keep_file  "app/models/concerns"
+    end
+ + See on GitHub + +
+ +

@@ -250,25 +250,25 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 100
-def bin
-  directory "bin" do |content|
-    "#{shebang}\n" + content
-  end
-  chmod "bin", 0755 & ~File.umask, verbose: false
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 100
+    def bin
+      directory "bin" do |content|
+        "#{shebang}\n" + content
+      end
+      chmod "bin", 0755 & ~File.umask, verbose: false
+    end
+ + See on GitHub + +
+ +

@@ -288,22 +288,22 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 107
-def bin_when_updating
-  bin
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 107
+    def bin_when_updating
+      bin
+    end
+ + See on GitHub + +
+ +

@@ -323,35 +323,35 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 111
-def config
-  empty_directory "config"
-
-  inside "config" do
-    template "routes.rb" unless options[:update]
-    template "application.rb"
-    template "environment.rb"
-    template "cable.yml" unless options[:update] || options[:skip_action_cable]
-    template "puma.rb"   unless options[:update]
-    template "storage.yml" unless options[:update] || skip_active_storage?
-
-    directory "environments"
-    directory "initializers"
-    directory "locales" unless options[:update]
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 111
+    def config
+      empty_directory "config"
+
+      inside "config" do
+        template "routes.rb" unless options[:update]
+        template "application.rb"
+        template "environment.rb"
+        template "cable.yml" unless options[:update] || options[:skip_action_cable]
+        template "puma.rb"   unless options[:update]
+        template "storage.yml" unless options[:update] || skip_active_storage?
+
+        directory "environments"
+        directory "initializers"
+        directory "locales" unless options[:update]
+      end
+    end
+ + See on GitHub + +
+ +

@@ -371,22 +371,22 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 261
-def config_target_version
-  defined?(@config_target_version) ? @config_target_version : Rails::VERSION::STRING.to_f
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 261
+    def config_target_version
+      defined?(@config_target_version) ? @config_target_version : Rails::VERSION::STRING.to_f
+    end
+ + See on GitHub + +
+ +

@@ -406,71 +406,71 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 128
-def config_when_updating
-  action_cable_config_exist       = File.exist?("config/cable.yml")
-  active_storage_config_exist     = File.exist?("config/storage.yml")
-  rack_cors_config_exist          = File.exist?("config/initializers/cors.rb")
-  assets_config_exist             = File.exist?("config/initializers/assets.rb")
-  asset_manifest_exist            = File.exist?("app/assets/config/manifest.js")
-  asset_app_stylesheet_exist      = File.exist?("app/assets/stylesheets/application.css")
-  csp_config_exist                = File.exist?("config/initializers/content_security_policy.rb")
-  permissions_policy_config_exist = File.exist?("config/initializers/permissions_policy.rb")
-
-  @config_target_version = Rails.application.config.loaded_config_version || "5.0"
-
-  config
-
-  if !options[:skip_action_cable] && !action_cable_config_exist
-    template "config/cable.yml"
-  end
-
-  if !skip_active_storage? && !active_storage_config_exist
-    template "config/storage.yml"
-  end
-
-  if skip_sprockets? && skip_propshaft? && !assets_config_exist
-    remove_file "config/initializers/assets.rb"
-  end
-
-  if skip_sprockets? && !asset_manifest_exist
-    remove_file "app/assets/config/manifest.js"
-  end
-
-  if skip_sprockets? && !asset_app_stylesheet_exist
-    remove_file "app/assets/stylesheets/application.css"
-  end
-
-  unless rack_cors_config_exist
-    remove_file "config/initializers/cors.rb"
-  end
-
-  if options[:api]
-    unless csp_config_exist
-      remove_file "config/initializers/content_security_policy.rb"
-    end
-
-    unless permissions_policy_config_exist
-      remove_file "config/initializers/permissions_policy.rb"
-    end
-  end
-
-  if !skip_sprockets?
-    insert_into_file "config/application.rb", %(require "sprockets/railtie"), after: /require\(["']rails\/all["']\)\n/
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 128
+    def config_when_updating
+      action_cable_config_exist       = File.exist?("config/cable.yml")
+      active_storage_config_exist     = File.exist?("config/storage.yml")
+      rack_cors_config_exist          = File.exist?("config/initializers/cors.rb")
+      assets_config_exist             = File.exist?("config/initializers/assets.rb")
+      asset_manifest_exist            = File.exist?("app/assets/config/manifest.js")
+      asset_app_stylesheet_exist      = File.exist?("app/assets/stylesheets/application.css")
+      csp_config_exist                = File.exist?("config/initializers/content_security_policy.rb")
+      permissions_policy_config_exist = File.exist?("config/initializers/permissions_policy.rb")
+
+      @config_target_version = Rails.application.config.loaded_config_version || "5.0"
+
+      config
+
+      if !options[:skip_action_cable] && !action_cable_config_exist
+        template "config/cable.yml"
+      end
+
+      if !skip_active_storage? && !active_storage_config_exist
+        template "config/storage.yml"
+      end
+
+      if skip_sprockets? && skip_propshaft? && !assets_config_exist
+        remove_file "config/initializers/assets.rb"
+      end
+
+      if skip_sprockets? && !asset_manifest_exist
+        remove_file "app/assets/config/manifest.js"
+      end
+
+      if skip_sprockets? && !asset_app_stylesheet_exist
+        remove_file "app/assets/stylesheets/application.css"
+      end
+
+      unless rack_cors_config_exist
+        remove_file "config/initializers/cors.rb"
+      end
+
+      if options[:api]
+        unless csp_config_exist
+          remove_file "config/initializers/content_security_policy.rb"
+        end
+
+        unless permissions_policy_config_exist
+          remove_file "config/initializers/permissions_policy.rb"
+        end
+      end
+
+      if !skip_sprockets?
+        insert_into_file "config/application.rb", %(require "sprockets/railtie"), after: /require\(["']rails\/all["']\)\n/
+      end
+    end
+ + See on GitHub + +
+ +

@@ -490,22 +490,22 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 65
-def configru
-  template "config.ru"
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 65
+    def configru
+      template "config.ru"
+    end
+ + See on GitHub + +
+ +

@@ -525,25 +525,25 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 190
-def credentials
-  return if options[:pretend] || options[:dummy_app]
-
-  require "rails/generators/rails/credentials/credentials_generator"
-  Rails::Generators::CredentialsGenerator.new([], quiet: true).add_credentials_file
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 190
+    def credentials
+      return if options[:pretend] || options[:dummy_app]
+
+      require "rails/generators/rails/credentials/credentials_generator"
+      Rails::Generators::CredentialsGenerator.new([], quiet: true).add_credentials_file
+    end
+ + See on GitHub + +
+ +

@@ -563,26 +563,26 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 197
-def credentials_diff_enroll
-  return if options[:skip_decrypted_diffs] || options[:dummy_app] || options[:pretend]
-
-  @generator.shell.mute do
-    rails_command "credentials:diff --enroll", inline: true, shell: @generator.shell
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 197
+    def credentials_diff_enroll
+      return if options[:skip_decrypted_diffs] || options[:dummy_app] || options[:pretend]
+
+      @generator.shell.mute do
+        rails_command "credentials:diff --enroll", inline: true, shell: @generator.shell
+      end
+    end
+ + See on GitHub + +
+ +

@@ -602,22 +602,22 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 205
-def database_yml
-  template "config/databases/#{options[:database]}.yml", "config/database.yml"
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 205
+    def database_yml
+      template "config/databases/#{options[:database]}.yml", "config/database.yml"
+    end
+ + See on GitHub + +
+ +

@@ -637,22 +637,22 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 209
-def db
-  directory "db"
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 209
+    def db
+      directory "db"
+    end
+ + See on GitHub + +
+ +

@@ -672,26 +672,26 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 77
-def dockerfiles
-  template "Dockerfile"
-  template "dockerignore", ".dockerignore"
-
-  template "docker-entrypoint", "bin/docker-entrypoint"
-  chmod "bin/docker-entrypoint", 0755 & ~File.umask, verbose: false
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 77
+    def dockerfiles
+      template "Dockerfile"
+      template "dockerignore", ".dockerignore"
+
+      template "docker-entrypoint", "bin/docker-entrypoint"
+      chmod "bin/docker-entrypoint", 0755 & ~File.umask, verbose: false
+    end
+ + See on GitHub + +
+ +

@@ -711,22 +711,22 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 61
-def gemfile
-  template "Gemfile"
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 61
+    def gemfile
+      template "Gemfile"
+    end
+ + See on GitHub + +
+ +

@@ -746,22 +746,22 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 73
-def gitattributes
-  template "gitattributes", ".gitattributes"
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 73
+    def gitattributes
+      template "gitattributes", ".gitattributes"
+    end
+ + See on GitHub + +
+ +

@@ -781,22 +781,22 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 69
-def gitignore
-  template "gitignore", ".gitignore"
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 69
+    def gitignore
+      template "gitignore", ".gitignore"
+    end
+ + See on GitHub + +
+ +

@@ -816,24 +816,24 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 213
-def lib
-  empty_directory "lib"
-  empty_directory_with_keep_file "lib/tasks"
-  empty_directory_with_keep_file "lib/assets"
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 213
+    def lib
+      empty_directory "lib"
+      empty_directory_with_keep_file "lib/tasks"
+      empty_directory_with_keep_file "lib/assets"
+    end
+ + See on GitHub + +
+ +

@@ -853,22 +853,22 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 219
-def log
-  empty_directory_with_keep_file "log"
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 219
+    def log
+      empty_directory_with_keep_file "log"
+    end
+ + See on GitHub + +
+ +

@@ -888,27 +888,27 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 181
-def master_key
-  return if options[:pretend] || options[:dummy_app]
-
-  require "rails/generators/rails/master_key/master_key_generator"
-  master_key_generator = Rails::Generators::MasterKeyGenerator.new([], quiet: options[:quiet], force: options[:force])
-  master_key_generator.add_master_key_file_silently
-  master_key_generator.ignore_master_key_file_silently
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 181
+    def master_key
+      return if options[:pretend] || options[:dummy_app]
+
+      require "rails/generators/rails/master_key/master_key_generator"
+      master_key_generator = Rails::Generators::MasterKeyGenerator.new([], quiet: options[:quiet], force: options[:force])
+      master_key_generator.add_master_key_file_silently
+      master_key_generator.ignore_master_key_file_silently
+    end
+ + See on GitHub + +
+ +

@@ -928,22 +928,22 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 57
-def node_version
-  template "node-version", ".node-version"
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 57
+    def node_version
+      template "node-version", ".node-version"
+    end
+ + See on GitHub + +
+ +

@@ -963,22 +963,22 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 223
-def public_directory
-  directory "public", "public", recursive: false
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 223
+    def public_directory
+      directory "public", "public", recursive: false
+    end
+ + See on GitHub + +
+ +

@@ -998,22 +998,22 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 45
-def rakefile
-  template "Rakefile"
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 45
+    def rakefile
+      template "Rakefile"
+    end
+ + See on GitHub + +
+ +

@@ -1033,22 +1033,22 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 49
-def readme
-  copy_file "README.md", "README.md"
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 49
+    def readme
+      copy_file "README.md", "README.md"
+    end
+ + See on GitHub + +
+ +

@@ -1068,22 +1068,22 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 53
-def ruby_version
-  template "ruby-version", ".ruby-version"
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 53
+    def ruby_version
+      template "ruby-version", ".ruby-version"
+    end
+ + See on GitHub + +
+ +

@@ -1103,23 +1103,23 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 227
-def storage
-  empty_directory_with_keep_file "storage"
-  empty_directory_with_keep_file "tmp/storage"
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 227
+    def storage
+      empty_directory_with_keep_file "storage"
+      empty_directory_with_keep_file "tmp/storage"
+    end
+ + See on GitHub + +
+ +

@@ -1139,24 +1139,24 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 244
-def system_test
-  empty_directory_with_keep_file "test/system"
-
-  template "test/application_system_test_case.rb"
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 244
+    def system_test
+      empty_directory_with_keep_file "test/system"
+
+      template "test/application_system_test_case.rb"
+    end
+ + See on GitHub + +
+ +

@@ -1176,30 +1176,30 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 232
-def test
-  empty_directory_with_keep_file "test/fixtures/files"
-  empty_directory_with_keep_file "test/controllers"
-  empty_directory_with_keep_file "test/mailers"
-  empty_directory_with_keep_file "test/models"
-  empty_directory_with_keep_file "test/helpers"
-  empty_directory_with_keep_file "test/integration"
-
-  template "test/channels/application_cable/connection_test.rb"
-  template "test/test_helper.rb"
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 232
+    def test
+      empty_directory_with_keep_file "test/fixtures/files"
+      empty_directory_with_keep_file "test/controllers"
+      empty_directory_with_keep_file "test/mailers"
+      empty_directory_with_keep_file "test/models"
+      empty_directory_with_keep_file "test/helpers"
+      empty_directory_with_keep_file "test/integration"
+
+      template "test/channels/application_cable/connection_test.rb"
+      template "test/test_helper.rb"
+    end
+ + See on GitHub + +
+ +

@@ -1219,25 +1219,25 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 250
-def tmp
-  empty_directory_with_keep_file "tmp"
-  empty_directory_with_keep_file "tmp/pids"
-  empty_directory "tmp/cache"
-  empty_directory "tmp/cache/assets"
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 250
+    def tmp
+      empty_directory_with_keep_file "tmp"
+      empty_directory_with_keep_file "tmp/pids"
+      empty_directory "tmp/cache"
+      empty_directory "tmp/cache/assets"
+    end
+ + See on GitHub + +
+ +

@@ -1257,22 +1257,22 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 257
-def vendor
-  empty_directory_with_keep_file "vendor"
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 257
+    def vendor
+      empty_directory_with_keep_file "vendor"
+    end
+ + See on GitHub + +
+ +

@@ -1292,24 +1292,24 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 85
-def version_control
-  if !options[:skip_git] && !options[:pretend]
-    run git_init_command, capture: options[:quiet], abort_on_failure: false
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 85
+    def version_control
+      if !options[:skip_git] && !options[:pretend]
+        run git_init_command, capture: options[:quiet], abort_on_failure: false
+      end
+    end
+ + See on GitHub + +
+ + diff --git a/src/classes/Rails/Application.html b/src/classes/Rails/Application.html index 98c1d40b59..b55380566f 100644 --- a/src/classes/Rails/Application.html +++ b/src/classes/Rails/Application.html @@ -357,22 +357,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application.rb, line 84
+      def create(initial_variable_values = {}, &block)
+        new(initial_variable_values, &block).run_load_hooks!
+      end
- -
-
# File railties/lib/rails/application.rb, line 84
-def create(initial_variable_values = {}, &block)
-  new(initial_variable_values, &block).run_load_hooks!
-end
-
-
- - + See on GitHub + + + +

@@ -392,22 +392,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application.rb, line 88
+      def find_root(from)
+        find_root_with_flag "config.ru", from, Dir.pwd
+      end
- -
-
# File railties/lib/rails/application.rb, line 88
-def find_root(from)
-  find_root_with_flag "config.ru", from, Dir.pwd
-end
-
-
- -

+ See on GitHub + + + +

@@ -427,27 +427,27 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application.rb, line 71
+      def inherited(base)
+        super
+        Rails.app_class = base
+        # lib has to be added to $LOAD_PATH unconditionally, even if it's in the
+        # autoload paths and config.add_autoload_paths_to_load_path is false.
+        add_lib_to_load_path!(find_root(base.called_from))
+        ActiveSupport.run_load_hooks(:before_configuration, base)
+      end
- -
-
# File railties/lib/rails/application.rb, line 71
-def inherited(base)
-  super
-  Rails.app_class = base
-  # lib has to be added to $LOAD_PATH unconditionally, even if it's in the
-  # autoload paths and config.add_autoload_paths_to_load_path is false.
-  add_lib_to_load_path!(find_root(base.called_from))
-  ActiveSupport.run_load_hooks(:before_configuration, base)
-end
-
-
- -

+ See on GitHub + + + +

@@ -467,22 +467,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application.rb, line 80
+      def instance
+        super.run_load_hooks!
+      end
- -
-
# File railties/lib/rails/application.rb, line 80
-def instance
-  super.run_load_hooks!
-end
-
-
- -

+ See on GitHub + + + +

@@ -502,42 +502,42 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application.rb, line 109
+    def initialize(initial_variable_values = {}, &block)
+      super()
+      @initialized       = false
+      @reloaders         = []
+      @routes_reloader   = nil
+      @app_env_config    = nil
+      @ordered_railties  = nil
+      @railties          = nil
+      @key_generators    = {}
+      @message_verifiers = nil
+      @deprecators       = nil
+      @ran_load_hooks    = false
+
+      @executor          = Class.new(ActiveSupport::Executor)
+      @reloader          = Class.new(ActiveSupport::Reloader)
+      @reloader.executor = @executor
+
+      @autoloaders = Rails::Autoloaders.new
+
+      # are these actually used?
+      @initial_variable_values = initial_variable_values
+      @block = block
+    end
- -
-
# File railties/lib/rails/application.rb, line 109
-def initialize(initial_variable_values = {}, &block)
-  super()
-  @initialized       = false
-  @reloaders         = []
-  @routes_reloader   = nil
-  @app_env_config    = nil
-  @ordered_railties  = nil
-  @railties          = nil
-  @key_generators    = {}
-  @message_verifiers = nil
-  @deprecators       = nil
-  @ran_load_hooks    = false
-
-  @executor          = Class.new(ActiveSupport::Executor)
-  @reloader          = Class.new(ActiveSupport::Reloader)
-  @reloader.executor = @executor
-
-  @autoloaders = Rails::Autoloaders.new
-
-  # are these actually used?
-  @initial_variable_values = initial_variable_values
-  @block = block
-end
-
-
- -

+ See on GitHub + + + + @@ -596,45 +596,45 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application.rb, line 271
+    def config_for(name, env: Rails.env)
+      yaml = name.is_a?(Pathname) ? name : Pathname.new("#{paths["config"].existent.first}/#{name}.yml")
+
+      if yaml.exist?
+        require "erb"
+        all_configs    = ActiveSupport::ConfigurationFile.parse(yaml).deep_symbolize_keys
+        config, shared = all_configs[env.to_sym], all_configs[:shared]
+
+        if shared
+          config = {} if config.nil? && shared.is_a?(Hash)
+          if config.is_a?(Hash) && shared.is_a?(Hash)
+            config = shared.deep_merge(config)
+          elsif config.nil?
+            config = shared
+          end
+        end
+
+        if config.is_a?(Hash)
+          config = ActiveSupport::OrderedOptions.new.update(config)
+        end
+
+        config
+      else
+        raise "Could not load configuration. No such file - #{yaml}"
+      end
+    end
- -
-
# File railties/lib/rails/application.rb, line 271
-def config_for(name, env: Rails.env)
-  yaml = name.is_a?(Pathname) ? name : Pathname.new("#{paths["config"].existent.first}/#{name}.yml")
-
-  if yaml.exist?
-    require "erb"
-    all_configs    = ActiveSupport::ConfigurationFile.parse(yaml).deep_symbolize_keys
-    config, shared = all_configs[env.to_sym], all_configs[:shared]
-
-    if shared
-      config = {} if config.nil? && shared.is_a?(Hash)
-      if config.is_a?(Hash) && shared.is_a?(Hash)
-        config = shared.deep_merge(config)
-      elsif config.nil?
-        config = shared
-      end
-    end
-
-    if config.is_a?(Hash)
-      config = ActiveSupport::OrderedOptions.new.update(config)
-    end
-
-    config
-  else
-    raise "Could not load configuration. No such file - #{yaml}"
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -654,22 +654,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application.rb, line 354
+    def console(&blk)
+      self.class.console(&blk)
+    end
- -
-
# File railties/lib/rails/application.rb, line 354
-def console(&blk)
-  self.class.console(&blk)
-end
-
-
- -

+ See on GitHub + + + +

@@ -693,22 +693,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application.rb, line 499
+    def credentials
+      @credentials ||= encrypted(config.credentials.content_path, key_path: config.credentials.key_path)
+    end
- -
-
# File railties/lib/rails/application.rb, line 499
-def credentials
-  @credentials ||= encrypted(config.credentials.content_path, key_path: config.credentials.key_path)
-end
-
-
- -

+ See on GitHub + + + +

@@ -728,24 +728,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application.rb, line 230
+    def deprecators
+      @deprecators ||= ActiveSupport::Deprecation::Deprecators.new.tap do |deprecators|
+        deprecators[:railties] = Rails.deprecator
+      end
+    end
- -
-
# File railties/lib/rails/application.rb, line 230
-def deprecators
-  @deprecators ||= ActiveSupport::Deprecation::Deprecators.new.tap do |deprecators|
-    deprecators[:railties] = Rails.deprecator
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -765,22 +765,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application.rb, line 557
+    def eager_load!
+      Rails.autoloaders.each(&:eager_load)
+    end
- -
-
# File railties/lib/rails/application.rb, line 557
-def eager_load!
-  Rails.autoloaders.each(&:eager_load)
-end
-
-
- -

+ See on GitHub + + + +

@@ -811,27 +811,27 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application.rb, line 518
+    def encrypted(path, key_path: "config/master.key", env_key: "RAILS_MASTER_KEY")
+      ActiveSupport::EncryptedConfiguration.new(
+        config_path: Rails.root.join(path),
+        key_path: Rails.root.join(key_path),
+        env_key: env_key,
+        raise_if_missing_key: config.require_master_key
+      )
+    end
- -
-
# File railties/lib/rails/application.rb, line 518
-def encrypted(path, key_path: "config/master.key", env_key: "RAILS_MASTER_KEY")
-  ActiveSupport::EncryptedConfiguration.new(
-    config_path: Rails.root.join(path),
-    key_path: Rails.root.join(key_path),
-    env_key: env_key,
-    raise_if_missing_key: config.require_master_key
-  )
-end
-
-
- -

+ See on GitHub + + + +

@@ -851,51 +851,51 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application.rb, line 300
+    def env_config
+      @app_env_config ||= super.merge(
+          "action_dispatch.parameter_filter" => filter_parameters,
+          "action_dispatch.redirect_filter" => config.filter_redirect,
+          "action_dispatch.secret_key_base" => secret_key_base,
+          "action_dispatch.show_exceptions" => config.action_dispatch.show_exceptions,
+          "action_dispatch.show_detailed_exceptions" => config.consider_all_requests_local,
+          "action_dispatch.log_rescued_responses" => config.action_dispatch.log_rescued_responses,
+          "action_dispatch.debug_exception_log_level" => ActiveSupport::Logger.const_get(config.action_dispatch.debug_exception_log_level.to_s.upcase),
+          "action_dispatch.logger" => Rails.logger,
+          "action_dispatch.backtrace_cleaner" => Rails.backtrace_cleaner,
+          "action_dispatch.key_generator" => key_generator,
+          "action_dispatch.http_auth_salt" => config.action_dispatch.http_auth_salt,
+          "action_dispatch.signed_cookie_salt" => config.action_dispatch.signed_cookie_salt,
+          "action_dispatch.encrypted_cookie_salt" => config.action_dispatch.encrypted_cookie_salt,
+          "action_dispatch.encrypted_signed_cookie_salt" => config.action_dispatch.encrypted_signed_cookie_salt,
+          "action_dispatch.authenticated_encrypted_cookie_salt" => config.action_dispatch.authenticated_encrypted_cookie_salt,
+          "action_dispatch.use_authenticated_cookie_encryption" => config.action_dispatch.use_authenticated_cookie_encryption,
+          "action_dispatch.encrypted_cookie_cipher" => config.action_dispatch.encrypted_cookie_cipher,
+          "action_dispatch.signed_cookie_digest" => config.action_dispatch.signed_cookie_digest,
+          "action_dispatch.cookies_serializer" => config.action_dispatch.cookies_serializer,
+          "action_dispatch.cookies_digest" => config.action_dispatch.cookies_digest,
+          "action_dispatch.cookies_rotations" => config.action_dispatch.cookies_rotations,
+          "action_dispatch.cookies_same_site_protection" => coerce_same_site_protection(config.action_dispatch.cookies_same_site_protection),
+          "action_dispatch.use_cookies_with_metadata" => config.action_dispatch.use_cookies_with_metadata,
+          "action_dispatch.content_security_policy" => config.content_security_policy,
+          "action_dispatch.content_security_policy_report_only" => config.content_security_policy_report_only,
+          "action_dispatch.content_security_policy_nonce_generator" => config.content_security_policy_nonce_generator,
+          "action_dispatch.content_security_policy_nonce_directives" => config.content_security_policy_nonce_directives,
+          "action_dispatch.permissions_policy" => config.permissions_policy,
+        )
+    end
- -
-
# File railties/lib/rails/application.rb, line 300
-def env_config
-  @app_env_config ||= super.merge(
-      "action_dispatch.parameter_filter" => filter_parameters,
-      "action_dispatch.redirect_filter" => config.filter_redirect,
-      "action_dispatch.secret_key_base" => secret_key_base,
-      "action_dispatch.show_exceptions" => config.action_dispatch.show_exceptions,
-      "action_dispatch.show_detailed_exceptions" => config.consider_all_requests_local,
-      "action_dispatch.log_rescued_responses" => config.action_dispatch.log_rescued_responses,
-      "action_dispatch.debug_exception_log_level" => ActiveSupport::Logger.const_get(config.action_dispatch.debug_exception_log_level.to_s.upcase),
-      "action_dispatch.logger" => Rails.logger,
-      "action_dispatch.backtrace_cleaner" => Rails.backtrace_cleaner,
-      "action_dispatch.key_generator" => key_generator,
-      "action_dispatch.http_auth_salt" => config.action_dispatch.http_auth_salt,
-      "action_dispatch.signed_cookie_salt" => config.action_dispatch.signed_cookie_salt,
-      "action_dispatch.encrypted_cookie_salt" => config.action_dispatch.encrypted_cookie_salt,
-      "action_dispatch.encrypted_signed_cookie_salt" => config.action_dispatch.encrypted_signed_cookie_salt,
-      "action_dispatch.authenticated_encrypted_cookie_salt" => config.action_dispatch.authenticated_encrypted_cookie_salt,
-      "action_dispatch.use_authenticated_cookie_encryption" => config.action_dispatch.use_authenticated_cookie_encryption,
-      "action_dispatch.encrypted_cookie_cipher" => config.action_dispatch.encrypted_cookie_cipher,
-      "action_dispatch.signed_cookie_digest" => config.action_dispatch.signed_cookie_digest,
-      "action_dispatch.cookies_serializer" => config.action_dispatch.cookies_serializer,
-      "action_dispatch.cookies_digest" => config.action_dispatch.cookies_digest,
-      "action_dispatch.cookies_rotations" => config.action_dispatch.cookies_rotations,
-      "action_dispatch.cookies_same_site_protection" => coerce_same_site_protection(config.action_dispatch.cookies_same_site_protection),
-      "action_dispatch.use_cookies_with_metadata" => config.action_dispatch.use_cookies_with_metadata,
-      "action_dispatch.content_security_policy" => config.content_security_policy,
-      "action_dispatch.content_security_policy_report_only" => config.content_security_policy_report_only,
-      "action_dispatch.content_security_policy_nonce_generator" => config.content_security_policy_nonce_generator,
-      "action_dispatch.content_security_policy_nonce_directives" => config.content_security_policy_nonce_directives,
-      "action_dispatch.permissions_policy" => config.permissions_policy,
-    )
-end
-
-
- -

+ See on GitHub + + + +

@@ -915,22 +915,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application.rb, line 360
+    def generators(&blk)
+      self.class.generators(&blk)
+    end
- -
-
# File railties/lib/rails/application.rb, line 360
-def generators(&blk)
-  self.class.generators(&blk)
-end
-
-
- -

+ See on GitHub + + + +

@@ -950,22 +950,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application.rb, line 134
+    def initialized?
+      @initialized
+    end
- -
-
# File railties/lib/rails/application.rb, line 134
-def initialized?
-  @initialized
-end
-
-
- -

+ See on GitHub + + + +

@@ -985,22 +985,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application.rb, line 342
+    def initializer(name, opts = {}, &block)
+      self.class.initializer(name, opts, &block)
+    end
- -
-
# File railties/lib/rails/application.rb, line 342
-def initializer(name, opts = {}, &block)
-  self.class.initializer(name, opts, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1020,22 +1020,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application.rb, line 371
+    def isolate_namespace(mod)
+      self.class.isolate_namespace(mod)
+    end
- -
-
# File railties/lib/rails/application.rb, line 371
-def isolate_namespace(mod)
-  self.class.isolate_namespace(mod)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1055,26 +1055,26 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application.rb, line 161
+    def key_generator(secret_key_base = self.secret_key_base)
+      # number of iterations selected based on consultation with the google security
+      # team. Details at https://github.com/rails/rails/pull/6952#issuecomment-7661220
+      @key_generators[secret_key_base] ||= ActiveSupport::CachingKeyGenerator.new(
+        ActiveSupport::KeyGenerator.new(secret_key_base, iterations: 1000)
+      )
+    end
- -
-
# File railties/lib/rails/application.rb, line 161
-def key_generator(secret_key_base = self.secret_key_base)
-  # number of iterations selected based on consultation with the google security
-  # team. Details at https://github.com/rails/rails/pull/6952#issuecomment-7661220
-  @key_generators[secret_key_base] ||= ActiveSupport::CachingKeyGenerator.new(
-    ActiveSupport::KeyGenerator.new(secret_key_base, iterations: 1000)
-  )
-end
-
-
- -

+ See on GitHub + + + +

@@ -1112,22 +1112,22 @@

Examples

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application.rb, line 222
+    def message_verifier(verifier_name)
+      message_verifiers[verifier_name]
+    end
- -
-
# File railties/lib/rails/application.rb, line 222
-def message_verifier(verifier_name)
-  message_verifiers[verifier_name]
-end
-
-
- -
+ See on GitHub + + + +

@@ -1164,25 +1164,25 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application.rb, line 197
+    def message_verifiers
+      @message_verifiers ||=
+        ActiveSupport::MessageVerifiers.new do |salt, secret_key_base: self.secret_key_base|
+          key_generator(secret_key_base).generate_key(salt)
+        end.rotate_defaults
+    end
- -
-
# File railties/lib/rails/application.rb, line 197
-def message_verifiers
-  @message_verifiers ||=
-    ActiveSupport::MessageVerifiers.new do |salt, secret_key_base: self.secret_key_base|
-      key_generator(secret_key_base).generate_key(salt)
-    end.rotate_defaults
-end
-
-
- -

+ See on GitHub + + + +

@@ -1202,22 +1202,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application.rb, line 335
+    def rake_tasks(&block)
+      self.class.rake_tasks(&block)
+    end
- -
-
# File railties/lib/rails/application.rb, line 335
-def rake_tasks(&block)
-  self.class.rake_tasks(&block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1237,22 +1237,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application.rb, line 153
+    def reload_routes!
+      routes_reloader.reload!
+    end
- -
-
# File railties/lib/rails/application.rb, line 153
-def reload_routes!
-  routes_reloader.reload!
-end
-
-
- -

+ See on GitHub + + + +

@@ -1272,22 +1272,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application.rb, line 348
+    def runner(&blk)
+      self.class.runner(&blk)
+    end
- -
-
# File railties/lib/rails/application.rb, line 348
-def runner(&blk)
-  self.class.runner(&blk)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1315,28 +1315,28 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application.rb, line 475
+    def secret_key_base
+      if Rails.env.local? || ENV["SECRET_KEY_BASE_DUMMY"]
+        config.secret_key_base ||= generate_local_secret
+      else
+        validate_secret_key_base(
+          ENV["SECRET_KEY_BASE"] || credentials.secret_key_base || secrets.secret_key_base
+        )
+      end
+    end
- -
-
# File railties/lib/rails/application.rb, line 475
-def secret_key_base
-  if Rails.env.local? || ENV["SECRET_KEY_BASE_DUMMY"]
-    config.secret_key_base ||= generate_local_secret
-  else
-    validate_secret_key_base(
-      ENV["SECRET_KEY_BASE"] || credentials.secret_key_base || secrets.secret_key_base
-    )
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1356,35 +1356,35 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application.rb, line 440
+    def secrets
+      Rails.deprecator.warn(<<~MSG.squish)
+        `Rails.application.secrets` is deprecated in favor of `Rails.application.credentials` and will be removed in Rails 7.2.
+      MSG
+      @secrets ||= begin
+        secrets = ActiveSupport::OrderedOptions.new
+        files = config.paths["config/secrets"].existent
+        files = files.reject { |path| path.end_with?(".enc") } unless config.read_encrypted_secrets
+        secrets.merge! Rails::Secrets.parse(files, env: Rails.env)
+
+        # Fallback to config.secret_key_base if secrets.secret_key_base isn't set
+        secrets.secret_key_base ||= config.secret_key_base
+
+        secrets
+      end
+    end
- -
-
# File railties/lib/rails/application.rb, line 440
-    def secrets
-      Rails.deprecator.warn(<<~MSG.squish)
-        `Rails.application.secrets` is deprecated in favor of `Rails.application.credentials` and will be removed in Rails 7.2.
-      MSG
-      @secrets ||= begin
-        secrets = ActiveSupport::OrderedOptions.new
-        files = config.paths["config/secrets"].existent
-        files = files.reject { |path| path.end_with?(".enc") } unless config.read_encrypted_secrets
-        secrets.merge! Rails::Secrets.parse(files, env: Rails.env)
-
-        # Fallback to config.secret_key_base if secrets.secret_key_base isn't set
-        secrets.secret_key_base ||= config.secret_key_base
-
-        secrets
-      end
-    end
-
-
- -

+ See on GitHub + + + +

@@ -1404,22 +1404,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application.rb, line 366
+    def server(&blk)
+      self.class.server(&blk)
+    end
- -
-
# File railties/lib/rails/application.rb, line 366
-def server(&blk)
-  self.class.server(&blk)
-end
-
-
- -

+ See on GitHub + + + +

Instance Protected methods

@@ -1442,23 +1442,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application.rb, line 645
+    def ensure_generator_templates_added
+      configured_paths = config.generators.templates
+      configured_paths.unshift(*(paths["lib/templates"].existent - configured_paths))
+    end
- -
-
# File railties/lib/rails/application.rb, line 645
-def ensure_generator_templates_added
-  configured_paths = config.generators.templates
-  configured_paths.unshift(*(paths["lib/templates"].existent - configured_paths))
-end
-
-
- - + See on GitHub + + + +

@@ -1478,28 +1478,28 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application.rb, line 635
+    def validate_secret_key_base(secret_key_base)
+      if secret_key_base.is_a?(String) && secret_key_base.present?
+        secret_key_base
+      elsif secret_key_base
+        raise ArgumentError, "`secret_key_base` for #{Rails.env} environment must be a type of String`"
+      else
+        raise ArgumentError, "Missing `secret_key_base` for '#{Rails.env}' environment, set this string with `bin/rails credentials:edit`"
+      end
+    end
- -
-
# File railties/lib/rails/application.rb, line 635
-def validate_secret_key_base(secret_key_base)
-  if secret_key_base.is_a?(String) && secret_key_base.present?
-    secret_key_base
-  elsif secret_key_base
-    raise ArgumentError, "`secret_key_base` for #{Rails.env} environment must be a type of String`"
-  else
-    raise ArgumentError, "Missing `secret_key_base` for '#{Rails.env}' environment, set this string with `bin/rails credentials:edit`"
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/Application/Configuration.html b/src/classes/Rails/Application/Configuration.html index 8cff8fe5e8..3e0b66ed82 100644 --- a/src/classes/Rails/Application/Configuration.html +++ b/src/classes/Rails/Application/Configuration.html @@ -558,76 +558,76 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application/configuration.rb, line 30
+      def initialize(*)
+        super
+        self.encoding                            = Encoding::UTF_8
+        @allow_concurrency                       = nil
+        @consider_all_requests_local             = false
+        @filter_parameters                       = []
+        @filter_redirect                         = []
+        @helpers_paths                           = []
+        if Rails.env.development?
+          @hosts = ActionDispatch::HostAuthorization::ALLOWED_HOSTS_IN_DEVELOPMENT +
+            ENV["RAILS_DEVELOPMENT_HOSTS"].to_s.split(",").map(&:strip)
+        else
+          @hosts = []
+        end
+        @host_authorization                      = {}
+        @public_file_server                      = ActiveSupport::OrderedOptions.new
+        @public_file_server.enabled              = true
+        @public_file_server.index_name           = "index"
+        @assume_ssl                              = false
+        @force_ssl                               = false
+        @ssl_options                             = {}
+        @session_store                           = nil
+        @time_zone                               = "UTC"
+        @beginning_of_week                       = :monday
+        @log_level                               = :debug
+        @log_file_size                           = nil
+        @generators                              = app_generators
+        @cache_store                             = [ :file_store, "#{root}/tmp/cache/" ]
+        @railties_order                          = [:all]
+        @relative_url_root                       = ENV["RAILS_RELATIVE_URL_ROOT"]
+        @reload_classes_only_on_change           = true
+        @file_watcher                            = ActiveSupport::FileUpdateChecker
+        @exceptions_app                          = nil
+        @autoflush_log                           = true
+        @log_formatter                           = ActiveSupport::Logger::SimpleFormatter.new
+        @eager_load                              = nil
+        @secret_key_base                         = nil
+        @api_only                                = false
+        @debug_exception_response_format         = nil
+        @x                                       = Custom.new
+        @enable_dependency_loading               = false
+        @read_encrypted_secrets                  = false
+        @content_security_policy                 = nil
+        @content_security_policy_report_only     = false
+        @content_security_policy_nonce_generator = nil
+        @content_security_policy_nonce_directives = nil
+        @require_master_key                      = false
+        @loaded_config_version                   = nil
+        @credentials                             = ActiveSupport::InheritableOptions.new(credentials_defaults)
+        @disable_sandbox                         = false
+        @sandbox_by_default                      = false
+        @add_autoload_paths_to_load_path         = true
+        @permissions_policy                      = nil
+        @rake_eager_load                         = false
+        @server_timing                           = false
+        @dom_testing_default_html_version        = :html4
+      end
- -
-
# File railties/lib/rails/application/configuration.rb, line 30
-def initialize(*)
-  super
-  self.encoding                            = Encoding::UTF_8
-  @allow_concurrency                       = nil
-  @consider_all_requests_local             = false
-  @filter_parameters                       = []
-  @filter_redirect                         = []
-  @helpers_paths                           = []
-  if Rails.env.development?
-    @hosts = ActionDispatch::HostAuthorization::ALLOWED_HOSTS_IN_DEVELOPMENT +
-      ENV["RAILS_DEVELOPMENT_HOSTS"].to_s.split(",").map(&:strip)
-  else
-    @hosts = []
-  end
-  @host_authorization                      = {}
-  @public_file_server                      = ActiveSupport::OrderedOptions.new
-  @public_file_server.enabled              = true
-  @public_file_server.index_name           = "index"
-  @assume_ssl                              = false
-  @force_ssl                               = false
-  @ssl_options                             = {}
-  @session_store                           = nil
-  @time_zone                               = "UTC"
-  @beginning_of_week                       = :monday
-  @log_level                               = :debug
-  @log_file_size                           = nil
-  @generators                              = app_generators
-  @cache_store                             = [ :file_store, "#{root}/tmp/cache/" ]
-  @railties_order                          = [:all]
-  @relative_url_root                       = ENV["RAILS_RELATIVE_URL_ROOT"]
-  @reload_classes_only_on_change           = true
-  @file_watcher                            = ActiveSupport::FileUpdateChecker
-  @exceptions_app                          = nil
-  @autoflush_log                           = true
-  @log_formatter                           = ActiveSupport::Logger::SimpleFormatter.new
-  @eager_load                              = nil
-  @secret_key_base                         = nil
-  @api_only                                = false
-  @debug_exception_response_format         = nil
-  @x                                       = Custom.new
-  @enable_dependency_loading               = false
-  @read_encrypted_secrets                  = false
-  @content_security_policy                 = nil
-  @content_security_policy_report_only     = false
-  @content_security_policy_nonce_generator = nil
-  @content_security_policy_nonce_directives = nil
-  @require_master_key                      = false
-  @loaded_config_version                   = nil
-  @credentials                             = ActiveSupport::InheritableOptions.new(credentials_defaults)
-  @disable_sandbox                         = false
-  @sandbox_by_default                      = false
-  @add_autoload_paths_to_load_path         = true
-  @permissions_policy                      = nil
-  @rake_eager_load                         = false
-  @server_timing                           = false
-  @dom_testing_default_html_version        = :html4
-end
-
-
- - + See on GitHub + + + + @@ -651,22 +651,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application/configuration.rb, line 532
+      def annotations
+        Rails::SourceAnnotationExtractor::Annotation
+      end
- -
-
# File railties/lib/rails/application/configuration.rb, line 532
-def annotations
-  Rails::SourceAnnotationExtractor::Annotation
-end
-
-
- - + See on GitHub + + + +

@@ -686,25 +686,25 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application/configuration.rb, line 375
+      def api_only=(value)
+        @api_only = value
+        generators.api_only = value
+
+        @debug_exception_response_format ||= :api
+      end
- -
-
# File railties/lib/rails/application/configuration.rb, line 375
-def api_only=(value)
-  @api_only = value
-  generators.api_only = value
-
-  @debug_exception_response_format ||= :api
-end
-
-
- -

+ See on GitHub + + + +

@@ -724,30 +724,30 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application/configuration.rb, line 464
+      def autoload_lib(ignore:)
+        lib = root.join("lib")
+
+        # Set as a string to have the same type as default autoload paths, for
+        # consistency.
+        autoload_paths << lib.to_s
+        eager_load_paths << lib.to_s
+
+        ignored_abspaths = Array.wrap(ignore).map { lib.join(_1) }
+        Rails.autoloaders.main.ignore(ignored_abspaths)
+      end
- -
-
# File railties/lib/rails/application/configuration.rb, line 464
-def autoload_lib(ignore:)
-  lib = root.join("lib")
-
-  # Set as a string to have the same type as default autoload paths, for
-  # consistency.
-  autoload_paths << lib.to_s
-  eager_load_paths << lib.to_s
-
-  ignored_abspaths = Array.wrap(ignore).map { lib.join(_1) }
-  Rails.autoloaders.main.ignore(ignored_abspaths)
-end
-
-
- -

+ See on GitHub + + + +

@@ -767,30 +767,30 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application/configuration.rb, line 476
+      def autoload_lib_once(ignore:)
+        lib = root.join("lib")
+
+        # Set as a string to have the same type as default autoload paths, for
+        # consistency.
+        autoload_once_paths << lib.to_s
+        eager_load_paths << lib.to_s
+
+        ignored_abspaths = Array.wrap(ignore).map { lib.join(_1) }
+        Rails.autoloaders.once.ignore(ignored_abspaths)
+      end
- -
-
# File railties/lib/rails/application/configuration.rb, line 476
-def autoload_lib_once(ignore:)
-  lib = root.join("lib")
-
-  # Set as a string to have the same type as default autoload paths, for
-  # consistency.
-  autoload_once_paths << lib.to_s
-  eager_load_paths << lib.to_s
-
-  ignored_abspaths = Array.wrap(ignore).map { lib.join(_1) }
-  Rails.autoloaders.once.ignore(ignored_abspaths)
-end
-
-
- -

+ See on GitHub + + + +

@@ -810,22 +810,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application/configuration.rb, line 488
+      def colorize_logging
+        ActiveSupport::LogSubscriber.colorize_logging
+      end
- -
-
# File railties/lib/rails/application/configuration.rb, line 488
-def colorize_logging
-  ActiveSupport::LogSubscriber.colorize_logging
-end
-
-
- -

+ See on GitHub + + + +

@@ -845,23 +845,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application/configuration.rb, line 492
+      def colorize_logging=(val)
+        ActiveSupport::LogSubscriber.colorize_logging = val
+        generators.colorize_logging = val
+      end
- -
-
# File railties/lib/rails/application/configuration.rb, line 492
-def colorize_logging=(val)
-  ActiveSupport::LogSubscriber.colorize_logging = val
-  generators.colorize_logging = val
-end
-
-
- -

+ See on GitHub + + + +

@@ -881,26 +881,26 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application/configuration.rb, line 537
+      def content_security_policy(&block)
+        if block_given?
+          @content_security_policy = ActionDispatch::ContentSecurityPolicy.new(&block)
+        else
+          @content_security_policy
+        end
+      end
- -
-
# File railties/lib/rails/application/configuration.rb, line 537
-def content_security_policy(&block)
-  if block_given?
-    @content_security_policy = ActionDispatch::ContentSecurityPolicy.new(&block)
-  else
-    @content_security_policy
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -920,55 +920,55 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application/configuration.rb, line 427
+      def database_configuration
+        path = paths["config/database"].existent.first
+        yaml = Pathname.new(path) if path
+
+        config = if yaml&.exist?
+          loaded_yaml = ActiveSupport::ConfigurationFile.parse(yaml)
+          if (shared = loaded_yaml.delete("shared"))
+            loaded_yaml.each do |env, config|
+              if config.is_a?(Hash) && config.values.all?(Hash)
+                if shared.is_a?(Hash) && shared.values.all?(Hash)
+                  config.map do |name, sub_config|
+                    sub_config.reverse_merge!(shared[name])
+                  end
+                else
+                  config.map do |name, sub_config|
+                    sub_config.reverse_merge!(shared)
+                  end
+                end
+              else
+                config.reverse_merge!(shared)
+              end
+            end
+          end
+          Hash.new(shared).merge(loaded_yaml)
+        elsif ENV["DATABASE_URL"]
+          # Value from ENV['DATABASE_URL'] is set to default database connection
+          # by Active Record.
+          {}
+        else
+          raise "Could not load database configuration. No such file - #{paths["config/database"].instance_variable_get(:@paths)}"
+        end
+
+        config
+      rescue => e
+        raise e, "Cannot load database configuration:\n#{e.message}", e.backtrace
+      end
- -
-
# File railties/lib/rails/application/configuration.rb, line 427
-def database_configuration
-  path = paths["config/database"].existent.first
-  yaml = Pathname.new(path) if path
-
-  config = if yaml&.exist?
-    loaded_yaml = ActiveSupport::ConfigurationFile.parse(yaml)
-    if (shared = loaded_yaml.delete("shared"))
-      loaded_yaml.each do |env, config|
-        if config.is_a?(Hash) && config.values.all?(Hash)
-          if shared.is_a?(Hash) && shared.values.all?(Hash)
-            config.map do |name, sub_config|
-              sub_config.reverse_merge!(shared[name])
-            end
-          else
-            config.map do |name, sub_config|
-              sub_config.reverse_merge!(shared)
-            end
-          end
-        else
-          config.reverse_merge!(shared)
-        end
-      end
-    end
-    Hash.new(shared).merge(loaded_yaml)
-  elsif ENV["DATABASE_URL"]
-    # Value from ENV['DATABASE_URL'] is set to default database connection
-    # by Active Record.
-    {}
-  else
-    raise "Could not load database configuration. No such file - #{paths["config/database"].instance_variable_get(:@paths)}"
-  end
-
-  config
-rescue => e
-  raise e, "Cannot load database configuration:\n#{e.message}", e.backtrace
-end
-
-
- -

+ See on GitHub + + + +

@@ -988,22 +988,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application/configuration.rb, line 382
+      def debug_exception_response_format
+        @debug_exception_response_format || :default
+      end
- -
-
# File railties/lib/rails/application/configuration.rb, line 382
-def debug_exception_response_format
-  @debug_exception_response_format || :default
-end
-
-
- -

+ See on GitHub + + + +

@@ -1023,30 +1023,30 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application/configuration.rb, line 554
+      def default_log_file
+        path = paths["log"].first
+        unless File.exist? File.dirname path
+          FileUtils.mkdir_p File.dirname path
+        end
+
+        f = File.open path, "a"
+        f.binmode
+        f.sync = autoflush_log # if true make sure every write flushes
+        f
+      end
- -
-
# File railties/lib/rails/application/configuration.rb, line 554
-def default_log_file
-  path = paths["log"].first
-  unless File.exist? File.dirname path
-    FileUtils.mkdir_p File.dirname path
-  end
-
-  f = File.open path, "a"
-  f.binmode
-  f.sync = autoflush_log # if true make sure every write flushes
-  f
-end
-
-
- -

+ See on GitHub + + + +

@@ -1066,23 +1066,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application/configuration.rb, line 357
+      def enable_dependency_loading
+        Rails.deprecator.warn(ENABLE_DEPENDENCY_LOADING_WARNING)
+        @enable_dependency_loading
+      end
- -
-
# File railties/lib/rails/application/configuration.rb, line 357
-def enable_dependency_loading
-  Rails.deprecator.warn(ENABLE_DEPENDENCY_LOADING_WARNING)
-  @enable_dependency_loading
-end
-
-
- -

+ See on GitHub + + + +

@@ -1102,23 +1102,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application/configuration.rb, line 362
+      def enable_dependency_loading=(value)
+        Rails.deprecator.warn(ENABLE_DEPENDENCY_LOADING_WARNING)
+        @enable_dependency_loading = value
+      end
- -
-
# File railties/lib/rails/application/configuration.rb, line 362
-def enable_dependency_loading=(value)
-  Rails.deprecator.warn(ENABLE_DEPENDENCY_LOADING_WARNING)
-  @enable_dependency_loading = value
-end
-
-
- -

+ See on GitHub + + + +

@@ -1138,22 +1138,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application/configuration.rb, line 343
+      def enable_reloading
+        !cache_classes
+      end
- -
-
# File railties/lib/rails/application/configuration.rb, line 343
-def enable_reloading
-  !cache_classes
-end
-
-
- -

+ See on GitHub + + + +

@@ -1173,22 +1173,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application/configuration.rb, line 347
+      def enable_reloading=(value)
+        self.cache_classes = !value
+      end
- -
-
# File railties/lib/rails/application/configuration.rb, line 347
-def enable_reloading=(value)
-  self.cache_classes = !value
-end
-
-
- -

+ See on GitHub + + + +

@@ -1208,26 +1208,26 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application/configuration.rb, line 367
+      def encoding=(value)
+        @encoding = value
+        silence_warnings do
+          Encoding.default_external = value
+          Encoding.default_internal = value
+        end
+      end
- -
-
# File railties/lib/rails/application/configuration.rb, line 367
-def encoding=(value)
-  @encoding = value
-  silence_warnings do
-    Encoding.default_external = value
-    Encoding.default_internal = value
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1247,265 +1247,265 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application/configuration.rb, line 92
+      def load_defaults(target_version)
+        # To introduce a change in behavior, follow these steps:
+        # 1. Add an accessor on the target object (e.g. the ActiveJob class for
+        #    global Active Job config).
+        # 2. Set a default value there preserving existing behavior for existing
+        #    applications.
+        # 3. Implement the behavior change based on the config value.
+        # 4. In the section below corresponding to the next release of Rails,
+        #    configure the default value.
+        # 5. Add a commented out section in the `new_framework_defaults` to
+        #    configure the default value again.
+        # 6. Update the guide in `configuring.md`.
+
+        # To remove configurable deprecated behavior, follow these steps:
+        # 1. Update or remove the entry in the guides.
+        # 2. Remove the references below.
+        # 3. Remove the legacy code paths and config check.
+        # 4. Remove the config accessor.
+
+        case target_version.to_s
+        when "5.0"
+          if respond_to?(:action_controller)
+            action_controller.per_form_csrf_tokens = true
+            action_controller.forgery_protection_origin_check = true
+          end
+
+          ActiveSupport.to_time_preserves_timezone = true
+
+          if respond_to?(:active_record)
+            active_record.belongs_to_required_by_default = true
+          end
+
+          self.ssl_options = { hsts: { subdomains: true } }
+        when "5.1"
+          load_defaults "5.0"
+
+          if respond_to?(:assets)
+            assets.unknown_asset_fallback = false
+          end
+
+          if respond_to?(:action_view)
+            action_view.form_with_generates_remote_forms = true
+          end
+        when "5.2"
+          load_defaults "5.1"
+
+          if respond_to?(:active_record)
+            active_record.cache_versioning = true
+          end
+
+          if respond_to?(:action_dispatch)
+            action_dispatch.use_authenticated_cookie_encryption = true
+          end
+
+          if respond_to?(:active_support)
+            active_support.use_authenticated_message_encryption = true
+            active_support.hash_digest_class = OpenSSL::Digest::SHA1
+          end
+
+          if respond_to?(:action_controller)
+            action_controller.default_protect_from_forgery = true
+          end
+
+          if respond_to?(:action_view)
+            action_view.form_with_generates_ids = true
+          end
+        when "6.0"
+          load_defaults "5.2"
+
+          if respond_to?(:action_view)
+            action_view.default_enforce_utf8 = false
+          end
+
+          if respond_to?(:action_dispatch)
+            action_dispatch.use_cookies_with_metadata = true
+          end
+
+          if respond_to?(:action_mailer)
+            action_mailer.delivery_job = "ActionMailer::MailDeliveryJob"
+          end
+
+          if respond_to?(:active_storage)
+            active_storage.queues.analysis = :active_storage_analysis
+            active_storage.queues.purge    = :active_storage_purge
+          end
+
+          if respond_to?(:active_record)
+            active_record.collection_cache_versioning = true
+          end
+        when "6.1"
+          load_defaults "6.0"
+
+          if respond_to?(:active_record)
+            active_record.has_many_inversing = true
+          end
+
+          if respond_to?(:active_job)
+            active_job.retry_jitter = 0.15
+          end
+
+          if respond_to?(:action_dispatch)
+            action_dispatch.cookies_same_site_protection = :lax
+            action_dispatch.ssl_default_redirect_status = 308
+          end
+
+          if respond_to?(:action_view)
+            action_view.form_with_generates_remote_forms = false
+            action_view.preload_links_header = true
+          end
+
+          if respond_to?(:active_storage)
+            active_storage.track_variants = true
+
+            active_storage.queues.analysis = nil
+            active_storage.queues.purge = nil
+          end
+
+          if respond_to?(:action_mailbox)
+            action_mailbox.queues.incineration = nil
+            action_mailbox.queues.routing = nil
+          end
+
+          if respond_to?(:action_mailer)
+            action_mailer.deliver_later_queue_name = nil
+          end
+
+          ActiveSupport.utc_to_local_returns_utc_offset_times = true
+        when "7.0"
+          load_defaults "6.1"
+
+          if respond_to?(:action_dispatch)
+            action_dispatch.default_headers = {
+              "X-Frame-Options" => "SAMEORIGIN",
+              "X-XSS-Protection" => "0",
+              "X-Content-Type-Options" => "nosniff",
+              "X-Download-Options" => "noopen",
+              "X-Permitted-Cross-Domain-Policies" => "none",
+              "Referrer-Policy" => "strict-origin-when-cross-origin"
+            }
+            action_dispatch.cookies_serializer = :json
+          end
+
+          if respond_to?(:action_view)
+            action_view.button_to_generates_button_tag = true
+            action_view.apply_stylesheet_media_default = false
+          end
+
+          if respond_to?(:active_support)
+            active_support.hash_digest_class = OpenSSL::Digest::SHA256
+            active_support.key_generator_hash_digest_class = OpenSSL::Digest::SHA256
+            active_support.cache_format_version = 7.0
+            active_support.executor_around_test_case = true
+          end
+
+          if respond_to?(:action_mailer)
+            action_mailer.smtp_timeout = 5
+          end
+
+          if respond_to?(:active_storage)
+            active_storage.video_preview_arguments =
+              "-vf 'select=eq(n\\,0)+eq(key\\,1)+gt(scene\\,0.015),loop=loop=-1:size=2,trim=start_frame=1'" \
+              " -frames:v 1 -f image2"
+
+            active_storage.variant_processor = :vips
+            active_storage.multiple_file_field_include_hidden = true
+          end
+
+          if respond_to?(:active_record)
+            active_record.verify_foreign_keys_for_fixtures = true
+            active_record.partial_inserts = false
+            active_record.automatic_scope_inversing = true
+          end
+
+          if respond_to?(:action_controller)
+            action_controller.raise_on_open_redirects = true
+            action_controller.wrap_parameters_by_default = true
+          end
+        when "7.1"
+          load_defaults "7.0"
+
+          self.add_autoload_paths_to_load_path = false
+          self.precompile_filter_parameters = true
+          self.dom_testing_default_html_version = defined?(Nokogiri::HTML5) ? :html5 : :html4
+
+          if Rails.env.local?
+            self.log_file_size = 100 * 1024 * 1024
+          end
+
+          if respond_to?(:active_record)
+            active_record.run_commit_callbacks_on_first_saved_instances_in_transaction = false
+            active_record.commit_transaction_on_non_local_return = true
+            active_record.allow_deprecated_singular_associations_name = false
+            active_record.sqlite3_adapter_strict_strings_by_default = true
+            active_record.query_log_tags_format = :sqlcommenter
+            active_record.raise_on_assign_to_attr_readonly = true
+            active_record.belongs_to_required_validates_foreign_key = false
+            active_record.before_committed_on_all_records = true
+            active_record.default_column_serializer = nil
+            active_record.encryption.hash_digest_class = OpenSSL::Digest::SHA256
+            active_record.encryption.support_sha1_for_non_deterministic_encryption = false
+            active_record.marshalling_format_version = 7.1
+            active_record.run_after_transaction_callbacks_in_order_defined = true
+            active_record.generate_secure_token_on = :initialize
+          end
+
+          if respond_to?(:action_dispatch)
+            action_dispatch.default_headers = {
+              "X-Frame-Options" => "SAMEORIGIN",
+              "X-XSS-Protection" => "0",
+              "X-Content-Type-Options" => "nosniff",
+              "X-Permitted-Cross-Domain-Policies" => "none",
+              "Referrer-Policy" => "strict-origin-when-cross-origin"
+            }
+            action_dispatch.debug_exception_log_level = :error
+          end
+
+          if respond_to?(:active_job)
+            active_job.use_big_decimal_serializer = true
+          end
+
+          if respond_to?(:active_support)
+            active_support.cache_format_version = 7.1
+            active_support.message_serializer = :json_allow_marshal
+            active_support.use_message_serializer_for_metadata = true
+            active_support.raise_on_invalid_cache_expiration_time = true
+          end
+
+          if respond_to?(:action_controller)
+            action_controller.allow_deprecated_parameters_hash_equality = false
+          end
+
+          if defined?(Rails::HTML::Sanitizer) # nested ifs to avoid linter errors
+            if respond_to?(:action_view)
+              action_view.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor
+            end
+
+            if respond_to?(:action_text)
+              action_text.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor
+            end
+          end
+        else
+          raise "Unknown version #{target_version.to_s.inspect}"
+        end
+
+        @loaded_config_version = target_version
+      end
- -
-
# File railties/lib/rails/application/configuration.rb, line 92
-def load_defaults(target_version)
-  # To introduce a change in behavior, follow these steps:
-  # 1. Add an accessor on the target object (e.g. the ActiveJob class for
-  #    global Active Job config).
-  # 2. Set a default value there preserving existing behavior for existing
-  #    applications.
-  # 3. Implement the behavior change based on the config value.
-  # 4. In the section below corresponding to the next release of Rails,
-  #    configure the default value.
-  # 5. Add a commented out section in the `new_framework_defaults` to
-  #    configure the default value again.
-  # 6. Update the guide in `configuring.md`.
-
-  # To remove configurable deprecated behavior, follow these steps:
-  # 1. Update or remove the entry in the guides.
-  # 2. Remove the references below.
-  # 3. Remove the legacy code paths and config check.
-  # 4. Remove the config accessor.
-
-  case target_version.to_s
-  when "5.0"
-    if respond_to?(:action_controller)
-      action_controller.per_form_csrf_tokens = true
-      action_controller.forgery_protection_origin_check = true
-    end
-
-    ActiveSupport.to_time_preserves_timezone = true
-
-    if respond_to?(:active_record)
-      active_record.belongs_to_required_by_default = true
-    end
-
-    self.ssl_options = { hsts: { subdomains: true } }
-  when "5.1"
-    load_defaults "5.0"
-
-    if respond_to?(:assets)
-      assets.unknown_asset_fallback = false
-    end
-
-    if respond_to?(:action_view)
-      action_view.form_with_generates_remote_forms = true
-    end
-  when "5.2"
-    load_defaults "5.1"
-
-    if respond_to?(:active_record)
-      active_record.cache_versioning = true
-    end
-
-    if respond_to?(:action_dispatch)
-      action_dispatch.use_authenticated_cookie_encryption = true
-    end
-
-    if respond_to?(:active_support)
-      active_support.use_authenticated_message_encryption = true
-      active_support.hash_digest_class = OpenSSL::Digest::SHA1
-    end
-
-    if respond_to?(:action_controller)
-      action_controller.default_protect_from_forgery = true
-    end
-
-    if respond_to?(:action_view)
-      action_view.form_with_generates_ids = true
-    end
-  when "6.0"
-    load_defaults "5.2"
-
-    if respond_to?(:action_view)
-      action_view.default_enforce_utf8 = false
-    end
-
-    if respond_to?(:action_dispatch)
-      action_dispatch.use_cookies_with_metadata = true
-    end
-
-    if respond_to?(:action_mailer)
-      action_mailer.delivery_job = "ActionMailer::MailDeliveryJob"
-    end
-
-    if respond_to?(:active_storage)
-      active_storage.queues.analysis = :active_storage_analysis
-      active_storage.queues.purge    = :active_storage_purge
-    end
-
-    if respond_to?(:active_record)
-      active_record.collection_cache_versioning = true
-    end
-  when "6.1"
-    load_defaults "6.0"
-
-    if respond_to?(:active_record)
-      active_record.has_many_inversing = true
-    end
-
-    if respond_to?(:active_job)
-      active_job.retry_jitter = 0.15
-    end
-
-    if respond_to?(:action_dispatch)
-      action_dispatch.cookies_same_site_protection = :lax
-      action_dispatch.ssl_default_redirect_status = 308
-    end
-
-    if respond_to?(:action_view)
-      action_view.form_with_generates_remote_forms = false
-      action_view.preload_links_header = true
-    end
-
-    if respond_to?(:active_storage)
-      active_storage.track_variants = true
-
-      active_storage.queues.analysis = nil
-      active_storage.queues.purge = nil
-    end
-
-    if respond_to?(:action_mailbox)
-      action_mailbox.queues.incineration = nil
-      action_mailbox.queues.routing = nil
-    end
-
-    if respond_to?(:action_mailer)
-      action_mailer.deliver_later_queue_name = nil
-    end
-
-    ActiveSupport.utc_to_local_returns_utc_offset_times = true
-  when "7.0"
-    load_defaults "6.1"
-
-    if respond_to?(:action_dispatch)
-      action_dispatch.default_headers = {
-        "X-Frame-Options" => "SAMEORIGIN",
-        "X-XSS-Protection" => "0",
-        "X-Content-Type-Options" => "nosniff",
-        "X-Download-Options" => "noopen",
-        "X-Permitted-Cross-Domain-Policies" => "none",
-        "Referrer-Policy" => "strict-origin-when-cross-origin"
-      }
-      action_dispatch.cookies_serializer = :json
-    end
-
-    if respond_to?(:action_view)
-      action_view.button_to_generates_button_tag = true
-      action_view.apply_stylesheet_media_default = false
-    end
-
-    if respond_to?(:active_support)
-      active_support.hash_digest_class = OpenSSL::Digest::SHA256
-      active_support.key_generator_hash_digest_class = OpenSSL::Digest::SHA256
-      active_support.cache_format_version = 7.0
-      active_support.executor_around_test_case = true
-    end
-
-    if respond_to?(:action_mailer)
-      action_mailer.smtp_timeout = 5
-    end
-
-    if respond_to?(:active_storage)
-      active_storage.video_preview_arguments =
-        "-vf 'select=eq(n\\,0)+eq(key\\,1)+gt(scene\\,0.015),loop=loop=-1:size=2,trim=start_frame=1'" \
-        " -frames:v 1 -f image2"
-
-      active_storage.variant_processor = :vips
-      active_storage.multiple_file_field_include_hidden = true
-    end
-
-    if respond_to?(:active_record)
-      active_record.verify_foreign_keys_for_fixtures = true
-      active_record.partial_inserts = false
-      active_record.automatic_scope_inversing = true
-    end
-
-    if respond_to?(:action_controller)
-      action_controller.raise_on_open_redirects = true
-      action_controller.wrap_parameters_by_default = true
-    end
-  when "7.1"
-    load_defaults "7.0"
-
-    self.add_autoload_paths_to_load_path = false
-    self.precompile_filter_parameters = true
-    self.dom_testing_default_html_version = defined?(Nokogiri::HTML5) ? :html5 : :html4
-
-    if Rails.env.local?
-      self.log_file_size = 100 * 1024 * 1024
-    end
-
-    if respond_to?(:active_record)
-      active_record.run_commit_callbacks_on_first_saved_instances_in_transaction = false
-      active_record.commit_transaction_on_non_local_return = true
-      active_record.allow_deprecated_singular_associations_name = false
-      active_record.sqlite3_adapter_strict_strings_by_default = true
-      active_record.query_log_tags_format = :sqlcommenter
-      active_record.raise_on_assign_to_attr_readonly = true
-      active_record.belongs_to_required_validates_foreign_key = false
-      active_record.before_committed_on_all_records = true
-      active_record.default_column_serializer = nil
-      active_record.encryption.hash_digest_class = OpenSSL::Digest::SHA256
-      active_record.encryption.support_sha1_for_non_deterministic_encryption = false
-      active_record.marshalling_format_version = 7.1
-      active_record.run_after_transaction_callbacks_in_order_defined = true
-      active_record.generate_secure_token_on = :initialize
-    end
-
-    if respond_to?(:action_dispatch)
-      action_dispatch.default_headers = {
-        "X-Frame-Options" => "SAMEORIGIN",
-        "X-XSS-Protection" => "0",
-        "X-Content-Type-Options" => "nosniff",
-        "X-Permitted-Cross-Domain-Policies" => "none",
-        "Referrer-Policy" => "strict-origin-when-cross-origin"
-      }
-      action_dispatch.debug_exception_log_level = :error
-    end
-
-    if respond_to?(:active_job)
-      active_job.use_big_decimal_serializer = true
-    end
-
-    if respond_to?(:active_support)
-      active_support.cache_format_version = 7.1
-      active_support.message_serializer = :json_allow_marshal
-      active_support.use_message_serializer_for_metadata = true
-      active_support.raise_on_invalid_cache_expiration_time = true
-    end
-
-    if respond_to?(:action_controller)
-      action_controller.allow_deprecated_parameters_hash_equality = false
-    end
-
-    if defined?(Rails::HTML::Sanitizer) # nested ifs to avoid linter errors
-      if respond_to?(:action_view)
-        action_view.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor
-      end
-
-      if respond_to?(:action_text)
-        action_text.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor
-      end
-    end
-  else
-    raise "Unknown version #{target_version.to_s.inspect}"
-  end
-
-  @loaded_config_version = target_version
-end
-
-
- -

+ See on GitHub + + + +

@@ -1525,34 +1525,34 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application/configuration.rb, line 388
+      def paths
+        @paths ||= begin
+          paths = super
+          paths.add "config/database",    with: "config/database.yml"
+          paths.add "config/secrets",     with: "config", glob: "secrets.yml{,.enc}"
+          paths.add "config/environment", with: "config/environment.rb"
+          paths.add "lib/templates"
+          paths.add "log",                with: "log/#{Rails.env}.log"
+          paths.add "public"
+          paths.add "public/javascripts"
+          paths.add "public/stylesheets"
+          paths.add "tmp"
+          paths
+        end
+      end
- -
-
# File railties/lib/rails/application/configuration.rb, line 388
-def paths
-  @paths ||= begin
-    paths = super
-    paths.add "config/database",    with: "config/database.yml"
-    paths.add "config/secrets",     with: "config", glob: "secrets.yml{,.enc}"
-    paths.add "config/environment", with: "config/environment.rb"
-    paths.add "lib/templates"
-    paths.add "log",                with: "log/#{Rails.env}.log"
-    paths.add "public"
-    paths.add "public/javascripts"
-    paths.add "public/stylesheets"
-    paths.add "tmp"
-    paths
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1572,26 +1572,26 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application/configuration.rb, line 546
+      def permissions_policy(&block)
+        if block_given?
+          @permissions_policy = ActionDispatch::PermissionsPolicy.new(&block)
+        else
+          @permissions_policy
+        end
+      end
- -
-
# File railties/lib/rails/application/configuration.rb, line 546
-def permissions_policy(&block)
-  if block_given?
-    @permissions_policy = ActionDispatch::PermissionsPolicy.new(&block)
-  else
-    @permissions_policy
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1611,22 +1611,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application/configuration.rb, line 339
+      def reloading_enabled?
+        enable_reloading
+      end
- -
-
# File railties/lib/rails/application/configuration.rb, line 339
-def reloading_enabled?
-  enable_reloading
-end
-
-
- -

+ See on GitHub + + + +

@@ -1658,34 +1658,34 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application/configuration.rb, line 512
+      def session_store(new_session_store = nil, **options)
+        if new_session_store
+          @session_store = new_session_store
+          @session_options = options || {}
+        else
+          case @session_store
+          when :disabled
+            nil
+          when Symbol
+            ActionDispatch::Session.resolve_store(@session_store)
+          else
+            @session_store
+          end
+        end
+      end
- -
-
# File railties/lib/rails/application/configuration.rb, line 512
-def session_store(new_session_store = nil, **options)
-  if new_session_store
-    @session_store = new_session_store
-    @session_options = options || {}
-  else
-    case @session_store
-    when :disabled
-      nil
-    when Symbol
-      ActionDispatch::Session.resolve_store(@session_store)
-    else
-      @session_store
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/Application/DefaultMiddlewareStack.html b/src/classes/Rails/Application/DefaultMiddlewareStack.html index c5a9690a06..8b76d059c3 100644 --- a/src/classes/Rails/Application/DefaultMiddlewareStack.html +++ b/src/classes/Rails/Application/DefaultMiddlewareStack.html @@ -114,24 +114,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application/default_middleware_stack.rb, line 8
+      def initialize(app, config, paths)
+        @app = app
+        @config = config
+        @paths = paths
+      end
- -
-
# File railties/lib/rails/application/default_middleware_stack.rb, line 8
-def initialize(app, config, paths)
-  @app = app
-  @config = config
-  @paths = paths
-end
-
-
- - + See on GitHub + + + + @@ -155,112 +155,112 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application/default_middleware_stack.rb, line 14
+      def build_stack
+        ActionDispatch::MiddlewareStack.new do |middleware|
+          unless Array(config.hosts).empty?
+            middleware.use ::ActionDispatch::HostAuthorization, config.hosts, **config.host_authorization
+          end
+
+          if config.assume_ssl
+            middleware.use ::ActionDispatch::AssumeSSL
+          end
+
+          if config.force_ssl
+            middleware.use ::ActionDispatch::SSL, **config.ssl_options,
+              ssl_default_redirect_status: config.action_dispatch.ssl_default_redirect_status
+          end
+
+          middleware.use ::Rack::Sendfile, config.action_dispatch.x_sendfile_header
+
+          if config.public_file_server.enabled
+            headers = config.public_file_server.headers || {}
+
+            middleware.use ::ActionDispatch::Static, paths["public"].first, index: config.public_file_server.index_name, headers: headers
+          end
+
+          if rack_cache = load_rack_cache
+            require "action_dispatch/http/rack_cache"
+            middleware.use ::Rack::Cache, rack_cache
+          end
+
+          if config.allow_concurrency == false
+            # User has explicitly opted out of concurrent request
+            # handling: presumably their code is not threadsafe
+
+            middleware.use ::Rack::Lock
+          end
+
+          middleware.use ::ActionDispatch::Executor, app.executor
+
+          middleware.use ::ActionDispatch::ServerTiming if config.server_timing
+          middleware.use ::Rack::Runtime
+          middleware.use ::Rack::MethodOverride unless config.api_only
+          middleware.use ::ActionDispatch::RequestId, header: config.action_dispatch.request_id_header
+          middleware.use ::ActionDispatch::RemoteIp, config.action_dispatch.ip_spoofing_check, config.action_dispatch.trusted_proxies
+
+          middleware.use ::Rails::Rack::Logger, config.log_tags
+          middleware.use ::ActionDispatch::ShowExceptions, show_exceptions_app
+          middleware.use ::ActionDispatch::DebugExceptions, app, config.debug_exception_response_format
+
+          if config.consider_all_requests_local
+            middleware.use ::ActionDispatch::ActionableExceptions
+          end
+
+          if config.reloading_enabled?
+            middleware.use ::ActionDispatch::Reloader, app.reloader
+          end
+
+          middleware.use ::ActionDispatch::Callbacks
+          middleware.use ::ActionDispatch::Cookies unless config.api_only
+
+          if !config.api_only && config.session_store
+            if config.force_ssl && config.ssl_options.fetch(:secure_cookies, true) && !config.session_options.key?(:secure)
+              config.session_options[:secure] = true
+            end
+            middleware.use config.session_store, config.session_options
+          end
+
+          unless config.api_only
+            middleware.use ::ActionDispatch::Flash
+            middleware.use ::ActionDispatch::ContentSecurityPolicy::Middleware
+            middleware.use ::ActionDispatch::PermissionsPolicy::Middleware
+          end
+
+          middleware.use ::Rack::Head
+          middleware.use ::Rack::ConditionalGet
+          middleware.use ::Rack::ETag, "no-cache"
+
+          middleware.use ::Rack::TempfileReaper unless config.api_only
+
+          if config.respond_to?(:active_record)
+            if selector_options = config.active_record.database_selector
+              resolver = config.active_record.database_resolver
+              context = config.active_record.database_resolver_context
+
+              middleware.use ::ActiveRecord::Middleware::DatabaseSelector, resolver, context, selector_options
+            end
+
+            if shard_resolver = config.active_record.shard_resolver
+              options = config.active_record.shard_selector || {}
+
+              middleware.use ::ActiveRecord::Middleware::ShardSelector, shard_resolver, options
+            end
+          end
+        end
+      end
- -
-
# File railties/lib/rails/application/default_middleware_stack.rb, line 14
-def build_stack
-  ActionDispatch::MiddlewareStack.new do |middleware|
-    unless Array(config.hosts).empty?
-      middleware.use ::ActionDispatch::HostAuthorization, config.hosts, **config.host_authorization
-    end
-
-    if config.assume_ssl
-      middleware.use ::ActionDispatch::AssumeSSL
-    end
-
-    if config.force_ssl
-      middleware.use ::ActionDispatch::SSL, **config.ssl_options,
-        ssl_default_redirect_status: config.action_dispatch.ssl_default_redirect_status
-    end
-
-    middleware.use ::Rack::Sendfile, config.action_dispatch.x_sendfile_header
-
-    if config.public_file_server.enabled
-      headers = config.public_file_server.headers || {}
-
-      middleware.use ::ActionDispatch::Static, paths["public"].first, index: config.public_file_server.index_name, headers: headers
-    end
-
-    if rack_cache = load_rack_cache
-      require "action_dispatch/http/rack_cache"
-      middleware.use ::Rack::Cache, rack_cache
-    end
-
-    if config.allow_concurrency == false
-      # User has explicitly opted out of concurrent request
-      # handling: presumably their code is not threadsafe
-
-      middleware.use ::Rack::Lock
-    end
-
-    middleware.use ::ActionDispatch::Executor, app.executor
-
-    middleware.use ::ActionDispatch::ServerTiming if config.server_timing
-    middleware.use ::Rack::Runtime
-    middleware.use ::Rack::MethodOverride unless config.api_only
-    middleware.use ::ActionDispatch::RequestId, header: config.action_dispatch.request_id_header
-    middleware.use ::ActionDispatch::RemoteIp, config.action_dispatch.ip_spoofing_check, config.action_dispatch.trusted_proxies
-
-    middleware.use ::Rails::Rack::Logger, config.log_tags
-    middleware.use ::ActionDispatch::ShowExceptions, show_exceptions_app
-    middleware.use ::ActionDispatch::DebugExceptions, app, config.debug_exception_response_format
-
-    if config.consider_all_requests_local
-      middleware.use ::ActionDispatch::ActionableExceptions
-    end
-
-    if config.reloading_enabled?
-      middleware.use ::ActionDispatch::Reloader, app.reloader
-    end
-
-    middleware.use ::ActionDispatch::Callbacks
-    middleware.use ::ActionDispatch::Cookies unless config.api_only
-
-    if !config.api_only && config.session_store
-      if config.force_ssl && config.ssl_options.fetch(:secure_cookies, true) && !config.session_options.key?(:secure)
-        config.session_options[:secure] = true
-      end
-      middleware.use config.session_store, config.session_options
-    end
-
-    unless config.api_only
-      middleware.use ::ActionDispatch::Flash
-      middleware.use ::ActionDispatch::ContentSecurityPolicy::Middleware
-      middleware.use ::ActionDispatch::PermissionsPolicy::Middleware
-    end
-
-    middleware.use ::Rack::Head
-    middleware.use ::Rack::ConditionalGet
-    middleware.use ::Rack::ETag, "no-cache"
-
-    middleware.use ::Rack::TempfileReaper unless config.api_only
-
-    if config.respond_to?(:active_record)
-      if selector_options = config.active_record.database_selector
-        resolver = config.active_record.database_resolver
-        context = config.active_record.database_resolver_context
-
-        middleware.use ::ActiveRecord::Middleware::DatabaseSelector, resolver, context, selector_options
-      end
-
-      if shard_resolver = config.active_record.shard_resolver
-        options = config.active_record.shard_selector || {}
-
-        middleware.use ::ActiveRecord::Middleware::ShardSelector, shard_resolver, options
-      end
-    end
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/Rails/Application/Finisher/InterlockHook.html b/src/classes/Rails/Application/Finisher/InterlockHook.html deleted file mode 100644 index e07c656c50..0000000000 --- a/src/classes/Rails/Application/Finisher/InterlockHook.html +++ /dev/null @@ -1,140 +0,0 @@ ---- -title: Rails::Application::Finisher::InterlockHook -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - complete(_state) - -

- - -
- -
- - - - - - - - -
- - -
-
# File railties/lib/rails/application/finisher.rb, line 162
-def self.complete(_state)
-  ActiveSupport::Dependencies.interlock.done_running
-end
-
-
- -
- -
-

- - run() - -

- - -
- -
- - - - - - - - -
- - -
-
# File railties/lib/rails/application/finisher.rb, line 158
-def self.run
-  ActiveSupport::Dependencies.interlock.start_running
-end
-
-
- -
- - - - - -
- -
-
diff --git a/src/classes/Rails/Application/Finisher/MutexHook.html b/src/classes/Rails/Application/Finisher/MutexHook.html deleted file mode 100644 index 1598f6253a..0000000000 --- a/src/classes/Rails/Application/Finisher/MutexHook.html +++ /dev/null @@ -1,188 +0,0 @@ ---- -title: Rails::Application::Finisher::MutexHook -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - -

Class Public methods

- -
-

- - new(mutex = Mutex.new) - -

- - -
- -
- - - - - - - - -
- - -
-
# File railties/lib/rails/application/finisher.rb, line 144
-def initialize(mutex = Mutex.new)
-  @mutex = mutex
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - complete(_state) - -

- - -
- -
- - - - - - - - -
- - -
-
# File railties/lib/rails/application/finisher.rb, line 152
-def complete(_state)
-  @mutex.unlock
-end
-
-
- -
- -
-

- - run() - -

- - -
- -
- - - - - - - - -
- - -
-
# File railties/lib/rails/application/finisher.rb, line 148
-def run
-  @mutex.lock
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/Rails/Application/RoutesReloader.html b/src/classes/Rails/Application/RoutesReloader.html index f5b1de8f7a..a104e25aef 100644 --- a/src/classes/Rails/Application/RoutesReloader.html +++ b/src/classes/Rails/Application/RoutesReloader.html @@ -136,25 +136,25 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application/routes_reloader.rb, line 15
+      def initialize
+        @paths      = []
+        @route_sets = []
+        @external_routes = []
+        @eager_load = false
+      end
- -
-
# File railties/lib/rails/application/routes_reloader.rb, line 15
-def initialize
-  @paths      = []
-  @route_sets = []
-  @external_routes = []
-  @eager_load = false
-end
-
-
- - + See on GitHub + + + + @@ -178,27 +178,27 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/application/routes_reloader.rb, line 22
+      def reload!
+        clear!
+        load_paths
+        finalize!
+        route_sets.each(&:eager_load!) if eager_load
+      ensure
+        revert
+      end
- -
-
# File railties/lib/rails/application/routes_reloader.rb, line 22
-def reload!
-  clear!
-  load_paths
-  finalize!
-  route_sets.each(&:eager_load!) if eager_load
-ensure
-  revert
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/Rails/BacktraceCleaner.html b/src/classes/Rails/BacktraceCleaner.html deleted file mode 100644 index ad61023600..0000000000 --- a/src/classes/Rails/BacktraceCleaner.html +++ /dev/null @@ -1,149 +0,0 @@ ---- -title: Rails::BacktraceCleaner -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

-
    - -
  • - new -
  • - -
- - - - - - - - - - - -

Constants

- - - - - - - - - - - - - - - - - - - - - - - - - - -
APP_DIRS_PATTERN=/\A(?:\.\/)?(?:app|config|lib|test|\(\w*\))/
 
RENDER_TEMPLATE_PATTERN=/:in `.*_\w+_{2,3}\d+_\d+'/
 
- - - - - - -

Class Public methods

- -
-

- - new() - -

- - -
- -
- - - - - - - - -
- - -
-
# File railties/lib/rails/backtrace_cleaner.rb, line 11
-def initialize
-  super
-  @root = "#{Rails.root}/"
-  add_filter do |line|
-    line.start_with?(@root) ? line.from(@root.size) : line
-  end
-  add_filter do |line|
-    if RENDER_TEMPLATE_PATTERN.match?(line)
-      line.sub(RENDER_TEMPLATE_PATTERN, "")
-    else
-      line
-    end
-  end
-  add_silencer { |line| !APP_DIRS_PATTERN.match?(line) }
-end
-
-
- -
- - - - - -
- -
-
diff --git a/src/classes/Rails/Command.html b/src/classes/Rails/Command.html index f1335fa845..c3814367e3 100644 --- a/src/classes/Rails/Command.html +++ b/src/classes/Rails/Command.html @@ -214,41 +214,41 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/command.rb, line 62
+      def invoke(full_namespace, args = [], **config)
+        args = ["--help"] if rails_new_with_no_path?(args)
+
+        full_namespace = full_namespace.to_s
+        namespace, command_name = split_namespace(full_namespace)
+        command = find_by_namespace(namespace, command_name)
+
+        with_argv(args) do
+          if command && command.all_commands[command_name]
+            command.perform(command_name, args, config)
+          else
+            invoke_rake(full_namespace, args, config)
+          end
+        end
+      rescue UnrecognizedCommandError => error
+        if error.name == full_namespace && command && command_name == full_namespace
+          command.perform("help", [], config)
+        else
+          puts error.detailed_message
+        end
+        exit(1)
+      end
- -
-
# File railties/lib/rails/command.rb, line 62
-def invoke(full_namespace, args = [], **config)
-  args = ["--help"] if rails_new_with_no_path?(args)
-
-  full_namespace = full_namespace.to_s
-  namespace, command_name = split_namespace(full_namespace)
-  command = find_by_namespace(namespace, command_name)
-
-  with_argv(args) do
-    if command && command.all_commands[command_name]
-      command.perform(command_name, args, config)
-    else
-      invoke_rake(full_namespace, args, config)
-    end
-  end
-rescue UnrecognizedCommandError => error
-  if error.name == full_namespace && command && command_name == full_namespace
-    command.perform("help", [], config)
-  else
-    puts error.detailed_message
-  end
-  exit(1)
-end
-
-
- - + See on GitHub + + + +

@@ -268,26 +268,26 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/command.rb, line 108
+      def root
+        if defined?(ENGINE_ROOT)
+          Pathname.new(ENGINE_ROOT)
+        else
+          application_root
+        end
+      end
- -
-
# File railties/lib/rails/command.rb, line 108
-def root
-  if defined?(ENGINE_ROOT)
-    Pathname.new(ENGINE_ROOT)
-  else
-    application_root
-  end
-end
-
-
- -

+ See on GitHub + + + +

Class Private methods

@@ -310,22 +310,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/command.rb, line 159
+        def command_type # :doc:
+          @command_type ||= "command"
+        end
- -
-
# File railties/lib/rails/command.rb, line 159
-def command_type # :doc:
-  @command_type ||= "command"
-end
-
-
- - + See on GitHub + + + +

@@ -345,22 +345,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/command.rb, line 167
+        def file_lookup_paths # :doc:
+          @file_lookup_paths ||= [ "{#{lookup_paths.join(',')}}", "**", "*_command.rb" ]
+        end
- -
-
# File railties/lib/rails/command.rb, line 167
-def file_lookup_paths # :doc:
-  @file_lookup_paths ||= [ "{#{lookup_paths.join(',')}}", "**", "*_command.rb" ]
-end
-
-
- -

+ See on GitHub + + + +

@@ -380,22 +380,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/command.rb, line 163
+        def lookup_paths # :doc:
+          @lookup_paths ||= %w( rails/commands commands )
+        end
- -
-
# File railties/lib/rails/command.rb, line 163
-def lookup_paths # :doc:
-  @lookup_paths ||= %w( rails/commands commands )
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/Command/Actions.html b/src/classes/Rails/Command/Actions.html index 18ca946d2e..3648513546 100644 --- a/src/classes/Rails/Command/Actions.html +++ b/src/classes/Rails/Command/Actions.html @@ -95,23 +95,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/command/actions.rb, line 18
+      def boot_application!
+        require_application!
+        Rails.application.require_environment! if defined?(APP_PATH)
+      end
- -
-
# File railties/lib/rails/command/actions.rb, line 18
-def boot_application!
-  require_application!
-  Rails.application.require_environment! if defined?(APP_PATH)
-end
-
-
- - + See on GitHub + + + +

@@ -131,25 +131,25 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/command/actions.rb, line 23
+      def load_environment_config!
+        require_application!
+        # Only run initializers that are in the :all group, which includes the
+        # :load_environment_config initializer.
+        Rails.application.initialize!(:_) if defined?(APP_PATH)
+      end
- -
-
# File railties/lib/rails/command/actions.rb, line 23
-def load_environment_config!
-  require_application!
-  # Only run initializers that are in the :all group, which includes the
-  # :load_environment_config initializer.
-  Rails.application.initialize!(:_) if defined?(APP_PATH)
-end
-
-
- -

+ See on GitHub + + + +

@@ -169,24 +169,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/command/actions.rb, line 36
+        def load_generators
+          engine = ::Rails::Engine.find(ENGINE_ROOT)
+          Rails::Generators.namespace = engine.railtie_namespace
+          engine.load_generators
+        end
- -
-
# File railties/lib/rails/command/actions.rb, line 36
-def load_generators
-  engine = ::Rails::Engine.find(ENGINE_ROOT)
-  Rails::Generators.namespace = engine.railtie_namespace
-  engine.load_generators
-end
-
-
- -

+ See on GitHub + + + +

@@ -206,23 +206,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/command/actions.rb, line 31
+        def load_tasks
+          Rake.application.init("rails")
+          Rake.application.load_rakefile
+        end
- -
-
# File railties/lib/rails/command/actions.rb, line 31
-def load_tasks
-  Rake.application.init("rails")
-  Rake.application.load_rakefile
-end
-
-
- -

+ See on GitHub + + + +

@@ -242,23 +242,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/command/actions.rb, line 13
+      def require_application!
+        require ENGINE_PATH if defined?(ENGINE_PATH)
+        require APP_PATH if defined?(APP_PATH)
+      end
- -
-
# File railties/lib/rails/command/actions.rb, line 13
-def require_application!
-  require ENGINE_PATH if defined?(ENGINE_PATH)
-  require APP_PATH if defined?(APP_PATH)
-end
-
-
- -

+ See on GitHub + + + +

@@ -278,22 +278,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/command/actions.rb, line 9
+      def set_application_directory!
+        Dir.chdir(File.expand_path("../..", APP_PATH)) unless File.exist?(File.expand_path("config.ru"))
+      end
- -
-
# File railties/lib/rails/command/actions.rb, line 9
-def set_application_directory!
-  Dir.chdir(File.expand_path("../..", APP_PATH)) unless File.exist?(File.expand_path("config.ru"))
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/Command/Base.html b/src/classes/Rails/Command/Base.html index d9de6c2ed1..6152959548 100644 --- a/src/classes/Rails/Command/Base.html +++ b/src/classes/Rails/Command/Base.html @@ -134,29 +134,29 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/command/base.rb, line 86
+        def banner(command = nil, *)
+          if command
+            # Similar to Thor's banner, but show the namespace (minus the
+            # "rails:" prefix), and show the command's declared bin instead of
+            # the command runner.
+            command.formatted_usage(self).gsub(/^#{namespace}:(\w+)/) { executable($1) }
+          else
+            executable
+          end
+        end
- -
-
# File railties/lib/rails/command/base.rb, line 86
-def banner(command = nil, *)
-  if command
-    # Similar to Thor's banner, but show the namespace (minus the
-    # "rails:" prefix), and show the command's declared bin instead of
-    # the command runner.
-    command.formatted_usage(self).gsub(/^#{namespace}:(\w+)/) { executable($1) }
-  else
-    executable
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -179,24 +179,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/command/base.rb, line 106
+        def base_name
+          @base_name ||= if base = name.to_s.split("::").first
+            base.underscore
+          end
+        end
- -
-
# File railties/lib/rails/command/base.rb, line 106
-def base_name
-  @base_name ||= if base = name.to_s.split("::").first
-    base.underscore
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -219,25 +219,25 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/command/base.rb, line 115
+        def command_name
+          @command_name ||= if command = name.to_s.split("::").last
+            command.chomp!("Command")
+            command.underscore
+          end
+        end
- -
-
# File railties/lib/rails/command/base.rb, line 115
-def command_name
-  @command_name ||= if command = name.to_s.split("::").last
-    command.chomp!("Command")
-    command.underscore
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -259,23 +259,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/command/base.rb, line 139
+        def default_command_root
+          @default_command_root = resolve_path(".") unless defined?(@default_command_root)
+          @default_command_root
+        end
- -
-
# File railties/lib/rails/command/base.rb, line 139
-def default_command_root
-  @default_command_root = resolve_path(".") unless defined?(@default_command_root)
-  @default_command_root
-end
-
-
- -

+ See on GitHub + + + +

@@ -295,26 +295,26 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/command/base.rb, line 34
+        def desc(usage = nil, description = nil, options = {})
+          if usage
+            super
+          else
+            class_usage
+          end
+        end
- -
-
# File railties/lib/rails/command/base.rb, line 34
-def desc(usage = nil, description = nil, options = {})
-  if usage
-    super
-  else
-    class_usage
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -334,22 +334,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/command/base.rb, line 28
+        def engine?
+          defined?(ENGINE_ROOT)
+        end
- -
-
# File railties/lib/rails/command/base.rb, line 28
-def engine?
-  defined?(ENGINE_ROOT)
-end
-
-
- -

+ See on GitHub + + + +

@@ -369,22 +369,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/command/base.rb, line 82
+        def executable(command_name = self.command_name)
+          "#{bin} #{namespaced_name(command_name)}"
+        end
- -
-
# File railties/lib/rails/command/base.rb, line 82
-def executable(command_name = self.command_name)
-  "#{bin} #{namespaced_name(command_name)}"
-end
-
-
- -

+ See on GitHub + + + +

@@ -404,22 +404,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/command/base.rb, line 55
+        def hide_command!
+          Rails::Command.hidden_commands << self
+        end
- -
-
# File railties/lib/rails/command/base.rb, line 55
-def hide_command!
-  Rails::Command.hidden_commands << self
-end
-
-
- -

+ See on GitHub + + + +

@@ -439,26 +439,26 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/command/base.rb, line 45
+        def namespace(name = nil)
+          if name
+            super
+          else
+            @namespace ||= super.chomp("_command").sub(/:command:/, ":")
+          end
+        end
- -
-
# File railties/lib/rails/command/base.rb, line 45
-def namespace(name = nil)
-  if name
-    super
-  else
-    @namespace ||= super.chomp("_command").sub(/:command:/, ":")
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -478,24 +478,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/command/base.rb, line 76
+        def printing_commands
+          commands.filter_map do |name, command|
+            [namespaced_name(name), command.description] unless command.hidden?
+          end
+        end
- -
-
# File railties/lib/rails/command/base.rb, line 76
-def printing_commands
-  commands.filter_map do |name, command|
-    [namespaced_name(name), command.description] unless command.hidden?
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -515,23 +515,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/command/base.rb, line 129
+        def usage_path
+          @usage_path = resolve_path("USAGE") unless defined?(@usage_path)
+          @usage_path
+        end
- -
-
# File railties/lib/rails/command/base.rb, line 129
-def usage_path
-  @usage_path = resolve_path("USAGE") unless defined?(@usage_path)
-  @usage_path
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/Command/UnusedRoutesCommand/RouteInfo.html b/src/classes/Rails/Command/UnusedRoutesCommand/RouteInfo.html index f8d163bc69..4c8d5608da 100644 --- a/src/classes/Rails/Command/UnusedRoutesCommand/RouteInfo.html +++ b/src/classes/Rails/Command/UnusedRoutesCommand/RouteInfo.html @@ -84,25 +84,25 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/commands/unused_routes/unused_routes_command.rb, line 13
+        def initialize(route)
+          requirements = route.requirements
+          @controller_name = requirements[:controller]
+          @action_name = requirements[:action]
+          @controller_class = (@controller_name.to_s.camelize + "Controller").safe_constantize
+        end
- -
-
# File railties/lib/rails/commands/unused_routes/unused_routes_command.rb, line 13
-def initialize(route)
-  requirements = route.requirements
-  @controller_name = requirements[:controller]
-  @action_name = requirements[:action]
-  @controller_class = (@controller_name.to_s.camelize + "Controller").safe_constantize
-end
-
-
- - + See on GitHub + + + + @@ -126,22 +126,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/commands/unused_routes/unused_routes_command.rb, line 20
+        def unused?
+          controller_class_missing? || (action_missing? && template_missing?)
+        end
- -
-
# File railties/lib/rails/commands/unused_routes/unused_routes_command.rb, line 20
-def unused?
-  controller_class_missing? || (action_missing? && template_missing?)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/Rails/Conductor.html b/src/classes/Rails/Conductor.html deleted file mode 100644 index deffd8b1fc..0000000000 --- a/src/classes/Rails/Conductor.html +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: Rails::Conductor -layout: default ---- - diff --git a/src/classes/Rails/Configuration/MiddlewareStackProxy.html b/src/classes/Rails/Configuration/MiddlewareStackProxy.html index c6b8022d76..b714906f14 100644 --- a/src/classes/Rails/Configuration/MiddlewareStackProxy.html +++ b/src/classes/Rails/Configuration/MiddlewareStackProxy.html @@ -183,23 +183,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/configuration.rb, line 47
+      def initialize(operations = [], delete_operations = [])
+        @operations = operations
+        @delete_operations = delete_operations
+      end
- -
-
# File railties/lib/rails/configuration.rb, line 47
-def initialize(operations = [], delete_operations = [])
-  @operations = operations
-  @delete_operations = delete_operations
-end
-
-
- - + See on GitHub + + + + @@ -223,22 +223,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/configuration.rb, line 70
+      def delete(...)
+        @delete_operations << -> middleware { middleware.delete(...) }
+      end
- -
-
# File railties/lib/rails/configuration.rb, line 70
-def delete(...)
-  @delete_operations << -> middleware { middleware.delete(...) }
-end
-
-
- - + See on GitHub + + + +

@@ -262,7 +262,8 @@

-

+ +

@@ -282,22 +283,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/configuration.rb, line 58
+      def insert_after(...)
+        @operations << -> middleware { middleware.insert_after(...) }
+      end
- -
-
# File railties/lib/rails/configuration.rb, line 58
-def insert_after(...)
-  @operations << -> middleware { middleware.insert_after(...) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -321,22 +322,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/configuration.rb, line 52
+      def insert_before(...)
+        @operations << -> middleware { middleware.insert_before(...) }
+      end
- -
-
# File railties/lib/rails/configuration.rb, line 52
-def insert_before(...)
-  @operations << -> middleware { middleware.insert_before(...) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -360,7 +361,8 @@

-

+ +

@@ -380,22 +382,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/configuration.rb, line 80
+      def move_after(...)
+        @delete_operations << -> middleware { middleware.move_after(...) }
+      end
- -
-
# File railties/lib/rails/configuration.rb, line 80
-def move_after(...)
-  @delete_operations << -> middleware { middleware.move_after(...) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -419,22 +421,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/configuration.rb, line 74
+      def move_before(...)
+        @delete_operations << -> middleware { middleware.move_before(...) }
+      end
- -
-
# File railties/lib/rails/configuration.rb, line 74
-def move_before(...)
-  @delete_operations << -> middleware { middleware.move_before(...) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -454,22 +456,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/configuration.rb, line 62
+      def swap(...)
+        @operations << -> middleware { middleware.swap(...) }
+      end
- -
-
# File railties/lib/rails/configuration.rb, line 62
-def swap(...)
-  @operations << -> middleware { middleware.swap(...) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -489,22 +491,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/configuration.rb, line 84
+      def unshift(...)
+        @operations << -> middleware { middleware.unshift(...) }
+      end
- -
-
# File railties/lib/rails/configuration.rb, line 84
-def unshift(...)
-  @operations << -> middleware { middleware.unshift(...) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -524,22 +526,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/configuration.rb, line 66
+      def use(...)
+        @operations << -> middleware { middleware.use(...) }
+      end
- -
-
# File railties/lib/rails/configuration.rb, line 66
-def use(...)
-  @operations << -> middleware { middleware.use(...) }
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/Console.html b/src/classes/Rails/Console.html index 07772a4aa9..e89e4b8bd8 100644 --- a/src/classes/Rails/Console.html +++ b/src/classes/Rails/Console.html @@ -147,45 +147,45 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/commands/console/console_command.rb, line 21
+    def initialize(app, options = {})
+      @app     = app
+      @options = options
+
+      app.sandbox = sandbox?
+
+      if sandbox? && app.config.disable_sandbox
+        puts "Error: Unable to start console in sandbox mode as sandbox mode is disabled (config.disable_sandbox is true)."
+        exit 1
+      end
+
+      app.load_console
+
+      @console = app.config.console || begin
+        require "irb"
+        require "irb/completion"
+
+        IRB::WorkSpace.prepend(BacktraceCleaner)
+
+        if !Rails.env.local?
+          ENV["IRB_USE_AUTOCOMPLETE"] ||= "false"
+        end
+
+        IRB
+      end
+    end
- -
-
# File railties/lib/rails/commands/console/console_command.rb, line 21
-def initialize(app, options = {})
-  @app     = app
-  @options = options
-
-  app.sandbox = sandbox?
-
-  if sandbox? && app.config.disable_sandbox
-    puts "Error: Unable to start console in sandbox mode as sandbox mode is disabled (config.disable_sandbox is true)."
-    exit 1
-  end
-
-  app.load_console
-
-  @console = app.config.console || begin
-    require "irb"
-    require "irb/completion"
-
-    IRB::WorkSpace.prepend(BacktraceCleaner)
-
-    if !Rails.env.local?
-      ENV["IRB_USE_AUTOCOMPLETE"] ||= "false"
-    end
-
-    IRB
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -205,22 +205,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/commands/console/console_command.rb, line 15
+    def self.start(*args)
+      new(*args).start
+    end
- -
-
# File railties/lib/rails/commands/console/console_command.rb, line 15
-def self.start(*args)
-  new(*args).start
-end
-
-
- -

+ See on GitHub + + + + @@ -248,22 +248,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/commands/console/console_command.rb, line 56
+    def environment
+      options[:environment]
+    end
- -
-
# File railties/lib/rails/commands/console/console_command.rb, line 56
-def environment
-  options[:environment]
-end
-
-
- - + See on GitHub + + + +

@@ -287,7 +287,8 @@

-

+ +

@@ -307,26 +308,26 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/commands/console/console_command.rb, line 48
+    def sandbox?
+      return options[:sandbox] if !options[:sandbox].nil?
+
+      return false if Rails.env.local?
+
+      app.config.sandbox_by_default
+    end
- -
-
# File railties/lib/rails/commands/console/console_command.rb, line 48
-def sandbox?
-  return options[:sandbox] if !options[:sandbox].nil?
-
-  return false if Rails.env.local?
-
-  app.config.sandbox_by_default
-end
-
-
- -

+ See on GitHub + + + +

@@ -346,22 +347,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/commands/console/console_command.rb, line 61
+    def set_environment!
+      Rails.env = environment
+    end
- -
-
# File railties/lib/rails/commands/console/console_command.rb, line 61
-def set_environment!
-  Rails.env = environment
-end
-
-
- -

+ See on GitHub + + + +

@@ -381,34 +382,34 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/commands/console/console_command.rb, line 65
+    def start
+      set_environment! if environment?
+
+      if sandbox?
+        puts "Loading #{Rails.env} environment in sandbox (Rails #{Rails.version})"
+        puts "Any modifications you make will be rolled back on exit"
+      else
+        puts "Loading #{Rails.env} environment (Rails #{Rails.version})"
+      end
+
+      if defined?(console::ExtendCommandBundle)
+        console::ExtendCommandBundle.include(Rails::ConsoleMethods)
+      end
+      console.start
+    end
- -
-
# File railties/lib/rails/commands/console/console_command.rb, line 65
-def start
-  set_environment! if environment?
-
-  if sandbox?
-    puts "Loading #{Rails.env} environment in sandbox (Rails #{Rails.version})"
-    puts "Any modifications you make will be rolled back on exit"
-  else
-    puts "Loading #{Rails.env} environment (Rails #{Rails.version})"
-  end
-
-  if defined?(console::ExtendCommandBundle)
-    console::ExtendCommandBundle.include(Rails::ConsoleMethods)
-  end
-  console.start
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/Console/BacktraceCleaner.html b/src/classes/Rails/Console/BacktraceCleaner.html index df4443d6c9..2bc8bbbb4d 100644 --- a/src/classes/Rails/Console/BacktraceCleaner.html +++ b/src/classes/Rails/Console/BacktraceCleaner.html @@ -75,24 +75,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/commands/console/console_command.rb, line 8
+      def filter_backtrace(bt)
+        if result = super
+          Rails.backtrace_cleaner.filter([result]).first
+        end
+      end
- -
-
# File railties/lib/rails/commands/console/console_command.rb, line 8
-def filter_backtrace(bt)
-  if result = super
-    Rails.backtrace_cleaner.filter([result]).first
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/Rails/ConsoleMethods.html b/src/classes/Rails/ConsoleMethods.html index bc88e6f6b7..a6299fbe01 100644 --- a/src/classes/Rails/ConsoleMethods.html +++ b/src/classes/Rails/ConsoleMethods.html @@ -93,23 +93,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/console/app.rb, line 10
+    def app(create = false)
+      @app_integration_instance = nil if create
+      @app_integration_instance ||= new_session
+    end
- -
-
# File railties/lib/rails/console/app.rb, line 10
-def app(create = false)
-  @app_integration_instance = nil if create
-  @app_integration_instance ||= new_session
-end
-
-
- - + See on GitHub + + + +

@@ -131,22 +131,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/console/helpers.rb, line 15
+    def controller
+      @controller ||= ApplicationController.new
+    end
- -
-
# File railties/lib/rails/console/helpers.rb, line 15
-def controller
-  @controller ||= ApplicationController.new
-end
-
-
- -

+ See on GitHub + + + +

@@ -168,22 +168,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/console/helpers.rb, line 8
+    def helper
+      ApplicationController.helpers
+    end
- -
-
# File railties/lib/rails/console/helpers.rb, line 8
-def helper
-  ApplicationController.helpers
-end
-
-
- -

+ See on GitHub + + + +

@@ -203,29 +203,29 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/console/app.rb, line 17
+    def new_session
+      app = Rails.application
+      session = ActionDispatch::Integration::Session.new(app)
+
+      # This makes app.url_for and app.foo_path available in the console
+      session.extend(app.routes.url_helpers)
+      session.extend(app.routes.mounted_helpers)
+
+      session
+    end
- -
-
# File railties/lib/rails/console/app.rb, line 17
-def new_session
-  app = Rails.application
-  session = ActionDispatch::Integration::Session.new(app)
-
-  # This makes app.url_for and app.foo_path available in the console
-  session.extend(app.routes.url_helpers)
-  session.extend(app.routes.mounted_helpers)
-
-  session
-end
-
-
- -

+ See on GitHub + + + +

@@ -245,24 +245,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/console/app.rb, line 29
+    def reload!(print = true)
+      puts "Reloading..." if print
+      Rails.application.reloader.reload!
+      true
+    end
- -
-
# File railties/lib/rails/console/app.rb, line 29
-def reload!(print = true)
-  puts "Reloading..." if print
-  Rails.application.reloader.reload!
-  true
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/DBConsole.html b/src/classes/Rails/DBConsole.html index 5c1e3c4de2..6273a5d540 100644 --- a/src/classes/Rails/DBConsole.html +++ b/src/classes/Rails/DBConsole.html @@ -108,23 +108,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/commands/dbconsole/dbconsole_command.rb, line 12
+    def initialize(options = {})
+      @options = options
+      @options[:environment] ||= Rails::Command.environment
+    end
- -
-
# File railties/lib/rails/commands/dbconsole/dbconsole_command.rb, line 12
-def initialize(options = {})
-  @options = options
-  @options[:environment] ||= Rails::Command.environment
-end
-
-
- - + See on GitHub + + + +

@@ -144,22 +144,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/commands/dbconsole/dbconsole_command.rb, line 8
+    def self.start(*args)
+      new(*args).start
+    end
- -
-
# File railties/lib/rails/commands/dbconsole/dbconsole_command.rb, line 8
-def self.start(*args)
-  new(*args).start
-end
-
-
- -

+ See on GitHub + + + + @@ -183,22 +183,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/commands/dbconsole/dbconsole_command.rb, line 43
+    def database
+      @options[:database]
+    end
- -
-
# File railties/lib/rails/commands/dbconsole/dbconsole_command.rb, line 43
-def database
-  @options[:database]
-end
-
-
- - + See on GitHub + + + +

@@ -218,38 +218,38 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/commands/dbconsole/dbconsole_command.rb, line 23
+    def db_config
+      return @db_config if defined?(@db_config)
+
+      # If the user provided a database, use that. Otherwise find
+      # the first config in the database.yml
+      if database
+        @db_config = configurations.configs_for(env_name: environment, name: database, include_hidden: true)
+      else
+        @db_config = configurations.find_db_config(environment)
+      end
+
+      unless @db_config
+        missing_db = database ? "'#{database}' database is not" : "No databases are"
+        raise ActiveRecord::AdapterNotSpecified,
+          "#{missing_db} configured for '#{environment}'. Available configuration: #{configurations.inspect}"
+      end
+
+      @db_config
+    end
- -
-
# File railties/lib/rails/commands/dbconsole/dbconsole_command.rb, line 23
-def db_config
-  return @db_config if defined?(@db_config)
-
-  # If the user provided a database, use that. Otherwise find
-  # the first config in the database.yml
-  if database
-    @db_config = configurations.configs_for(env_name: environment, name: database, include_hidden: true)
-  else
-    @db_config = configurations.find_db_config(environment)
-  end
-
-  unless @db_config
-    missing_db = database ? "'#{database}' database is not" : "No databases are"
-    raise ActiveRecord::AdapterNotSpecified,
-      "#{missing_db} configured for '#{environment}'. Available configuration: #{configurations.inspect}"
-  end
-
-  @db_config
-end
-
-
- -

+ See on GitHub + + + +

@@ -269,22 +269,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/commands/dbconsole/dbconsole_command.rb, line 47
+    def environment
+      @options[:environment]
+    end
- -
-
# File railties/lib/rails/commands/dbconsole/dbconsole_command.rb, line 47
-def environment
-  @options[:environment]
-end
-
-
- -

+ See on GitHub + + + +

@@ -304,24 +304,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/commands/dbconsole/dbconsole_command.rb, line 17
+    def start
+      adapter_class.dbconsole(db_config, @options)
+    rescue NotImplementedError
+      abort "Unknown command-line client for #{db_config.database}."
+    end
- -
-
# File railties/lib/rails/commands/dbconsole/dbconsole_command.rb, line 17
-def start
-  adapter_class.dbconsole(db_config, @options)
-rescue NotImplementedError
-  abort "Unknown command-line client for #{db_config.database}."
-end
-
-
- -

+ See on GitHub + + + +

Instance Private methods

@@ -344,24 +344,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/commands/dbconsole/dbconsole_command.rb, line 60
+      def configurations # :doc:
+        require APP_PATH
+        ActiveRecord::Base.configurations = Rails.application.config.database_configuration
+        ActiveRecord::Base.configurations
+      end
- -
-
# File railties/lib/rails/commands/dbconsole/dbconsole_command.rb, line 60
-def configurations # :doc:
-  require APP_PATH
-  ActiveRecord::Base.configurations = Rails.application.config.database_configuration
-  ActiveRecord::Base.configurations
-end
-
-
- - + See on GitHub + + + +

@@ -381,26 +381,26 @@

- -
- - -
-
# File railties/lib/rails/commands/dbconsole/dbconsole_command.rb, line 66
-      def find_cmd_and_exec(commands, *args) # :doc:
-        Rails.deprecator.warn(<<~MSG.squish)
-          Rails::DBConsole#find_cmd_and_exec is deprecated and will be removed in Rails 7.2.
+          
+            
+ + Source code + + +
# File railties/lib/rails/commands/dbconsole/dbconsole_command.rb, line 66
+      def find_cmd_and_exec(commands, *args) # :doc:
+        Rails.deprecator.warn(<<~MSG.squish)
+          Rails::DBConsole#find_cmd_and_exec is deprecated and will be removed in Rails 7.2.
           Please use find_cmd_and_exec on the connection adapter class instead.
-        MSG
-        ActiveRecord::Base.connection.find_cmd_and_exec(commands, *args)
-      end
-
-
- -

+ MSG + ActiveRecord::Base.connection.find_cmd_and_exec(commands, *args) + end + + See on GitHub + + + + diff --git a/src/classes/Rails/Engine.html b/src/classes/Rails/Engine.html index 3aab0446e6..baf7d3a793 100644 --- a/src/classes/Rails/Engine.html +++ b/src/classes/Rails/Engine.html @@ -536,24 +536,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine.rb, line 378
+      def endpoint(endpoint = nil)
+        @endpoint ||= nil
+        @endpoint = endpoint if endpoint
+        @endpoint
+      end
- -
-
# File railties/lib/rails/engine.rb, line 378
-def endpoint(endpoint = nil)
-  @endpoint ||= nil
-  @endpoint = endpoint if endpoint
-  @endpoint
-end
-
-
- - + See on GitHub + + + +

@@ -573,27 +573,27 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine.rb, line 416
+      def find(path)
+        expanded_path = File.expand_path path
+        Rails::Engine.subclasses.each do |klass|
+          engine = klass.instance
+          return engine if File.expand_path(engine.root) == expanded_path
+        end
+        nil
+      end
- -
-
# File railties/lib/rails/engine.rb, line 416
-def find(path)
-  expanded_path = File.expand_path path
-  Rails::Engine.subclasses.each do |klass|
-    engine = klass.instance
-    return engine if File.expand_path(engine.root) == expanded_path
-  end
-  nil
-end
-
-
- -

+ See on GitHub + + + +

@@ -613,22 +613,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine.rb, line 374
+      def find_root(from)
+        find_root_with_flag "lib", from
+      end
- -
-
# File railties/lib/rails/engine.rb, line 374
-def find_root(from)
-  find_root_with_flag "lib", from
-end
-
-
- -

+ See on GitHub + + + +

@@ -648,32 +648,32 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine.rb, line 360
+      def inherited(base)
+        unless base.abstract_railtie?
+          Rails::Railtie::Configuration.eager_load_namespaces << base
+
+          base.called_from = begin
+            call_stack = caller_locations.map { |l| l.absolute_path || l.path }
+
+            File.dirname(call_stack.detect { |p| !p.match?(%r[railties[\w.-]*/lib/rails|rack[\w.-]*/lib/rack]) })
+          end
+        end
+
+        super
+      end
- -
-
# File railties/lib/rails/engine.rb, line 360
-def inherited(base)
-  unless base.abstract_railtie?
-    Rails::Railtie::Configuration.eager_load_namespaces << base
-
-    base.called_from = begin
-      call_stack = caller_locations.map { |l| l.absolute_path || l.path }
-
-      File.dirname(call_stack.detect { |p| !p.match?(%r[railties[\w.-]*/lib/rails|rack[\w.-]*/lib/rack]) })
-    end
-  end
-
-  super
-end
-
-
- -

+ See on GitHub + + + +

@@ -693,49 +693,49 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine.rb, line 384
+      def isolate_namespace(mod)
+        engine_name(generate_railtie_name(mod.name))
+
+        routes.default_scope = { module: ActiveSupport::Inflector.underscore(mod.name) }
+        self.isolated = true
+
+        unless mod.respond_to?(:railtie_namespace)
+          name, railtie = engine_name, self
+
+          mod.singleton_class.instance_eval do
+            define_method(:railtie_namespace) { railtie }
+
+            unless mod.respond_to?(:table_name_prefix)
+              define_method(:table_name_prefix) { "#{name}_" }
+            end
+
+            unless mod.respond_to?(:use_relative_model_naming?)
+              class_eval "def use_relative_model_naming?; true; end", __FILE__, __LINE__
+            end
+
+            unless mod.respond_to?(:railtie_helpers_paths)
+              define_method(:railtie_helpers_paths) { railtie.helpers_paths }
+            end
+
+            unless mod.respond_to?(:railtie_routes_url_helpers)
+              define_method(:railtie_routes_url_helpers) { |include_path_helpers = true| railtie.routes.url_helpers(include_path_helpers) }
+            end
+          end
+        end
+      end
- -
-
# File railties/lib/rails/engine.rb, line 384
-def isolate_namespace(mod)
-  engine_name(generate_railtie_name(mod.name))
-
-  routes.default_scope = { module: ActiveSupport::Inflector.underscore(mod.name) }
-  self.isolated = true
-
-  unless mod.respond_to?(:railtie_namespace)
-    name, railtie = engine_name, self
-
-    mod.singleton_class.instance_eval do
-      define_method(:railtie_namespace) { railtie }
-
-      unless mod.respond_to?(:table_name_prefix)
-        define_method(:table_name_prefix) { "#{name}_" }
-      end
-
-      unless mod.respond_to?(:use_relative_model_naming?)
-        class_eval "def use_relative_model_naming?; true; end", __FILE__, __LINE__
-      end
-
-      unless mod.respond_to?(:railtie_helpers_paths)
-        define_method(:railtie_helpers_paths) { railtie.helpers_paths }
-      end
-
-      unless mod.respond_to?(:railtie_routes_url_helpers)
-        define_method(:railtie_routes_url_helpers) { |include_path_helpers = true| railtie.routes.url_helpers(include_path_helpers) }
-      end
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -755,30 +755,30 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine.rb, line 432
+    def initialize
+      @_all_autoload_paths = nil
+      @_all_load_paths     = nil
+      @app                 = nil
+      @config              = nil
+      @env_config          = nil
+      @helpers             = nil
+      @routes              = nil
+      @app_build_lock      = Mutex.new
+      super
+    end
- -
-
# File railties/lib/rails/engine.rb, line 432
-def initialize
-  @_all_autoload_paths = nil
-  @_all_load_paths     = nil
-  @app                 = nil
-  @config              = nil
-  @env_config          = nil
-  @helpers             = nil
-  @routes              = nil
-  @app_build_lock      = Mutex.new
-  super
-end
-
-
- -

+ See on GitHub + + + + @@ -802,28 +802,28 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine.rb, line 510
+    def app
+      @app || @app_build_lock.synchronize {
+        @app ||= begin
+          stack = default_middleware_stack
+          config.middleware = build_middleware.merge_into(stack)
+          config.middleware.build(endpoint)
+        end
+      }
+    end
- -
-
# File railties/lib/rails/engine.rb, line 510
-def app
-  @app || @app_build_lock.synchronize {
-    @app ||= begin
-      stack = default_middleware_stack
-      config.middleware = build_middleware.merge_into(stack)
-      config.middleware.build(endpoint)
-    end
-  }
-end
-
-
- - + See on GitHub + + + +

@@ -843,23 +843,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine.rb, line 527
+    def call(env)
+      req = build_request env
+      app.call req.env
+    end
- -
-
# File railties/lib/rails/engine.rb, line 527
-def call(env)
-  req = build_request env
-  app.call req.env
-end
-
-
- -

+ See on GitHub + + + +

@@ -879,22 +879,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine.rb, line 546
+    def config
+      @config ||= Engine::Configuration.new(self.class.find_root(self.class.called_from))
+    end
- -
-
# File railties/lib/rails/engine.rb, line 546
-def config
-  @config ||= Engine::Configuration.new(self.class.find_root(self.class.called_from))
-end
-
-
- -

+ See on GitHub + + + +

@@ -914,23 +914,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine.rb, line 484
+    def eager_load!
+      # Already done by Zeitwerk::Loader.eager_load_all. By now, we leave the
+      # method as a no-op for backwards compatibility.
+    end
- -
-
# File railties/lib/rails/engine.rb, line 484
-def eager_load!
-  # Already done by Zeitwerk::Loader.eager_load_all. By now, we leave the
-  # method as a no-op for backwards compatibility.
-end
-
-
- -

+ See on GitHub + + + +

@@ -950,22 +950,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine.rb, line 522
+    def endpoint
+      self.class.endpoint || routes
+    end
- -
-
# File railties/lib/rails/engine.rb, line 522
-def endpoint
-  self.class.endpoint || routes
-end
-
-
- -

+ See on GitHub + + + +

@@ -985,22 +985,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine.rb, line 533
+    def env_config
+      @env_config ||= {}
+    end
- -
-
# File railties/lib/rails/engine.rb, line 533
-def env_config
-  @env_config ||= {}
-end
-
-
- -

+ See on GitHub + + + +

@@ -1020,28 +1020,28 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine.rb, line 494
+    def helpers
+      @helpers ||= begin
+        helpers = Module.new
+        AbstractController::Helpers.helper_modules_from_paths(helpers_paths).each do |mod|
+          helpers.include(mod)
+        end
+        helpers
+      end
+    end
- -
-
# File railties/lib/rails/engine.rb, line 494
-def helpers
-  @helpers ||= begin
-    helpers = Module.new
-    AbstractController::Helpers.helper_modules_from_paths(helpers_paths).each do |mod|
-      helpers.include(mod)
-    end
-    helpers
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1061,22 +1061,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine.rb, line 505
+    def helpers_paths
+      paths["app/helpers"].existent
+    end
- -
-
# File railties/lib/rails/engine.rb, line 505
-def helpers_paths
-  paths["app/helpers"].existent
-end
-
-
- -

+ See on GitHub + + + +

@@ -1096,25 +1096,25 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine.rb, line 446
+    def load_console(app = self)
+      require "rails/console/app"
+      require "rails/console/helpers"
+      run_console_blocks(app)
+      self
+    end
- -
-
# File railties/lib/rails/engine.rb, line 446
-def load_console(app = self)
-  require "rails/console/app"
-  require "rails/console/helpers"
-  run_console_blocks(app)
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -1134,25 +1134,25 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine.rb, line 470
+    def load_generators(app = self)
+      require "rails/generators"
+      run_generators_blocks(app)
+      Rails::Generators.configure!(app.config.generators)
+      self
+    end
- -
-
# File railties/lib/rails/engine.rb, line 470
-def load_generators(app = self)
-  require "rails/generators"
-  run_generators_blocks(app)
-  Rails::Generators.configure!(app.config.generators)
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -1172,23 +1172,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine.rb, line 455
+    def load_runner(app = self)
+      run_runner_blocks(app)
+      self
+    end
- -
-
# File railties/lib/rails/engine.rb, line 455
-def load_runner(app = self)
-  run_runner_blocks(app)
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -1210,23 +1210,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine.rb, line 554
+    def load_seed
+      seed_file = paths["db/seeds.rb"].existent.first
+      run_callbacks(:load_seed) { load(seed_file) } if seed_file
+    end
- -
-
# File railties/lib/rails/engine.rb, line 554
-def load_seed
-  seed_file = paths["db/seeds.rb"].existent.first
-  run_callbacks(:load_seed) { load(seed_file) } if seed_file
-end
-
-
- -

+ See on GitHub + + + +

@@ -1246,23 +1246,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine.rb, line 479
+    def load_server(app = self)
+      run_server_blocks(app)
+      self
+    end
- -
-
# File railties/lib/rails/engine.rb, line 479
-def load_server(app = self)
-  run_server_blocks(app)
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -1282,24 +1282,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine.rb, line 462
+    def load_tasks(app = self)
+      require "rake"
+      run_tasks_blocks(app)
+      self
+    end
- -
-
# File railties/lib/rails/engine.rb, line 462
-def load_tasks(app = self)
-  require "rake"
-  run_tasks_blocks(app)
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -1319,22 +1319,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine.rb, line 489
+    def railties
+      @railties ||= Railties.new
+    end
- -
-
# File railties/lib/rails/engine.rb, line 489
-def railties
-  @railties ||= Railties.new
-end
-
-
- -

+ See on GitHub + + + +

@@ -1354,24 +1354,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine.rb, line 539
+    def routes(&block)
+      @routes ||= ActionDispatch::Routing::RouteSet.new_with_config(config)
+      @routes.append(&block) if block_given?
+      @routes
+    end
- -
-
# File railties/lib/rails/engine.rb, line 539
-def routes(&block)
-  @routes ||= ActionDispatch::Routing::RouteSet.new_with_config(config)
-  @routes.append(&block) if block_given?
-  @routes
-end
-
-
- -

+ See on GitHub + + + +

Instance Private methods

@@ -1394,24 +1394,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine.rb, line 681
+      def load_config_initializer(initializer) # :doc:
+        ActiveSupport::Notifications.instrument("load_config_initializer.railties", initializer: initializer) do
+          load(initializer)
+        end
+      end
- -
-
# File railties/lib/rails/engine.rb, line 681
-def load_config_initializer(initializer) # :doc:
-  ActiveSupport::Notifications.instrument("load_config_initializer.railties", initializer: initializer) do
-    load(initializer)
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/Rails/Engine/Configuration.html b/src/classes/Rails/Engine/Configuration.html index c681f2d030..979220d832 100644 --- a/src/classes/Rails/Engine/Configuration.html +++ b/src/classes/Rails/Engine/Configuration.html @@ -158,26 +158,26 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine/configuration.rb, line 12
+      def initialize(root = nil)
+        super()
+        @root = root
+        @generators = app_generators.dup
+        @middleware = Rails::Configuration::MiddlewareStackProxy.new
+        @javascript_path = "javascript"
+      end
- -
-
# File railties/lib/rails/engine/configuration.rb, line 12
-def initialize(root = nil)
-  super()
-  @root = root
-  @generators = app_generators.dup
-  @middleware = Rails::Configuration::MiddlewareStackProxy.new
-  @javascript_path = "javascript"
-end
-
-
- - + See on GitHub + + + + @@ -201,22 +201,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine/configuration.rb, line 88
+      def autoload_once_paths
+        @autoload_once_paths ||= paths.autoload_once
+      end
- -
-
# File railties/lib/rails/engine/configuration.rb, line 88
-def autoload_once_paths
-  @autoload_once_paths ||= paths.autoload_once
-end
-
-
- - + See on GitHub + + + +

@@ -236,22 +236,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine/configuration.rb, line 92
+      def autoload_paths
+        @autoload_paths ||= paths.autoload_paths
+      end
- -
-
# File railties/lib/rails/engine/configuration.rb, line 92
-def autoload_paths
-  @autoload_paths ||= paths.autoload_paths
-end
-
-
- -

+ See on GitHub + + + +

@@ -271,22 +271,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine/configuration.rb, line 84
+      def eager_load_paths
+        @eager_load_paths ||= paths.eager_load
+      end
- -
-
# File railties/lib/rails/engine/configuration.rb, line 84
-def eager_load_paths
-  @eager_load_paths ||= paths.eager_load
-end
-
-
- -

+ See on GitHub + + + +

@@ -318,24 +318,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine/configuration.rb, line 32
+      def generators
+        @generators ||= Rails::Configuration::Generators.new
+        yield(@generators) if block_given?
+        @generators
+      end
- -
-
# File railties/lib/rails/engine/configuration.rb, line 32
-def generators
-  @generators ||= Rails::Configuration::Generators.new
-  yield(@generators) if block_given?
-  @generators
-end
-
-
- -

+ See on GitHub + + + +

@@ -355,60 +355,60 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine/configuration.rb, line 38
+      def paths
+        @paths ||= begin
+          paths = Rails::Paths::Root.new(@root)
+
+          paths.add "app",                 eager_load: true,
+                                           glob: "{*,*/concerns}",
+                                           exclude: ["assets", javascript_path]
+          paths.add "app/assets",          glob: "*"
+          paths.add "app/controllers",     eager_load: true
+          paths.add "app/channels",        eager_load: true
+          paths.add "app/helpers",         eager_load: true
+          paths.add "app/models",          eager_load: true
+          paths.add "app/mailers",         eager_load: true
+          paths.add "app/views"
+
+          # If you add more lib subdirectories here that should not be managed
+          # by the main autoloader, please update the config.autoload_lib call
+          # in the template that generates config/application.rb accordingly.
+          paths.add "lib",                 load_path: true
+          paths.add "lib/assets",          glob: "*"
+          paths.add "lib/tasks",           glob: "**/*.rake"
+
+          paths.add "config"
+          paths.add "config/environments", glob: -"#{Rails.env}.rb"
+          paths.add "config/initializers", glob: "**/*.rb"
+          paths.add "config/locales",      glob: "**/*.{rb,yml}"
+          paths.add "config/routes.rb"
+          paths.add "config/routes",       glob: "**/*.rb"
+
+          paths.add "db"
+          paths.add "db/migrate"
+          paths.add "db/seeds.rb"
+
+          paths.add "vendor",              load_path: true
+          paths.add "vendor/assets",       glob: "*"
+
+          paths.add "test/mailers/previews", autoload: true
+
+          paths
+        end
+      end
- -
-
# File railties/lib/rails/engine/configuration.rb, line 38
-def paths
-  @paths ||= begin
-    paths = Rails::Paths::Root.new(@root)
-
-    paths.add "app",                 eager_load: true,
-                                     glob: "{*,*/concerns}",
-                                     exclude: ["assets", javascript_path]
-    paths.add "app/assets",          glob: "*"
-    paths.add "app/controllers",     eager_load: true
-    paths.add "app/channels",        eager_load: true
-    paths.add "app/helpers",         eager_load: true
-    paths.add "app/models",          eager_load: true
-    paths.add "app/mailers",         eager_load: true
-    paths.add "app/views"
-
-    # If you add more lib subdirectories here that should not be managed
-    # by the main autoloader, please update the config.autoload_lib call
-    # in the template that generates config/application.rb accordingly.
-    paths.add "lib",                 load_path: true
-    paths.add "lib/assets",          glob: "*"
-    paths.add "lib/tasks",           glob: "**/*.rake"
-
-    paths.add "config"
-    paths.add "config/environments", glob: -"#{Rails.env}.rb"
-    paths.add "config/initializers", glob: "**/*.rb"
-    paths.add "config/locales",      glob: "**/*.{rb,yml}"
-    paths.add "config/routes.rb"
-    paths.add "config/routes",       glob: "**/*.rb"
-
-    paths.add "db"
-    paths.add "db/migrate"
-    paths.add "db/seeds.rb"
-
-    paths.add "vendor",              load_path: true
-    paths.add "vendor/assets",       glob: "*"
-
-    paths.add "test/mailers/previews", autoload: true
-
-    paths
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -428,22 +428,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine/configuration.rb, line 80
+      def root=(value)
+        @root = paths.path = Pathname.new(value).expand_path
+      end
- -
-
# File railties/lib/rails/engine/configuration.rb, line 80
-def root=(value)
-  @root = paths.path = Pathname.new(value).expand_path
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/Engine/Railties.html b/src/classes/Rails/Engine/Railties.html index e631f62250..7ec59dd3cd 100644 --- a/src/classes/Rails/Engine/Railties.html +++ b/src/classes/Rails/Engine/Railties.html @@ -116,23 +116,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine/railties.rb, line 9
+      def initialize
+        @_all ||= ::Rails::Railtie.subclasses.map(&:instance) +
+          ::Rails::Engine.subclasses.map(&:instance)
+      end
- -
-
# File railties/lib/rails/engine/railties.rb, line 9
-def initialize
-  @_all ||= ::Rails::Railtie.subclasses.map(&:instance) +
-    ::Rails::Engine.subclasses.map(&:instance)
-end
-
-
- - + See on GitHub + + + + @@ -156,22 +156,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine/railties.rb, line 18
+      def -(others)
+        _all - others
+      end
- -
-
# File railties/lib/rails/engine/railties.rb, line 18
-def -(others)
-  _all - others
-end
-
-
- - + See on GitHub + + + +

@@ -191,22 +191,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine/railties.rb, line 14
+      def each(*args, &block)
+        _all.each(*args, &block)
+      end
- -
-
# File railties/lib/rails/engine/railties.rb, line 14
-def each(*args, &block)
-  _all.each(*args, &block)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/Engine/Updater.html b/src/classes/Rails/Engine/Updater.html index c2195e7cca..fe3b8a38b6 100644 --- a/src/classes/Rails/Engine/Updater.html +++ b/src/classes/Rails/Engine/Updater.html @@ -84,23 +84,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine/updater.rb, line 10
+        def generator
+          @generator ||= Rails::Generators::PluginGenerator.new ["plugin"],
+            { engine: true }, { destination_root: ENGINE_ROOT }
+        end
- -
-
# File railties/lib/rails/engine/updater.rb, line 10
-def generator
-  @generator ||= Rails::Generators::PluginGenerator.new ["plugin"],
-    { engine: true }, { destination_root: ENGINE_ROOT }
-end
-
-
- - + See on GitHub + + + +

@@ -120,22 +120,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/engine/updater.rb, line 15
+        def run(action)
+          generator.public_send(action)
+        end
- -
-
# File railties/lib/rails/engine/updater.rb, line 15
-def run(action)
-  generator.public_send(action)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/Generators.html b/src/classes/Rails/Generators.html index ae9569c86a..642dcad4a9 100644 --- a/src/classes/Rails/Generators.html +++ b/src/classes/Rails/Generators.html @@ -322,32 +322,32 @@

- -
- - -
-
# File railties/lib/rails/generators.rb, line 112
-def api_only!
-  hide_namespaces "assets", "helper", "css", "js"
-
-  options[:rails].merge!(
-    api: true,
-    assets: false,
-    helper: false,
-    template_engine: nil
-  )
-
-  options[:mailer] ||= {}
-  options[:mailer][:template_engine] ||= :erb
-end
-
-
- - + +
+ + Source code + + +
# File railties/lib/rails/generators.rb, line 112
+      def api_only!
+        hide_namespaces "assets", "helper", "css", "js"
+
+        options[:rails].merge!(
+          api: true,
+          assets: false,
+          helper: false,
+          template_engine: nil
+        )
+
+        options[:mailer] ||= {}
+        options[:mailer][:template_engine] ||= :erb
+      end
+ + See on GitHub + +
+ +

@@ -374,22 +374,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators.rb, line 104
+      def fallbacks
+        @fallbacks ||= {}
+      end
- -
-
# File railties/lib/rails/generators.rb, line 104
-def fallbacks
-  @fallbacks ||= {}
-end
-
-
- -

+ See on GitHub + + + +

@@ -409,35 +409,35 @@

- -
- - -
-
# File railties/lib/rails/generators.rb, line 165
-def help(command = "generate")
-  puts "Usage:"
-  puts "  bin/rails #{command} GENERATOR [args] [options]"
-  puts
-  puts "General options:"
-  puts "  -h, [--help]     # Print generator's options and usage"
-  puts "  -p, [--pretend]  # Run but do not make any changes"
-  puts "  -f, [--force]    # Overwrite files that already exist"
-  puts "  -s, [--skip]     # Skip files that already exist"
-  puts "  -q, [--quiet]    # Suppress status output"
-  puts
-  puts "Please choose a generator below."
-  puts
+          
+            
+ + Source code + - print_generators -end
-
-
- -

+
# File railties/lib/rails/generators.rb, line 165
+      def help(command = "generate")
+        puts "Usage:"
+        puts "  bin/rails #{command} GENERATOR [args] [options]"
+        puts
+        puts "General options:"
+        puts "  -h, [--help]     # Print generator's options and usage"
+        puts "  -p, [--pretend]  # Run but do not make any changes"
+        puts "  -f, [--force]    # Overwrite files that already exist"
+        puts "  -s, [--skip]     # Skip files that already exist"
+        puts "  -q, [--quiet]    # Suppress status output"
+        puts
+        puts "Please choose a generator below."
+        puts
+
+        print_generators
+      end
+ + See on GitHub + + + +

@@ -457,47 +457,47 @@

- -
- - -
-
# File railties/lib/rails/generators.rb, line 130
-def hidden_namespaces
-  @hidden_namespaces ||= begin
-    orm      = options[:rails][:orm]
-    test     = options[:rails][:test_framework]
-    template = options[:rails][:template_engine]
-
-    [
-      "rails",
-      "resource_route",
-      "#{orm}:migration",
-      "#{orm}:model",
-      "#{test}:controller",
-      "#{test}:helper",
-      "#{test}:integration",
-      "#{test}:system",
-      "#{test}:mailer",
-      "#{test}:model",
-      "#{test}:scaffold",
-      "#{test}:view",
-      "#{test}:job",
-      "#{template}:controller",
-      "#{template}:scaffold",
-      "#{template}:mailer",
-      "action_text:install",
-      "action_mailbox:install"
-    ]
-  end
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/generators.rb, line 130
+      def hidden_namespaces
+        @hidden_namespaces ||= begin
+          orm      = options[:rails][:orm]
+          test     = options[:rails][:test_framework]
+          template = options[:rails][:template_engine]
+
+          [
+            "rails",
+            "resource_route",
+            "#{orm}:migration",
+            "#{orm}:model",
+            "#{test}:controller",
+            "#{test}:helper",
+            "#{test}:integration",
+            "#{test}:system",
+            "#{test}:mailer",
+            "#{test}:model",
+            "#{test}:scaffold",
+            "#{test}:view",
+            "#{test}:job",
+            "#{template}:controller",
+            "#{template}:scaffold",
+            "#{template}:mailer",
+            "action_text:install",
+            "action_mailbox:install"
+          ]
+        end
+      end
+ + See on GitHub + +
+ +

@@ -521,7 +521,8 @@

-

+ +

@@ -545,22 +546,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators.rb, line 159
+      def hide_namespaces(*namespaces)
+        hidden_namespaces.concat(namespaces)
+      end
- -
-
# File railties/lib/rails/generators.rb, line 159
-def hide_namespaces(*namespaces)
-  hidden_namespaces.concat(namespaces)
-end
-
-
- -

+ See on GitHub + + + +

@@ -580,35 +581,35 @@

- -
- - -
-
# File railties/lib/rails/generators.rb, line 257
-      def invoke(namespace, args = ARGV, config = {})
-        names = namespace.to_s.split(":")
-        if klass = find_by_namespace(names.pop, names.any? && names.join(":"))
-          args << "--help" if args.empty? && klass.arguments.any?(&:required?)
-          klass.start(args, config)
-          run_after_generate_callback if config[:behavior] == :invoke
-        else
-          options = sorted_groups.flat_map(&:last)
-          error = Command::CorrectableNameError.new("Could not find generator '#{namespace}'.", namespace, options)
+          
+            
+ + Source code + + +
# File railties/lib/rails/generators.rb, line 257
+      def invoke(namespace, args = ARGV, config = {})
+        names = namespace.to_s.split(":")
+        if klass = find_by_namespace(names.pop, names.any? && names.join(":"))
+          args << "--help" if args.empty? && klass.arguments.any?(&:required?)
+          klass.start(args, config)
+          run_after_generate_callback if config[:behavior] == :invoke
+        else
+          options = sorted_groups.flat_map(&:last)
+          error = Command::CorrectableNameError.new("Could not find generator '#{namespace}'.", namespace, options)
 
-          puts <<~MSG
-            #{error.detailed_message}
+          puts <<~MSG
+            #{error.detailed_message}
             Run `bin/rails generate --help` for more options.
-          MSG
-        end
-      end
-
-
- -

+ MSG + end + end + + See on GitHub + + + +

@@ -628,22 +629,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators.rb, line 187
+      def print_generators
+        sorted_groups.each { |b, n| print_list(b, n) }
+      end
- -
-
# File railties/lib/rails/generators.rb, line 187
-def print_generators
-  sorted_groups.each { |b, n| print_list(b, n) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -663,23 +664,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators.rb, line 182
+      def public_namespaces
+        lookup!
+        subclasses.map(&:namespace)
+      end
- -
-
# File railties/lib/rails/generators.rb, line 182
-def public_namespaces
-  lookup!
-  subclasses.map(&:namespace)
-end
-
-
- -

+ See on GitHub + + + +

@@ -699,44 +700,44 @@

- -
- - -
-
# File railties/lib/rails/generators.rb, line 191
-def sorted_groups
-  namespaces = public_namespaces
-  namespaces.sort!
+          
+            
+ + Source code + - groups = Hash.new { |h, k| h[k] = [] } - namespaces.each do |namespace| - base = namespace.split(":").first - groups[base] << namespace - end +
# File railties/lib/rails/generators.rb, line 191
+      def sorted_groups
+        namespaces = public_namespaces
+        namespaces.sort!
 
-  rails = groups.delete("rails")
-  rails.map! { |n| n.delete_prefix("rails:") }
-  rails.delete("app")
-  rails.delete("plugin")
-  rails.delete("encrypted_secrets")
-  rails.delete("encrypted_file")
-  rails.delete("encryption_key_file")
-  rails.delete("master_key")
-  rails.delete("credentials")
-  rails.delete("db:system:change")
+        groups = Hash.new { |h, k| h[k] = [] }
+        namespaces.each do |namespace|
+          base = namespace.split(":").first
+          groups[base] << namespace
+        end
 
-  hidden_namespaces.each { |n| groups.delete(n.to_s) }
+        rails = groups.delete("rails")
+        rails.map! { |n| n.delete_prefix("rails:") }
+        rails.delete("app")
+        rails.delete("plugin")
+        rails.delete("encrypted_secrets")
+        rails.delete("encrypted_file")
+        rails.delete("encryption_key_file")
+        rails.delete("master_key")
+        rails.delete("credentials")
+        rails.delete("db:system:change")
 
-  [[ "rails", rails ]] + groups.sort.to_a
-end
-
-
- -

+ hidden_namespaces.each { |n| groups.delete(n.to_s) } + + [[ "rails", rails ]] + groups.sort.to_a + end + + See on GitHub + + + +

Class Private methods

@@ -759,22 +760,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators.rb, line 301
+        def command_type # :doc:
+          @command_type ||= "generator"
+        end
- -
-
# File railties/lib/rails/generators.rb, line 301
-def command_type # :doc:
-  @command_type ||= "generator"
-end
-
-
- - + See on GitHub + + + +

@@ -794,22 +795,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators.rb, line 309
+        def file_lookup_paths # :doc:
+          @file_lookup_paths ||= [ "{#{lookup_paths.join(',')}}", "**", "*_generator.rb" ]
+        end
- -
-
# File railties/lib/rails/generators.rb, line 309
-def file_lookup_paths # :doc:
-  @file_lookup_paths ||= [ "{#{lookup_paths.join(',')}}", "**", "*_generator.rb" ]
-end
-
-
- -

+ See on GitHub + + + +

@@ -829,22 +830,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators.rb, line 305
+        def lookup_paths # :doc:
+          @lookup_paths ||= %w( rails/generators generators )
+        end
- -
-
# File railties/lib/rails/generators.rb, line 305
-def lookup_paths # :doc:
-  @lookup_paths ||= %w( rails/generators generators )
-end
-
-
- -

+ See on GitHub + + + +

@@ -864,23 +865,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators.rb, line 280
+        def print_list(base, namespaces) # :doc:
+          namespaces = namespaces.reject { |n| hidden_namespaces.include?(n) }
+          super
+        end
- -
-
# File railties/lib/rails/generators.rb, line 280
-def print_list(base, namespaces) # :doc:
-  namespaces = namespaces.reject { |n| hidden_namespaces.include?(n) }
-  super
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/Generators/Actions.html b/src/classes/Rails/Generators/Actions.html index 415e7084eb..ce8c2ff86e 100644 --- a/src/classes/Rails/Generators/Actions.html +++ b/src/classes/Rails/Generators/Actions.html @@ -172,32 +172,32 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/actions.rb, line 151
+      def add_source(source, options = {}, &block)
+        log :source, source
+
+        in_root do
+          if block
+            append_file_with_newline "Gemfile", "\nsource #{quote(source)} do", force: true
+            with_indentation(&block)
+            append_file_with_newline "Gemfile", "end", force: true
+          else
+            prepend_file "Gemfile", "source #{quote(source)}\n", verbose: false
+          end
+        end
+      end
- -
-
# File railties/lib/rails/generators/actions.rb, line 151
-def add_source(source, options = {}, &block)
-  log :source, source
-
-  in_root do
-    if block
-      append_file_with_newline "Gemfile", "\nsource #{quote(source)} do", force: true
-      with_indentation(&block)
-      append_file_with_newline "Gemfile", "end", force: true
-    else
-      prepend_file "Gemfile", "source #{quote(source)}\n", verbose: false
-    end
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -221,7 +221,8 @@

-

+ +

@@ -286,34 +287,34 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/actions.rb, line 206
+      def environment(data = nil, options = {})
+        sentinel = "class Application < Rails::Application\n"
+        env_file_sentinel = "Rails.application.configure do\n"
+        data ||= yield if block_given?
+
+        in_root do
+          if options[:env].nil?
+            inject_into_file "config/application.rb", optimize_indentation(data, 4), after: sentinel, verbose: false
+          else
+            Array(options[:env]).each do |env|
+              inject_into_file "config/environments/#{env}.rb", optimize_indentation(data, 2), after: env_file_sentinel, verbose: false
+            end
+          end
+        end
+      end
- -
-
# File railties/lib/rails/generators/actions.rb, line 206
-def environment(data = nil, options = {})
-  sentinel = "class Application < Rails::Application\n"
-  env_file_sentinel = "Rails.application.configure do\n"
-  data ||= yield if block_given?
-
-  in_root do
-    if options[:env].nil?
-      inject_into_file "config/application.rb", optimize_indentation(data, 4), after: sentinel, verbose: false
-    else
-      Array(options[:env]).each do |env|
-        inject_into_file "config/environments/#{env}.rb", optimize_indentation(data, 2), after: env_file_sentinel, verbose: false
-      end
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -387,57 +388,57 @@

Options

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/actions.rb, line 67
+      def gem(*args)
+        options = args.extract_options!
+        name, *versions = args
+
+        # Set the message to be shown in logs. Uses the git repo if one is given,
+        # otherwise use name (version).
+        parts, message = [ quote(name) ], name.dup
+
+        # Output a comment above the gem declaration.
+        comment = options.delete(:comment)
+
+        if versions = versions.any? ? versions : options.delete(:version)
+          _versions = Array(versions)
+          _versions.each do |version|
+            parts << quote(version)
+          end
+          message << " (#{_versions.join(", ")})"
+        end
+        message = options[:git] if options[:git]
+
+        log :gemfile, message
+
+        parts << quote(options) unless options.empty?
+
+        in_root do
+          str = []
+          if comment
+            comment.each_line do |comment_line|
+              str << indentation
+              str << "# #{comment_line}"
+            end
+            str << "\n"
+          end
+          str << indentation
+          str << "gem #{parts.join(", ")}"
+          append_file_with_newline "Gemfile", str.join, verbose: false
+        end
+      end
- -
-
# File railties/lib/rails/generators/actions.rb, line 67
-def gem(*args)
-  options = args.extract_options!
-  name, *versions = args
-
-  # Set the message to be shown in logs. Uses the git repo if one is given,
-  # otherwise use name (version).
-  parts, message = [ quote(name) ], name.dup
-
-  # Output a comment above the gem declaration.
-  comment = options.delete(:comment)
-
-  if versions = versions.any? ? versions : options.delete(:version)
-    _versions = Array(versions)
-    _versions.each do |version|
-      parts << quote(version)
-    end
-    message << " (#{_versions.join(", ")})"
-  end
-  message = options[:git] if options[:git]
-
-  log :gemfile, message
-
-  parts << quote(options) unless options.empty?
-
-  in_root do
-    str = []
-    if comment
-      comment.each_line do |comment_line|
-        str << indentation
-        str << "# #{comment_line}"
-      end
-      str << "\n"
-    end
-    str << indentation
-    str << "gem #{parts.join(", ")}"
-    append_file_with_newline "Gemfile", str.join, verbose: false
-  end
-end
-
-
- -
+ See on GitHub + + + +

@@ -462,32 +463,32 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/actions.rb, line 111
+      def gem_group(*names, &block)
+        options = names.extract_options!
+        str = names.map(&:inspect)
+        str << quote(options) unless options.empty?
+        str = str.join(", ")
+        log :gemfile, "group #{str}"
+
+        in_root do
+          append_file_with_newline "Gemfile", "\ngroup #{str} do", force: true
+          with_indentation(&block)
+          append_file_with_newline "Gemfile", "end", force: true
+        end
+      end
- -
-
# File railties/lib/rails/generators/actions.rb, line 111
-def gem_group(*names, &block)
-  options = names.extract_options!
-  str = names.map(&:inspect)
-  str << quote(options) unless options.empty?
-  str = str.join(", ")
-  log :gemfile, "group #{str}"
-
-  in_root do
-    append_file_with_newline "Gemfile", "\ngroup #{str} do", force: true
-    with_indentation(&block)
-    append_file_with_newline "Gemfile", "end", force: true
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -513,27 +514,27 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/actions.rb, line 332
+      def generate(what, *args)
+        log :generate, what
+
+        options = args.extract_options!
+        options[:abort_on_failure] = !options[:inline]
+
+        rails_command "generate #{what} #{args.join(" ")}", options
+      end
- -
-
# File railties/lib/rails/generators/actions.rb, line 332
-def generate(what, *args)
-  log :generate, what
-
-  options = args.extract_options!
-  options[:abort_on_failure] = !options[:inline]
-
-  rails_command "generate #{what} #{args.join(" ")}", options
-end
-
-
- -

+ See on GitHub + + + +

@@ -566,28 +567,28 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/actions.rb, line 237
+      def git(commands = {})
+        if commands.is_a?(Symbol)
+          run "git #{commands}"
+        else
+          commands.each do |cmd, options|
+            run "git #{cmd} #{options}"
+          end
+        end
+      end
- -
-
# File railties/lib/rails/generators/actions.rb, line 237
-def git(commands = {})
-  if commands.is_a?(Symbol)
-    run "git #{commands}"
-  else
-    commands.each do |cmd, options|
-      run "git #{cmd} #{options}"
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -607,35 +608,35 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/actions.rb, line 125
+      def github(repo, options = {}, &block)
+        str = [quote(repo)]
+        str << quote(options) unless options.empty?
+        str = str.join(", ")
+        log :github, "github #{str}"
+
+        in_root do
+          if @indentation.zero?
+            append_file_with_newline "Gemfile", "\ngithub #{str} do", force: true
+          else
+            append_file_with_newline "Gemfile", "#{indentation}github #{str} do", force: true
+          end
+          with_indentation(&block)
+          append_file_with_newline "Gemfile", "#{indentation}end", force: true
+        end
+      end
- -
-
# File railties/lib/rails/generators/actions.rb, line 125
-def github(repo, options = {}, &block)
-  str = [quote(repo)]
-  str << quote(options) unless options.empty?
-  str = str.join(", ")
-  log :github, "github #{str}"
-
-  in_root do
-    if @indentation.zero?
-      append_file_with_newline "Gemfile", "\ngithub #{str} do", force: true
-    else
-      append_file_with_newline "Gemfile", "#{indentation}github #{str} do", force: true
-    end
-    with_indentation(&block)
-    append_file_with_newline "Gemfile", "#{indentation}end", force: true
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -664,24 +665,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/actions.rb, line 319
+      def initializer(filename, data = nil)
+        log :initializer, filename
+        data ||= yield if block_given?
+        create_file("config/initializers/#{filename}", optimize_indentation(data), verbose: false)
+      end
- -
-
# File railties/lib/rails/generators/actions.rb, line 319
-def initializer(filename, data = nil)
-  log :initializer, filename
-  data ||= yield if block_given?
-  create_file("config/initializers/#{filename}", optimize_indentation(data), verbose: false)
-end
-
-
- -

+ See on GitHub + + + +

@@ -710,24 +711,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/actions.rb, line 275
+      def lib(filename, data = nil)
+        log :lib, filename
+        data ||= yield if block_given?
+        create_file("lib/#{filename}", optimize_indentation(data), verbose: false)
+      end
- -
-
# File railties/lib/rails/generators/actions.rb, line 275
-def lib(filename, data = nil)
-  log :lib, filename
-  data ||= yield if block_given?
-  create_file("lib/#{filename}", optimize_indentation(data), verbose: false)
-end
-
-
- -

+ See on GitHub + + + +

@@ -769,32 +770,32 @@

Options

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/actions.rb, line 391
+      def rails_command(command, options = {})
+        if options[:inline]
+          log :rails, command
+          command, *args = Shellwords.split(command)
+          in_root do
+            silence_warnings do
+              ::Rails::Command.invoke(command, args, **options)
+            end
+          end
+        else
+          execute_command :rails, command, options
+        end
+      end
- -
-
# File railties/lib/rails/generators/actions.rb, line 391
-def rails_command(command, options = {})
-  if options[:inline]
-    log :rails, command
-    command, *args = Shellwords.split(command)
-    in_root do
-      silence_warnings do
-        ::Rails::Command.invoke(command, args, **options)
-      end
-    end
-  else
-    execute_command :rails, command, options
-  end
-end
-
-
- -
+ See on GitHub + + + +

@@ -836,22 +837,22 @@

Options

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/actions.rb, line 364
+      def rake(command, options = {})
+        execute_command :rake, command, options
+      end
- -
-
# File railties/lib/rails/generators/actions.rb, line 364
-def rake(command, options = {})
-  execute_command :rake, command, options
-end
-
-
- -
+ See on GitHub + + + +

@@ -890,24 +891,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/actions.rb, line 302
+      def rakefile(filename, data = nil)
+        log :rakefile, filename
+        data ||= yield if block_given?
+        create_file("lib/tasks/#{filename}", optimize_indentation(data), verbose: false)
+      end
- -
-
# File railties/lib/rails/generators/actions.rb, line 302
-def rakefile(filename, data = nil)
-  log :rakefile, filename
-  data ||= yield if block_given?
-  create_file("lib/tasks/#{filename}", optimize_indentation(data), verbose: false)
-end
-
-
- -

+ See on GitHub + + + +

@@ -930,22 +931,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/actions.rb, line 442
+      def readme(path)
+        log File.read(find_in_source_paths(path))
+      end
- -
-
# File railties/lib/rails/generators/actions.rb, line 442
-def readme(path)
-  log File.read(find_in_source_paths(path))
-end
-
-
- -

+ See on GitHub + + + +

@@ -969,48 +970,48 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/actions.rb, line 409
+      def route(routing_code, namespace: nil)
+        namespace = Array(namespace)
+        namespace_pattern = route_namespace_pattern(namespace)
+        routing_code = namespace.reverse.reduce(routing_code) do |code, name|
+          "namespace :#{name} do\n#{rebase_indentation(code, 2)}end"
+        end
+
+        log :route, routing_code
+
+        in_root do
+          if namespace_match = match_file("config/routes.rb", namespace_pattern)
+            base_indent, *, existing_block_indent = namespace_match.captures.compact.map(&:length)
+            existing_line_pattern = /^[ ]{,#{existing_block_indent}}\S.+\n?/
+            routing_code = rebase_indentation(routing_code, base_indent + 2).gsub(existing_line_pattern, "")
+            namespace_pattern = /#{Regexp.escape namespace_match.to_s}/
+          end
+
+          inject_into_file "config/routes.rb", routing_code, after: namespace_pattern, verbose: false, force: false
+
+          if behavior == :revoke && namespace.any? && namespace_match
+            empty_block_pattern = /(#{namespace_pattern})((?:\s*end\n){1,#{namespace.size}})/
+            gsub_file "config/routes.rb", empty_block_pattern, verbose: false, force: true do |matched|
+              beginning, ending = empty_block_pattern.match(matched).captures
+              ending.sub!(/\A\s*end\n/, "") while !ending.empty? && beginning.sub!(/^[ ]*namespace .+ do\n\s*\z/, "")
+              beginning + ending
+            end
+          end
+        end
+      end
- -
-
# File railties/lib/rails/generators/actions.rb, line 409
-def route(routing_code, namespace: nil)
-  namespace = Array(namespace)
-  namespace_pattern = route_namespace_pattern(namespace)
-  routing_code = namespace.reverse.reduce(routing_code) do |code, name|
-    "namespace :#{name} do\n#{rebase_indentation(code, 2)}end"
-  end
-
-  log :route, routing_code
-
-  in_root do
-    if namespace_match = match_file("config/routes.rb", namespace_pattern)
-      base_indent, *, existing_block_indent = namespace_match.captures.compact.map(&:length)
-      existing_line_pattern = /^[ ]{,#{existing_block_indent}}\S.+\n?/
-      routing_code = rebase_indentation(routing_code, base_indent + 2).gsub(existing_line_pattern, "")
-      namespace_pattern = /#{Regexp.escape namespace_match.to_s}/
-    end
-
-    inject_into_file "config/routes.rb", routing_code, after: namespace_pattern, verbose: false, force: false
-
-    if behavior == :revoke && namespace.any? && namespace_match
-      empty_block_pattern = /(#{namespace_pattern})((?:\s*end\n){1,#{namespace.size}})/
-      gsub_file "config/routes.rb", empty_block_pattern, verbose: false, force: true do |matched|
-        beginning, ending = empty_block_pattern.match(matched).captures
-        ending.sub!(/\A\s*end\n/, "") while !ending.empty? && beginning.sub!(/^[ ]*namespace .+ do\n\s*\z/, "")
-        beginning + ending
-      end
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1039,24 +1040,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/actions.rb, line 258
+      def vendor(filename, data = nil)
+        log :vendor, filename
+        data ||= yield if block_given?
+        create_file("vendor/#{filename}", optimize_indentation(data), verbose: false)
+      end
- -
-
# File railties/lib/rails/generators/actions.rb, line 258
-def vendor(filename, data = nil)
-  log :vendor, filename
-  data ||= yield if block_given?
-  create_file("vendor/#{filename}", optimize_indentation(data), verbose: false)
-end
-
-
- -

+ See on GitHub + + + +

Instance Private methods

@@ -1079,31 +1080,31 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/actions.rb, line 461
+        def execute_command(executor, command, options = {}) # :doc:
+          log executor, command
+          sudo = options[:sudo] && !Gem.win_platform? ? "sudo " : ""
+          config = {
+            env: { "RAILS_ENV" => (options[:env] || ENV["RAILS_ENV"] || "development") },
+            verbose: false,
+            capture: options[:capture],
+            abort_on_failure: options[:abort_on_failure],
+          }
+
+          in_root { run("#{sudo}#{Shellwords.escape Gem.ruby} bin/#{executor} #{command}", config) }
+        end
- -
-
# File railties/lib/rails/generators/actions.rb, line 461
-def execute_command(executor, command, options = {}) # :doc:
-  log executor, command
-  sudo = options[:sudo] && !Gem.win_platform? ? "sudo " : ""
-  config = {
-    env: { "RAILS_ENV" => (options[:env] || ENV["RAILS_ENV"] || "development") },
-    verbose: false,
-    capture: options[:capture],
-    abort_on_failure: options[:abort_on_failure],
-  }
-
-  in_root { run("#{sudo}#{Shellwords.escape Gem.ruby} bin/#{executor} #{command}", config) }
-end
-
-
- - + See on GitHub + + + +

@@ -1123,22 +1124,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/actions.rb, line 494
+        def indentation # :doc:
+          "  " * @indentation
+        end
- -
-
# File railties/lib/rails/generators/actions.rb, line 494
-def indentation # :doc:
-  "  " * @indentation
-end
-
-
- -

+ See on GitHub + + + +

@@ -1158,27 +1159,27 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/actions.rb, line 450
+        def log(*args) # :doc:
+          if args.size == 1
+            say args.first.to_s unless options.quiet?
+          else
+            args << (behavior == :invoke ? :green : :red)
+            say_status(*args)
+          end
+        end
- -
-
# File railties/lib/rails/generators/actions.rb, line 450
-def log(*args) # :doc:
-  if args.size == 1
-    say args.first.to_s unless options.quiet?
-  else
-    args << (behavior == :invoke ? :green : :red)
-    say_status(*args)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1202,23 +1203,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/actions.rb, line 487
+        def optimize_indentation(value, amount = 0) # :doc:
+          return "#{value}\n" unless value.is_a?(String)
+          "#{value.strip_heredoc.indent(amount).chomp}\n"
+        end
- -
-
# File railties/lib/rails/generators/actions.rb, line 487
-def optimize_indentation(value, amount = 0) # :doc:
-  return "#{value}\n" unless value.is_a?(String)
-  "#{value.strip_heredoc.indent(amount).chomp}\n"
-end
-
-
- -

+ See on GitHub + + + +

@@ -1238,29 +1239,29 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/actions.rb, line 475
+        def quote(value) # :doc:
+          if value.respond_to? :each_pair
+            return value.map do |k, v|
+              "#{k}: #{quote(v)}"
+            end.join(", ")
+          end
+          return value.inspect unless value.is_a? String
+
+          "\"#{value.tr("'", '"')}\""
+        end
- -
-
# File railties/lib/rails/generators/actions.rb, line 475
-def quote(value) # :doc:
-  if value.respond_to? :each_pair
-    return value.map do |k, v|
-      "#{k}: #{quote(v)}"
-    end.join(", ")
-  end
-  return value.inspect unless value.is_a? String
-
-  "\"#{value.tr("'", '"')}\""
-end
-
-
- -

+ See on GitHub + + + +

@@ -1280,25 +1281,25 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/actions.rb, line 499
+        def with_indentation(&block) # :doc:
+          @indentation += 1
+          instance_eval(&block)
+        ensure
+          @indentation -= 1
+        end
- -
-
# File railties/lib/rails/generators/actions.rb, line 499
-def with_indentation(&block) # :doc:
-  @indentation += 1
-  instance_eval(&block)
-ensure
-  @indentation -= 1
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/Generators/ActiveModel.html b/src/classes/Rails/Generators/ActiveModel.html index 5bff1e3d81..ae0935d749 100644 --- a/src/classes/Rails/Generators/ActiveModel.html +++ b/src/classes/Rails/Generators/ActiveModel.html @@ -147,22 +147,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/active_model.rb, line 36
+      def self.all(klass)
+        "#{klass}.all"
+      end
- -
-
# File railties/lib/rails/generators/active_model.rb, line 36
-def self.all(klass)
-  "#{klass}.all"
-end
-
-
- - + See on GitHub + + + +

@@ -182,26 +182,26 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/active_model.rb, line 50
+      def self.build(klass, params = nil)
+        if params
+          "#{klass}.new(#{params})"
+        else
+          "#{klass}.new"
+        end
+      end
- -
-
# File railties/lib/rails/generators/active_model.rb, line 50
-def self.build(klass, params = nil)
-  if params
-    "#{klass}.new(#{params})"
-  else
-    "#{klass}.new"
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -221,22 +221,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/active_model.rb, line 44
+      def self.find(klass, params = nil)
+        "#{klass}.find(#{params})"
+      end
- -
-
# File railties/lib/rails/generators/active_model.rb, line 44
-def self.find(klass, params = nil)
-  "#{klass}.find(#{params})"
-end
-
-
- -

+ See on GitHub + + + +

@@ -256,22 +256,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/active_model.rb, line 31
+      def initialize(name)
+        @name = name
+      end
- -
-
# File railties/lib/rails/generators/active_model.rb, line 31
-def initialize(name)
-  @name = name
-end
-
-
- -

+ See on GitHub + + + + @@ -295,22 +295,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/active_model.rb, line 75
+      def destroy
+        "#{name}.destroy!"
+      end
- -
-
# File railties/lib/rails/generators/active_model.rb, line 75
-def destroy
-  "#{name}.destroy!"
-end
-
-
- - + See on GitHub + + + +

@@ -330,22 +330,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/active_model.rb, line 70
+      def errors
+        "#{name}.errors"
+      end
- -
-
# File railties/lib/rails/generators/active_model.rb, line 70
-def errors
-  "#{name}.errors"
-end
-
-
- -

+ See on GitHub + + + +

@@ -365,22 +365,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/active_model.rb, line 59
+      def save
+        "#{name}.save"
+      end
- -
-
# File railties/lib/rails/generators/active_model.rb, line 59
-def save
-  "#{name}.save"
-end
-
-
- -

+ See on GitHub + + + +

@@ -400,22 +400,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/active_model.rb, line 64
+      def update(params = nil)
+        "#{name}.update(#{params})"
+      end
- -
-
# File railties/lib/rails/generators/active_model.rb, line 64
-def update(params = nil)
-  "#{name}.update(#{params})"
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/Generators/AppBase/GemfileEntry.html b/src/classes/Rails/Generators/AppBase/GemfileEntry.html index 7fe19a3436..0f422ca0be 100644 --- a/src/classes/Rails/Generators/AppBase/GemfileEntry.html +++ b/src/classes/Rails/Generators/AppBase/GemfileEntry.html @@ -100,22 +100,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/app_base.rb, line 394
+        def self.floats(name, comment = nil)
+          new(name, nil, comment)
+        end
- -
-
# File railties/lib/rails/generators/app_base.rb, line 394
-def self.floats(name, comment = nil)
-  new(name, nil, comment)
-end
-
-
- - + See on GitHub + + + +

@@ -135,26 +135,26 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/app_base.rb, line 382
+        def self.github(name, github, branch = nil, comment = nil)
+          if branch
+            new(name, nil, comment, github: github, branch: branch)
+          else
+            new(name, nil, comment, github: github)
+          end
+        end
- -
-
# File railties/lib/rails/generators/app_base.rb, line 382
-def self.github(name, github, branch = nil, comment = nil)
-  if branch
-    new(name, nil, comment, github: github, branch: branch)
-  else
-    new(name, nil, comment, github: github)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -174,22 +174,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/app_base.rb, line 378
+        def initialize(name, version, comment, options = {}, commented_out = false)
+          super
+        end
- -
-
# File railties/lib/rails/generators/app_base.rb, line 378
-def initialize(name, version, comment, options = {}, commented_out = false)
-  super
-end
-
-
- -

+ See on GitHub + + + +

@@ -209,22 +209,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/app_base.rb, line 398
+        def self.path(name, path, comment = nil)
+          new(name, nil, comment, path: path)
+        end
- -
-
# File railties/lib/rails/generators/app_base.rb, line 398
-def self.path(name, path, comment = nil)
-  new(name, nil, comment, path: path)
-end
-
-
- -

+ See on GitHub + + + +

@@ -244,22 +244,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/app_base.rb, line 390
+        def self.version(name, version, comment = nil)
+          new(name, version, comment)
+        end
- -
-
# File railties/lib/rails/generators/app_base.rb, line 390
-def self.version(name, version, comment = nil)
-  new(name, version, comment)
-end
-
-
- -

+ See on GitHub + + + + @@ -283,28 +283,28 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/app_base.rb, line 402
+        def to_s
+          [
+            (comment.gsub(/^/, "# ").chomp + "\n" if comment),
+            ("# " if commented_out),
+            "gem \"#{name}\"",
+            *Array(version).map { |constraint| ", \"#{constraint}\"" },
+            *options.map { |key, value| ", #{key}: #{value.inspect}" },
+          ].compact.join
+        end
- -
-
# File railties/lib/rails/generators/app_base.rb, line 402
-def to_s
-  [
-    (comment.gsub(/^/, "# ").chomp + "\n" if comment),
-    ("# " if commented_out),
-    "gem \"#{name}\"",
-    *Array(version).map { |constraint| ", \"#{constraint}\"" },
-    *options.map { |key, value| ", #{key}: #{value.inspect}" },
-  ].compact.join
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/Rails/Generators/AppGenerator.html b/src/classes/Rails/Generators/AppGenerator.html index 36b679f9fa..22e140128d 100644 --- a/src/classes/Rails/Generators/AppGenerator.html +++ b/src/classes/Rails/Generators/AppGenerator.html @@ -88,22 +88,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 577
+      def after_bundle(&block) # :doc:
+        @after_bundle_callbacks << block
+      end
- -
-
# File railties/lib/rails/generators/rails/app/app_generator.rb, line 577
-def after_bundle(&block) # :doc:
-  @after_bundle_callbacks << block
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/Rails/Generators/Base.html b/src/classes/Rails/Generators/Base.html index c02441c6c3..c38073327f 100644 --- a/src/classes/Rails/Generators/Base.html +++ b/src/classes/Rails/Generators/Base.html @@ -192,22 +192,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/base.rb, line 236
+      def self.base_root
+        __dir__
+      end
- -
-
# File railties/lib/rails/generators/base.rb, line 236
-def self.base_root
-  __dir__
-end
-
-
- - + See on GitHub + + + +

@@ -227,25 +227,25 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/base.rb, line 227
+      def self.default_source_root
+        return unless base_name && generator_name
+        return unless default_generator_root
+        path = File.join(default_generator_root, "templates")
+        path if File.exist?(path)
+      end
- -
-
# File railties/lib/rails/generators/base.rb, line 227
-def self.default_source_root
-  return unless base_name && generator_name
-  return unless default_generator_root
-  path = File.join(default_generator_root, "templates")
-  path if File.exist?(path)
-end
-
-
- -

+ See on GitHub + + + +

@@ -265,28 +265,28 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/base.rb, line 41
+      def self.desc(description = nil)
+        return super if description
+
+        @desc ||= if usage_path
+          ERB.new(File.read(usage_path)).result(binding)
+        else
+          "Description:\n    Create #{base_name.humanize.downcase} files for #{generator_name} generator."
+        end
+      end
- -
-
# File railties/lib/rails/generators/base.rb, line 41
-def self.desc(description = nil)
-  return super if description
-
-  @desc ||= if usage_path
-    ERB.new(File.read(usage_path)).result(binding)
-  else
-    "Description:\n    Create #{base_name.humanize.downcase} files for #{generator_name} generator."
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -306,22 +306,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/base.rb, line 61
+      def self.hide!
+        Rails::Generators.hide_namespace(namespace)
+      end
- -
-
# File railties/lib/rails/generators/base.rb, line 61
-def self.hide!
-  Rails::Generators.hide_namespace(namespace)
-end
-
-
- -

+ See on GitHub + + + +

@@ -444,48 +444,48 @@

Custom invocations

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/base.rb, line 174
+      def self.hook_for(*names, &block)
+        options = names.extract_options!
+        in_base = options.delete(:in) || base_name
+        as_hook = options.delete(:as) || generator_name
+
+        names.each do |name|
+          unless class_options.key?(name)
+            defaults = if options[:type] == :boolean
+              {}
+            elsif [true, false].include?(default_value_for_option(name, options))
+              { banner: "" }
+            else
+              { desc: "#{name.to_s.humanize} to be invoked", banner: "NAME" }
+            end
+
+            class_option(name, defaults.merge!(options))
+          end
+
+          klass = self
+
+          singleton_class.define_method("#{name}_generator") do
+            value = class_options[name].default
+            Rails::Generators.find_by_namespace(klass.generator_name, value)
+          end
+
+          hooks[name] = [ in_base, as_hook ]
+          invoke_from_option(name, options, &block)
+        end
+      end
- -
-
# File railties/lib/rails/generators/base.rb, line 174
-def self.hook_for(*names, &block)
-  options = names.extract_options!
-  in_base = options.delete(:in) || base_name
-  as_hook = options.delete(:as) || generator_name
-
-  names.each do |name|
-    unless class_options.key?(name)
-      defaults = if options[:type] == :boolean
-        {}
-      elsif [true, false].include?(default_value_for_option(name, options))
-        { banner: "" }
-      else
-        { desc: "#{name.to_s.humanize} to be invoked", banner: "NAME" }
-      end
-
-      class_option(name, defaults.merge!(options))
-    end
-
-    klass = self
-
-    singleton_class.define_method("#{name}_generator") do
-      value = class_options[name].default
-      Rails::Generators.find_by_namespace(klass.generator_name, value)
-    end
-
-    hooks[name] = [ in_base, as_hook ]
-    invoke_from_option(name, options, &block)
-  end
-end
-
-
- -
+ See on GitHub + + + +

@@ -505,23 +505,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/base.rb, line 54
+      def self.namespace(name = nil)
+        return super if name
+        @namespace ||= super.delete_suffix("_generator").sub(/:generators:/, ":")
+      end
- -
-
# File railties/lib/rails/generators/base.rb, line 54
-def self.namespace(name = nil)
-  return super if name
-  @namespace ||= super.delete_suffix("_generator").sub(/:generators:/, ":")
-end
-
-
- -

+ See on GitHub + + + +

@@ -544,27 +544,27 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/base.rb, line 207
+      def self.remove_hook_for(*names)
+        remove_invocation(*names)
+
+        names.each do |name|
+          singleton_class.undef_method("#{name}_generator")
+          hooks.delete(name)
+        end
+      end
- -
-
# File railties/lib/rails/generators/base.rb, line 207
-def self.remove_hook_for(*names)
-  remove_invocation(*names)
-
-  names.each do |name|
-    singleton_class.undef_method("#{name}_generator")
-    hooks.delete(name)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -584,23 +584,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/base.rb, line 34
+      def self.source_root(path = nil)
+        @_source_root = path if path
+        @_source_root ||= default_source_root
+      end
- -
-
# File railties/lib/rails/generators/base.rb, line 34
-def self.source_root(path = nil)
-  @_source_root = path if path
-  @_source_root ||= default_source_root
-end
-
-
- -

+ See on GitHub + + + +

Class Private methods

@@ -623,36 +623,36 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/base.rb, line 396
+        def self.add_shebang_option! # :doc:
+          class_option :ruby, type: :string, aliases: "-r", default: Thor::Util.ruby_command,
+                              desc: "Path to the Ruby binary of your choice", banner: "PATH"
+
+          no_tasks {
+            define_method :shebang do
+              @shebang ||= begin
+                command = if options[:ruby] == Thor::Util.ruby_command
+                  "/usr/bin/env #{File.basename(Thor::Util.ruby_command)}"
+                else
+                  options[:ruby]
+                end
+                "#!#{command}"
+              end
+            end
+          }
+        end
- -
-
# File railties/lib/rails/generators/base.rb, line 396
-def self.add_shebang_option! # :doc:
-  class_option :ruby, type: :string, aliases: "-r", default: Thor::Util.ruby_command,
-                      desc: "Path to the Ruby binary of your choice", banner: "PATH"
-
-  no_tasks {
-    define_method :shebang do
-      @shebang ||= begin
-        command = if options[:ruby] == Thor::Util.ruby_command
-          "/usr/bin/env #{File.basename(Thor::Util.ruby_command)}"
-        else
-          options[:ruby]
-        end
-        "#!#{command}"
-      end
-    end
-  }
-end
-
-
- - + See on GitHub + + + +

@@ -672,22 +672,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/base.rb, line 329
+        def self.banner # :doc:
+          "bin/rails generate #{namespace.delete_prefix("rails:")} #{arguments.map(&:usage).join(' ')} [options]".gsub(/\s+/, " ")
+        end
- -
-
# File railties/lib/rails/generators/base.rb, line 329
-def self.banner # :doc:
-  "bin/rails generate #{namespace.delete_prefix("rails:")} #{arguments.map(&:usage).join(' ')} [options]".gsub(/\s+/, " ")
-end
-
-
- -

+ See on GitHub + + + +

@@ -707,24 +707,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/base.rb, line 334
+        def self.base_name # :doc:
+          @base_name ||= if base = name.to_s.split("::").first
+            base.underscore
+          end
+        end
- -
-
# File railties/lib/rails/generators/base.rb, line 334
-def self.base_name # :doc:
-  @base_name ||= if base = name.to_s.split("::").first
-    base.underscore
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -744,22 +744,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/base.rb, line 357
+        def self.default_aliases_for_option(name, options) # :doc:
+          default_for_option(Rails::Generators.aliases, name, options, options[:aliases])
+        end
- -
-
# File railties/lib/rails/generators/base.rb, line 357
-def self.default_aliases_for_option(name, options) # :doc:
-  default_for_option(Rails::Generators.aliases, name, options, options[:aliases])
-end
-
-
- -

+ See on GitHub + + + +

@@ -779,30 +779,30 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/base.rb, line 362
+        def self.default_for_option(config, name, options, default) # :doc:
+          if generator_name && (c = config[generator_name.to_sym]) && c.key?(name)
+            c[name]
+          elsif base_name && (c = config[base_name.to_sym]) && c.key?(name)
+            c[name]
+          elsif config[:rails].key?(name)
+            config[:rails][name]
+          else
+            default
+          end
+        end
- -
-
# File railties/lib/rails/generators/base.rb, line 362
-def self.default_for_option(config, name, options, default) # :doc:
-  if generator_name && (c = config[generator_name.to_sym]) && c.key?(name)
-    c[name]
-  elsif base_name && (c = config[base_name.to_sym]) && c.key?(name)
-    c[name]
-  elsif config[:rails].key?(name)
-    config[:rails][name]
-  else
-    default
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -822,23 +822,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/base.rb, line 422
+        def self.default_generator_root # :doc:
+          path = File.expand_path(File.join(base_name, generator_name), base_root)
+          path if File.exist?(path)
+        end
- -
-
# File railties/lib/rails/generators/base.rb, line 422
-def self.default_generator_root # :doc:
-  path = File.expand_path(File.join(base_name, generator_name), base_root)
-  path if File.exist?(path)
-end
-
-
- -

+ See on GitHub + + + +

@@ -858,22 +858,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/base.rb, line 351
+        def self.default_value_for_option(name, options) # :doc:
+          default_for_option(Rails::Generators.options, name, options, options[:default])
+        end
- -
-
# File railties/lib/rails/generators/base.rb, line 351
-def self.default_value_for_option(name, options) # :doc:
-  default_for_option(Rails::Generators.options, name, options, options[:default])
-end
-
-
- -

+ See on GitHub + + + +

@@ -893,25 +893,25 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/base.rb, line 342
+        def self.generator_name # :doc:
+          @generator_name ||= if generator = name.to_s.split("::").last
+            generator.delete_suffix!("Generator")
+            generator.underscore
+          end
+        end
- -
-
# File railties/lib/rails/generators/base.rb, line 342
-def self.generator_name # :doc:
-  @generator_name ||= if generator = name.to_s.split("::").last
-    generator.delete_suffix!("Generator")
-    generator.underscore
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -931,26 +931,26 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/base.rb, line 414
+        def self.usage_path # :doc:
+          paths = [
+            source_root && File.expand_path("../USAGE", source_root),
+            default_generator_root && File.join(default_generator_root, "USAGE")
+          ]
+          paths.compact.detect { |path| File.exist? path }
+        end
- -
-
# File railties/lib/rails/generators/base.rb, line 414
-def self.usage_path # :doc:
-  paths = [
-    source_root && File.expand_path("../USAGE", source_root),
-    default_generator_root && File.join(default_generator_root, "USAGE")
-  ]
-  paths.compact.detect { |path| File.exist? path }
-end
-
-
- -

+ See on GitHub + + + + @@ -974,25 +974,25 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/base.rb, line 287
+        def extract_last_module(nesting) # :doc:
+          nesting.inject(Object) do |last_module, nest|
+            break unless last_module.const_defined?(nest, false)
+            last_module.const_get(nest)
+          end
+        end
- -
-
# File railties/lib/rails/generators/base.rb, line 287
-def extract_last_module(nesting) # :doc:
-  nesting.inject(Object) do |last_module, nest|
-    break unless last_module.const_defined?(nest, false)
-    last_module.const_get(nest)
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -1012,23 +1012,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/base.rb, line 302
+        def indent(content, multiplier = 2) # :doc:
+          spaces = " " * multiplier
+          content.each_line.map { |line| line.blank? ? line : "#{spaces}#{line}" }.join
+        end
- -
-
# File railties/lib/rails/generators/base.rb, line 302
-def indent(content, multiplier = 2) # :doc:
-  spaces = " " * multiplier
-  content.each_line.map { |line| line.blank? ? line : "#{spaces}#{line}" }.join
-end
-
-
- -

+ See on GitHub + + + +

@@ -1048,24 +1048,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/base.rb, line 296
+        def module_namespacing(&block) # :doc:
+          content = capture(&block)
+          content = wrap_with_namespace(content) if namespaced?
+          concat(content)
+        end
- -
-
# File railties/lib/rails/generators/base.rb, line 296
-def module_namespacing(&block) # :doc:
-  content = capture(&block)
-  content = wrap_with_namespace(content) if namespaced?
-  concat(content)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1085,22 +1085,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/base.rb, line 312
+        def namespace # :doc:
+          Rails::Generators.namespace
+        end
- -
-
# File railties/lib/rails/generators/base.rb, line 312
-def namespace # :doc:
-  Rails::Generators.namespace
-end
-
-
- -

+ See on GitHub + + + +

@@ -1120,22 +1120,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/base.rb, line 316
+        def namespaced? # :doc:
+          !options[:skip_namespace] && namespace
+        end
- -
-
# File railties/lib/rails/generators/base.rb, line 316
-def namespaced? # :doc:
-  !options[:skip_namespace] && namespace
-end
-
-
- -

+ See on GitHub + + + +

@@ -1155,22 +1155,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/base.rb, line 324
+        def namespaced_path # :doc:
+          @namespaced_path ||= namespace_dirs.join("/")
+        end
- -
-
# File railties/lib/rails/generators/base.rb, line 324
-def namespaced_path # :doc:
-  @namespaced_path ||= namespace_dirs.join("/")
-end
-
-
- -

+ See on GitHub + + + +

@@ -1190,23 +1190,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/base.rb, line 307
+        def wrap_with_namespace(content) # :doc:
+          content = indent(content).chomp
+          "module #{namespace.name}\n#{content}\nend\n"
+        end
- -
-
# File railties/lib/rails/generators/base.rb, line 307
-def wrap_with_namespace(content) # :doc:
-  content = indent(content).chomp
-  "module #{namespace.name}\n#{content}\nend\n"
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/Generators/BenchmarkGenerator.html b/src/classes/Rails/Generators/BenchmarkGenerator.html index 74d039067c..80e8d38221 100644 --- a/src/classes/Rails/Generators/BenchmarkGenerator.html +++ b/src/classes/Rails/Generators/BenchmarkGenerator.html @@ -111,23 +111,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/benchmark/benchmark_generator.rb, line 13
+      def generate_layout
+        add_ips_to_gemfile unless ips_installed?
+        template("benchmark.rb.tt", "script/benchmarks/#{file_name}.rb")
+      end
- -
-
# File railties/lib/rails/generators/rails/benchmark/benchmark_generator.rb, line 13
-def generate_layout
-  add_ips_to_gemfile unless ips_installed?
-  template("benchmark.rb.tt", "script/benchmarks/#{file_name}.rb")
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/Rails/Generators/Migration.html b/src/classes/Rails/Generators/Migration.html index 730bc66eab..9a0a983415 100644 --- a/src/classes/Rails/Generators/Migration.html +++ b/src/classes/Rails/Generators/Migration.html @@ -119,22 +119,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/migration.rb, line 35
+      def create_migration(destination, data, config = {}, &block)
+        action Rails::Generators::Actions::CreateMigration.new(self, destination, block || data.to_s, config)
+      end
- -
-
# File railties/lib/rails/generators/migration.rb, line 35
-def create_migration(destination, data, config = {}, &block)
-  action Rails::Generators::Actions::CreateMigration.new(self, destination, block || data.to_s, config)
-end
-
-
- - + See on GitHub + + + +

@@ -159,32 +159,32 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/migration.rb, line 56
+      def migration_template(source, destination, config = {})
+        source = File.expand_path(find_in_source_paths(source.to_s))
+
+        set_migration_assigns!(destination)
+
+        dir, base = File.split(destination)
+        numbered_destination = File.join(dir, ["%migration_number%", base].join("_"))
+
+        file = create_migration numbered_destination, nil, config do
+          ERB.new(::File.binread(source), trim_mode: "-", eoutvar: "@output_buffer").result(binding)
+        end
+        Rails::Generators.add_generated_file(file)
+      end
- -
-
# File railties/lib/rails/generators/migration.rb, line 56
-def migration_template(source, destination, config = {})
-  source = File.expand_path(find_in_source_paths(source.to_s))
-
-  set_migration_assigns!(destination)
-
-  dir, base = File.split(destination)
-  numbered_destination = File.join(dir, ["%migration_number%", base].join("_"))
-
-  file = create_migration numbered_destination, nil, config do
-    ERB.new(::File.binread(source), trim_mode: "-", eoutvar: "@output_buffer").result(binding)
-  end
-  Rails::Generators.add_generated_file(file)
-end
-
-
- -

+ See on GitHub + + + +

@@ -204,27 +204,27 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/migration.rb, line 39
+      def set_migration_assigns!(destination)
+        destination = File.expand_path(destination, destination_root)
+
+        migration_dir = File.dirname(destination)
+        @migration_number     = self.class.next_migration_number(migration_dir)
+        @migration_file_name  = File.basename(destination, ".rb")
+        @migration_class_name = @migration_file_name.camelize
+      end
- -
-
# File railties/lib/rails/generators/migration.rb, line 39
-def set_migration_assigns!(destination)
-  destination = File.expand_path(destination, destination_root)
-
-  migration_dir = File.dirname(destination)
-  @migration_number     = self.class.next_migration_number(migration_dir)
-  @migration_file_name  = File.basename(destination, ".rb")
-  @migration_class_name = @migration_file_name.camelize
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/Generators/NamedBase.html b/src/classes/Rails/Generators/NamedBase.html index 7f6c27866c..ec6bd7146b 100644 --- a/src/classes/Rails/Generators/NamedBase.html +++ b/src/classes/Rails/Generators/NamedBase.html @@ -219,30 +219,30 @@

Examples

- -
- - -
-
# File railties/lib/rails/generators/named_base.rb, line 214
-def self.check_class_collision(options = {}) # :doc:
-  define_method :check_class_collision do
-    name = if respond_to?(:controller_class_name, true) # for ResourceHelpers
-      controller_class_name
-    else
-      class_name
-    end
-
-    class_collisions "#{options[:prefix]}#{name}#{options[:suffix]}"
-  end
-end
-
-
- - + +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 214
+        def self.check_class_collision(options = {}) # :doc:
+          define_method :check_class_collision do
+            name = if respond_to?(:controller_class_name, true) # for ResourceHelpers
+              controller_class_name
+            else
+              class_name
+            end
+
+            class_collisions "#{options[:prefix]}#{name}#{options[:suffix]}"
+          end
+        end
+ + See on GitHub + +
+ + @@ -266,22 +266,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 29
+        def js_template(source, destination)
+          template(source + ".js", destination + ".js")
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 29
-def js_template(source, destination)
-  template(source + ".js", destination + ".js")
-end
-
-
- - + See on GitHub + + + +

@@ -301,24 +301,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 23
+        def template(source, *args, &block)
+          inside_template do
+            Rails::Generators.add_generated_file(super)
+          end
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 23
-def template(source, *args, &block)
-  inside_template do
-    Rails::Generators.add_generated_file(super)
-  end
-end
-
-
- -

+ See on GitHub + + + +

Instance Private methods

@@ -341,26 +341,26 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 138
+        def application_name # :doc:
+          if defined?(Rails) && Rails.application
+            Rails.application.class.name.split("::").first.underscore
+          else
+            "application"
+          end
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 138
-def application_name # :doc:
-  if defined?(Rails) && Rails.application
-    Rails.application.class.name.split("::").first.underscore
-  else
-    "application"
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -380,26 +380,26 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 188
+        def attributes_names # :doc:
+          @attributes_names ||= attributes.each_with_object([]) do |a, names|
+            names << a.column_name
+            names << "password_confirmation" if a.password_digest?
+            names << "#{a.name}_type" if a.polymorphic?
+          end
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 188
-def attributes_names # :doc:
-  @attributes_names ||= attributes.each_with_object([]) do |a, names|
-    names << a.column_name
-    names << "password_confirmation" if a.password_digest?
-    names << "#{a.name}_type" if a.polymorphic?
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -419,22 +419,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 70
+        def class_name # :doc:
+          (class_path + [file_name]).map!(&:camelize).join("::")
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 70
-def class_name # :doc:
-  (class_path + [file_name]).map!(&:camelize).join("::")
-end
-
-
- -

+ See on GitHub + + + +

@@ -454,22 +454,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 58
+        def class_path # :doc:
+          inside_template? || !namespaced? ? regular_class_path : namespaced_class_path
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 58
-def class_path # :doc:
-  inside_template? || !namespaced? ? regular_class_path : namespaced_class_path
-end
-
-
- -

+ See on GitHub + + + +

@@ -489,22 +489,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 105
+        def edit_helper(...) # :doc:
+          "edit_#{show_helper(...)}"
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 105
-def edit_helper(...) # :doc:
-  "edit_#{show_helper(...)}"
-end
-
-
- -

+ See on GitHub + + + +

@@ -524,22 +524,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 54
+        def file_path # :doc:
+          @file_path ||= (class_path + [file_name]).join("/")
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 54
-def file_path # :doc:
-  @file_path ||= (class_path + [file_name]).join("/")
-end
-
-
- -

+ See on GitHub + + + +

@@ -559,22 +559,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 125
+        def fixture_file_name # :doc:
+          @fixture_file_name ||= (pluralize_table_names? ? plural_file_name : file_name)
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 125
-def fixture_file_name # :doc:
-  @fixture_file_name ||= (pluralize_table_names? ? plural_file_name : file_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -594,22 +594,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 74
+        def human_name # :doc:
+          @human_name ||= singular_name.humanize
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 74
-def human_name # :doc:
-  @human_name ||= singular_name.humanize
-end
-
-
- -

+ See on GitHub + + + +

@@ -629,22 +629,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 82
+        def i18n_scope # :doc:
+          @i18n_scope ||= file_path.tr("/", ".")
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 82
-def i18n_scope # :doc:
-  @i18n_scope ||= file_path.tr("/", ".")
-end
-
-
- -

+ See on GitHub + + + +

@@ -664,22 +664,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 97
+        def index_helper(type: nil) # :doc:
+          [plural_route_name, ("index" if uncountable?), type].compact.join("_")
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 97
-def index_helper(type: nil) # :doc:
-  [plural_route_name, ("index" if uncountable?), type].compact.join("_")
-end
-
-
- -

+ See on GitHub + + + +

@@ -699,25 +699,25 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 43
+        def inside_template # :doc:
+          @inside_template = true
+          yield
+        ensure
+          @inside_template = false
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 43
-def inside_template # :doc:
-  @inside_template = true
-  yield
-ensure
-  @inside_template = false
-end
-
-
- -

+ See on GitHub + + + +

@@ -737,22 +737,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 50
+        def inside_template? # :doc:
+          @inside_template
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 50
-def inside_template? # :doc:
-  @inside_template
-end
-
-
- -

+ See on GitHub + + + +

@@ -772,27 +772,27 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 150
+        def model_resource_name(base_name = singular_table_name, prefix: "") # :doc:
+          resource_name = "#{prefix}#{base_name}"
+          if options[:model_name]
+            "[#{controller_class_path.map { |name| ":" + name }.join(", ")}, #{resource_name}]"
+          else
+            resource_name
+          end
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 150
-def model_resource_name(base_name = singular_table_name, prefix: "") # :doc:
-  resource_name = "#{prefix}#{base_name}"
-  if options[:model_name]
-    "[#{controller_class_path.map { |name| ":" + name }.join(", ")}, #{resource_name}]"
-  else
-    resource_name
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -812,22 +812,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 200
+        def mountable_engine? # :doc:
+          defined?(ENGINE_ROOT) && namespaced?
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 200
-def mountable_engine? # :doc:
-  defined?(ENGINE_ROOT) && namespaced?
-end
-
-
- -

+ See on GitHub + + + +

@@ -847,22 +847,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 66
+        def namespaced_class_path # :doc:
+          @namespaced_class_path ||= namespace_dirs + @class_path
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 66
-def namespaced_class_path # :doc:
-  @namespaced_class_path ||= namespace_dirs + @class_path
-end
-
-
- -

+ See on GitHub + + + +

@@ -882,22 +882,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 109
+        def new_helper(type: :url) # :doc:
+          "new_#{singular_route_name}_#{type}"
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 109
-def new_helper(type: :url) # :doc:
-  "new_#{singular_route_name}_#{type}"
-end
-
-
- -

+ See on GitHub + + + +

@@ -917,22 +917,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 121
+        def plural_file_name # :doc:
+          @plural_file_name ||= file_name.pluralize
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 121
-def plural_file_name # :doc:
-  @plural_file_name ||= file_name.pluralize
-end
-
-
- -

+ See on GitHub + + + +

@@ -952,22 +952,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 78
+        def plural_name # :doc:
+          @plural_name ||= singular_name.pluralize
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 78
-def plural_name # :doc:
-  @plural_name ||= singular_name.pluralize
-end
-
-
- -

+ See on GitHub + + + +

@@ -987,26 +987,26 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 167
+        def plural_route_name # :doc:
+          if options[:model_name]
+            "#{controller_class_path.join('_')}_#{plural_table_name}"
+          else
+            plural_table_name
+          end
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 167
-def plural_route_name # :doc:
-  if options[:model_name]
-    "#{controller_class_path.join('_')}_#{plural_table_name}"
-  else
-    plural_table_name
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1026,22 +1026,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 117
+        def plural_table_name # :doc:
+          @plural_table_name ||= (pluralize_table_names? ? table_name : table_name.pluralize)
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 117
-def plural_table_name # :doc:
-  @plural_table_name ||= (pluralize_table_names? ? table_name : table_name.pluralize)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1061,22 +1061,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 196
+        def pluralize_table_names? # :doc:
+          !defined?(ActiveRecord::Base) || ActiveRecord::Base.pluralize_table_names
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 196
-def pluralize_table_names? # :doc:
-  !defined?(ActiveRecord::Base) || ActiveRecord::Base.pluralize_table_names
-end
-
-
- -

+ See on GitHub + + + +

@@ -1096,22 +1096,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 146
+        def redirect_resource_name # :doc:
+          model_resource_name(prefix: "@")
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 146
-def redirect_resource_name # :doc:
-  model_resource_name(prefix: "@")
-end
-
-
- -

+ See on GitHub + + + +

@@ -1131,22 +1131,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 62
+        def regular_class_path # :doc:
+          @class_path
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 62
-def regular_class_path # :doc:
-  @class_path
-end
-
-
- -

+ See on GitHub + + + +

@@ -1166,22 +1166,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 129
+        def route_url # :doc:
+          @route_url ||= controller_class_path.collect { |dname| "/" + dname }.join + "/" + plural_file_name
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 129
-def route_url # :doc:
-  @route_url ||= controller_class_path.collect { |dname| "/" + dname }.join + "/" + plural_file_name
-end
-
-
- -

+ See on GitHub + + + +

@@ -1201,22 +1201,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 101
+        def show_helper(arg = "@#{singular_table_name}", type: :url) # :doc:
+          "#{singular_route_name}_#{type}(#{arg})"
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 101
-def show_helper(arg = "@#{singular_table_name}", type: :url) # :doc:
-  "#{singular_route_name}_#{type}(#{arg})"
-end
-
-
- -

+ See on GitHub + + + +

@@ -1236,22 +1236,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 39
+        def singular_name # :doc:
+          file_name
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 39
-def singular_name # :doc:
-  file_name
-end
-
-
- -

+ See on GitHub + + + +

@@ -1271,26 +1271,26 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 159
+        def singular_route_name # :doc:
+          if options[:model_name]
+            "#{controller_class_path.join('_')}_#{singular_table_name}"
+          else
+            singular_table_name
+          end
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 159
-def singular_route_name # :doc:
-  if options[:model_name]
-    "#{controller_class_path.join('_')}_#{singular_table_name}"
-  else
-    singular_table_name
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1310,22 +1310,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 113
+        def singular_table_name # :doc:
+          @singular_table_name ||= (pluralize_table_names? ? table_name.singularize : table_name)
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 113
-def singular_table_name # :doc:
-  @singular_table_name ||= (pluralize_table_names? ? table_name.singularize : table_name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1345,25 +1345,25 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 86
+        def table_name # :doc:
+          @table_name ||= begin
+            base = pluralize_table_names? ? plural_name : singular_name
+            (class_path + [base]).join("_")
+          end
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 86
-def table_name # :doc:
-  @table_name ||= begin
-    base = pluralize_table_names? ? plural_name : singular_name
-    (class_path + [base]).join("_")
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1383,22 +1383,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 93
+        def uncountable? # :doc:
+          singular_name == plural_name
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 93
-def uncountable? # :doc:
-  singular_name == plural_name
-end
-
-
- -

+ See on GitHub + + + +

@@ -1418,22 +1418,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/named_base.rb, line 133
+        def url_helper_prefix # :doc:
+          @url_helper_prefix ||= (class_path + [file_name]).join("_")
+        end
- -
-
# File railties/lib/rails/generators/named_base.rb, line 133
-def url_helper_prefix # :doc:
-  @url_helper_prefix ||= (class_path + [file_name]).join("_")
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/Generators/Testing/Assertions.html b/src/classes/Rails/Generators/Testing/Assertions.html index dc6bc10b51..aa74d8cff1 100644 --- a/src/classes/Rails/Generators/Testing/Assertions.html +++ b/src/classes/Rails/Generators/Testing/Assertions.html @@ -122,22 +122,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/testing/assertions.rb, line 88
+        def assert_class_method(method, content, &block)
+          assert_instance_method "self.#{method}", content, &block
+        end
- -
-
# File railties/lib/rails/generators/testing/assertions.rb, line 88
-def assert_class_method(method, content, &block)
-  assert_instance_method "self.#{method}", content, &block
-end
-
-
- - + See on GitHub + + + +

@@ -161,7 +161,8 @@

-

+ +

@@ -184,26 +185,26 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/testing/assertions.rb, line 117
+        def assert_field_default_value(attribute_type, value)
+          if value.nil?
+            assert_nil(create_generated_attribute(attribute_type).default)
+          else
+            assert_equal(value, create_generated_attribute(attribute_type).default)
+          end
+        end
- -
-
# File railties/lib/rails/generators/testing/assertions.rb, line 117
-def assert_field_default_value(attribute_type, value)
-  if value.nil?
-    assert_nil(create_generated_attribute(attribute_type).default)
-  else
-    assert_equal(value, create_generated_attribute(attribute_type).default)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -226,22 +227,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/testing/assertions.rb, line 110
+        def assert_field_type(attribute_type, field_type)
+          assert_equal(field_type, create_generated_attribute(attribute_type).field_type)
+        end
- -
-
# File railties/lib/rails/generators/testing/assertions.rb, line 110
-def assert_field_type(attribute_type, field_type)
-  assert_equal(field_type, create_generated_attribute(attribute_type).field_type)
-end
-
-
- -

+ See on GitHub + + + +

@@ -282,35 +283,35 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/testing/assertions.rb, line 25
+        def assert_file(relative, *contents)
+          absolute = File.expand_path(relative, destination_root)
+          assert File.exist?(absolute), "Expected file #{relative.inspect} to exist, but does not"
+
+          read = File.read(absolute) if block_given? || !contents.empty?
+          assert_nothing_raised { yield read } if block_given?
+
+          contents.each do |content|
+            case content
+            when String
+              assert_equal content, read
+            when Regexp
+              assert_match content, read
+            end
+          end
+        end
- -
-
# File railties/lib/rails/generators/testing/assertions.rb, line 25
-def assert_file(relative, *contents)
-  absolute = File.expand_path(relative, destination_root)
-  assert File.exist?(absolute), "Expected file #{relative.inspect} to exist, but does not"
-
-  read = File.read(absolute) if block_given? || !contents.empty?
-  assert_nothing_raised { yield read } if block_given?
-
-  contents.each do |content|
-    case content
-    when String
-      assert_equal content, read
-    when Regexp
-      assert_match content, read
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -341,23 +342,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/testing/assertions.rb, line 100
+        def assert_instance_method(method, content)
+          assert content =~ /(\s+)def #{method}(\(.+\))?(.*?)\n\1end/m, "Expected to have method #{method}"
+          assert_nothing_raised { yield $3.strip } if block_given?
+        end
- -
-
# File railties/lib/rails/generators/testing/assertions.rb, line 100
-def assert_instance_method(method, content)
-  assert content =~ /(\s+)def #{method}(\(.+\))?(.*?)\n\1end/m, "Expected to have method #{method}"
-  assert_nothing_raised { yield $3.strip } if block_given?
-end
-
-
- -

+ See on GitHub + + + +

@@ -381,7 +382,8 @@

-

+ +

@@ -411,24 +413,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/testing/assertions.rb, line 64
+        def assert_migration(relative, *contents, &block)
+          file_name = migration_file_name(relative)
+          assert file_name, "Expected migration #{relative} to exist, but was not found"
+          assert_file file_name, *contents, &block
+        end
- -
-
# File railties/lib/rails/generators/testing/assertions.rb, line 64
-def assert_migration(relative, *contents, &block)
-  file_name = migration_file_name(relative)
-  assert file_name, "Expected migration #{relative} to exist, but was not found"
-  assert_file file_name, *contents, &block
-end
-
-
- -

+ See on GitHub + + + +

@@ -452,7 +454,8 @@

-

+ +

@@ -479,23 +482,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/testing/assertions.rb, line 47
+        def assert_no_file(relative)
+          absolute = File.expand_path(relative, destination_root)
+          assert !File.exist?(absolute), "Expected file #{relative.inspect} to not exist, but does"
+        end
- -
-
# File railties/lib/rails/generators/testing/assertions.rb, line 47
-def assert_no_file(relative)
-  absolute = File.expand_path(relative, destination_root)
-  assert !File.exist?(absolute), "Expected file #{relative.inspect} to not exist, but does"
-end
-
-
- -

+ See on GitHub + + + +

@@ -518,23 +521,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/testing/assertions.rb, line 74
+        def assert_no_migration(relative)
+          file_name = migration_file_name(relative)
+          assert_nil file_name, "Expected migration #{relative} to not exist, but found #{file_name}"
+        end
- -
-
# File railties/lib/rails/generators/testing/assertions.rb, line 74
-def assert_no_migration(relative)
-  file_name = migration_file_name(relative)
-  assert_nil file_name, "Expected migration #{relative} to not exist, but found #{file_name}"
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/Generators/Testing/Behavior.html b/src/classes/Rails/Generators/Testing/Behavior.html index b1bb5e20bb..3b97bf40f3 100644 --- a/src/classes/Rails/Generators/Testing/Behavior.html +++ b/src/classes/Rails/Generators/Testing/Behavior.html @@ -103,22 +103,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/testing/behavior.rb, line 85
+        def create_generated_attribute(attribute_type, name = "test", index = nil)
+          Rails::Generators::GeneratedAttribute.parse([name, attribute_type, index].compact.join(":"))
+        end
- -
-
# File railties/lib/rails/generators/testing/behavior.rb, line 85
-def create_generated_attribute(attribute_type, name = "test", index = nil)
-  Rails::Generators::GeneratedAttribute.parse([name, attribute_type, index].compact.join(":"))
-end
-
-
- - + See on GitHub + + + +

@@ -138,22 +138,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/testing/behavior.rb, line 77
+        def generator(args = default_arguments, options = {}, config = {})
+          @generator ||= generator_class.new(args, options, config.reverse_merge(destination_root: destination_root))
+        end
- -
-
# File railties/lib/rails/generators/testing/behavior.rb, line 77
-def generator(args = default_arguments, options = {}, config = {})
-  @generator ||= generator_class.new(args, options, config.reverse_merge(destination_root: destination_root))
-end
-
-
- -

+ See on GitHub + + + +

@@ -187,27 +187,27 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/testing/behavior.rb, line 67
+        def run_generator(args = default_arguments, config = {})
+          capture(:stdout) do
+            args += ["--skip-bundle"] unless args.include?("--no-skip-bundle") || args.include?("--dev")
+            args += ["--skip-bootsnap"] unless args.include?("--no-skip-bootsnap") || args.include?("--skip-bootsnap")
+
+            generator_class.start(args, config.reverse_merge(destination_root: destination_root))
+          end
+        end
- -
-
# File railties/lib/rails/generators/testing/behavior.rb, line 67
-def run_generator(args = default_arguments, config = {})
-  capture(:stdout) do
-    args += ["--skip-bundle"] unless args.include?("--no-skip-bundle") || args.include?("--dev")
-    args += ["--skip-bootsnap"] unless args.include?("--no-skip-bootsnap") || args.include?("--skip-bootsnap")
-
-    generator_class.start(args, config.reverse_merge(destination_root: destination_root))
-  end
-end
-
-
- -

+ See on GitHub + + + +

Instance Private methods

@@ -230,23 +230,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/testing/behavior.rb, line 99
+          def prepare_destination # :doc:
+            rm_rf(destination_root)
+            mkdir_p(destination_root)
+          end
- -
-
# File railties/lib/rails/generators/testing/behavior.rb, line 99
-def prepare_destination # :doc:
-  rm_rf(destination_root)
-  mkdir_p(destination_root)
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/Rails/Generators/Testing/Behavior/ClassMethods.html b/src/classes/Rails/Generators/Testing/Behavior/ClassMethods.html index a5a2a39942..93150427f7 100644 --- a/src/classes/Rails/Generators/Testing/Behavior/ClassMethods.html +++ b/src/classes/Rails/Generators/Testing/Behavior/ClassMethods.html @@ -86,22 +86,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/testing/behavior.rb, line 39
+          def arguments(array)
+            self.default_arguments = array
+          end
- -
-
# File railties/lib/rails/generators/testing/behavior.rb, line 39
-def arguments(array)
-  self.default_arguments = array
-end
-
-
- - + See on GitHub + + + +

@@ -124,22 +124,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/testing/behavior.rb, line 46
+          def destination(path)
+            self.destination_root = path
+          end
- -
-
# File railties/lib/rails/generators/testing/behavior.rb, line 46
-def destination(path)
-  self.destination_root = path
-end
-
-
- -

+ See on GitHub + + + +

@@ -162,22 +162,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/testing/behavior.rb, line 31
+          def tests(klass)
+            self.generator_class = klass
+          end
- -
-
# File railties/lib/rails/generators/testing/behavior.rb, line 31
-def tests(klass)
-  self.generator_class = klass
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/Generators/Testing/Behaviour.html b/src/classes/Rails/Generators/Testing/Behaviour.html deleted file mode 100644 index 39640c4177..0000000000 --- a/src/classes/Rails/Generators/Testing/Behaviour.html +++ /dev/null @@ -1,257 +0,0 @@ ---- -title: Rails::Generators::Testing::Behaviour -layout: default ---- -
- -
-
- - - - - - - - - -

Namespace

- - -

Module

- - - - - - - -

Methods

- - - - - - - - - - - - - - - - - -

Instance Public methods

- -
-

- - create_generated_attribute(attribute_type, name = "test", index = nil) - -

- - -
-

Create a Rails::Generators::GeneratedAttribute by supplying the attribute type and, optionally, the attribute name:

- -
create_generated_attribute(:string, "name")
-
-
- - - - - - - - -
- - -
-
# File railties/lib/rails/generators/testing/behaviour.rb, line 85
-def create_generated_attribute(attribute_type, name = "test", index = nil)
-  Rails::Generators::GeneratedAttribute.parse([name, attribute_type, index].compact.join(":"))
-end
-
-
- -
- -
-

- - generator(args = default_arguments, options = {}, config = {}) - -

- - -
-

Instantiate the generator.

-
- - - - - - - - -
- - -
-
# File railties/lib/rails/generators/testing/behaviour.rb, line 77
-def generator(args = default_arguments, options = {}, config = {})
-  @generator ||= generator_class.new(args, options, config.reverse_merge(destination_root: destination_root))
-end
-
-
- -
- -
-

- - run_generator(args = default_arguments, config = {}) - -

- - -
-

Runs the generator configured for this class. The first argument is an array like command line arguments:

- -
class AppGeneratorTest < Rails::Generators::TestCase
-  tests AppGenerator
-  destination File.expand_path("../tmp", __dir__)
-  setup :prepare_destination
-
-  test "database.yml is not created when skipping Active Record" do
-    run_generator %w(myapp --skip-active-record)
-    assert_no_file "config/database.yml"
-  end
-end
-
- -

You can provide a configuration hash as second argument. This method returns the output printed by the generator.

-
- - - - - - - - -
- - -
-
# File railties/lib/rails/generators/testing/behaviour.rb, line 67
-def run_generator(args = default_arguments, config = {})
-  capture(:stdout) do
-    args += ["--skip-bundle"] unless args.include?("--no-skip-bundle") || args.include?("--dev")
-    args += ["--skip-bootsnap"] unless args.include?("--no-skip-bootsnap") || args.include?("--skip-bootsnap")
-
-    generator_class.start(args, config.reverse_merge(destination_root: destination_root))
-  end
-end
-
-
- -
- - -

Instance Private methods

- -
-

- - prepare_destination() - -

- - -
-

Clears all files and directories in destination.

-
- - - - - - - - -
- - -
-
# File railties/lib/rails/generators/testing/behaviour.rb, line 99
-def prepare_destination # :doc:
-  rm_rf(destination_root)
-  mkdir_p(destination_root)
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/Rails/Generators/Testing/Behaviour/ClassMethods.html b/src/classes/Rails/Generators/Testing/Behaviour/ClassMethods.html deleted file mode 100644 index 0fe005b9b4..0000000000 --- a/src/classes/Rails/Generators/Testing/Behaviour/ClassMethods.html +++ /dev/null @@ -1,188 +0,0 @@ ---- -title: Rails::Generators::Testing::Behaviour::ClassMethods -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - - -

Instance Public methods

- -
-

- - arguments(array) - -

- - -
-

Sets default arguments on generator invocation. This can be overwritten when invoking it.

- -
arguments %w(app_name --skip-active-record)
-
-
- - - - - - - - -
- - -
-
# File railties/lib/rails/generators/testing/behaviour.rb, line 39
-def arguments(array)
-  self.default_arguments = array
-end
-
-
- -
- -
-

- - destination(path) - -

- - -
-

Sets the destination of generator files:

- -
destination File.expand_path("../tmp", __dir__)
-
-
- - - - - - - - -
- - -
-
# File railties/lib/rails/generators/testing/behaviour.rb, line 46
-def destination(path)
-  self.destination_root = path
-end
-
-
- -
- -
-

- - tests(klass) - -

- - -
-

Sets which generator should be tested:

- -
tests AppGenerator
-
-
- - - - - - - - -
- - -
-
# File railties/lib/rails/generators/testing/behaviour.rb, line 31
-def tests(klass)
-  self.generator_class = klass
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/Rails/HealthController.html b/src/classes/Rails/HealthController.html index 4a4e546588..1e4efbfa49 100644 --- a/src/classes/Rails/HealthController.html +++ b/src/classes/Rails/HealthController.html @@ -104,22 +104,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/health_controller.rb, line 38
+    def show
+      render_up
+    end
- -
-
# File railties/lib/rails/health_controller.rb, line 38
-def show
-  render_up
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/Rails/Info.html b/src/classes/Rails/Info.html index 93dc05316a..54adeff993 100644 --- a/src/classes/Rails/Info.html +++ b/src/classes/Rails/Info.html @@ -96,7 +96,8 @@

- + +

@@ -116,24 +117,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/info.rb, line 25
+      def property(name, value = nil)
+        value ||= yield
+        properties << [name, value] if value
+      rescue Exception
+      end
- -
-
# File railties/lib/rails/info.rb, line 25
-def property(name, value = nil)
-  value ||= yield
-  properties << [name, value] if value
-rescue Exception
-end
-
-
- -

+ See on GitHub + + + +

@@ -153,33 +154,33 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/info.rb, line 43
+      def to_html
+        (+"").tap do |table|
+          properties.each do |(name, value)|
+            table << %()
+            formatted_value = if value.kind_of?(Array)
+              "
    " + value.map { |v| "
  • #{CGI.escapeHTML(v.to_s)}
  • " }.join + "
" + else + CGI.escapeHTML(value.to_s) + end + table << %() + end + table << "
#{CGI.escapeHTML(name.to_s)}#{formatted_value}
" + end + end
- -
-
# File railties/lib/rails/info.rb, line 43
-def to_html
-  (+"<table>").tap do |table|
-    properties.each do |(name, value)|
-      table << %(<tr><td class="name">#{CGI.escapeHTML(name.to_s)}</td>)
-      formatted_value = if value.kind_of?(Array)
-        "<ul>" + value.map { |v| "<li>#{CGI.escapeHTML(v.to_s)}</li>" }.join + "</ul>"
-      else
-        CGI.escapeHTML(value.to_s)
-      end
-      table << %(<td class="value">#{formatted_value}</td></tr>)
-    end
-    table << "</table>"
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -203,28 +204,28 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/info.rb, line 31
+      def to_s
+        column_width = properties.names.map(&:length).max
+        info = properties.map do |name, value|
+          value = value.join(", ") if value.is_a?(Array)
+          "%-#{column_width}s   %s" % [name, value]
+        end
+        info.unshift "About your application's environment"
+        info * "\n"
+      end
- -
-
# File railties/lib/rails/info.rb, line 31
-def to_s
-  column_width = properties.names.map(&:length).max
-  info = properties.map do |name, value|
-    value = value.join(", ") if value.is_a?(Array)
-    "%-#{column_width}s   %s" % [name, value]
-  end
-  info.unshift "About your application's environment"
-  info * "\n"
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/Initializable.html b/src/classes/Rails/Initializable.html index 56e1783e81..1701bdb199 100644 --- a/src/classes/Rails/Initializable.html +++ b/src/classes/Rails/Initializable.html @@ -101,22 +101,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/initializable.rb, line 66
+    def initializers
+      @initializers ||= self.class.initializers_for(self)
+    end
- -
-
# File railties/lib/rails/initializable.rb, line 66
-def initializers
-  @initializers ||= self.class.initializers_for(self)
-end
-
-
- - + See on GitHub + + + +

@@ -136,26 +136,26 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/initializable.rb, line 58
+    def run_initializers(group = :default, *args)
+      return if instance_variable_defined?(:@ran)
+      initializers.tsort_each do |initializer|
+        initializer.run(*args) if initializer.belongs_to?(group)
+      end
+      @ran = true
+    end
- -
-
# File railties/lib/rails/initializable.rb, line 58
-def run_initializers(group = :default, *args)
-  return if instance_variable_defined?(:@ran)
-  initializers.tsort_each do |initializer|
-    initializer.run(*args) if initializer.belongs_to?(group)
-  end
-  @ran = true
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/Initializable/ClassMethods.html b/src/classes/Rails/Initializable/ClassMethods.html index c26d159dab..bf3dd8b7e3 100644 --- a/src/classes/Rails/Initializable/ClassMethods.html +++ b/src/classes/Rails/Initializable/ClassMethods.html @@ -87,24 +87,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/initializable.rb, line 88
+      def initializer(name, opts = {}, &blk)
+        raise ArgumentError, "A block must be passed when defining an initializer" unless blk
+        opts[:after] ||= initializers.last.name unless initializers.empty? || initializers.find { |i| i.name == opts[:before] }
+        initializers << Initializer.new(name, nil, opts, &blk)
+      end
- -
-
# File railties/lib/rails/initializable.rb, line 88
-def initializer(name, opts = {}, &blk)
-  raise ArgumentError, "A block must be passed when defining an initializer" unless blk
-  opts[:after] ||= initializers.last.name unless initializers.empty? || initializers.find { |i| i.name == opts[:before] }
-  initializers << Initializer.new(name, nil, opts, &blk)
-end
-
-
- - + See on GitHub + + + +

@@ -124,22 +124,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/initializable.rb, line 71
+      def initializers
+        @initializers ||= Collection.new
+      end
- -
-
# File railties/lib/rails/initializable.rb, line 71
-def initializers
-  @initializers ||= Collection.new
-end
-
-
- -

+ See on GitHub + + + +

@@ -159,27 +159,27 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/initializable.rb, line 75
+      def initializers_chain
+        initializers = Collection.new
+        ancestors.reverse_each do |klass|
+          next unless klass.respond_to?(:initializers)
+          initializers = initializers + klass.initializers
+        end
+        initializers
+      end
- -
-
# File railties/lib/rails/initializable.rb, line 75
-def initializers_chain
-  initializers = Collection.new
-  ancestors.reverse_each do |klass|
-    next unless klass.respond_to?(:initializers)
-    initializers = initializers + klass.initializers
-  end
-  initializers
-end
-
-
- -

+ See on GitHub + + + +

@@ -199,22 +199,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/initializable.rb, line 84
+      def initializers_for(binding)
+        Collection.new(initializers_chain.map { |i| i.bind(binding) })
+      end
- -
-
# File railties/lib/rails/initializable.rb, line 84
-def initializers_for(binding)
-  Collection.new(initializers_chain.map { |i| i.bind(binding) })
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/Initializable/Collection.html b/src/classes/Rails/Initializable/Collection.html index f4ed029392..9504ec065e 100644 --- a/src/classes/Rails/Initializable/Collection.html +++ b/src/classes/Rails/Initializable/Collection.html @@ -97,22 +97,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/initializable.rb, line 53
+      def +(other)
+        Collection.new(to_a + other.to_a)
+      end
- -
-
# File railties/lib/rails/initializable.rb, line 53
-def +(other)
-  Collection.new(to_a + other.to_a)
-end
-
-
- - + See on GitHub + + + +

@@ -132,22 +132,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/initializable.rb, line 49
+      def tsort_each_child(initializer, &block)
+        select { |i| i.before == initializer.name || i.name == initializer.after }.each(&block)
+      end
- -
-
# File railties/lib/rails/initializable.rb, line 49
-def tsort_each_child(initializer, &block)
-  select { |i| i.before == initializer.name || i.name == initializer.after }.each(&block)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/Initializable/Initializer.html b/src/classes/Rails/Initializable/Initializer.html index c3fc623c66..7b331c2601 100644 --- a/src/classes/Rails/Initializable/Initializer.html +++ b/src/classes/Rails/Initializable/Initializer.html @@ -126,23 +126,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/initializable.rb, line 14
+      def initialize(name, context, options, &block)
+        options[:group] ||= :default
+        @name, @context, @options, @block = name, context, options, block
+      end
- -
-
# File railties/lib/rails/initializable.rb, line 14
-def initialize(name, context, options, &block)
-  options[:group] ||= :default
-  @name, @context, @options, @block = name, context, options, block
-end
-
-
- - + See on GitHub + + + + @@ -166,22 +166,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/initializable.rb, line 23
+      def after
+        @options[:after]
+      end
- -
-
# File railties/lib/rails/initializable.rb, line 23
-def after
-  @options[:after]
-end
-
-
- - + See on GitHub + + + +

@@ -201,22 +201,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/initializable.rb, line 19
+      def before
+        @options[:before]
+      end
- -
-
# File railties/lib/rails/initializable.rb, line 19
-def before
-  @options[:before]
-end
-
-
- -

+ See on GitHub + + + +

@@ -236,22 +236,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/initializable.rb, line 27
+      def belongs_to?(group)
+        @options[:group] == group || @options[:group] == :all
+      end
- -
-
# File railties/lib/rails/initializable.rb, line 27
-def belongs_to?(group)
-  @options[:group] == group || @options[:group] == :all
-end
-
-
- -

+ See on GitHub + + + +

@@ -271,23 +271,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/initializable.rb, line 35
+      def bind(context)
+        return self if @context
+        Initializer.new(@name, context, @options, &block)
+      end
- -
-
# File railties/lib/rails/initializable.rb, line 35
-def bind(context)
-  return self if @context
-  Initializer.new(@name, context, @options, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -307,22 +307,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/initializable.rb, line 40
+      def context_class
+        @context.class
+      end
- -
-
# File railties/lib/rails/initializable.rb, line 40
-def context_class
-  @context.class
-end
-
-
- -

+ See on GitHub + + + +

@@ -342,22 +342,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/initializable.rb, line 31
+      def run(*args)
+        @context.instance_exec(*args, &block)
+      end
- -
-
# File railties/lib/rails/initializable.rb, line 31
-def run(*args)
-  @context.instance_exec(*args, &block)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/Paths/Path.html b/src/classes/Rails/Paths/Path.html index 3e9adddcff..39ed7fe5f6 100644 --- a/src/classes/Rails/Paths/Path.html +++ b/src/classes/Rails/Paths/Path.html @@ -164,31 +164,31 @@

- -
- - -
-
# File railties/lib/rails/paths.rb, line 119
-def initialize(root, current, paths, options = {})
-  @paths   = paths
-  @current = current
-  @root    = root
-  @glob    = options[:glob]
-  @exclude = options[:exclude]
-
-  options[:autoload_once] ? autoload_once! : skip_autoload_once!
-  options[:eager_load]    ? eager_load!    : skip_eager_load!
-  options[:autoload]      ? autoload!      : skip_autoload!
-  options[:load_path]     ? load_path!     : skip_load_path!
-end
-
-
- - + +
+ + Source code + + +
# File railties/lib/rails/paths.rb, line 119
+      def initialize(root, current, paths, options = {})
+        @paths   = paths
+        @current = current
+        @root    = root
+        @glob    = options[:glob]
+        @exclude = options[:exclude]
+
+        options[:autoload_once] ? autoload_once! : skip_autoload_once!
+        options[:eager_load]    ? eager_load!    : skip_eager_load!
+        options[:autoload]      ? autoload!      : skip_autoload!
+        options[:load_path]     ? load_path!     : skip_load_path!
+      end
+ + See on GitHub + +
+ + @@ -216,22 +216,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/paths.rb, line 171
+      def <<(path)
+        @paths << path
+      end
- -
-
# File railties/lib/rails/paths.rb, line 171
-def <<(path)
-  @paths << path
-end
-
-
- - + See on GitHub + + + +

@@ -251,25 +251,25 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/paths.rb, line 136
+      def children
+        keys = @root.keys.find_all { |k|
+          k.start_with?(@current) && k != @current
+        }
+        @root.values_at(*keys.sort)
+      end
- -
-
# File railties/lib/rails/paths.rb, line 136
-def children
-  keys = @root.keys.find_all { |k|
-    k.start_with?(@current) && k != @current
-  }
-  @root.values_at(*keys.sort)
-end
-
-
- -

+ See on GitHub + + + +

@@ -289,22 +289,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/paths.rb, line 176
+      def concat(paths)
+        @paths.concat paths
+      end
- -
-
# File railties/lib/rails/paths.rb, line 176
-def concat(paths)
-  @paths.concat paths
-end
-
-
- -

+ See on GitHub + + + +

@@ -324,22 +324,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/paths.rb, line 167
+      def each(&block)
+        @paths.each(&block)
+      end
- -
-
# File railties/lib/rails/paths.rb, line 167
-def each(&block)
-  @paths.each(&block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -359,29 +359,29 @@

- -
- - -
-
# File railties/lib/rails/paths.rb, line 220
-def existent
-  expanded.select do |f|
-    does_exist = File.exist?(f)
+          
+            
+ + Source code + - if !does_exist && File.symlink?(f) - raise "File #{f.inspect} is a symlink that does not point to a valid file" - end - does_exist - end -end
-
-
- -

+
# File railties/lib/rails/paths.rb, line 220
+      def existent
+        expanded.select do |f|
+          does_exist = File.exist?(f)
+
+          if !does_exist && File.symlink?(f)
+            raise "File #{f.inspect} is a symlink that does not point to a valid file"
+          end
+          does_exist
+        end
+      end
+ + See on GitHub + + + +

@@ -401,22 +401,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/paths.rb, line 231
+      def existent_directories
+        expanded.select { |d| File.directory?(d) }
+      end
- -
-
# File railties/lib/rails/paths.rb, line 231
-def existent_directories
-  expanded.select { |d| File.directory?(d) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -440,36 +440,36 @@

- -
- - -
-
# File railties/lib/rails/paths.rb, line 201
-def expanded
-  raise "You need to set a path root" unless @root.path
-  result = []
+          
+            
+ + Source code + - each do |path| - path = File.expand_path(path, @root.path) +
# File railties/lib/rails/paths.rb, line 201
+      def expanded
+        raise "You need to set a path root" unless @root.path
+        result = []
 
-    if @glob && File.directory?(path)
-      result.concat files_in(path)
-    else
-      result << path
-    end
-  end
+        each do |path|
+          path = File.expand_path(path, @root.path)
 
-  result.uniq!
-  result
-end
-
-
- -

+ if @glob && File.directory?(path) + result.concat files_in(path) + else + result << path + end + end + + result.uniq! + result + end + + See on GitHub + + + +

@@ -489,22 +489,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/paths.rb, line 143
+      def first
+        expanded.first
+      end
- -
-
# File railties/lib/rails/paths.rb, line 143
-def first
-  expanded.first
-end
-
-
- -

+ See on GitHub + + + +

@@ -524,22 +524,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/paths.rb, line 147
+      def last
+        expanded.last
+      end
- -
-
# File railties/lib/rails/paths.rb, line 147
-def last
-  expanded.last
-end
-
-
- -

+ See on GitHub + + + +

@@ -559,26 +559,26 @@

- -
- - -
-
# File railties/lib/rails/paths.rb, line 188
-def paths
-  raise "You need to set a path root" unless @root.path
+          
+            
+ + Source code + - map do |p| - Pathname.new(@root.path).join(p) - end -end
-
-
- -

+
# File railties/lib/rails/paths.rb, line 188
+      def paths
+        raise "You need to set a path root" unless @root.path
+
+        map do |p|
+          Pathname.new(@root.path).join(p)
+        end
+      end
+ + See on GitHub + + + +

@@ -602,7 +602,8 @@

-

+ +

@@ -626,7 +627,8 @@

-

+ +

@@ -646,22 +648,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/paths.rb, line 184
+      def to_ary
+        @paths
+      end
- -
-
# File railties/lib/rails/paths.rb, line 184
-def to_ary
-  @paths
-end
-
-
- -

+ See on GitHub + + + +

@@ -681,22 +683,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/paths.rb, line 180
+      def unshift(*paths)
+        @paths.unshift(*paths)
+      end
- -
-
# File railties/lib/rails/paths.rb, line 180
-def unshift(*paths)
-  @paths.unshift(*paths)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/Paths/Root.html b/src/classes/Rails/Paths/Root.html index 540882f1c9..3d3dc12f4a 100644 --- a/src/classes/Rails/Paths/Root.html +++ b/src/classes/Rails/Paths/Root.html @@ -183,23 +183,23 @@

- -
- - -
-
# File railties/lib/rails/paths.rb, line 54
-def initialize(path)
-  @path = path
-  @root = {}
-end
-
-
- - + +
+ + Source code + + +
# File railties/lib/rails/paths.rb, line 54
+      def initialize(path)
+        @path = path
+        @root = {}
+      end
+ + See on GitHub + +
+ + @@ -223,22 +223,22 @@

- -
- - -
-
# File railties/lib/rails/paths.rb, line 69
-def [](path)
-  @root[path]
-end
-
-
- - + +
+ + Source code + + +
# File railties/lib/rails/paths.rb, line 69
+      def [](path)
+        @root[path]
+      end
+ + See on GitHub + +
+ +

@@ -258,23 +258,23 @@

- -
- - -
-
# File railties/lib/rails/paths.rb, line 59
-def []=(path, value)
-  glob = self[path] ? self[path].glob : nil
-  add(path, with: value, glob: glob)
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/paths.rb, line 59
+      def []=(path, value)
+        glob = self[path] ? self[path].glob : nil
+        add(path, with: value, glob: glob)
+      end
+ + See on GitHub + +
+ +

@@ -294,23 +294,23 @@

- -
- - -
-
# File railties/lib/rails/paths.rb, line 64
-def add(path, options = {})
-  with = Array(options.fetch(:with, path))
-  @root[path] = Path.new(self, path, with, options)
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/paths.rb, line 64
+      def add(path, options = {})
+        with = Array(options.fetch(:with, path))
+        @root[path] = Path.new(self, path, with, options)
+      end
+ + See on GitHub + +
+ +

@@ -330,22 +330,22 @@

- -
- - -
-
# File railties/lib/rails/paths.rb, line 85
-def all_paths
-  values.tap(&:uniq!)
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/paths.rb, line 85
+      def all_paths
+        values.tap(&:uniq!)
+      end
+ + See on GitHub + +
+ +

@@ -365,22 +365,22 @@

- -
- - -
-
# File railties/lib/rails/paths.rb, line 89
-def autoload_once
-  filter_by(&:autoload_once?)
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/paths.rb, line 89
+      def autoload_once
+        filter_by(&:autoload_once?)
+      end
+ + See on GitHub + +
+ +

@@ -400,22 +400,22 @@

- -
- - -
-
# File railties/lib/rails/paths.rb, line 97
-def autoload_paths
-  filter_by(&:autoload?)
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/paths.rb, line 97
+      def autoload_paths
+        filter_by(&:autoload?)
+      end
+ + See on GitHub + +
+ +

@@ -435,22 +435,22 @@

- -
- - -
-
# File railties/lib/rails/paths.rb, line 93
-def eager_load
-  filter_by(&:eager_load?)
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/paths.rb, line 93
+      def eager_load
+        filter_by(&:eager_load?)
+      end
+ + See on GitHub + +
+ +

@@ -470,22 +470,22 @@

- -
- - -
-
# File railties/lib/rails/paths.rb, line 77
-def keys
-  @root.keys
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/paths.rb, line 77
+      def keys
+        @root.keys
+      end
+ + See on GitHub + +
+ +

@@ -505,22 +505,22 @@

- -
- - -
-
# File railties/lib/rails/paths.rb, line 101
-def load_paths
-  filter_by(&:load_path?)
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/paths.rb, line 101
+      def load_paths
+        filter_by(&:load_path?)
+      end
+ + See on GitHub + +
+ +

@@ -540,22 +540,22 @@

- -
- - -
-
# File railties/lib/rails/paths.rb, line 73
-def values
-  @root.values
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/paths.rb, line 73
+      def values
+        @root.values
+      end
+ + See on GitHub + +
+ +

@@ -575,22 +575,22 @@

- -
- - -
-
# File railties/lib/rails/paths.rb, line 81
-def values_at(*list)
-  @root.values_at(*list)
-end
-
-
- -

+ +
+ + Source code + + +
# File railties/lib/rails/paths.rb, line 81
+      def values_at(*list)
+        @root.values_at(*list)
+      end
+ + See on GitHub + +
+ + diff --git a/src/classes/Rails/PluginBuilder.html b/src/classes/Rails/PluginBuilder.html index df353d8609..c628e66baa 100644 --- a/src/classes/Rails/PluginBuilder.html +++ b/src/classes/Rails/PluginBuilder.html @@ -179,47 +179,47 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 20
-def app
-  if mountable?
-    if api?
-      directory "app", exclude_pattern: %r{app/(views|helpers)}
-    else
-      directory "app"
-      empty_directory_with_keep_file "app/assets/images/#{namespaced_name}"
-    end
-
-    empty_directory_with_keep_file "app/models/concerns"
-    empty_directory_with_keep_file "app/controllers/concerns"
-    remove_dir "app/mailers" if options[:skip_action_mailer]
-    remove_dir "app/jobs" if options[:skip_active_job]
-  elsif full?
-    empty_directory_with_keep_file "app/models"
-    empty_directory_with_keep_file "app/controllers"
-    empty_directory_with_keep_file "app/models/concerns"
-    empty_directory_with_keep_file "app/controllers/concerns"
-    empty_directory_with_keep_file "app/mailers" unless options[:skip_action_mailer]
-    empty_directory_with_keep_file "app/jobs" unless options[:skip_active_job]
-
-    unless api?
-      empty_directory_with_keep_file "app/assets/images/#{namespaced_name}"
-      empty_directory_with_keep_file "app/helpers"
-      empty_directory_with_keep_file "app/views"
-    end
-  end
-end
-
-
- - + +
+ + Source code + + +
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 20
+    def app
+      if mountable?
+        if api?
+          directory "app", exclude_pattern: %r{app/(views|helpers)}
+        else
+          directory "app"
+          empty_directory_with_keep_file "app/assets/images/#{namespaced_name}"
+        end
+
+        empty_directory_with_keep_file "app/models/concerns"
+        empty_directory_with_keep_file "app/controllers/concerns"
+        remove_dir "app/mailers" if options[:skip_action_mailer]
+        remove_dir "app/jobs" if options[:skip_active_job]
+      elsif full?
+        empty_directory_with_keep_file "app/models"
+        empty_directory_with_keep_file "app/controllers"
+        empty_directory_with_keep_file "app/models/concerns"
+        empty_directory_with_keep_file "app/controllers/concerns"
+        empty_directory_with_keep_file "app/mailers" unless options[:skip_action_mailer]
+        empty_directory_with_keep_file "app/jobs" unless options[:skip_active_job]
+
+        unless api?
+          empty_directory_with_keep_file "app/assets/images/#{namespaced_name}"
+          empty_directory_with_keep_file "app/helpers"
+          empty_directory_with_keep_file "app/views"
+        end
+      end
+    end
+ + See on GitHub + +
+ +

@@ -239,22 +239,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 157
+    def assets_manifest
+      template "rails/engine_manifest.js", "app/assets/config/#{underscored_name}_manifest.js"
+    end
- -
-
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 157
-def assets_manifest
-  template "rails/engine_manifest.js", "app/assets/config/#{underscored_name}_manifest.js"
-end
-
-
- -

+ See on GitHub + + + +

@@ -274,26 +274,26 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 170
+    def bin(force = false)
+      bin_file = engine? ? "bin/rails.tt" : "bin/test.tt"
+      template bin_file, force: force do |content|
+        "#{shebang}\n" + content
+      end
+      chmod "bin", 0755, verbose: false
+    end
- -
-
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 170
-def bin(force = false)
-  bin_file = engine? ? "bin/rails.tt" : "bin/test.tt"
-  template bin_file, force: force do |content|
-    "#{shebang}\n" + content
-  end
-  chmod "bin", 0755, verbose: false
-end
-
-
- -

+ See on GitHub + + + +

@@ -313,22 +313,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 87
+    def config
+      template "config/routes.rb" if engine?
+    end
- -
-
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 87
-def config
-  template "config/routes.rb" if engine?
-end
-
-
- -

+ See on GitHub + + + +

@@ -348,22 +348,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 53
+    def gemfile
+      template "Gemfile"
+    end
- -
-
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 53
-def gemfile
-  template "Gemfile"
-end
-
-
- -

+ See on GitHub + + + +

@@ -383,28 +383,28 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 178
-def gemfile_entry
-  return unless inside_application?
+          
+            
+ + Source code + - gemfile_in_app_path = File.join(rails_app_path, "Gemfile") - if File.exist? gemfile_in_app_path - entry = "\ngem '#{name}', path: '#{relative_path}'" - append_file gemfile_in_app_path, entry - end -end
-
-
- -

+
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 178
+    def gemfile_entry
+      return unless inside_application?
+
+      gemfile_in_app_path = File.join(rails_app_path, "Gemfile")
+      if File.exist? gemfile_in_app_path
+        entry = "\ngem '#{name}', path: '#{relative_path}'"
+        append_file gemfile_in_app_path, entry
+      end
+    end
+ + See on GitHub + + + +

@@ -424,22 +424,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 61
+    def gemspec
+      template "%name%.gemspec"
+    end
- -
-
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 61
-def gemspec
-  template "%name%.gemspec"
-end
-
-
- -

+ See on GitHub + + + +

@@ -459,30 +459,30 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 112
-def generate_test_dummy(force = false)
-  opts = options.transform_keys(&:to_sym).except(*DUMMY_IGNORE_OPTIONS)
-  opts[:force] = force
-  opts[:skip_bundle] = true
-  opts[:skip_git] = true
-  opts[:skip_hotwire] = true
-  opts[:dummy_app] = true
+          
+            
+ + Source code + - invoke Rails::Generators::AppGenerator, - [ File.expand_path(dummy_path, destination_root) ], opts -end
-
-
- -

+
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 112
+    def generate_test_dummy(force = false)
+      opts = options.transform_keys(&:to_sym).except(*DUMMY_IGNORE_OPTIONS)
+      opts[:force] = force
+      opts[:skip_bundle] = true
+      opts[:skip_git] = true
+      opts[:skip_hotwire] = true
+      opts[:dummy_app] = true
+
+      invoke Rails::Generators::AppGenerator,
+        [ File.expand_path(dummy_path, destination_root) ], opts
+    end
+ + See on GitHub + + + +

@@ -502,22 +502,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 65
+    def gitignore
+      template "gitignore", ".gitignore"
+    end
- -
-
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 65
-def gitignore
-  template "gitignore", ".gitignore"
-end
-
-
- -

+ See on GitHub + + + +

@@ -537,30 +537,30 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 75
-def lib
-  template "lib/%namespaced_name%.rb"
-  template "lib/tasks/%namespaced_name%_tasks.rake"
-  template "lib/%namespaced_name%/version.rb"
+          
+            
+ + Source code + - if engine? - template "lib/%namespaced_name%/engine.rb" - else - template "lib/%namespaced_name%/railtie.rb" - end -end
-
-
- -

+
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 75
+    def lib
+      template "lib/%namespaced_name%.rb"
+      template "lib/tasks/%namespaced_name%_tasks.rake"
+      template "lib/%namespaced_name%/version.rb"
+
+      if engine?
+        template "lib/%namespaced_name%/engine.rb"
+      else
+        template "lib/%namespaced_name%/railtie.rb"
+      end
+    end
+ + See on GitHub + + + +

@@ -580,22 +580,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 57
+    def license
+      template "MIT-LICENSE" unless inside_application?
+    end
- -
-
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 57
-def license
-  template "MIT-LICENSE" unless inside_application?
-end
-
-
- -

+ See on GitHub + + + +

@@ -615,22 +615,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 16
+    def rakefile
+      template "Rakefile"
+    end
- -
-
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 16
-def rakefile
-  template "Rakefile"
-end
-
-
- -

+ See on GitHub + + + +

@@ -650,22 +650,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 49
+    def readme
+      template "README.md"
+    end
- -
-
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 49
-def readme
-  template "README.md"
-end
-
-
- -

+ See on GitHub + + + +

@@ -685,27 +685,27 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 161
+    def stylesheets
+      if mountable?
+        copy_file "rails/stylesheets.css",
+                  "app/assets/stylesheets/#{namespaced_name}/application.css"
+      elsif full?
+        empty_directory_with_keep_file "app/assets/stylesheets/#{namespaced_name}"
+      end
+    end
- -
-
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 161
-def stylesheets
-  if mountable?
-    copy_file "rails/stylesheets.css",
-              "app/assets/stylesheets/#{namespaced_name}/application.css"
-  elsif full?
-    empty_directory_with_keep_file "app/assets/stylesheets/#{namespaced_name}"
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -725,37 +725,37 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 91
-def test
-  template "test/test_helper.rb"
-  template "test/%namespaced_name%_test.rb"
+          
+            
+ + Source code + - if engine? - empty_directory_with_keep_file "test/fixtures/files" - empty_directory_with_keep_file "test/controllers" - empty_directory_with_keep_file "test/mailers" - empty_directory_with_keep_file "test/models" - empty_directory_with_keep_file "test/integration" +
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 91
+    def test
+      template "test/test_helper.rb"
+      template "test/%namespaced_name%_test.rb"
 
-    unless api?
-      empty_directory_with_keep_file "test/helpers"
-    end
+      if engine?
+        empty_directory_with_keep_file "test/fixtures/files"
+        empty_directory_with_keep_file "test/controllers"
+        empty_directory_with_keep_file "test/mailers"
+        empty_directory_with_keep_file "test/models"
+        empty_directory_with_keep_file "test/integration"
 
-    template "test/integration/navigation_test.rb"
-  end
-end
-
-
- -

+ unless api? + empty_directory_with_keep_file "test/helpers" + end + + template "test/integration/navigation_test.rb" + end + end + + See on GitHub + + + +

@@ -775,31 +775,31 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 144
+    def test_dummy_clean
+      inside dummy_path do
+        remove_file ".ruby-version"
+        remove_file "db/seeds.rb"
+        remove_file "Gemfile"
+        remove_file "lib/tasks"
+        remove_file "public/robots.txt"
+        remove_file "README.md"
+        remove_file "test"
+        remove_file "vendor"
+      end
+    end
- -
-
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 144
-def test_dummy_clean
-  inside dummy_path do
-    remove_file ".ruby-version"
-    remove_file "db/seeds.rb"
-    remove_file "Gemfile"
-    remove_file "lib/tasks"
-    remove_file "public/robots.txt"
-    remove_file "README.md"
-    remove_file "test"
-    remove_file "vendor"
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -819,33 +819,33 @@

- -
- - -
-
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 124
-    def test_dummy_config
-      template "rails/boot.rb", "#{dummy_path}/config/boot.rb", force: true
+          
+            
+ + Source code + + +
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 124
+    def test_dummy_config
+      template "rails/boot.rb", "#{dummy_path}/config/boot.rb", force: true
+
+      if mountable?
+        template "rails/routes.rb", "#{dummy_path}/config/routes.rb", force: true
+      end
+      if engine? && !api?
+        insert_into_file "#{dummy_path}/config/application.rb", indent(<<~RUBY, 4), after: /^\s*config\.load_defaults.*\n/
 
-      if mountable?
-        template "rails/routes.rb", "#{dummy_path}/config/routes.rb", force: true
-      end
-      if engine? && !api?
-        insert_into_file "#{dummy_path}/config/application.rb", indent(<<~RUBY, 4), after: /^\s*config\.load_defaults.*\n/
-
           # For compatibility with applications that use this config
           config.action_controller.include_all_helpers = false
-        RUBY
-      end
-    end
-
-
- -

+ RUBY + end + end + + See on GitHub + + + +

@@ -865,23 +865,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 139
+    def test_dummy_sprocket_assets
+      template "rails/stylesheets.css",   "#{dummy_path}/app/assets/stylesheets/application.css", force: true
+      template "rails/dummy_manifest.js", "#{dummy_path}/app/assets/config/manifest.js", force: true
+    end
- -
-
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 139
-def test_dummy_sprocket_assets
-  template "rails/stylesheets.css",   "#{dummy_path}/app/assets/stylesheets/application.css", force: true
-  template "rails/dummy_manifest.js", "#{dummy_path}/app/assets/config/manifest.js", force: true
-end
-
-
- -

+ See on GitHub + + + +

@@ -901,24 +901,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 69
+    def version_control
+      if !options[:skip_git] && !options[:pretend]
+        run git_init_command, capture: options[:quiet], abort_on_failure: false
+      end
+    end
- -
-
# File railties/lib/rails/generators/rails/plugin/plugin_generator.rb, line 69
-def version_control
-  if !options[:skip_git] && !options[:pretend]
-    run git_init_command, capture: options[:quiet], abort_on_failure: false
-  end
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/Rack/Logger.html b/src/classes/Rails/Rack/Logger.html index e088eba4ec..68c60a135d 100644 --- a/src/classes/Rails/Rack/Logger.html +++ b/src/classes/Rails/Rack/Logger.html @@ -104,23 +104,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/rack/logger.rb, line 15
+      def initialize(app, taggers = nil)
+        @app          = app
+        @taggers      = taggers || []
+      end
- -
-
# File railties/lib/rails/rack/logger.rb, line 15
-def initialize(app, taggers = nil)
-  @app          = app
-  @taggers      = taggers || []
-end
-
-
- - + See on GitHub + + + + @@ -144,28 +144,28 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/rack/logger.rb, line 20
+      def call(env)
+        request = ActionDispatch::Request.new(env)
+
+        if logger.respond_to?(:tagged)
+          logger.tagged(*compute_tags(request)) { call_app(request, env) }
+        else
+          call_app(request, env)
+        end
+      end
- -
-
# File railties/lib/rails/rack/logger.rb, line 20
-def call(env)
-  request = ActionDispatch::Request.new(env)
-
-  if logger.respond_to?(:tagged)
-    logger.tagged(*compute_tags(request)) { call_app(request, env) }
-  else
-    call_app(request, env)
-  end
-end
-
-
- - + See on GitHub + + + +

Instance Private methods

@@ -188,40 +188,40 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/rack/logger.rb, line 31
+        def call_app(request, env) # :doc:
+          instrumenter = ActiveSupport::Notifications.instrumenter
+          handle = instrumenter.build_handle("request.action_dispatch", { request: request })
+          handle.start
+
+          logger.info { started_request_message(request) }
+          status, headers, body = response = @app.call(env)
+          body = ::Rack::BodyProxy.new(body, &handle.method(:finish))
+
+          if response.frozen?
+            [status, headers, body]
+          else
+            response[2] = body
+            response
+          end
+        rescue Exception
+          handle.finish
+          raise
+        ensure
+          ActiveSupport::LogSubscriber.flush_all!
+        end
- -
-
# File railties/lib/rails/rack/logger.rb, line 31
-def call_app(request, env) # :doc:
-  instrumenter = ActiveSupport::Notifications.instrumenter
-  handle = instrumenter.build_handle("request.action_dispatch", { request: request })
-  handle.start
-
-  logger.info { started_request_message(request) }
-  status, headers, body = response = @app.call(env)
-  body = ::Rack::BodyProxy.new(body, &handle.method(:finish))
-
-  if response.frozen?
-    [status, headers, body]
-  else
-    response[2] = body
-    response
-  end
-rescue Exception
-  handle.finish
-  raise
-ensure
-  ActiveSupport::LogSubscriber.flush_all!
-end
-
-
- - + See on GitHub + + + +

@@ -241,31 +241,31 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/rack/logger.rb, line 62
+        def compute_tags(request) # :doc:
+          @taggers.collect do |tag|
+            case tag
+            when Proc
+              tag.call(request)
+            when Symbol
+              request.send(tag)
+            else
+              tag
+            end
+          end
+        end
- -
-
# File railties/lib/rails/rack/logger.rb, line 62
-def compute_tags(request) # :doc:
-  @taggers.collect do |tag|
-    case tag
-    when Proc
-      tag.call(request)
-    when Symbol
-      request.send(tag)
-    else
-      tag
-    end
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -285,26 +285,26 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/rack/logger.rb, line 54
+        def started_request_message(request) # :doc:
+          sprintf('Started %s "%s" for %s at %s',
+            request.raw_request_method,
+            request.filtered_path,
+            request.remote_ip,
+            Time.now)
+        end
- -
-
# File railties/lib/rails/rack/logger.rb, line 54
-def started_request_message(request) # :doc:
-  sprintf('Started %s "%s" for %s at %s',
-    request.raw_request_method,
-    request.filtered_path,
-    request.remote_ip,
-    Time.now)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/Rails.html b/src/classes/Rails/Rails.html deleted file mode 100644 index 87863b394d..0000000000 --- a/src/classes/Rails/Rails.html +++ /dev/null @@ -1,145 +0,0 @@ ---- -title: Rails::Rails -layout: default ---- -
- -
-
- - - - - - - - - -

Namespace

- - -

Module

- - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/Rails/Rails/Conductor.html b/src/classes/Rails/Rails/Conductor.html deleted file mode 100644 index 540e77c6e0..0000000000 --- a/src/classes/Rails/Rails/Conductor.html +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: Rails::Rails::Conductor -layout: default ---- -
- -
-
- - - - - - - - - -

Namespace

- - -

Module

- - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/Rails/Rails/Conductor/ActionMailbox.html b/src/classes/Rails/Rails/Conductor/ActionMailbox.html deleted file mode 100644 index dad5972e9a..0000000000 --- a/src/classes/Rails/Rails/Conductor/ActionMailbox.html +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: Rails::Rails::Conductor::ActionMailbox -layout: default ---- -
- - -
diff --git a/src/classes/Rails/Rails/Conductor/ActionMailbox/InboundEmails.html b/src/classes/Rails/Rails/Conductor/ActionMailbox/InboundEmails.html deleted file mode 100644 index c4f611f477..0000000000 --- a/src/classes/Rails/Rails/Conductor/ActionMailbox/InboundEmails.html +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: Rails::Rails::Conductor::ActionMailbox::InboundEmails -layout: default ---- -
- -
-
- - - - - - - - - -

Namespace

- - - - -

Class

- - - - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/src/classes/Rails/Rails/Conductor/ActionMailbox/InboundEmails/SourcesController.html b/src/classes/Rails/Rails/Conductor/ActionMailbox/InboundEmails/SourcesController.html deleted file mode 100644 index db9fd81a0c..0000000000 --- a/src/classes/Rails/Rails/Conductor/ActionMailbox/InboundEmails/SourcesController.html +++ /dev/null @@ -1,146 +0,0 @@ ---- -title: Rails::Rails::Conductor::ActionMailbox::InboundEmails::SourcesController -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - - -

Instance Public methods

- -
-

- - create() - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails/sources_controller.rb, line 8
-def create
-  inbound_email = ActionMailbox::InboundEmail.create_and_extract_message_id! params[:source]
-  redirect_to main_app.rails_conductor_inbound_email_url(inbound_email)
-end
-
-
- -
- -
-

- - new() - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails/sources_controller.rb, line 5
-def new
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/Rails/Rails/Conductor/ActionMailbox/InboundEmailsController.html b/src/classes/Rails/Rails/Conductor/ActionMailbox/InboundEmailsController.html deleted file mode 100644 index abcdfaa239..0000000000 --- a/src/classes/Rails/Rails/Conductor/ActionMailbox/InboundEmailsController.html +++ /dev/null @@ -1,224 +0,0 @@ ---- -title: Rails::Rails::Conductor::ActionMailbox::InboundEmailsController -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - - -

Instance Public methods

- -
-

- - create() - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails_controller.rb, line 16
-def create
-  inbound_email = create_inbound_email(new_mail)
-  redirect_to main_app.rails_conductor_inbound_email_url(inbound_email)
-end
-
-
- -
- -
-

- - index() - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails_controller.rb, line 5
-def index
-  @inbound_emails = ActionMailbox::InboundEmail.order(created_at: :desc)
-end
-
-
- -
- -
-

- - new() - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails_controller.rb, line 9
-def new
-end
-
-
- -
- -
-

- - show() - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails_controller.rb, line 12
-def show
-  @inbound_email = ActionMailbox::InboundEmail.find(params[:id])
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/Rails/Rails/Conductor/ActionMailbox/IncineratesController.html b/src/classes/Rails/Rails/Conductor/ActionMailbox/IncineratesController.html deleted file mode 100644 index 33b4b1f5a6..0000000000 --- a/src/classes/Rails/Rails/Conductor/ActionMailbox/IncineratesController.html +++ /dev/null @@ -1,115 +0,0 @@ ---- -title: Rails::Rails::Conductor::ActionMailbox::IncineratesController -layout: default ---- -
- -
-
- -
- -

Incinerating will destroy an email that is due and has already been processed.

- -
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - - -

Instance Public methods

- -
-

- - create() - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionmailbox/app/controllers/rails/conductor/action_mailbox/incinerates_controller.rb, line 6
-def create
-  ActionMailbox::InboundEmail.find(params[:inbound_email_id]).incinerate
-
-  redirect_to main_app.rails_conductor_inbound_emails_url
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/Rails/Rails/Conductor/ActionMailbox/ReroutesController.html b/src/classes/Rails/Rails/Conductor/ActionMailbox/ReroutesController.html deleted file mode 100644 index 03cf01c92c..0000000000 --- a/src/classes/Rails/Rails/Conductor/ActionMailbox/ReroutesController.html +++ /dev/null @@ -1,116 +0,0 @@ ---- -title: Rails::Rails::Conductor::ActionMailbox::ReroutesController -layout: default ---- -
- -
-
- -
- -

Rerouting will run routing and processing on an email that has already been, or attempted to be, processed.

- -
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - - -

Instance Public methods

- -
-

- - create() - -

- - -
- -
- - - - - - - - -
- - -
-
# File actionmailbox/app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb, line 6
-def create
-  inbound_email = ActionMailbox::InboundEmail.find(params[:inbound_email_id])
-  reroute inbound_email
-
-  redirect_to main_app.rails_conductor_inbound_email_url(inbound_email)
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/Rails/Railtie.html b/src/classes/Rails/Railtie.html index 1ab6518217..791462c714 100644 --- a/src/classes/Rails/Railtie.html +++ b/src/classes/Rails/Railtie.html @@ -316,22 +316,22 @@

- -
- - -
-
# File railties/lib/rails/railtie.rb, line 172
-def abstract_railtie?
-  ABSTRACT_RAILTIES.include?(name)
-end
-
-
- - + +
+ + Source code + + +
# File railties/lib/rails/railtie.rb, line 172
+      def abstract_railtie?
+        ABSTRACT_RAILTIES.include?(name)
+      end
+ + See on GitHub + +
+ +

@@ -351,22 +351,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/railtie.rb, line 190
+      def configure(&block)
+        instance.configure(&block)
+      end
- -
-
# File railties/lib/rails/railtie.rb, line 190
-def configure(&block)
-  instance.configure(&block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -386,22 +386,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/railtie.rb, line 156
+      def console(&blk)
+        register_block_for(:load_console, &blk)
+      end
- -
-
# File railties/lib/rails/railtie.rb, line 156
-def console(&blk)
-  register_block_for(:load_console, &blk)
-end
-
-
- -

+ See on GitHub + + + +

@@ -421,22 +421,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/railtie.rb, line 164
+      def generators(&blk)
+        register_block_for(:generators, &blk)
+      end
- -
-
# File railties/lib/rails/railtie.rb, line 164
-def generators(&blk)
-  register_block_for(:generators, &blk)
-end
-
-
- -

+ See on GitHub + + + +

@@ -456,23 +456,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/railtie.rb, line 198
+      def inherited(subclass)
+        subclass.increment_load_index
+        super
+      end
- -
-
# File railties/lib/rails/railtie.rb, line 198
-def inherited(subclass)
-  subclass.increment_load_index
-  super
-end
-
-
- -

+ See on GitHub + + + +

@@ -492,22 +492,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/railtie.rb, line 183
+      def instance
+        @instance ||= new
+      end
- -
-
# File railties/lib/rails/railtie.rb, line 183
-def instance
-  @instance ||= new
-end
-
-
- -

+ See on GitHub + + + +

@@ -527,23 +527,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/railtie.rb, line 176
+      def railtie_name(name = nil)
+        @railtie_name = name.to_s if name
+        @railtie_name ||= generate_railtie_name(self.name)
+      end
- -
-
# File railties/lib/rails/railtie.rb, line 176
-def railtie_name(name = nil)
-  @railtie_name = name.to_s if name
-  @railtie_name ||= generate_railtie_name(self.name)
-end
-
-
- -

+ See on GitHub + + + +

@@ -563,22 +563,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/railtie.rb, line 152
+      def rake_tasks(&blk)
+        register_block_for(:rake_tasks, &blk)
+      end
- -
-
# File railties/lib/rails/railtie.rb, line 152
-def rake_tasks(&blk)
-  register_block_for(:rake_tasks, &blk)
-end
-
-
- -

+ See on GitHub + + + +

@@ -598,22 +598,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/railtie.rb, line 160
+      def runner(&blk)
+        register_block_for(:runner, &blk)
+      end
- -
-
# File railties/lib/rails/railtie.rb, line 160
-def runner(&blk)
-  register_block_for(:runner, &blk)
-end
-
-
- -

+ See on GitHub + + + +

@@ -633,22 +633,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/railtie.rb, line 168
+      def server(&blk)
+        register_block_for(:server, &blk)
+      end
- -
-
# File railties/lib/rails/railtie.rb, line 168
-def server(&blk)
-  register_block_for(:server, &blk)
-end
-
-
- -

+ See on GitHub + + + +

@@ -668,22 +668,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/railtie.rb, line 148
+      def subclasses
+        super.reject(&:abstract_railtie?).sort
+      end
- -
-
# File railties/lib/rails/railtie.rb, line 148
-def subclasses
-  super.reject(&:abstract_railtie?).sort
-end
-
-
- -

+ See on GitHub + + + +

Class Protected methods

@@ -706,23 +706,23 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/railtie.rb, line 206
+        def increment_load_index
+          @@load_counter ||= 0
+          @load_index = (@@load_counter += 1)
+        end
- -
-
# File railties/lib/rails/railtie.rb, line 206
-def increment_load_index
-  @@load_counter ||= 0
-  @load_index = (@@load_counter += 1)
-end
-
-
- - + See on GitHub + + + + @@ -746,22 +746,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/railtie.rb, line 263
+    def config
+      @config ||= Railtie::Configuration.new
+    end
- -
-
# File railties/lib/rails/railtie.rb, line 263
-def config
-  @config ||= Railtie::Configuration.new
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/Rails/Railtie/Configurable/ClassMethods.html b/src/classes/Rails/Railtie/Configurable/ClassMethods.html index 05241fb00a..c1c5cde3b7 100644 --- a/src/classes/Rails/Railtie/Configurable/ClassMethods.html +++ b/src/classes/Rails/Railtie/Configurable/ClassMethods.html @@ -87,22 +87,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/railtie/configurable.rb, line 25
+        def configure(&block)
+          class_eval(&block)
+        end
- -
-
# File railties/lib/rails/railtie/configurable.rb, line 25
-def configure(&block)
-  class_eval(&block)
-end
-
-
- - + See on GitHub + + + +

@@ -122,22 +122,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/railtie/configurable.rb, line 13
+        def inherited(base)
+          raise "You cannot inherit from a #{superclass.name} child"
+        end
- -
-
# File railties/lib/rails/railtie/configurable.rb, line 13
-def inherited(base)
-  raise "You cannot inherit from a #{superclass.name} child"
-end
-
-
- -

+ See on GitHub + + + +

@@ -157,22 +157,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/railtie/configurable.rb, line 17
+        def instance
+          @instance ||= new
+        end
- -
-
# File railties/lib/rails/railtie/configurable.rb, line 17
-def instance
-  @instance ||= new
-end
-
-
- -

+ See on GitHub + + + +

@@ -192,22 +192,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/railtie/configurable.rb, line 21
+        def respond_to?(*args)
+          super || instance.respond_to?(*args)
+        end
- -
-
# File railties/lib/rails/railtie/configurable.rb, line 21
-def respond_to?(*args)
-  super || instance.respond_to?(*args)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/Railtie/Configuration.html b/src/classes/Rails/Railtie/Configuration.html index 7dc340fa0e..7fc55cf4a0 100644 --- a/src/classes/Rails/Railtie/Configuration.html +++ b/src/classes/Rails/Railtie/Configuration.html @@ -132,22 +132,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/railtie/configuration.rb, line 8
+      def initialize
+        @@options ||= {}
+      end
- -
-
# File railties/lib/rails/railtie/configuration.rb, line 8
-def initialize
-  @@options ||= {}
-end
-
-
- - + See on GitHub + + + + @@ -171,22 +171,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/railtie/configuration.rb, line 70
+      def after_initialize(&block)
+        ActiveSupport.on_load(:after_initialize, yield: true, &block)
+      end
- -
-
# File railties/lib/rails/railtie/configuration.rb, line 70
-def after_initialize(&block)
-  ActiveSupport.on_load(:after_initialize, yield: true, &block)
-end
-
-
- - + See on GitHub + + + +

@@ -206,22 +206,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/railtie/configuration.rb, line 75
+      def after_routes_loaded(&block)
+        ActiveSupport.on_load(:after_routes_loaded, yield: true, &block)
+      end
- -
-
# File railties/lib/rails/railtie/configuration.rb, line 75
-def after_routes_loaded(&block)
-  ActiveSupport.on_load(:after_routes_loaded, yield: true, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -243,24 +243,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/railtie/configuration.rb, line 47
+      def app_generators
+        @@app_generators ||= Rails::Configuration::Generators.new
+        yield(@@app_generators) if block_given?
+        @@app_generators
+      end
- -
-
# File railties/lib/rails/railtie/configuration.rb, line 47
-def app_generators
-  @@app_generators ||= Rails::Configuration::Generators.new
-  yield(@@app_generators) if block_given?
-  @@app_generators
-end
-
-
- -

+ See on GitHub + + + +

@@ -282,22 +282,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/railtie/configuration.rb, line 39
+      def app_middleware
+        @@app_middleware ||= Rails::Configuration::MiddlewareStackProxy.new
+      end
- -
-
# File railties/lib/rails/railtie/configuration.rb, line 39
-def app_middleware
-  @@app_middleware ||= Rails::Configuration::MiddlewareStackProxy.new
-end
-
-
- -

+ See on GitHub + + + +

@@ -317,22 +317,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/railtie/configuration.rb, line 54
+      def before_configuration(&block)
+        ActiveSupport.on_load(:before_configuration, yield: true, &block)
+      end
- -
-
# File railties/lib/rails/railtie/configuration.rb, line 54
-def before_configuration(&block)
-  ActiveSupport.on_load(:before_configuration, yield: true, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -352,22 +352,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/railtie/configuration.rb, line 60
+      def before_eager_load(&block)
+        ActiveSupport.on_load(:before_eager_load, yield: true, &block)
+      end
- -
-
# File railties/lib/rails/railtie/configuration.rb, line 60
-def before_eager_load(&block)
-  ActiveSupport.on_load(:before_eager_load, yield: true, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -387,22 +387,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/railtie/configuration.rb, line 65
+      def before_initialize(&block)
+        ActiveSupport.on_load(:before_initialize, yield: true, &block)
+      end
- -
-
# File railties/lib/rails/railtie/configuration.rb, line 65
-def before_initialize(&block)
-  ActiveSupport.on_load(:before_initialize, yield: true, &block)
-end
-
-
- -

+ See on GitHub + + + +

@@ -422,22 +422,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/railtie/configuration.rb, line 18
+      def eager_load_namespaces
+        @@eager_load_namespaces ||= []
+      end
- -
-
# File railties/lib/rails/railtie/configuration.rb, line 18
-def eager_load_namespaces
-  @@eager_load_namespaces ||= []
-end
-
-
- -

+ See on GitHub + + + +

@@ -457,22 +457,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/railtie/configuration.rb, line 90
+      def respond_to?(name, include_private = false)
+        super || @@options.key?(name.to_sym)
+      end
- -
-
# File railties/lib/rails/railtie/configuration.rb, line 90
-def respond_to?(name, include_private = false)
-  super || @@options.key?(name.to_sym)
-end
-
-
- -

+ See on GitHub + + + +

@@ -492,22 +492,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/railtie/configuration.rb, line 86
+      def to_prepare(&blk)
+        to_prepare_blocks << blk if blk
+      end
- -
-
# File railties/lib/rails/railtie/configuration.rb, line 86
-def to_prepare(&blk)
-  to_prepare_blocks << blk if blk
-end
-
-
- -

+ See on GitHub + + + +

@@ -527,22 +527,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/railtie/configuration.rb, line 80
+      def to_prepare_blocks
+        @@to_prepare_blocks ||= []
+      end
- -
-
# File railties/lib/rails/railtie/configuration.rb, line 80
-def to_prepare_blocks
-  @@to_prepare_blocks ||= []
-end
-
-
- -

+ See on GitHub + + + +

@@ -562,22 +562,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/railtie/configuration.rb, line 30
+      def watchable_dirs
+        @@watchable_dirs ||= {}
+      end
- -
-
# File railties/lib/rails/railtie/configuration.rb, line 30
-def watchable_dirs
-  @@watchable_dirs ||= {}
-end
-
-
- -

+ See on GitHub + + + +

@@ -597,22 +597,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/railtie/configuration.rb, line 23
+      def watchable_files
+        @@watchable_files ||= []
+      end
- -
-
# File railties/lib/rails/railtie/configuration.rb, line 23
-def watchable_files
-  @@watchable_files ||= []
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/Secrets/MissingKeyError.html b/src/classes/Rails/Secrets/MissingKeyError.html index b7169986dd..522288fa63 100644 --- a/src/classes/Rails/Secrets/MissingKeyError.html +++ b/src/classes/Rails/Secrets/MissingKeyError.html @@ -80,25 +80,25 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/secrets.rb, line 11
+      def initialize
+        super(<<-end_of_message.squish)
+          Missing encryption key to decrypt secrets with.
+          Ask your team for your master key and put it in ENV["RAILS_MASTER_KEY"]
+        end_of_message
+      end
- -
-
# File railties/lib/rails/secrets.rb, line 11
-      def initialize
-        super(<<-end_of_message.squish)
-          Missing encryption key to decrypt secrets with.
-          Ask your team for your master key and put it in ENV["RAILS_MASTER_KEY"]
-        end_of_message
-      end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/Rails/Server.html b/src/classes/Rails/Server.html index 7c2b131db2..e890de368b 100644 --- a/src/classes/Rails/Server.html +++ b/src/classes/Rails/Server.html @@ -117,24 +117,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/commands/server/server_command.rb, line 18
+    def initialize(options = nil)
+      @default_options = options || {}
+      super(@default_options)
+      set_environment
+    end
- -
-
# File railties/lib/rails/commands/server/server_command.rb, line 18
-def initialize(options = nil)
-  @default_options = options || {}
-  super(@default_options)
-  set_environment
-end
-
-
- - + See on GitHub + + + + @@ -158,22 +158,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/commands/server/server_command.rb, line 54
+    def default_options
+      super.merge(@default_options)
+    end
- -
-
# File railties/lib/rails/commands/server/server_command.rb, line 54
-def default_options
-  super.merge(@default_options)
-end
-
-
- - + See on GitHub + + + +

@@ -193,22 +193,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/commands/server/server_command.rb, line 50
+    def middleware
+      Hash.new([])
+    end
- -
-
# File railties/lib/rails/commands/server/server_command.rb, line 50
-def middleware
-  Hash.new([])
-end
-
-
- -

+ See on GitHub + + + +

@@ -228,22 +228,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/commands/server/server_command.rb, line 24
+    def opt_parser
+      Options.new
+    end
- -
-
# File railties/lib/rails/commands/server/server_command.rb, line 24
-def opt_parser
-  Options.new
-end
-
-
- -

+ See on GitHub + + + +

@@ -263,22 +263,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/commands/server/server_command.rb, line 58
+    def served_url
+      "#{options[:SSLEnable] ? 'https' : 'http'}://#{options[:Host]}:#{options[:Port]}" unless use_puma?
+    end
- -
-
# File railties/lib/rails/commands/server/server_command.rb, line 58
-def served_url
-  "#{options[:SSLEnable] ? 'https' : 'http'}://#{options[:Host]}:#{options[:Port]}" unless use_puma?
-end
-
-
- -

+ See on GitHub + + + +

@@ -298,22 +298,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/commands/server/server_command.rb, line 28
+    def set_environment
+      ENV["RAILS_ENV"] ||= options[:environment]
+    end
- -
-
# File railties/lib/rails/commands/server/server_command.rb, line 28
-def set_environment
-  ENV["RAILS_ENV"] ||= options[:environment]
-end
-
-
- -

+ See on GitHub + + + +

@@ -333,29 +333,29 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/commands/server/server_command.rb, line 32
+    def start(after_stop_callback = nil)
+      trap(:INT) { exit }
+      create_tmp_directories
+      setup_dev_caching
+      log_to_stdout if options[:log_stdout]
+
+      super()
+    ensure
+      after_stop_callback.call if after_stop_callback
+    end
- -
-
# File railties/lib/rails/commands/server/server_command.rb, line 32
-def start(after_stop_callback = nil)
-  trap(:INT) { exit }
-  create_tmp_directories
-  setup_dev_caching
-  log_to_stdout if options[:log_stdout]
-
-  super()
-ensure
-  after_stop_callback.call if after_stop_callback
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/Server/Options.html b/src/classes/Rails/Server/Options.html index d05087630a..5d0e899a70 100644 --- a/src/classes/Rails/Server/Options.html +++ b/src/classes/Rails/Server/Options.html @@ -81,22 +81,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/commands/server/server_command.rb, line 13
+      def parse!(args)
+        Rails::Command::ServerCommand.new([], args).server_options
+      end
- -
-
# File railties/lib/rails/commands/server/server_command.rb, line 13
-def parse!(args)
-  Rails::Command::ServerCommand.new([], args).server_options
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/Rails/SourceAnnotationExtractor.html b/src/classes/Rails/SourceAnnotationExtractor.html index 8237ceb95a..9dc1a5c00b 100644 --- a/src/classes/Rails/SourceAnnotationExtractor.html +++ b/src/classes/Rails/SourceAnnotationExtractor.html @@ -150,25 +150,25 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/source_annotation_extractor.rb, line 128
+    def self.enumerate(tag = nil, options = {})
+      tag ||= Annotation.tags.join("|")
+      extractor = new(tag)
+      dirs = options.delete(:dirs) || Annotation.directories
+      extractor.display(extractor.find(dirs), options)
+    end
- -
-
# File railties/lib/rails/source_annotation_extractor.rb, line 128
-def self.enumerate(tag = nil, options = {})
-  tag ||= Annotation.tags.join("|")
-  extractor = new(tag)
-  dirs = options.delete(:dirs) || Annotation.directories
-  extractor.display(extractor.find(dirs), options)
-end
-
-
- - + See on GitHub + + + +

@@ -188,22 +188,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/source_annotation_extractor.rb, line 137
+    def initialize(tag)
+      @tag = tag
+    end
- -
-
# File railties/lib/rails/source_annotation_extractor.rb, line 137
-def initialize(tag)
-  @tag = tag
-end
-
-
- -

+ See on GitHub + + + + @@ -227,29 +227,29 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/source_annotation_extractor.rb, line 186
+    def display(results, options = {})
+      options[:indent] = results.flat_map { |f, a| a.map(&:line) }.max.to_s.size
+      results.keys.sort.each do |file|
+        puts "#{file}:"
+        results[file].each do |note|
+          puts "  * #{note.to_s(options)}"
+        end
+        puts
+      end
+    end
- -
-
# File railties/lib/rails/source_annotation_extractor.rb, line 186
-def display(results, options = {})
-  options[:indent] = results.flat_map { |f, a| a.map(&:line) }.max.to_s.size
-  results.keys.sort.each do |file|
-    puts "#{file}:"
-    results[file].each do |note|
-      puts "  * #{note.to_s(options)}"
-    end
-    puts
-  end
-end
-
-
- - + See on GitHub + + + +

@@ -269,22 +269,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/source_annotation_extractor.rb, line 143
+    def find(dirs)
+      dirs.inject({}) { |h, dir| h.update(find_in(dir)) }
+    end
- -
-
# File railties/lib/rails/source_annotation_extractor.rb, line 143
-def find(dirs)
-  dirs.inject({}) { |h, dir| h.update(find_in(dir)) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -304,51 +304,51 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/source_annotation_extractor.rb, line 151
+    def find_in(dir)
+      results = {}
+
+      Dir.glob("#{dir}/*") do |item|
+        next if File.basename(item).start_with?(".")
+
+        if File.directory?(item)
+          results.update(find_in(item))
+        else
+          extension = Annotation.extensions.detect do |regexp, _block|
+            regexp.match(item)
+          end
+
+          if extension
+            pattern = extension.last.call(tag)
+
+            # In case a user-defined pattern returns nothing for the given set
+            # of tags, we exit early.
+            next unless pattern
+
+            # If a user-defined pattern returns a regular expression, we will
+            # wrap it in a PatternExtractor to keep the same API.
+            pattern = PatternExtractor.new(pattern) if pattern.is_a?(Regexp)
+
+            annotations = pattern.annotations(item)
+            results.update(item => annotations) if annotations.any?
+          end
+        end
+      end
+
+      results
+    end
- -
-
# File railties/lib/rails/source_annotation_extractor.rb, line 151
-def find_in(dir)
-  results = {}
-
-  Dir.glob("#{dir}/*") do |item|
-    next if File.basename(item).start_with?(".")
-
-    if File.directory?(item)
-      results.update(find_in(item))
-    else
-      extension = Annotation.extensions.detect do |regexp, _block|
-        regexp.match(item)
-      end
-
-      if extension
-        pattern = extension.last.call(tag)
-
-        # In case a user-defined pattern returns nothing for the given set
-        # of tags, we exit early.
-        next unless pattern
-
-        # If a user-defined pattern returns a regular expression, we will
-        # wrap it in a PatternExtractor to keep the same API.
-        pattern = PatternExtractor.new(pattern) if pattern.is_a?(Regexp)
-
-        annotations = pattern.annotations(item)
-        results.update(item => annotations) if annotations.any?
-      end
-    end
-  end
-
-  results
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Rails/SourceAnnotationExtractor/Annotation.html b/src/classes/Rails/SourceAnnotationExtractor/Annotation.html index 2e16820094..529c7f1095 100644 --- a/src/classes/Rails/SourceAnnotationExtractor/Annotation.html +++ b/src/classes/Rails/SourceAnnotationExtractor/Annotation.html @@ -104,22 +104,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/source_annotation_extractor.rb, line 55
+      def self.directories
+        @@directories ||= %w(app config db lib test)
+      end
- -
-
# File railties/lib/rails/source_annotation_extractor.rb, line 55
-def self.directories
-  @@directories ||= %w(app config db lib test)
-end
-
-
- - + See on GitHub + + + +

@@ -139,22 +139,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/source_annotation_extractor.rb, line 75
+      def self.extensions
+        @@extensions ||= {}
+      end
- -
-
# File railties/lib/rails/source_annotation_extractor.rb, line 75
-def self.extensions
-  @@extensions ||= {}
-end
-
-
- -

+ See on GitHub + + + +

@@ -177,22 +177,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/source_annotation_extractor.rb, line 61
+      def self.register_directories(*dirs)
+        directories.push(*dirs)
+      end
- -
-
# File railties/lib/rails/source_annotation_extractor.rb, line 61
-def self.register_directories(*dirs)
-  directories.push(*dirs)
-end
-
-
- -

+ See on GitHub + + + +

@@ -215,22 +215,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/source_annotation_extractor.rb, line 81
+      def self.register_extensions(*exts, &block)
+        extensions[/\.(#{exts.join("|")})$/] = block
+      end
- -
-
# File railties/lib/rails/source_annotation_extractor.rb, line 81
-def self.register_extensions(*exts, &block)
-  extensions[/\.(#{exts.join("|")})$/] = block
-end
-
-
- -

+ See on GitHub + + + +

@@ -253,22 +253,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/source_annotation_extractor.rb, line 71
+      def self.register_tags(*additional_tags)
+        tags.push(*additional_tags)
+      end
- -
-
# File railties/lib/rails/source_annotation_extractor.rb, line 71
-def self.register_tags(*additional_tags)
-  tags.push(*additional_tags)
-end
-
-
- -

+ See on GitHub + + + +

@@ -288,22 +288,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/source_annotation_extractor.rb, line 65
+      def self.tags
+        @@tags ||= %w(OPTIMIZE FIXME TODO)
+      end
- -
-
# File railties/lib/rails/source_annotation_extractor.rb, line 65
-def self.tags
-  @@tags ||= %w(OPTIMIZE FIXME TODO)
-end
-
-
- -

+ See on GitHub + + + + @@ -332,24 +332,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/source_annotation_extractor.rb, line 107
+      def to_s(options = {})
+        s = +"[#{line.to_s.rjust(options[:indent])}] "
+        s << "[#{tag}] " if options[:tag]
+        s << text
+      end
- -
-
# File railties/lib/rails/source_annotation_extractor.rb, line 107
-def to_s(options = {})
-  s = +"[#{line.to_s.rjust(options[:indent])}] "
-  s << "[#{tag}] " if options[:tag]
-  s << text
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/Rails/SourceAnnotationExtractor/ParserExtractor.html b/src/classes/Rails/SourceAnnotationExtractor/ParserExtractor.html index d2c71aa0c9..235e3588be 100644 --- a/src/classes/Rails/SourceAnnotationExtractor/ParserExtractor.html +++ b/src/classes/Rails/SourceAnnotationExtractor/ParserExtractor.html @@ -100,24 +100,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/source_annotation_extractor.rb, line 33
+      def annotations(file)
+        contents = File.read(file, encoding: Encoding::BINARY)
+        parser = Parser.new(contents, pattern: pattern).tap(&:parse)
+        parser.error? ? [] : parser.comments
+      end
- -
-
# File railties/lib/rails/source_annotation_extractor.rb, line 33
-def annotations(file)
-  contents = File.read(file, encoding: Encoding::BINARY)
-  parser = Parser.new(contents, pattern: pattern).tap(&:parse)
-  parser.error? ? [] : parser.comments
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/Rails/SourceAnnotationExtractor/ParserExtractor/Parser.html b/src/classes/Rails/SourceAnnotationExtractor/ParserExtractor/Parser.html index a26fa28ac0..bceaf6d636 100644 --- a/src/classes/Rails/SourceAnnotationExtractor/ParserExtractor/Parser.html +++ b/src/classes/Rails/SourceAnnotationExtractor/ParserExtractor/Parser.html @@ -106,24 +106,24 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/source_annotation_extractor.rb, line 22
+        def initialize(source, pattern:)
+          super(source)
+          @pattern = pattern
+          @comments = []
+        end
- -
-
# File railties/lib/rails/source_annotation_extractor.rb, line 22
-def initialize(source, pattern:)
-  super(source)
-  @pattern = pattern
-  @comments = []
-end
-
-
- - + See on GitHub + + + + @@ -147,22 +147,22 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/source_annotation_extractor.rb, line 28
+        def on_comment(value)
+          @comments << Annotation.new(lineno, $1, $2) if value =~ pattern
+        end
- -
-
# File railties/lib/rails/source_annotation_extractor.rb, line 28
-def on_comment(value)
-  @comments << Annotation.new(lineno, $1, $2) if value =~ pattern
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/Rails/SourceAnnotationExtractor/PatternExtractor.html b/src/classes/Rails/SourceAnnotationExtractor/PatternExtractor.html index fa3921246d..6a1ae410c9 100644 --- a/src/classes/Rails/SourceAnnotationExtractor/PatternExtractor.html +++ b/src/classes/Rails/SourceAnnotationExtractor/PatternExtractor.html @@ -87,28 +87,28 @@

- -
+ +
+ + Source code + + +
# File railties/lib/rails/source_annotation_extractor.rb, line 43
+      def annotations(file)
+        lineno = 0
+
+        File.readlines(file, encoding: Encoding::BINARY).inject([]) do |list, line|
+          lineno += 1
+          next list unless line =~ pattern
+          list << Annotation.new(lineno, $1, $2)
+        end
+      end
- -
-
# File railties/lib/rails/source_annotation_extractor.rb, line 43
-def annotations(file)
-  lineno = 0
-
-  File.readlines(file, encoding: Encoding::BINARY).inject([]) do |list, line|
-    lineno += 1
-    next list unless line =~ pattern
-    list << Annotation.new(lineno, $1, $2)
-  end
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/Range.html b/src/classes/Range.html index cb987dd930..52488dcf53 100644 --- a/src/classes/Range.html +++ b/src/classes/Range.html @@ -93,25 +93,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/range/overlap.rb, line 31
+    def _empty_range?(b, e, excl)
+      return false if b.nil? || e.nil?
+
+      comp = b <=> e
+      comp.nil? || comp > 0 || (comp == 0 && excl)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/range/overlap.rb, line 31
-def _empty_range?(b, e, excl)
-  return false if b.nil? || e.nil?
-
-  comp = b <=> e
-  comp.nil? || comp > 0 || (comp == 0 && excl)
-end
-
-
- - + See on GitHub + + + +

@@ -135,40 +135,40 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/range/overlap.rb, line 8
+    def overlap?(other)
+      raise TypeError unless other.is_a? Range
+
+      self_begin = self.begin
+      other_end = other.end
+      other_excl = other.exclude_end?
+
+      return false if _empty_range?(self_begin, other_end, other_excl)
+
+      other_begin = other.begin
+      self_end = self.end
+      self_excl = self.exclude_end?
+
+      return false if _empty_range?(other_begin, self_end, self_excl)
+      return true if self_begin == other_begin
+
+      return false if _empty_range?(self_begin, self_end, self_excl)
+      return false if _empty_range?(other_begin, other_end, other_excl)
+
+      true
+    end
- -
-
# File activesupport/lib/active_support/core_ext/range/overlap.rb, line 8
-def overlap?(other)
-  raise TypeError unless other.is_a? Range
-
-  self_begin = self.begin
-  other_end = other.end
-  other_excl = other.exclude_end?
-
-  return false if _empty_range?(self_begin, other_end, other_excl)
-
-  other_begin = other.begin
-  self_end = self.end
-  self_excl = self.exclude_end?
-
-  return false if _empty_range?(other_begin, self_end, self_excl)
-  return true if self_begin == other_begin
-
-  return false if _empty_range?(self_begin, self_end, self_excl)
-  return false if _empty_range?(other_begin, other_end, other_excl)
-
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -192,7 +192,8 @@

-

+ + diff --git a/src/classes/Rational.html b/src/classes/Rational.html deleted file mode 100644 index e2ed4515fe..0000000000 --- a/src/classes/Rational.html +++ /dev/null @@ -1,111 +0,0 @@ ---- -title: Rational -layout: default ---- -
- -
-
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - - - - - - -

Instance Public methods

- -
-

- - duplicable?() - -

- - -
-

Rationals are not duplicable:

- -
Rational(1).duplicable? # => false
-Rational(1).dup         # => TypeError: can't copy Rational
-
-
- - - - - - - - -
- - -
-
# File activesupport/lib/active_support/core_ext/object/duplicable.rb, line 152
-def duplicable?
-  false
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/Regexp.html b/src/classes/Regexp.html index 1348e13ab6..f750f6f728 100644 --- a/src/classes/Regexp.html +++ b/src/classes/Regexp.html @@ -90,22 +90,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/regexp.rb, line 11
+  def multiline?
+    options & MULTILINE == MULTILINE
+  end
- -
-
# File activesupport/lib/active_support/core_ext/regexp.rb, line 11
-def multiline?
-  options & MULTILINE == MULTILINE
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/SecureRandom.html b/src/classes/SecureRandom.html index 7d3cef3e2d..735ff58f82 100644 --- a/src/classes/SecureRandom.html +++ b/src/classes/SecureRandom.html @@ -108,22 +108,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/securerandom.rb, line 45
+    def self.base36(n = 16)
+      SecureRandom.alphanumeric(n, chars: BASE36_ALPHABET)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/securerandom.rb, line 45
-def self.base36(n = 16)
-  SecureRandom.alphanumeric(n, chars: BASE36_ALPHABET)
-end
-
-
- - + See on GitHub + + + +

@@ -143,22 +143,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/securerandom.rb, line 20
+    def self.base58(n = 16)
+      SecureRandom.alphanumeric(n, chars: BASE58_ALPHABET)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/securerandom.rb, line 20
-def self.base58(n = 16)
-  SecureRandom.alphanumeric(n, chars: BASE58_ALPHABET)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Singleton.html b/src/classes/Singleton.html index 7cd3af4881..c2a0ac8df2 100644 --- a/src/classes/Singleton.html +++ b/src/classes/Singleton.html @@ -78,22 +78,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/duplicable.rb, line 57
+  def duplicable?
+    false
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/duplicable.rb, line 57
-def duplicable?
-  false
-end
-
-
- - + See on GitHub + + + + diff --git a/src/classes/SourceAnnotationExtractor.html b/src/classes/SourceAnnotationExtractor.html deleted file mode 100644 index 2a5a33f523..0000000000 --- a/src/classes/SourceAnnotationExtractor.html +++ /dev/null @@ -1,436 +0,0 @@ ---- -title: SourceAnnotationExtractor -layout: default ---- -
- -
-
- -
- -

Implements the logic behind the rake tasks for annotations like

- -
rails notes
-rails notes:optimize
-
- -

and friends. See rails -T notes and railties/lib/rails/tasks/annotations.rake.

- -

Annotation objects are triplets :line, :tag, :text that represent the line where the annotation lives, its tag, and its text. Note the filename is not stored.

- -

Annotations are looked for in comments and modulus whitespace they have to start with the tag optionally followed by a colon. Everything up to the end of the line (or closing ERB comment tag) is considered to be their text.

- -
- - - - - - - - - - - -

Methods

- - - - - - - - - - - - -

Constants

- - - - - - - - - - - - - - -
Annotation=Struct.new(:line, :tag, :text) do -def self.directories -@@directories ||= %w(app config db lib test) + (ENV["SOURCE_ANNOTATION_DIRECTORIES"] || "").split(",") -end - -# Registers additional directories to be included -# SourceAnnotationExtractor::Annotation.register_directories("spec", "another") -def self.register_directories(*dirs) -directories.push(*dirs) -end - -def self.extensions -@@extensions ||= {} -end - -# Registers new Annotations File Extensions -# SourceAnnotationExtractor::Annotation.register_extensions("css", "scss", "sass", "less", "js") { |tag| /\/\/\s*(#{tag}):?\s*(.*)$/ } -def self.register_extensions(*exts, &block) -extensions[/\.(#{exts.join("|")})$/] = block -end - -register_extensions("builder", "rb", "rake", "yml", "yaml", "ruby") { |tag| /#\s*(#{tag}):?\s*(.*)$/ } -register_extensions("css", "js") { |tag| /\/\/\s*(#{tag}):?\s*(.*)$/ } -register_extensions("erb") { |tag| /<%\s*#\s*(#{tag}):?\s*(.*?)\s*%>/ } - -# Returns a representation of the annotation that looks like this: -# -# [126] [TODO] This algorithm is simple and clearly correct, make it faster. -# -# If +options+ has a flag <tt>:tag</tt> the tag is shown as in the example above. -# Otherwise the string contains just line and text. -def to_s(options = {}) -s = "[#{line.to_s.rjust(options[:indent])}] ".dup -s << "[#{tag}] " if options[:tag] -s << text -end -end
 
- - - - -

Attributes

- - - - - - - - -
- [R] - tag
- - - - -

Class Public methods

- -
-

- - enumerate(tag, options = {}) - -

- - -
-

Prints all annotations with tag tag under the root directories app, config, db, lib, and test (recursively).

- -

Additional directories may be added using a comma-delimited list set using ENV['SOURCE_ANNOTATION_DIRECTORIES'].

- -

Directories may also be explicitly set using the :dirs key in options.

- -
SourceAnnotationExtractor.enumerate 'TODO|FIXME', dirs: %w(app lib), tag: true
-
- -

If options has a :tag flag, it will be passed to each annotation's to_s.

- -

See #find_in for a list of file extensions that will be taken into account.

- -

This class method is the single entry point for the rake tasks.

-
- - - - - - - - -
- - -
-
# File railties/lib/rails/source_annotation_extractor.rb, line 71
-def self.enumerate(tag, options = {})
-  extractor = new(tag)
-  dirs = options.delete(:dirs) || Annotation.directories
-  extractor.display(extractor.find(dirs), options)
-end
-
-
- -
- -
-

- - new(tag) - -

- - -
- -
- - - - - - - - -
- - -
-
# File railties/lib/rails/source_annotation_extractor.rb, line 79
-def initialize(tag)
-  @tag = tag
-end
-
-
- -
- - - -

Instance Public methods

- -
-

- - display(results, options = {}) - -

- - -
-

Prints the mapping from filenames to annotations in results ordered by filename. The options hash is passed to each annotation's to_s.

-
- - - - - - - - -
- - -
-
# File railties/lib/rails/source_annotation_extractor.rb, line 131
-def display(results, options = {})
-  options[:indent] = results.flat_map { |f, a| a.map(&:line) }.max.to_s.size
-  results.keys.sort.each do |file|
-    puts "#{file}:"
-    results[file].each do |note|
-      puts "  * #{note.to_s(options)}"
-    end
-    puts
-  end
-end
-
-
- -
- -
-

- - extract_annotations_from(file, pattern) - -

- - -
-

If file is the filename of a file that contains annotations this method returns a hash with a single entry that maps file to an array of its annotations. Otherwise it returns an empty hash.

-
- - - - - - - - -
- - -
-
# File railties/lib/rails/source_annotation_extractor.rb, line 119
-def extract_annotations_from(file, pattern)
-  lineno = 0
-  result = File.readlines(file, encoding: Encoding::BINARY).inject([]) do |list, line|
-    lineno += 1
-    next list unless line =~ pattern
-    list << Annotation.new(lineno, $1, $2)
-  end
-  result.empty? ? {} : { file => result }
-end
-
-
- -
- -
-

- - find(dirs) - -

- - -
-

Returns a hash that maps filenames under dirs (recursively) to arrays with their annotations.

-
- - - - - - - - -
- - -
-
# File railties/lib/rails/source_annotation_extractor.rb, line 85
-def find(dirs)
-  dirs.inject({}) { |h, dir| h.update(find_in(dir)) }
-end
-
-
- -
- -
-

- - find_in(dir) - -

- - -
-

Returns a hash that maps filenames under dir (recursively) to arrays with their annotations. Only files with annotations are included. Files with extension .builder, .rb, .rake, .yml, .yaml, .ruby, .css, .js and .erb are taken into account.

-
- - - - - - - - -
- - -
-
# File railties/lib/rails/source_annotation_extractor.rb, line 93
-def find_in(dir)
-  results = {}
-
-  Dir.glob("#{dir}/*") do |item|
-    next if File.basename(item)[0] == ?.
-
-    if File.directory?(item)
-      results.update(find_in(item))
-    else
-      extension = Annotation.extensions.detect do |regexp, _block|
-        regexp.match(item)
-      end
-
-      if extension
-        pattern = extension.last.call(tag)
-        results.update(extract_annotations_from(item, pattern)) if pattern
-      end
-    end
-  end
-
-  results
-end
-
-
- -
- - - - -
- -
-
diff --git a/src/classes/String.html b/src/classes/String.html index a063c5ace6..b33cfe29ec 100644 --- a/src/classes/String.html +++ b/src/classes/String.html @@ -326,22 +326,22 @@

- -
- - -
-
# File activesupport/lib/active_support/core_ext/string/behavior.rb, line 5
-def acts_like_string?
-  true
-end
-
-
- - + +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/behavior.rb, line 5
+  def acts_like_string?
+    true
+  end
+ + See on GitHub + +
+ +

@@ -379,22 +379,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/access.rb, line 29
+  def at(position)
+    self[position]
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/access.rb, line 29
-def at(position)
-  self[position]
-end
-
-
- -

+ See on GitHub + + + +

@@ -427,30 +427,30 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/blank.rb, line 121
+  def blank?
+    # The regexp that matches blank strings is expensive. For the case of empty
+    # strings we can speed up this method (~3.5x) with an empty? call. The
+    # penalty for the rest of strings is marginal.
+    empty? ||
+      begin
+        BLANK_RE.match?(self)
+      rescue Encoding::CompatibilityError
+        ENCODED_BLANKS[self.encoding].match?(self)
+      end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/blank.rb, line 121
-def blank?
-  # The regexp that matches blank strings is expensive. For the case of empty
-  # strings we can speed up this method (~3.5x) with an empty? call. The
-  # penalty for the rest of strings is marginal.
-  empty? ||
-    begin
-      BLANK_RE.match?(self)
-    rescue Encoding::CompatibilityError
-      ENCODED_BLANKS[self.encoding].match?(self)
-    end
-end
-
-
- -

+ See on GitHub + + + +

@@ -474,7 +474,8 @@

-

+ +

@@ -508,29 +509,29 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 101
+  def camelize(first_letter = :upper)
+    case first_letter
+    when :upper
+      ActiveSupport::Inflector.camelize(self, true)
+    when :lower
+      ActiveSupport::Inflector.camelize(self, false)
+    else
+      raise ArgumentError, "Invalid option, use either :upper or :lower."
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 101
-def camelize(first_letter = :upper)
-  case first_letter
-  when :upper
-    ActiveSupport::Inflector.camelize(self, true)
-  when :lower
-    ActiveSupport::Inflector.camelize(self, false)
-  else
-    raise ArgumentError, "Invalid option, use either :upper or :lower."
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -556,22 +557,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 239
+  def classify
+    ActiveSupport::Inflector.classify(self)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 239
-def classify
-  ActiveSupport::Inflector.classify(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -598,22 +599,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 73
+  def constantize
+    ActiveSupport::Inflector.constantize(self)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 73
-def constantize
-  ActiveSupport::Inflector.constantize(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -638,22 +639,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 148
+  def dasherize
+    ActiveSupport::Inflector.dasherize(self)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 148
-def dasherize
-  ActiveSupport::Inflector.dasherize(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -684,22 +685,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 177
+  def deconstantize
+    ActiveSupport::Inflector.deconstantize(self)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 177
-def deconstantize
-  ActiveSupport::Inflector.deconstantize(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -729,22 +730,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 162
+  def demodulize
+    ActiveSupport::Inflector.demodulize(self)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 162
-def demodulize
-  ActiveSupport::Inflector.demodulize(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -771,22 +772,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 284
+  def downcase_first
+    ActiveSupport::Inflector.downcase_first(self)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 284
-def downcase_first
-  ActiveSupport::Inflector.downcase_first(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -811,22 +812,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/exclude.rb, line 10
+  def exclude?(string)
+    !include?(string)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/exclude.rb, line 10
-def exclude?(string)
-  !include?(string)
-end
-
-
- -

+ See on GitHub + + + +

@@ -854,22 +855,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/access.rb, line 78
+  def first(limit = 1)
+    self[0, limit] || raise(ArgumentError, "negative limit")
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/access.rb, line 78
-def first(limit = 1)
-  self[0, limit] || raise(ArgumentError, "negative limit")
-end
-
-
- -

+ See on GitHub + + + +

@@ -896,22 +897,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 297
+  def foreign_key(separate_class_name_and_id_with_underscore = true)
+    ActiveSupport::Inflector.foreign_key(self, separate_class_name_and_id_with_underscore)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 297
-def foreign_key(separate_class_name_and_id_with_underscore = true)
-  ActiveSupport::Inflector.foreign_key(self, separate_class_name_and_id_with_underscore)
-end
-
-
- -

+ See on GitHub + + + +

@@ -944,22 +945,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/access.rb, line 46
+  def from(position)
+    self[position, length]
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/access.rb, line 46
-def from(position)
-  self[position, length]
-end
-
-
- -

+ See on GitHub + + + +

@@ -979,22 +980,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 232
+  def html_safe
+    ActiveSupport::SafeBuffer.new(self)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 232
-def html_safe
-  ActiveSupport::SafeBuffer.new(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1027,22 +1028,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 262
+  def humanize(capitalize: true, keep_id_suffix: false)
+    ActiveSupport::Inflector.humanize(self, capitalize: capitalize, keep_id_suffix: keep_id_suffix)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 262
-def humanize(capitalize: true, keep_id_suffix: false)
-  ActiveSupport::Inflector.humanize(self, capitalize: capitalize, keep_id_suffix: keep_id_suffix)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1062,26 +1063,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/zones.rb, line 9
+  def in_time_zone(zone = ::Time.zone)
+    if zone
+      ::Time.find_zone!(zone).parse(self)
+    else
+      to_time
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/zones.rb, line 9
-def in_time_zone(zone = ::Time.zone)
-  if zone
-    ::Time.find_zone!(zone).parse(self)
-  else
-    to_time
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1127,22 +1128,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/indent.rb, line 42
+  def indent(amount, indent_string = nil, indent_empty_lines = false)
+    dup.tap { |_| _.indent!(amount, indent_string, indent_empty_lines) }
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/indent.rb, line 42
-def indent(amount, indent_string = nil, indent_empty_lines = false)
-  dup.tap { |_| _.indent!(amount, indent_string, indent_empty_lines) }
-end
-
-
- -

+ See on GitHub + + + +

@@ -1164,24 +1165,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/indent.rb, line 7
+  def indent!(amount, indent_string = nil, indent_empty_lines = false)
+    indent_string = indent_string || self[/^[ \t]/] || " "
+    re = indent_empty_lines ? /^/ : /^(?!$)/
+    gsub!(re, indent_string * amount)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/indent.rb, line 7
-def indent!(amount, indent_string = nil, indent_empty_lines = false)
-  indent_string = indent_string || self[/^[ \t]/] || " "
-  re = indent_empty_lines ? /^/ : /^(?!$)/
-  gsub!(re, indent_string * amount)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1206,22 +1207,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/inquiry.rb, line 13
+  def inquiry
+    ActiveSupport::StringInquirer.new(self)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/inquiry.rb, line 13
-def inquiry
-  ActiveSupport::StringInquirer.new(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1248,29 +1249,29 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/multibyte.rb, line 48
+  def is_utf8?
+    case encoding
+    when Encoding::UTF_8, Encoding::US_ASCII
+      valid_encoding?
+    when Encoding::ASCII_8BIT
+      dup.force_encoding(Encoding::UTF_8).valid_encoding?
+    else
+      false
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/multibyte.rb, line 48
-def is_utf8?
-  case encoding
-  when Encoding::UTF_8, Encoding::US_ASCII
-    valid_encoding?
-  when Encoding::ASCII_8BIT
-    dup.force_encoding(Encoding::UTF_8).valid_encoding?
-  else
-    false
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1298,22 +1299,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/access.rb, line 92
+  def last(limit = 1)
+    self[[length - limit, 0].max, limit] || raise(ArgumentError, "negative limit")
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/access.rb, line 92
-def last(limit = 1)
-  self[[length - limit, 0].max, limit] || raise(ArgumentError, "negative limit")
-end
-
-
- -

+ See on GitHub + + + +

@@ -1360,22 +1361,22 @@

Interoperabi - -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/multibyte.rb, line 37
+  def mb_chars
+    ActiveSupport::Multibyte.proxy_class.new(self)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/multibyte.rb, line 37
-def mb_chars
-  ActiveSupport::Multibyte.proxy_class.new(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1427,22 +1428,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 215
+  def parameterize(separator: "-", preserve_case: false, locale: nil)
+    ActiveSupport::Inflector.parameterize(self, separator: separator, preserve_case: preserve_case, locale: locale)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 215
-def parameterize(separator: "-", preserve_case: false, locale: nil)
-  ActiveSupport::Inflector.parameterize(self, separator: separator, preserve_case: preserve_case, locale: locale)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1480,27 +1481,27 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 35
+  def pluralize(count = nil, locale = :en)
+    locale = count if count.is_a?(Symbol)
+    if count == 1
+      dup
+    else
+      ActiveSupport::Inflector.pluralize(self, locale)
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 35
-def pluralize(count = nil, locale = :en)
-  locale = count if count.is_a?(Symbol)
-  if count == 1
-    dup
-  else
-    ActiveSupport::Inflector.pluralize(self, locale)
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1526,22 +1527,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/filters.rb, line 32
+  def remove(*patterns)
+    dup.remove!(*patterns)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/filters.rb, line 32
-def remove(*patterns)
-  dup.remove!(*patterns)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1566,26 +1567,26 @@

- -
- - -
-
# File activesupport/lib/active_support/core_ext/string/filters.rb, line 40
-def remove!(*patterns)
-  patterns.each do |pattern|
-    gsub! pattern, ""
-  end
+          
+            
+ + Source code + - self -end
-
-
- -

+
# File activesupport/lib/active_support/core_ext/string/filters.rb, line 40
+  def remove!(*patterns)
+    patterns.each do |pattern|
+      gsub! pattern, ""
+    end
+
+    self
+  end
+ + See on GitHub + + + +

@@ -1612,22 +1613,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 86
+  def safe_constantize
+    ActiveSupport::Inflector.safe_constantize(self)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 86
-def safe_constantize
-  ActiveSupport::Inflector.safe_constantize(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1660,22 +1661,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 60
+  def singularize(locale = :en)
+    ActiveSupport::Inflector.singularize(self, locale)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 60
-def singularize(locale = :en)
-  ActiveSupport::Inflector.singularize(self, locale)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1702,22 +1703,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/filters.rb, line 13
+  def squish
+    dup.squish!
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/filters.rb, line 13
-def squish
-  dup.squish!
-end
-
-
- -

+ See on GitHub + + + +

@@ -1742,24 +1743,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/filters.rb, line 21
+  def squish!
+    gsub!(/[[:space:]]+/, " ")
+    strip!
+    self
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/filters.rb, line 21
-def squish!
-  gsub!(/[[:space:]]+/, " ")
-  strip!
-  self
-end
-
-
- -

+ See on GitHub + + + +

@@ -1796,24 +1797,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/strip.rb, line 22
+  def strip_heredoc
+    gsub(/^#{scan(/^[ \t]*(?=\S)/).min}/, "").tap do |stripped|
+      stripped.freeze if frozen?
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/strip.rb, line 22
-def strip_heredoc
-  gsub(/^#{scan(/^[ \t]*(?=\S)/).min}/, "").tap do |stripped|
-    stripped.freeze if frozen?
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1840,22 +1841,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 227
+  def tableize
+    ActiveSupport::Inflector.tableize(self)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 227
-def tableize
-  ActiveSupport::Inflector.tableize(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1879,7 +1880,8 @@

-

+ +

@@ -1912,22 +1914,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 126
+  def titleize(keep_id_suffix: false)
+    ActiveSupport::Inflector.titleize(self, keep_id_suffix: keep_id_suffix)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 126
-def titleize(keep_id_suffix: false)
-  ActiveSupport::Inflector.titleize(self, keep_id_suffix: keep_id_suffix)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1960,23 +1962,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/access.rb, line 63
+  def to(position)
+    position += size if position < 0
+    self[0, position + 1] || +""
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/access.rb, line 63
-def to(position)
-  position += size if position < 0
-  self[0, position + 1] || +""
-end
-
-
- -

+ See on GitHub + + + +

@@ -2002,22 +2004,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/conversions.rb, line 47
+  def to_date
+    ::Date.parse(self, false) unless blank?
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/conversions.rb, line 47
-def to_date
-  ::Date.parse(self, false) unless blank?
-end
-
-
- -

+ See on GitHub + + + +

@@ -2043,22 +2045,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/conversions.rb, line 57
+  def to_datetime
+    ::DateTime.parse(self, false) unless blank?
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/conversions.rb, line 57
-def to_datetime
-  ::DateTime.parse(self, false) unless blank?
-end
-
-
- -

+ See on GitHub + + + +

@@ -2089,37 +2091,37 @@

- -
- - -
-
# File activesupport/lib/active_support/core_ext/string/conversions.rb, line 22
-def to_time(form = :local)
-  parts = Date._parse(self, false)
-  used_keys = %i(year mon mday hour min sec sec_fraction offset)
-  return if (parts.keys & used_keys).empty?
+          
+            
+ + Source code + - now = Time.now - time = Time.new( - parts.fetch(:year, now.year), - parts.fetch(:mon, now.month), - parts.fetch(:mday, now.day), - parts.fetch(:hour, 0), - parts.fetch(:min, 0), - parts.fetch(:sec, 0) + parts.fetch(:sec_fraction, 0), - parts.fetch(:offset, form == :utc ? 0 : nil) - ) +
# File activesupport/lib/active_support/core_ext/string/conversions.rb, line 22
+  def to_time(form = :local)
+    parts = Date._parse(self, false)
+    used_keys = %i(year mon mday hour min sec sec_fraction offset)
+    return if (parts.keys & used_keys).empty?
 
-  form == :utc ? time.utc : time.to_time
-end
-
-
- -

+ now = Time.now + time = Time.new( + parts.fetch(:year, now.year), + parts.fetch(:mon, now.month), + parts.fetch(:mday, now.day), + parts.fetch(:hour, 0), + parts.fetch(:min, 0), + parts.fetch(:sec, 0) + parts.fetch(:sec_fraction, 0), + parts.fetch(:offset, form == :utc ? 0 : nil) + ) + + form == :utc ? time.utc : time.to_time + end + + See on GitHub + + + +

@@ -2161,33 +2163,33 @@

- -
- - -
-
# File activesupport/lib/active_support/core_ext/string/filters.rb, line 70
-def truncate(truncate_to, options = {})
-  return dup unless length > truncate_to
+          
+            
+ + Source code + - omission = options[:omission] || "..." - length_with_room_for_omission = truncate_to - omission.length - stop = \ - if options[:separator] - rindex(options[:separator], length_with_room_for_omission) || length_with_room_for_omission - else - length_with_room_for_omission - end +
# File activesupport/lib/active_support/core_ext/string/filters.rb, line 70
+  def truncate(truncate_to, options = {})
+    return dup unless length > truncate_to
 
-  +"#{self[0, stop]}#{omission}"
-end
-
-
- -

+ omission = options[:omission] || "..." + length_with_room_for_omission = truncate_to - omission.length + stop = \ + if options[:separator] + rindex(options[:separator], length_with_room_for_omission) || length_with_room_for_omission + else + length_with_room_for_omission + end + + +"#{self[0, stop]}#{omission}" + end + + See on GitHub + + + +

@@ -2219,45 +2221,45 @@

- -
- - -
-
# File activesupport/lib/active_support/core_ext/string/filters.rb, line 101
-def truncate_bytes(truncate_to, omission: "…")
-  omission ||= ""
+          
+            
+ + Source code + - case - when bytesize <= truncate_to - dup - when omission.bytesize > truncate_to - raise ArgumentError, "Omission #{omission.inspect} is #{omission.bytesize}, larger than the truncation length of #{truncate_to} bytes" - when omission.bytesize == truncate_to - omission.dup - else - self.class.new.tap do |cut| - cut_at = truncate_to - omission.bytesize +
# File activesupport/lib/active_support/core_ext/string/filters.rb, line 101
+  def truncate_bytes(truncate_to, omission: "…")
+    omission ||= ""
 
-      each_grapheme_cluster do |grapheme|
-        if cut.bytesize + grapheme.bytesize <= cut_at
-          cut << grapheme
-        else
-          break
-        end
-      end
+    case
+    when bytesize <= truncate_to
+      dup
+    when omission.bytesize > truncate_to
+      raise ArgumentError, "Omission #{omission.inspect} is #{omission.bytesize}, larger than the truncation length of #{truncate_to} bytes"
+    when omission.bytesize == truncate_to
+      omission.dup
+    else
+      self.class.new.tap do |cut|
+        cut_at = truncate_to - omission.bytesize
 
-      cut << omission
-    end
-  end
-end
-
-
- -

+ each_grapheme_cluster do |grapheme| + if cut.bytesize + grapheme.bytesize <= cut_at + cut << grapheme + else + break + end + end + + cut << omission + end + end + end + + See on GitHub + + + +

@@ -2293,28 +2295,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/filters.rb, line 142
+  def truncate_words(words_count, options = {})
+    sep = options[:separator] || /\s+/
+    sep = Regexp.escape(sep.to_s) unless Regexp === sep
+    if self =~ /\A((?>.+?#{sep}){#{words_count - 1}}.+?)#{sep}.*/m
+      $1 + (options[:omission] || "...")
+    else
+      dup
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/filters.rb, line 142
-def truncate_words(words_count, options = {})
-  sep = options[:separator] || /\s+/
-  sep = Regexp.escape(sep.to_s) unless Regexp === sep
-  if self =~ /\A((?>.+?#{sep}){#{words_count - 1}}.+?)#{sep}.*/m
-    $1 + (options[:omission] || "...")
-  else
-    dup
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -2342,22 +2344,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 139
+  def underscore
+    ActiveSupport::Inflector.underscore(self)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 139
-def underscore
-  ActiveSupport::Inflector.underscore(self)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2384,22 +2386,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 273
+  def upcase_first
+    ActiveSupport::Inflector.upcase_first(self)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 273
-def upcase_first
-  ActiveSupport::Inflector.upcase_first(self)
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/Time.html b/src/classes/Time.html index d45d6e0738..be5c3d03bc 100644 --- a/src/classes/Time.html +++ b/src/classes/Time.html @@ -438,22 +438,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 18
+    def ===(other)
+      super || (self == Time && other.is_a?(ActiveSupport::TimeWithZone))
+    end
- -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 18
-def ===(other)
-  super || (self == Time && other.is_a?(ActiveSupport::TimeWithZone))
-end
-
-
- - + See on GitHub + + + +

@@ -481,7 +481,8 @@

-

+ +

@@ -505,33 +506,33 @@

- -
- - -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 45
-def at_with_coercion(*args, **kwargs)
-  return at_without_coercion(*args, **kwargs) if args.size != 1 || !kwargs.empty?
+          
+            
+ + Source code + - # Time.at can be called with a time or numerical value - time_or_number = args.first +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 45
+    def at_with_coercion(*args, **kwargs)
+      return at_without_coercion(*args, **kwargs) if args.size != 1 || !kwargs.empty?
 
-  if time_or_number.is_a?(ActiveSupport::TimeWithZone)
-    at_without_coercion(time_or_number.to_r).getlocal
-  elsif time_or_number.is_a?(DateTime)
-    at_without_coercion(time_or_number.to_f).getlocal
-  else
-    at_without_coercion(time_or_number)
-  end
-end
-
-
- -

+ # Time.at can be called with a time or numerical value + time_or_number = args.first + + if time_or_number.is_a?(ActiveSupport::TimeWithZone) + at_without_coercion(time_or_number.to_r).getlocal + elsif time_or_number.is_a?(DateTime) + at_without_coercion(time_or_number.to_f).getlocal + else + at_without_coercion(time_or_number) + end + end + + See on GitHub + + + +

@@ -555,7 +556,8 @@

-

+ +

@@ -575,22 +577,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 39
+    def current
+      ::Time.zone ? ::Time.zone.now : ::Time.now
+    end
- -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 39
-def current
-  ::Time.zone ? ::Time.zone.now : ::Time.now
-end
-
-
- -

+ See on GitHub + + + +

@@ -610,26 +612,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 24
+    def days_in_month(month, year = current.year)
+      if month == 2 && ::Date.gregorian_leap?(year)
+        29
+      else
+        COMMON_YEAR_DAYS_IN_MONTH[month]
+      end
+    end
- -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 24
-def days_in_month(month, year = current.year)
-  if month == 2 && ::Date.gregorian_leap?(year)
-    29
-  else
-    COMMON_YEAR_DAYS_IN_MONTH[month]
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -649,22 +651,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 34
+    def days_in_year(year = current.year)
+      days_in_month(2, year) + 337
+    end
- -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 34
-def days_in_year(year = current.year)
-  days_in_month(2, year) + 337
-end
-
-
- -

+ See on GitHub + + + +

@@ -688,22 +690,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/zones.rb, line 93
+    def find_zone(time_zone)
+      find_zone!(time_zone) rescue nil
+    end
- -
-
# File activesupport/lib/active_support/core_ext/time/zones.rb, line 93
-def find_zone(time_zone)
-  find_zone!(time_zone) rescue nil
-end
-
-
- -

+ See on GitHub + + + +

@@ -731,24 +733,24 @@

- -
- - -
-
# File activesupport/lib/active_support/core_ext/time/zones.rb, line 81
-def find_zone!(time_zone)
-  return time_zone unless time_zone
+          
+            
+ + Source code + - ActiveSupport::TimeZone[time_zone] || raise(ArgumentError, "Invalid Timezone: #{time_zone}") -end
-
-
- -

+
# File activesupport/lib/active_support/core_ext/time/zones.rb, line 81
+    def find_zone!(time_zone)
+      return time_zone unless time_zone
+
+      ActiveSupport::TimeZone[time_zone] || raise(ArgumentError, "Invalid Timezone: #{time_zone}")
+    end
+ + See on GitHub + + + +

@@ -776,34 +778,34 @@

- -
- - -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 69
-def rfc3339(str)
-  parts = Date._rfc3339(str)
+          
+            
+ + Source code + - raise ArgumentError, "invalid date" if parts.empty? +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 69
+    def rfc3339(str)
+      parts = Date._rfc3339(str)
 
-  Time.new(
-    parts.fetch(:year),
-    parts.fetch(:mon),
-    parts.fetch(:mday),
-    parts.fetch(:hour),
-    parts.fetch(:min),
-    parts.fetch(:sec) + parts.fetch(:sec_fraction, 0),
-    parts.fetch(:offset)
-  )
-end
-
-
- -

+ raise ArgumentError, "invalid date" if parts.empty? + + Time.new( + parts.fetch(:year), + parts.fetch(:mon), + parts.fetch(:mday), + parts.fetch(:hour), + parts.fetch(:min), + parts.fetch(:sec) + parts.fetch(:sec_fraction, 0), + parts.fetch(:offset) + ) + end + + See on GitHub + + + +

@@ -835,28 +837,28 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/zones.rb, line 61
+    def use_zone(time_zone)
+      new_zone = find_zone!(time_zone)
+      begin
+        old_zone, ::Time.zone = ::Time.zone, new_zone
+        yield
+      ensure
+        ::Time.zone = old_zone
+      end
+    end
- -
-
# File activesupport/lib/active_support/core_ext/time/zones.rb, line 61
-def use_zone(time_zone)
-  new_zone = find_zone!(time_zone)
-  begin
-    old_zone, ::Time.zone = ::Time.zone, new_zone
-    yield
-  ensure
-    ::Time.zone = old_zone
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -876,22 +878,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/zones.rb, line 14
+    def zone
+      ::ActiveSupport::IsolatedExecutionState[:time_zone] || zone_default
+    end
- -
-
# File activesupport/lib/active_support/core_ext/time/zones.rb, line 14
-def zone
-  ::ActiveSupport::IsolatedExecutionState[:time_zone] || zone_default
-end
-
-
- -

+ See on GitHub + + + +

@@ -937,22 +939,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/zones.rb, line 41
+    def zone=(time_zone)
+      ::ActiveSupport::IsolatedExecutionState[:time_zone] = find_zone!(time_zone)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/time/zones.rb, line 41
-def zone=(time_zone)
-  ::ActiveSupport::IsolatedExecutionState[:time_zone] = find_zone!(time_zone)
-end
-
-
- -

+ See on GitHub + + + + @@ -984,7 +986,8 @@

- + +

@@ -1012,7 +1015,8 @@

-

+ +

@@ -1032,22 +1036,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/acts_like.rb, line 7
+  def acts_like_time?
+    true
+  end
- -
-
# File activesupport/lib/active_support/core_ext/time/acts_like.rb, line 7
-def acts_like_time?
-  true
-end
-
-
- -

+ See on GitHub + + + +

@@ -1076,43 +1080,43 @@

- -
- - -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 202
-def advance(options)
-  unless options[:weeks].nil?
-    options[:weeks], partial_weeks = options[:weeks].divmod(1)
-    options[:days] = options.fetch(:days, 0) + 7 * partial_weeks
-  end
+          
+            
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 202
+  def advance(options)
+    unless options[:weeks].nil?
+      options[:weeks], partial_weeks = options[:weeks].divmod(1)
+      options[:days] = options.fetch(:days, 0) + 7 * partial_weeks
+    end
 
-  unless options[:days].nil?
-    options[:days], partial_days = options[:days].divmod(1)
-    options[:hours] = options.fetch(:hours, 0) + 24 * partial_days
-  end
+    unless options[:days].nil?
+      options[:days], partial_days = options[:days].divmod(1)
+      options[:hours] = options.fetch(:hours, 0) + 24 * partial_days
+    end
 
-  d = to_date.gregorian.advance(options)
-  time_advanced_by_date = change(year: d.year, month: d.month, day: d.day)
-  seconds_to_advance = \
-    options.fetch(:seconds, 0) +
-    options.fetch(:minutes, 0) * 60 +
-    options.fetch(:hours, 0) * 3600
+    d = to_date.gregorian.advance(options)
+    time_advanced_by_date = change(year: d.year, month: d.month, day: d.day)
+    seconds_to_advance = \
+      options.fetch(:seconds, 0) +
+      options.fetch(:minutes, 0) * 60 +
+      options.fetch(:hours, 0) * 3600
 
-  if seconds_to_advance.zero?
-    time_advanced_by_date
-  else
-    time_advanced_by_date.since(seconds_to_advance)
-  end
-end
-
-
- -

+ if seconds_to_advance.zero? + time_advanced_by_date + else + time_advanced_by_date.since(seconds_to_advance) + end + end + + See on GitHub + + + +

@@ -1132,22 +1136,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 228
+  def ago(seconds)
+    since(-seconds)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 228
-def ago(seconds)
-  since(-seconds)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1171,7 +1175,8 @@

-

+ +

@@ -1195,7 +1200,8 @@

-

+ +

@@ -1219,7 +1225,8 @@

-

+ +

@@ -1243,7 +1250,8 @@

-

+ +

@@ -1267,7 +1275,8 @@

-

+ +

@@ -1291,7 +1300,8 @@

-

+ +

@@ -1315,7 +1325,8 @@

-

+ +

@@ -1339,7 +1350,8 @@

-

+ +

@@ -1363,7 +1375,8 @@

-

+ +

@@ -1387,7 +1400,8 @@

-

+ +

@@ -1411,22 +1425,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 241
+  def beginning_of_day
+    change(hour: 0)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 241
-def beginning_of_day
-  change(hour: 0)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1450,22 +1464,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 270
+  def beginning_of_hour
+    change(min: 0)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 270
-def beginning_of_hour
-  change(min: 0)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1489,22 +1503,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 286
+  def beginning_of_minute
+    change(sec: 0)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 286
-def beginning_of_minute
-  change(sec: 0)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1524,22 +1538,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 121
+    def ceil(precision = 0)
+      change(nsec: 0) + subsec.ceil(precision)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 121
-def ceil(precision = 0)
-  change(nsec: 0) + subsec.ceil(precision)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1564,67 +1578,67 @@

- -
- - -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 138
-def change(options)
-  new_year   = options.fetch(:year, year)
-  new_month  = options.fetch(:month, month)
-  new_day    = options.fetch(:day, day)
-  new_hour   = options.fetch(:hour, hour)
-  new_min    = options.fetch(:min, options[:hour] ? 0 : min)
-  new_sec    = options.fetch(:sec, (options[:hour] || options[:min]) ? 0 : sec)
-  new_offset = options.fetch(:offset, nil)
-
-  if new_nsec = options[:nsec]
-    raise ArgumentError, "Can't change both :nsec and :usec at the same time: #{options.inspect}" if options[:usec]
-    new_usec = Rational(new_nsec, 1000)
-  else
-    new_usec = options.fetch(:usec, (options[:hour] || options[:min] || options[:sec]) ? 0 : Rational(nsec, 1000))
-  end
-
-  raise ArgumentError, "argument out of range" if new_usec >= 1000000
+          
+            
+ + Source code + - new_sec += Rational(new_usec, 1000000) +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 138
+  def change(options)
+    new_year   = options.fetch(:year, year)
+    new_month  = options.fetch(:month, month)
+    new_day    = options.fetch(:day, day)
+    new_hour   = options.fetch(:hour, hour)
+    new_min    = options.fetch(:min, options[:hour] ? 0 : min)
+    new_sec    = options.fetch(:sec, (options[:hour] || options[:min]) ? 0 : sec)
+    new_offset = options.fetch(:offset, nil)
 
-  if new_offset
-    ::Time.new(new_year, new_month, new_day, new_hour, new_min, new_sec, new_offset)
-  elsif utc?
-    ::Time.utc(new_year, new_month, new_day, new_hour, new_min, new_sec)
-  elsif zone&.respond_to?(:utc_to_local)
-    new_time = ::Time.new(new_year, new_month, new_day, new_hour, new_min, new_sec, zone)
+    if new_nsec = options[:nsec]
+      raise ArgumentError, "Can't change both :nsec and :usec at the same time: #{options.inspect}" if options[:usec]
+      new_usec = Rational(new_nsec, 1000)
+    else
+      new_usec = options.fetch(:usec, (options[:hour] || options[:min] || options[:sec]) ? 0 : Rational(nsec, 1000))
+    end
 
-    # When there are two occurrences of a nominal time due to DST ending,
-    # `Time.new` chooses the first chronological occurrence (the one with a
-    # larger UTC offset). However, for `change`, we want to choose the
-    # occurrence that matches this time's UTC offset.
-    #
-    # If the new time's UTC offset is larger than this time's UTC offset, the
-    # new time might be a first chronological occurrence. So we add the offset
-    # difference to fast-forward the new time, and check if the result has the
-    # desired UTC offset (i.e. is the second chronological occurrence).
-    offset_difference = new_time.utc_offset - utc_offset
-    if offset_difference > 0 && (new_time_2 = new_time + offset_difference).utc_offset == utc_offset
-      new_time_2
-    else
-      new_time
-    end
-  elsif zone
-    ::Time.local(new_sec, new_min, new_hour, new_day, new_month, new_year, nil, nil, isdst, nil)
-  else
-    ::Time.new(new_year, new_month, new_day, new_hour, new_min, new_sec, utc_offset)
-  end
-end
-
-
- -

+ raise ArgumentError, "argument out of range" if new_usec >= 1000000 + + new_sec += Rational(new_usec, 1000000) + + if new_offset + ::Time.new(new_year, new_month, new_day, new_hour, new_min, new_sec, new_offset) + elsif utc? + ::Time.utc(new_year, new_month, new_day, new_hour, new_min, new_sec) + elsif zone&.respond_to?(:utc_to_local) + new_time = ::Time.new(new_year, new_month, new_day, new_hour, new_min, new_sec, zone) + + # When there are two occurrences of a nominal time due to DST ending, + # `Time.new` chooses the first chronological occurrence (the one with a + # larger UTC offset). However, for `change`, we want to choose the + # occurrence that matches this time's UTC offset. + # + # If the new time's UTC offset is larger than this time's UTC offset, the + # new time might be a first chronological occurrence. So we add the offset + # difference to fast-forward the new time, and check if the result has the + # desired UTC offset (i.e. is the second chronological occurrence). + offset_difference = new_time.utc_offset - utc_offset + if offset_difference > 0 && (new_time_2 = new_time + offset_difference).utc_offset == utc_offset + new_time_2 + else + new_time + end + elsif zone + ::Time.local(new_sec, new_min, new_hour, new_day, new_month, new_year, nil, nil, isdst, nil) + else + ::Time.new(new_year, new_month, new_day, new_hour, new_min, new_sec, utc_offset) + end + end + + See on GitHub + + + +

@@ -1648,29 +1662,29 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 332
+  def compare_with_coercion(other)
+    # we're avoiding Time#to_datetime and Time#to_time because they're expensive
+    if other.class == Time
+      compare_without_coercion(other)
+    elsif other.is_a?(Time)
+      compare_without_coercion(other.to_time)
+    else
+      to_datetime <=> other
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 332
-def compare_with_coercion(other)
-  # we're avoiding Time#to_datetime and Time#to_time because they're expensive
-  if other.class == Time
-    compare_without_coercion(other)
-  elsif other.is_a?(Time)
-    compare_without_coercion(other.to_time)
-  else
-    to_datetime <=> other
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -1694,7 +1708,8 @@

-

+ +

@@ -1718,27 +1733,27 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 259
+  def end_of_day
+    change(
+      hour: 23,
+      min: 59,
+      sec: 59,
+      usec: Rational(999999999, 1000)
+    )
+  end
- -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 259
-def end_of_day
-  change(
-    hour: 23,
-    min: 59,
-    sec: 59,
-    usec: Rational(999999999, 1000)
-  )
-end
-
-
- -

+ See on GitHub + + + +

@@ -1762,26 +1777,26 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 276
+  def end_of_hour
+    change(
+      min: 59,
+      sec: 59,
+      usec: Rational(999999999, 1000)
+    )
+  end
- -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 276
-def end_of_hour
-  change(
-    min: 59,
-    sec: 59,
-    usec: Rational(999999999, 1000)
-  )
-end
-
-
- -

+ See on GitHub + + + +

@@ -1805,25 +1820,25 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 292
+  def end_of_minute
+    change(
+      sec: 59,
+      usec: Rational(999999999, 1000)
+    )
+  end
- -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 292
-def end_of_minute
-  change(
-    sec: 59,
-    usec: Rational(999999999, 1000)
-  )
-end
-
-
- -

+ See on GitHub + + + +

@@ -1851,7 +1866,8 @@

-

+ +

@@ -1875,24 +1891,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 347
+  def eql_with_coercion(other)
+    # if other is an ActiveSupport::TimeWithZone, coerce a Time instance from it so we can do eql? comparison
+    other = other.comparable_time if other.respond_to?(:comparable_time)
+    eql_without_coercion(other)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 347
-def eql_with_coercion(other)
-  # if other is an ActiveSupport::TimeWithZone, coerce a Time instance from it so we can do eql? comparison
-  other = other.comparable_time if other.respond_to?(:comparable_time)
-  eql_without_coercion(other)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1916,7 +1932,8 @@

-

+ +

@@ -1936,22 +1953,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 112
+    def floor(precision = 0)
+      change(nsec: 0) + subsec.floor(precision)
+    end
- -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 112
-def floor(precision = 0)
-  change(nsec: 0) + subsec.floor(precision)
-end
-
-
- -

+ See on GitHub + + + +

@@ -1975,22 +1992,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/conversions.rb, line 69
+  def formatted_offset(colon = true, alternate_utc_string = nil)
+    utc? && alternate_utc_string || ActiveSupport::TimeZone.seconds_to_utc_offset(utc_offset, colon)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/time/conversions.rb, line 69
-def formatted_offset(colon = true, alternate_utc_string = nil)
-  utc? && alternate_utc_string || ActiveSupport::TimeZone.seconds_to_utc_offset(utc_offset, colon)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2014,7 +2031,8 @@

-

+ +

@@ -2038,7 +2056,8 @@

-

+ +

@@ -2062,22 +2081,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 249
+  def middle_of_day
+    change(hour: 12)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 249
-def middle_of_day
-  change(hour: 12)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2101,7 +2120,8 @@

-

+ +

@@ -2125,23 +2145,23 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 323
+  def minus_with_coercion(other)
+    other = other.comparable_time if other.respond_to?(:comparable_time)
+    other.is_a?(DateTime) ? to_f - other.to_f : minus_without_coercion(other)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 323
-def minus_with_coercion(other)
-  other = other.comparable_time if other.respond_to?(:comparable_time)
-  other.is_a?(DateTime) ? to_f - other.to_f : minus_without_coercion(other)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2165,7 +2185,8 @@

-

+ +

@@ -2189,7 +2210,8 @@

-

+ +

@@ -2209,22 +2231,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 361
+  def next_day(days = 1)
+    advance(days: days)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 361
-def next_day(days = 1)
-  advance(days: days)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2244,22 +2266,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 371
+  def next_month(months = 1)
+    advance(months: months)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 371
-def next_month(months = 1)
-  advance(months: months)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2279,22 +2301,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 381
+  def next_year(years = 1)
+    advance(years: years)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 381
-def next_year(years = 1)
-  advance(years: years)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2318,7 +2340,8 @@

-

+ +

@@ -2338,22 +2361,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 356
+  def prev_day(days = 1)
+    advance(days: -days)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 356
-def prev_day(days = 1)
-  advance(days: -days)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2373,22 +2396,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 366
+  def prev_month(months = 1)
+    advance(months: -months)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 366
-def prev_month(months = 1)
-  advance(months: -months)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2408,22 +2431,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 376
+  def prev_year(years = 1)
+    advance(years: -years)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 376
-def prev_year(years = 1)
-  advance(years: -years)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2446,22 +2469,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 107
+  def sec_fraction
+    subsec
+  end
- -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 107
-def sec_fraction
-  subsec
-end
-
-
- -

+ See on GitHub + + + +

@@ -2486,22 +2509,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 91
+  def seconds_since_midnight
+    to_i - change(hour: 0).to_i + (usec / 1.0e+6)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 91
-def seconds_since_midnight
-  to_i - change(hour: 0).to_i + (usec / 1.0e+6)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2526,22 +2549,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 100
+  def seconds_until_end_of_day
+    end_of_day.to_i - to_i
+  end
- -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 100
-def seconds_until_end_of_day
-  end_of_day.to_i - to_i
-end
-
-
- -

+ See on GitHub + + + +

@@ -2565,24 +2588,24 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 233
+  def since(seconds)
+    self + seconds
+  rescue
+    to_datetime.since(seconds)
+  end
- -
-
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 233
-def since(seconds)
-  self + seconds
-rescue
-  to_datetime.since(seconds)
-end
-
-
- -

+ See on GitHub + + + +

@@ -2606,7 +2629,8 @@

-

+ +

@@ -2655,26 +2679,26 @@

Adding your - -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/conversions.rb, line 53
+  def to_fs(format = :default)
+    if formatter = DATE_FORMATS[format]
+      formatter.respond_to?(:call) ? formatter.call(self).to_s : strftime(formatter)
+    else
+      to_s
+    end
+  end
- -
-
# File activesupport/lib/active_support/core_ext/time/conversions.rb, line 53
-def to_fs(format = :default)
-  if formatter = DATE_FORMATS[format]
-    formatter.respond_to?(:call) ? formatter.call(self).to_s : strftime(formatter)
-  else
-    to_s
-  end
-end
-
-
- -

+ See on GitHub + + + +

@@ -2694,22 +2718,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/time/compatibility.rb, line 13
+  def to_time
+    preserve_timezone ? self : getlocal
+  end
- -
-
# File activesupport/lib/active_support/core_ext/time/compatibility.rb, line 13
-def to_time
-  preserve_timezone ? self : getlocal
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/TrueClass.html b/src/classes/TrueClass.html index 00172521c1..b61637ff55 100644 --- a/src/classes/TrueClass.html +++ b/src/classes/TrueClass.html @@ -94,22 +94,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/blank.rb, line 78
+  def blank?
+    false
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/blank.rb, line 78
-def blank?
-  false
-end
-
-
- - + See on GitHub + + + +

@@ -129,22 +129,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/to_query.rb, line 27
+  def to_param
+    self
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/to_query.rb, line 27
-def to_param
-  self
-end
-
-
- -

+ See on GitHub + + + + diff --git a/src/classes/UnboundMethod.html b/src/classes/UnboundMethod.html index 4221b70008..9a9ce76fed 100644 --- a/src/classes/UnboundMethod.html +++ b/src/classes/UnboundMethod.html @@ -85,22 +85,22 @@

- -
+ +
+ + Source code + + +
# File activesupport/lib/active_support/core_ext/object/duplicable.rb, line 46
+  def duplicable?
+    false
+  end
- -
-
# File activesupport/lib/active_support/core_ext/object/duplicable.rb, line 46
-def duplicable?
-  false
-end
-
-
- - + See on GitHub + + + + diff --git a/src/files/actioncable/README_md.html b/src/files/actioncable/README_md.html index e1e6901a78..4fdf21e48f 100644 --- a/src/files/actioncable/README_md.html +++ b/src/files/actioncable/README_md.html @@ -15,6 +15,8 @@

  • actioncable/README.md + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/channel/base_rb.html b/src/files/actioncable/lib/action_cable/channel/base_rb.html index 3445ab7fea..0d9e5a973d 100644 --- a/src/files/actioncable/lib/action_cable/channel/base_rb.html +++ b/src/files/actioncable/lib/action_cable/channel/base_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/channel/base.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/channel/broadcasting_rb.html b/src/files/actioncable/lib/action_cable/channel/broadcasting_rb.html index 9da8a70448..30b005bcff 100644 --- a/src/files/actioncable/lib/action_cable/channel/broadcasting_rb.html +++ b/src/files/actioncable/lib/action_cable/channel/broadcasting_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/channel/broadcasting.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/channel/callbacks_rb.html b/src/files/actioncable/lib/action_cable/channel/callbacks_rb.html index b4bb95c596..420375ef7d 100644 --- a/src/files/actioncable/lib/action_cable/channel/callbacks_rb.html +++ b/src/files/actioncable/lib/action_cable/channel/callbacks_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/channel/callbacks.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/channel/naming_rb.html b/src/files/actioncable/lib/action_cable/channel/naming_rb.html index 6b195480d7..746aeb8854 100644 --- a/src/files/actioncable/lib/action_cable/channel/naming_rb.html +++ b/src/files/actioncable/lib/action_cable/channel/naming_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/channel/naming.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/channel/periodic_timers_rb.html b/src/files/actioncable/lib/action_cable/channel/periodic_timers_rb.html index fa2c78ce75..49c579467a 100644 --- a/src/files/actioncable/lib/action_cable/channel/periodic_timers_rb.html +++ b/src/files/actioncable/lib/action_cable/channel/periodic_timers_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/channel/periodic_timers.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/channel/streams_rb.html b/src/files/actioncable/lib/action_cable/channel/streams_rb.html index 403b876c9d..5577c4c7ce 100644 --- a/src/files/actioncable/lib/action_cable/channel/streams_rb.html +++ b/src/files/actioncable/lib/action_cable/channel/streams_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/channel/streams.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/channel/test_case_rb.html b/src/files/actioncable/lib/action_cable/channel/test_case_rb.html index ab68acd2e4..3874f3fadc 100644 --- a/src/files/actioncable/lib/action_cable/channel/test_case_rb.html +++ b/src/files/actioncable/lib/action_cable/channel/test_case_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/channel/test_case.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/channel_rb.html b/src/files/actioncable/lib/action_cable/channel_rb.html deleted file mode 100644 index 0e414bb1c1..0000000000 --- a/src/files/actioncable/lib/action_cable/channel_rb.html +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: channel.rb -layout: default ---- -
    - - -
    -
    - - - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/actioncable/lib/action_cable/connection/authorization_rb.html b/src/files/actioncable/lib/action_cable/connection/authorization_rb.html index b768ca07ef..7604501fd4 100644 --- a/src/files/actioncable/lib/action_cable/connection/authorization_rb.html +++ b/src/files/actioncable/lib/action_cable/connection/authorization_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/connection/authorization.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/connection/base_rb.html b/src/files/actioncable/lib/action_cable/connection/base_rb.html index 2ecca118d2..956e5a87cd 100644 --- a/src/files/actioncable/lib/action_cable/connection/base_rb.html +++ b/src/files/actioncable/lib/action_cable/connection/base_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/connection/base.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/connection/callbacks_rb.html b/src/files/actioncable/lib/action_cable/connection/callbacks_rb.html index 9137ffa0c6..248236b63f 100644 --- a/src/files/actioncable/lib/action_cable/connection/callbacks_rb.html +++ b/src/files/actioncable/lib/action_cable/connection/callbacks_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/connection/callbacks.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/connection/client_socket_rb.html b/src/files/actioncable/lib/action_cable/connection/client_socket_rb.html index 0951cd3385..467a12de10 100644 --- a/src/files/actioncable/lib/action_cable/connection/client_socket_rb.html +++ b/src/files/actioncable/lib/action_cable/connection/client_socket_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/connection/client_socket.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/connection/identification_rb.html b/src/files/actioncable/lib/action_cable/connection/identification_rb.html index d0f8d07b45..7cb3e4d7fe 100644 --- a/src/files/actioncable/lib/action_cable/connection/identification_rb.html +++ b/src/files/actioncable/lib/action_cable/connection/identification_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/connection/identification.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/connection/internal_channel_rb.html b/src/files/actioncable/lib/action_cable/connection/internal_channel_rb.html index c4074463f0..2bb8b7648f 100644 --- a/src/files/actioncable/lib/action_cable/connection/internal_channel_rb.html +++ b/src/files/actioncable/lib/action_cable/connection/internal_channel_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/connection/internal_channel.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/connection/message_buffer_rb.html b/src/files/actioncable/lib/action_cable/connection/message_buffer_rb.html index 0fab1d52ee..c8ecd4d1ca 100644 --- a/src/files/actioncable/lib/action_cable/connection/message_buffer_rb.html +++ b/src/files/actioncable/lib/action_cable/connection/message_buffer_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/connection/message_buffer.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/connection/stream_event_loop_rb.html b/src/files/actioncable/lib/action_cable/connection/stream_event_loop_rb.html index b2c365afdb..16fa6e83ea 100644 --- a/src/files/actioncable/lib/action_cable/connection/stream_event_loop_rb.html +++ b/src/files/actioncable/lib/action_cable/connection/stream_event_loop_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/connection/stream_event_loop.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/connection/stream_rb.html b/src/files/actioncable/lib/action_cable/connection/stream_rb.html index db029bd19c..03aa0c6efc 100644 --- a/src/files/actioncable/lib/action_cable/connection/stream_rb.html +++ b/src/files/actioncable/lib/action_cable/connection/stream_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/connection/stream.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/connection/subscriptions_rb.html b/src/files/actioncable/lib/action_cable/connection/subscriptions_rb.html index 164ddaefae..2f4aa02827 100644 --- a/src/files/actioncable/lib/action_cable/connection/subscriptions_rb.html +++ b/src/files/actioncable/lib/action_cable/connection/subscriptions_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/connection/subscriptions.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/connection/tagged_logger_proxy_rb.html b/src/files/actioncable/lib/action_cable/connection/tagged_logger_proxy_rb.html index 0782987d22..92d273c968 100644 --- a/src/files/actioncable/lib/action_cable/connection/tagged_logger_proxy_rb.html +++ b/src/files/actioncable/lib/action_cable/connection/tagged_logger_proxy_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/connection/tagged_logger_proxy.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/connection/test_case_rb.html b/src/files/actioncable/lib/action_cable/connection/test_case_rb.html index ee3a581301..d521d1b8ae 100644 --- a/src/files/actioncable/lib/action_cable/connection/test_case_rb.html +++ b/src/files/actioncable/lib/action_cable/connection/test_case_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/connection/test_case.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/connection/web_socket_rb.html b/src/files/actioncable/lib/action_cable/connection/web_socket_rb.html index cadd1672a5..610efc44e8 100644 --- a/src/files/actioncable/lib/action_cable/connection/web_socket_rb.html +++ b/src/files/actioncable/lib/action_cable/connection/web_socket_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/connection/web_socket.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/connection_rb.html b/src/files/actioncable/lib/action_cable/connection_rb.html deleted file mode 100644 index 26ff20ada9..0000000000 --- a/src/files/actioncable/lib/action_cable/connection_rb.html +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: connection.rb -layout: default ---- -
    - - -
    -
    - - - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/actioncable/lib/action_cable/deprecator_rb.html b/src/files/actioncable/lib/action_cable/deprecator_rb.html index 7e51669bd5..ab7fb959a0 100644 --- a/src/files/actioncable/lib/action_cable/deprecator_rb.html +++ b/src/files/actioncable/lib/action_cable/deprecator_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/deprecator.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/engine_rb.html b/src/files/actioncable/lib/action_cable/engine_rb.html index cb4f41ad59..a793fca1e0 100644 --- a/src/files/actioncable/lib/action_cable/engine_rb.html +++ b/src/files/actioncable/lib/action_cable/engine_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/engine.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/gem_version_rb.html b/src/files/actioncable/lib/action_cable/gem_version_rb.html index 37f77674a8..4c50066a5d 100644 --- a/src/files/actioncable/lib/action_cable/gem_version_rb.html +++ b/src/files/actioncable/lib/action_cable/gem_version_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/gem_version.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/helpers/action_cable_helper_rb.html b/src/files/actioncable/lib/action_cable/helpers/action_cable_helper_rb.html index 79e89c265e..579040098c 100644 --- a/src/files/actioncable/lib/action_cable/helpers/action_cable_helper_rb.html +++ b/src/files/actioncable/lib/action_cable/helpers/action_cable_helper_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/helpers/action_cable_helper.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/remote_connections_rb.html b/src/files/actioncable/lib/action_cable/remote_connections_rb.html index 70214df650..0267476033 100644 --- a/src/files/actioncable/lib/action_cable/remote_connections_rb.html +++ b/src/files/actioncable/lib/action_cable/remote_connections_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/remote_connections.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/server/base_rb.html b/src/files/actioncable/lib/action_cable/server/base_rb.html index 5ab271bbe9..0973a8974a 100644 --- a/src/files/actioncable/lib/action_cable/server/base_rb.html +++ b/src/files/actioncable/lib/action_cable/server/base_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/server/base.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/server/broadcasting_rb.html b/src/files/actioncable/lib/action_cable/server/broadcasting_rb.html index 9d28ad82ed..b08b0ac0c6 100644 --- a/src/files/actioncable/lib/action_cable/server/broadcasting_rb.html +++ b/src/files/actioncable/lib/action_cable/server/broadcasting_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/server/broadcasting.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/server/configuration_rb.html b/src/files/actioncable/lib/action_cable/server/configuration_rb.html index 5dabc2f715..b82d5de62a 100644 --- a/src/files/actioncable/lib/action_cable/server/configuration_rb.html +++ b/src/files/actioncable/lib/action_cable/server/configuration_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/server/configuration.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/server/connections_rb.html b/src/files/actioncable/lib/action_cable/server/connections_rb.html index b0f9f4fca5..ac75142c22 100644 --- a/src/files/actioncable/lib/action_cable/server/connections_rb.html +++ b/src/files/actioncable/lib/action_cable/server/connections_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/server/connections.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/server/worker/active_record_connection_management_rb.html b/src/files/actioncable/lib/action_cable/server/worker/active_record_connection_management_rb.html index 4451a37bfa..627fcdde98 100644 --- a/src/files/actioncable/lib/action_cable/server/worker/active_record_connection_management_rb.html +++ b/src/files/actioncable/lib/action_cable/server/worker/active_record_connection_management_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/server/worker/active_record_connection_management.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/server/worker_rb.html b/src/files/actioncable/lib/action_cable/server/worker_rb.html index f83f4a9d42..e4524d4885 100644 --- a/src/files/actioncable/lib/action_cable/server/worker_rb.html +++ b/src/files/actioncable/lib/action_cable/server/worker_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/server/worker.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/server_rb.html b/src/files/actioncable/lib/action_cable/server_rb.html deleted file mode 100644 index ac06a63856..0000000000 --- a/src/files/actioncable/lib/action_cable/server_rb.html +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: server.rb -layout: default ---- -
    - - -
    -
    - - - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/actioncable/lib/action_cable/subscription_adapter/async_rb.html b/src/files/actioncable/lib/action_cable/subscription_adapter/async_rb.html index 1377c483f3..55e778f90f 100644 --- a/src/files/actioncable/lib/action_cable/subscription_adapter/async_rb.html +++ b/src/files/actioncable/lib/action_cable/subscription_adapter/async_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/subscription_adapter/async.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/subscription_adapter/base_rb.html b/src/files/actioncable/lib/action_cable/subscription_adapter/base_rb.html index e34056309c..407db0484a 100644 --- a/src/files/actioncable/lib/action_cable/subscription_adapter/base_rb.html +++ b/src/files/actioncable/lib/action_cable/subscription_adapter/base_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/subscription_adapter/base.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/subscription_adapter/channel_prefix_rb.html b/src/files/actioncable/lib/action_cable/subscription_adapter/channel_prefix_rb.html index 00225765ec..b5d628c307 100644 --- a/src/files/actioncable/lib/action_cable/subscription_adapter/channel_prefix_rb.html +++ b/src/files/actioncable/lib/action_cable/subscription_adapter/channel_prefix_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/subscription_adapter/channel_prefix.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/subscription_adapter/inline_rb.html b/src/files/actioncable/lib/action_cable/subscription_adapter/inline_rb.html index 65e66e96f8..37e03f6cb1 100644 --- a/src/files/actioncable/lib/action_cable/subscription_adapter/inline_rb.html +++ b/src/files/actioncable/lib/action_cable/subscription_adapter/inline_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/subscription_adapter/inline.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/subscription_adapter/postgresql_rb.html b/src/files/actioncable/lib/action_cable/subscription_adapter/postgresql_rb.html index 65b72424b7..c02e48dd6f 100644 --- a/src/files/actioncable/lib/action_cable/subscription_adapter/postgresql_rb.html +++ b/src/files/actioncable/lib/action_cable/subscription_adapter/postgresql_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/subscription_adapter/postgresql.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/subscription_adapter/redis_rb.html b/src/files/actioncable/lib/action_cable/subscription_adapter/redis_rb.html index 46ba5671f7..673724d77e 100644 --- a/src/files/actioncable/lib/action_cable/subscription_adapter/redis_rb.html +++ b/src/files/actioncable/lib/action_cable/subscription_adapter/redis_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/subscription_adapter/redis.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/subscription_adapter/subscriber_map_rb.html b/src/files/actioncable/lib/action_cable/subscription_adapter/subscriber_map_rb.html index 08496b8653..5f911bcf9a 100644 --- a/src/files/actioncable/lib/action_cable/subscription_adapter/subscriber_map_rb.html +++ b/src/files/actioncable/lib/action_cable/subscription_adapter/subscriber_map_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/subscription_adapter/test_rb.html b/src/files/actioncable/lib/action_cable/subscription_adapter/test_rb.html index 9e59dfdd80..2abec1be53 100644 --- a/src/files/actioncable/lib/action_cable/subscription_adapter/test_rb.html +++ b/src/files/actioncable/lib/action_cable/subscription_adapter/test_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/subscription_adapter/test.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/subscription_adapter_rb.html b/src/files/actioncable/lib/action_cable/subscription_adapter_rb.html deleted file mode 100644 index a955f4e5ef..0000000000 --- a/src/files/actioncable/lib/action_cable/subscription_adapter_rb.html +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: subscription_adapter.rb -layout: default ---- -
    - - -
    -
    - - - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/actioncable/lib/action_cable/test_case_rb.html b/src/files/actioncable/lib/action_cable/test_case_rb.html index a64a95be54..6fd0e2f937 100644 --- a/src/files/actioncable/lib/action_cable/test_case_rb.html +++ b/src/files/actioncable/lib/action_cable/test_case_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/test_case.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/test_helper_rb.html b/src/files/actioncable/lib/action_cable/test_helper_rb.html index c10de73c49..0289bec146 100644 --- a/src/files/actioncable/lib/action_cable/test_helper_rb.html +++ b/src/files/actioncable/lib/action_cable/test_helper_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/test_helper.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable/version_rb.html b/src/files/actioncable/lib/action_cable/version_rb.html index df0b71567f..7cfe9799ff 100644 --- a/src/files/actioncable/lib/action_cable/version_rb.html +++ b/src/files/actioncable/lib/action_cable/version_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable/version.rb + on GitHub +
  • diff --git a/src/files/actioncable/lib/action_cable_rb.html b/src/files/actioncable/lib/action_cable_rb.html index af081b5610..a044a99acc 100644 --- a/src/files/actioncable/lib/action_cable_rb.html +++ b/src/files/actioncable/lib/action_cable_rb.html @@ -15,6 +15,8 @@

  • actioncable/lib/action_cable.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/README_md.html b/src/files/actionmailbox/README_md.html index 6bd219955d..ab05f51907 100644 --- a/src/files/actionmailbox/README_md.html +++ b/src/files/actionmailbox/README_md.html @@ -15,6 +15,8 @@

  • actionmailbox/README.md + on GitHub +
  • diff --git a/src/files/actionmailbox/app/controllers/action_mailbox/base_controller_rb.html b/src/files/actionmailbox/app/controllers/action_mailbox/base_controller_rb.html index aa69126d27..ddcb2a5b9f 100644 --- a/src/files/actionmailbox/app/controllers/action_mailbox/base_controller_rb.html +++ b/src/files/actionmailbox/app/controllers/action_mailbox/base_controller_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/app/controllers/action_mailbox/base_controller.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/app/controllers/action_mailbox/ingresses/amazon/inbound_emails_controller_rb.html b/src/files/actionmailbox/app/controllers/action_mailbox/ingresses/amazon/inbound_emails_controller_rb.html deleted file mode 100644 index 6cab1ea558..0000000000 --- a/src/files/actionmailbox/app/controllers/action_mailbox/ingresses/amazon/inbound_emails_controller_rb.html +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: inbound_emails_controller.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • aws-sdk-sns
    • - -
    - - - - - - - -

    Namespace

    - - -

    Module

    - - - - -

    Class

    - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/actionmailbox/app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller_rb.html b/src/files/actionmailbox/app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller_rb.html index cdd2aad6a4..22fc2561e5 100644 --- a/src/files/actionmailbox/app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller_rb.html +++ b/src/files/actionmailbox/app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/app/controllers/action_mailbox/ingresses/mailgun/inbound_emails_controller.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/app/controllers/action_mailbox/ingresses/mandrill/inbound_emails_controller_rb.html b/src/files/actionmailbox/app/controllers/action_mailbox/ingresses/mandrill/inbound_emails_controller_rb.html index 93496cd6ed..9d88199417 100644 --- a/src/files/actionmailbox/app/controllers/action_mailbox/ingresses/mandrill/inbound_emails_controller_rb.html +++ b/src/files/actionmailbox/app/controllers/action_mailbox/ingresses/mandrill/inbound_emails_controller_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/app/controllers/action_mailbox/ingresses/mandrill/inbound_emails_controller.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/app/controllers/action_mailbox/ingresses/postmark/inbound_emails_controller_rb.html b/src/files/actionmailbox/app/controllers/action_mailbox/ingresses/postmark/inbound_emails_controller_rb.html index 4f7e1bb5e5..48d940c2eb 100644 --- a/src/files/actionmailbox/app/controllers/action_mailbox/ingresses/postmark/inbound_emails_controller_rb.html +++ b/src/files/actionmailbox/app/controllers/action_mailbox/ingresses/postmark/inbound_emails_controller_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/app/controllers/action_mailbox/ingresses/postmark/inbound_emails_controller.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/app/controllers/action_mailbox/ingresses/relay/inbound_emails_controller_rb.html b/src/files/actionmailbox/app/controllers/action_mailbox/ingresses/relay/inbound_emails_controller_rb.html index c900778129..f33abe12a7 100644 --- a/src/files/actionmailbox/app/controllers/action_mailbox/ingresses/relay/inbound_emails_controller_rb.html +++ b/src/files/actionmailbox/app/controllers/action_mailbox/ingresses/relay/inbound_emails_controller_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/app/controllers/action_mailbox/ingresses/relay/inbound_emails_controller.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/app/controllers/action_mailbox/ingresses/sendgrid/inbound_emails_controller_rb.html b/src/files/actionmailbox/app/controllers/action_mailbox/ingresses/sendgrid/inbound_emails_controller_rb.html index 454a9b7d24..d3cc0d0560 100644 --- a/src/files/actionmailbox/app/controllers/action_mailbox/ingresses/sendgrid/inbound_emails_controller_rb.html +++ b/src/files/actionmailbox/app/controllers/action_mailbox/ingresses/sendgrid/inbound_emails_controller_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/app/controllers/action_mailbox/ingresses/sendgrid/inbound_emails_controller.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails/sources_controller_rb.html b/src/files/actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails/sources_controller_rb.html index 50a71a727c..701ad5f7a6 100644 --- a/src/files/actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails/sources_controller_rb.html +++ b/src/files/actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails/sources_controller_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails/sources_controller.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails_controller_rb.html b/src/files/actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails_controller_rb.html index 3d57045425..ba12a9e4cd 100644 --- a/src/files/actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails_controller_rb.html +++ b/src/files/actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails_controller_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails_controller.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/app/controllers/rails/conductor/action_mailbox/incinerates_controller_rb.html b/src/files/actionmailbox/app/controllers/rails/conductor/action_mailbox/incinerates_controller_rb.html index 5578c0d807..fb0060212e 100644 --- a/src/files/actionmailbox/app/controllers/rails/conductor/action_mailbox/incinerates_controller_rb.html +++ b/src/files/actionmailbox/app/controllers/rails/conductor/action_mailbox/incinerates_controller_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/app/controllers/rails/conductor/action_mailbox/incinerates_controller.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/app/controllers/rails/conductor/action_mailbox/reroutes_controller_rb.html b/src/files/actionmailbox/app/controllers/rails/conductor/action_mailbox/reroutes_controller_rb.html index 01542e309f..78e65e1c83 100644 --- a/src/files/actionmailbox/app/controllers/rails/conductor/action_mailbox/reroutes_controller_rb.html +++ b/src/files/actionmailbox/app/controllers/rails/conductor/action_mailbox/reroutes_controller_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/app/controllers/rails/conductor/action_mailbox/reroutes_controller.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/app/jobs/action_mailbox/incineration_job_rb.html b/src/files/actionmailbox/app/jobs/action_mailbox/incineration_job_rb.html index bb2973e8e1..0ee7d89bca 100644 --- a/src/files/actionmailbox/app/jobs/action_mailbox/incineration_job_rb.html +++ b/src/files/actionmailbox/app/jobs/action_mailbox/incineration_job_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/app/jobs/action_mailbox/incineration_job.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/app/jobs/action_mailbox/routing_job_rb.html b/src/files/actionmailbox/app/jobs/action_mailbox/routing_job_rb.html index 37b829c196..2bc716ae93 100644 --- a/src/files/actionmailbox/app/jobs/action_mailbox/routing_job_rb.html +++ b/src/files/actionmailbox/app/jobs/action_mailbox/routing_job_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/app/jobs/action_mailbox/routing_job.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/app/models/action_mailbox/inbound_email/incineratable/incineration_rb.html b/src/files/actionmailbox/app/models/action_mailbox/inbound_email/incineratable/incineration_rb.html index 3ae49582f9..1204a09c6c 100644 --- a/src/files/actionmailbox/app/models/action_mailbox/inbound_email/incineratable/incineration_rb.html +++ b/src/files/actionmailbox/app/models/action_mailbox/inbound_email/incineratable/incineration_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/app/models/action_mailbox/inbound_email/incineratable/incineration.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/app/models/action_mailbox/inbound_email/incineratable_rb.html b/src/files/actionmailbox/app/models/action_mailbox/inbound_email/incineratable_rb.html index 393bb0699f..8a2d0fe78c 100644 --- a/src/files/actionmailbox/app/models/action_mailbox/inbound_email/incineratable_rb.html +++ b/src/files/actionmailbox/app/models/action_mailbox/inbound_email/incineratable_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/app/models/action_mailbox/inbound_email/incineratable.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/app/models/action_mailbox/inbound_email/message_id_rb.html b/src/files/actionmailbox/app/models/action_mailbox/inbound_email/message_id_rb.html index 5fb9ea5504..702d0addfb 100644 --- a/src/files/actionmailbox/app/models/action_mailbox/inbound_email/message_id_rb.html +++ b/src/files/actionmailbox/app/models/action_mailbox/inbound_email/message_id_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/app/models/action_mailbox/inbound_email/message_id.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/app/models/action_mailbox/inbound_email/routable_rb.html b/src/files/actionmailbox/app/models/action_mailbox/inbound_email/routable_rb.html index 85d413bc98..2c74aba91a 100644 --- a/src/files/actionmailbox/app/models/action_mailbox/inbound_email/routable_rb.html +++ b/src/files/actionmailbox/app/models/action_mailbox/inbound_email/routable_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/app/models/action_mailbox/inbound_email/routable.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/app/models/action_mailbox/inbound_email_rb.html b/src/files/actionmailbox/app/models/action_mailbox/inbound_email_rb.html index fa65bf0d91..bf3a85abe2 100644 --- a/src/files/actionmailbox/app/models/action_mailbox/inbound_email_rb.html +++ b/src/files/actionmailbox/app/models/action_mailbox/inbound_email_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/app/models/action_mailbox/inbound_email.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/app/models/action_mailbox/record_rb.html b/src/files/actionmailbox/app/models/action_mailbox/record_rb.html index 4dd6690890..4069d913ee 100644 --- a/src/files/actionmailbox/app/models/action_mailbox/record_rb.html +++ b/src/files/actionmailbox/app/models/action_mailbox/record_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/app/models/action_mailbox/record.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/lib/action_mailbox/base_rb.html b/src/files/actionmailbox/lib/action_mailbox/base_rb.html index 130f73b791..6d51c5281e 100644 --- a/src/files/actionmailbox/lib/action_mailbox/base_rb.html +++ b/src/files/actionmailbox/lib/action_mailbox/base_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/lib/action_mailbox/base.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/lib/action_mailbox/callbacks_rb.html b/src/files/actionmailbox/lib/action_mailbox/callbacks_rb.html index fc2728e5e8..0206750a45 100644 --- a/src/files/actionmailbox/lib/action_mailbox/callbacks_rb.html +++ b/src/files/actionmailbox/lib/action_mailbox/callbacks_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/lib/action_mailbox/callbacks.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/lib/action_mailbox/deprecator_rb.html b/src/files/actionmailbox/lib/action_mailbox/deprecator_rb.html index 3b342b990c..2b1b5d46da 100644 --- a/src/files/actionmailbox/lib/action_mailbox/deprecator_rb.html +++ b/src/files/actionmailbox/lib/action_mailbox/deprecator_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/lib/action_mailbox/deprecator.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/lib/action_mailbox/engine_rb.html b/src/files/actionmailbox/lib/action_mailbox/engine_rb.html index a74a6309ab..9c6ec886c5 100644 --- a/src/files/actionmailbox/lib/action_mailbox/engine_rb.html +++ b/src/files/actionmailbox/lib/action_mailbox/engine_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/lib/action_mailbox/engine.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/lib/action_mailbox/gem_version_rb.html b/src/files/actionmailbox/lib/action_mailbox/gem_version_rb.html index 9032aeabd1..e452d508d9 100644 --- a/src/files/actionmailbox/lib/action_mailbox/gem_version_rb.html +++ b/src/files/actionmailbox/lib/action_mailbox/gem_version_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/lib/action_mailbox/gem_version.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/lib/action_mailbox/mail_ext/address_equality_rb.html b/src/files/actionmailbox/lib/action_mailbox/mail_ext/address_equality_rb.html index a7f8327670..dee611d2dc 100644 --- a/src/files/actionmailbox/lib/action_mailbox/mail_ext/address_equality_rb.html +++ b/src/files/actionmailbox/lib/action_mailbox/mail_ext/address_equality_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/lib/action_mailbox/mail_ext/address_equality.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/lib/action_mailbox/mail_ext/address_wrapping_rb.html b/src/files/actionmailbox/lib/action_mailbox/mail_ext/address_wrapping_rb.html index ba0d4baf78..738d808bef 100644 --- a/src/files/actionmailbox/lib/action_mailbox/mail_ext/address_wrapping_rb.html +++ b/src/files/actionmailbox/lib/action_mailbox/mail_ext/address_wrapping_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/lib/action_mailbox/mail_ext/address_wrapping.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/lib/action_mailbox/mail_ext/addresses_rb.html b/src/files/actionmailbox/lib/action_mailbox/mail_ext/addresses_rb.html index cb5209507f..4051970150 100644 --- a/src/files/actionmailbox/lib/action_mailbox/mail_ext/addresses_rb.html +++ b/src/files/actionmailbox/lib/action_mailbox/mail_ext/addresses_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/lib/action_mailbox/mail_ext/addresses.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/lib/action_mailbox/mail_ext/from_source_rb.html b/src/files/actionmailbox/lib/action_mailbox/mail_ext/from_source_rb.html index 047e93cda0..753be27140 100644 --- a/src/files/actionmailbox/lib/action_mailbox/mail_ext/from_source_rb.html +++ b/src/files/actionmailbox/lib/action_mailbox/mail_ext/from_source_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/lib/action_mailbox/mail_ext/from_source.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/lib/action_mailbox/mail_ext/recipients_rb.html b/src/files/actionmailbox/lib/action_mailbox/mail_ext/recipients_rb.html index 18965e58a6..72fb372812 100644 --- a/src/files/actionmailbox/lib/action_mailbox/mail_ext/recipients_rb.html +++ b/src/files/actionmailbox/lib/action_mailbox/mail_ext/recipients_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/lib/action_mailbox/mail_ext/recipients.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/lib/action_mailbox/mail_ext_rb.html b/src/files/actionmailbox/lib/action_mailbox/mail_ext_rb.html index 2ed5c48c2f..1d35351b56 100644 --- a/src/files/actionmailbox/lib/action_mailbox/mail_ext_rb.html +++ b/src/files/actionmailbox/lib/action_mailbox/mail_ext_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/lib/action_mailbox/mail_ext.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/lib/action_mailbox/mail_with_error_handling_rb.html b/src/files/actionmailbox/lib/action_mailbox/mail_with_error_handling_rb.html deleted file mode 100644 index c3f344e801..0000000000 --- a/src/files/actionmailbox/lib/action_mailbox/mail_with_error_handling_rb.html +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: mail_with_error_handling.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • mail
    • - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/actionmailbox/lib/action_mailbox/relayer_rb.html b/src/files/actionmailbox/lib/action_mailbox/relayer_rb.html index 83aa6a9131..f3e819bc2f 100644 --- a/src/files/actionmailbox/lib/action_mailbox/relayer_rb.html +++ b/src/files/actionmailbox/lib/action_mailbox/relayer_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/lib/action_mailbox/relayer.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/lib/action_mailbox/router/route_rb.html b/src/files/actionmailbox/lib/action_mailbox/router/route_rb.html index fed0e82702..5d5aa60a55 100644 --- a/src/files/actionmailbox/lib/action_mailbox/router/route_rb.html +++ b/src/files/actionmailbox/lib/action_mailbox/router/route_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/lib/action_mailbox/router/route.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/lib/action_mailbox/router_rb.html b/src/files/actionmailbox/lib/action_mailbox/router_rb.html index b4cf1c5501..3396de7be2 100644 --- a/src/files/actionmailbox/lib/action_mailbox/router_rb.html +++ b/src/files/actionmailbox/lib/action_mailbox/router_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/lib/action_mailbox/router.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/lib/action_mailbox/routing_rb.html b/src/files/actionmailbox/lib/action_mailbox/routing_rb.html index 5d726bf5fc..d94c037cff 100644 --- a/src/files/actionmailbox/lib/action_mailbox/routing_rb.html +++ b/src/files/actionmailbox/lib/action_mailbox/routing_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/lib/action_mailbox/routing.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/lib/action_mailbox/test_case_rb.html b/src/files/actionmailbox/lib/action_mailbox/test_case_rb.html index 6139101fcc..b2488acd54 100644 --- a/src/files/actionmailbox/lib/action_mailbox/test_case_rb.html +++ b/src/files/actionmailbox/lib/action_mailbox/test_case_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/lib/action_mailbox/test_case.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/lib/action_mailbox/test_helper_rb.html b/src/files/actionmailbox/lib/action_mailbox/test_helper_rb.html index f4f5db795b..9a898620f4 100644 --- a/src/files/actionmailbox/lib/action_mailbox/test_helper_rb.html +++ b/src/files/actionmailbox/lib/action_mailbox/test_helper_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/lib/action_mailbox/test_helper.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/lib/action_mailbox/version_rb.html b/src/files/actionmailbox/lib/action_mailbox/version_rb.html index 5d87c92c3a..4275f354d0 100644 --- a/src/files/actionmailbox/lib/action_mailbox/version_rb.html +++ b/src/files/actionmailbox/lib/action_mailbox/version_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/lib/action_mailbox/version.rb + on GitHub +
  • diff --git a/src/files/actionmailbox/lib/action_mailbox_rb.html b/src/files/actionmailbox/lib/action_mailbox_rb.html index 84c44fb495..c09acf1bf5 100644 --- a/src/files/actionmailbox/lib/action_mailbox_rb.html +++ b/src/files/actionmailbox/lib/action_mailbox_rb.html @@ -15,6 +15,8 @@

  • actionmailbox/lib/action_mailbox.rb + on GitHub +
  • diff --git a/src/files/actionmailer/README_rdoc.html b/src/files/actionmailer/README_rdoc.html index 1eeac841cf..47bdc8c164 100644 --- a/src/files/actionmailer/README_rdoc.html +++ b/src/files/actionmailer/README_rdoc.html @@ -15,6 +15,8 @@

  • actionmailer/README.rdoc + on GitHub +
  • diff --git a/src/files/actionmailer/lib/action_mailer/base_rb.html b/src/files/actionmailer/lib/action_mailer/base_rb.html index 9b528c8140..576951bcdf 100644 --- a/src/files/actionmailer/lib/action_mailer/base_rb.html +++ b/src/files/actionmailer/lib/action_mailer/base_rb.html @@ -15,6 +15,8 @@

  • actionmailer/lib/action_mailer/base.rb + on GitHub +
  • diff --git a/src/files/actionmailer/lib/action_mailer/callbacks_rb.html b/src/files/actionmailer/lib/action_mailer/callbacks_rb.html index c7988a35dc..453c647801 100644 --- a/src/files/actionmailer/lib/action_mailer/callbacks_rb.html +++ b/src/files/actionmailer/lib/action_mailer/callbacks_rb.html @@ -15,6 +15,8 @@

  • actionmailer/lib/action_mailer/callbacks.rb + on GitHub +
  • diff --git a/src/files/actionmailer/lib/action_mailer/collector_rb.html b/src/files/actionmailer/lib/action_mailer/collector_rb.html index 141ddaedf3..3ac390c61b 100644 --- a/src/files/actionmailer/lib/action_mailer/collector_rb.html +++ b/src/files/actionmailer/lib/action_mailer/collector_rb.html @@ -15,6 +15,8 @@

  • actionmailer/lib/action_mailer/collector.rb + on GitHub +
  • diff --git a/src/files/actionmailer/lib/action_mailer/delivery_job_rb.html b/src/files/actionmailer/lib/action_mailer/delivery_job_rb.html deleted file mode 100644 index 7ca10af08f..0000000000 --- a/src/files/actionmailer/lib/action_mailer/delivery_job_rb.html +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: delivery_job.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • active_job
    • - -
    - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/actionmailer/lib/action_mailer/delivery_methods_rb.html b/src/files/actionmailer/lib/action_mailer/delivery_methods_rb.html index 95d88a8e33..b4b50f27ad 100644 --- a/src/files/actionmailer/lib/action_mailer/delivery_methods_rb.html +++ b/src/files/actionmailer/lib/action_mailer/delivery_methods_rb.html @@ -15,6 +15,8 @@

  • actionmailer/lib/action_mailer/delivery_methods.rb + on GitHub +
  • diff --git a/src/files/actionmailer/lib/action_mailer/deprecator_rb.html b/src/files/actionmailer/lib/action_mailer/deprecator_rb.html index f7892afa83..fd93368767 100644 --- a/src/files/actionmailer/lib/action_mailer/deprecator_rb.html +++ b/src/files/actionmailer/lib/action_mailer/deprecator_rb.html @@ -15,6 +15,8 @@

  • actionmailer/lib/action_mailer/deprecator.rb + on GitHub +
  • diff --git a/src/files/actionmailer/lib/action_mailer/form_builder_rb.html b/src/files/actionmailer/lib/action_mailer/form_builder_rb.html index dfdf55361f..b1847c181d 100644 --- a/src/files/actionmailer/lib/action_mailer/form_builder_rb.html +++ b/src/files/actionmailer/lib/action_mailer/form_builder_rb.html @@ -15,6 +15,8 @@

  • actionmailer/lib/action_mailer/form_builder.rb + on GitHub +
  • diff --git a/src/files/actionmailer/lib/action_mailer/gem_version_rb.html b/src/files/actionmailer/lib/action_mailer/gem_version_rb.html index 177def1d6a..1f0dcd976b 100644 --- a/src/files/actionmailer/lib/action_mailer/gem_version_rb.html +++ b/src/files/actionmailer/lib/action_mailer/gem_version_rb.html @@ -15,6 +15,8 @@

  • actionmailer/lib/action_mailer/gem_version.rb + on GitHub +
  • diff --git a/src/files/actionmailer/lib/action_mailer/inline_preview_interceptor_rb.html b/src/files/actionmailer/lib/action_mailer/inline_preview_interceptor_rb.html index 29ec8c5310..12684ca7ae 100644 --- a/src/files/actionmailer/lib/action_mailer/inline_preview_interceptor_rb.html +++ b/src/files/actionmailer/lib/action_mailer/inline_preview_interceptor_rb.html @@ -15,6 +15,8 @@

  • actionmailer/lib/action_mailer/inline_preview_interceptor.rb + on GitHub +
  • diff --git a/src/files/actionmailer/lib/action_mailer/log_subscriber_rb.html b/src/files/actionmailer/lib/action_mailer/log_subscriber_rb.html index ca1cbc8c98..648d69bd3c 100644 --- a/src/files/actionmailer/lib/action_mailer/log_subscriber_rb.html +++ b/src/files/actionmailer/lib/action_mailer/log_subscriber_rb.html @@ -15,6 +15,8 @@

  • actionmailer/lib/action_mailer/log_subscriber.rb + on GitHub +
  • diff --git a/src/files/actionmailer/lib/action_mailer/mail_delivery_job_rb.html b/src/files/actionmailer/lib/action_mailer/mail_delivery_job_rb.html index 7a0cc1bb10..ec282e4b14 100644 --- a/src/files/actionmailer/lib/action_mailer/mail_delivery_job_rb.html +++ b/src/files/actionmailer/lib/action_mailer/mail_delivery_job_rb.html @@ -15,6 +15,8 @@

  • actionmailer/lib/action_mailer/mail_delivery_job.rb + on GitHub +
  • diff --git a/src/files/actionmailer/lib/action_mailer/mail_helper_rb.html b/src/files/actionmailer/lib/action_mailer/mail_helper_rb.html index 509776f05f..99fe61e64a 100644 --- a/src/files/actionmailer/lib/action_mailer/mail_helper_rb.html +++ b/src/files/actionmailer/lib/action_mailer/mail_helper_rb.html @@ -15,6 +15,8 @@

  • actionmailer/lib/action_mailer/mail_helper.rb + on GitHub +
  • diff --git a/src/files/actionmailer/lib/action_mailer/mail_with_error_handling_rb.html b/src/files/actionmailer/lib/action_mailer/mail_with_error_handling_rb.html deleted file mode 100644 index 5b36395ae1..0000000000 --- a/src/files/actionmailer/lib/action_mailer/mail_with_error_handling_rb.html +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: mail_with_error_handling.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • mail
    • - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/actionmailer/lib/action_mailer/message_delivery_rb.html b/src/files/actionmailer/lib/action_mailer/message_delivery_rb.html index c1fe646d11..31a0a4e64c 100644 --- a/src/files/actionmailer/lib/action_mailer/message_delivery_rb.html +++ b/src/files/actionmailer/lib/action_mailer/message_delivery_rb.html @@ -15,6 +15,8 @@

  • actionmailer/lib/action_mailer/message_delivery.rb + on GitHub +
  • diff --git a/src/files/actionmailer/lib/action_mailer/parameterized_rb.html b/src/files/actionmailer/lib/action_mailer/parameterized_rb.html index b0e4c69581..d8a183f3d6 100644 --- a/src/files/actionmailer/lib/action_mailer/parameterized_rb.html +++ b/src/files/actionmailer/lib/action_mailer/parameterized_rb.html @@ -15,6 +15,8 @@

  • actionmailer/lib/action_mailer/parameterized.rb + on GitHub +
  • diff --git a/src/files/actionmailer/lib/action_mailer/preview_rb.html b/src/files/actionmailer/lib/action_mailer/preview_rb.html index 4fc09ad661..7d6cd690a1 100644 --- a/src/files/actionmailer/lib/action_mailer/preview_rb.html +++ b/src/files/actionmailer/lib/action_mailer/preview_rb.html @@ -15,6 +15,8 @@

  • actionmailer/lib/action_mailer/preview.rb + on GitHub +
  • diff --git a/src/files/actionmailer/lib/action_mailer/queued_delivery_rb.html b/src/files/actionmailer/lib/action_mailer/queued_delivery_rb.html index deec587451..65771bef46 100644 --- a/src/files/actionmailer/lib/action_mailer/queued_delivery_rb.html +++ b/src/files/actionmailer/lib/action_mailer/queued_delivery_rb.html @@ -15,6 +15,8 @@

  • actionmailer/lib/action_mailer/queued_delivery.rb + on GitHub +
  • diff --git a/src/files/actionmailer/lib/action_mailer/railtie_rb.html b/src/files/actionmailer/lib/action_mailer/railtie_rb.html index 3d78a92d08..c253605653 100644 --- a/src/files/actionmailer/lib/action_mailer/railtie_rb.html +++ b/src/files/actionmailer/lib/action_mailer/railtie_rb.html @@ -15,6 +15,8 @@

  • actionmailer/lib/action_mailer/railtie.rb + on GitHub +
  • diff --git a/src/files/actionmailer/lib/action_mailer/rescuable_rb.html b/src/files/actionmailer/lib/action_mailer/rescuable_rb.html index 84f2eca731..c99582401e 100644 --- a/src/files/actionmailer/lib/action_mailer/rescuable_rb.html +++ b/src/files/actionmailer/lib/action_mailer/rescuable_rb.html @@ -15,6 +15,8 @@

  • actionmailer/lib/action_mailer/rescuable.rb + on GitHub +
  • diff --git a/src/files/actionmailer/lib/action_mailer/test_case_rb.html b/src/files/actionmailer/lib/action_mailer/test_case_rb.html index c50d57d5ba..a1fdc2083f 100644 --- a/src/files/actionmailer/lib/action_mailer/test_case_rb.html +++ b/src/files/actionmailer/lib/action_mailer/test_case_rb.html @@ -15,6 +15,8 @@

  • actionmailer/lib/action_mailer/test_case.rb + on GitHub +
  • diff --git a/src/files/actionmailer/lib/action_mailer/test_helper_rb.html b/src/files/actionmailer/lib/action_mailer/test_helper_rb.html index 9ddbf194e4..7d50a4f75f 100644 --- a/src/files/actionmailer/lib/action_mailer/test_helper_rb.html +++ b/src/files/actionmailer/lib/action_mailer/test_helper_rb.html @@ -15,6 +15,8 @@

  • actionmailer/lib/action_mailer/test_helper.rb + on GitHub +
  • diff --git a/src/files/actionmailer/lib/action_mailer/version_rb.html b/src/files/actionmailer/lib/action_mailer/version_rb.html index cab20c595d..ce2d0b41ba 100644 --- a/src/files/actionmailer/lib/action_mailer/version_rb.html +++ b/src/files/actionmailer/lib/action_mailer/version_rb.html @@ -15,6 +15,8 @@

  • actionmailer/lib/action_mailer/version.rb + on GitHub +
  • diff --git a/src/files/actionmailer/lib/action_mailer_rb.html b/src/files/actionmailer/lib/action_mailer_rb.html index 8b5054f2f3..fc2eea8a69 100644 --- a/src/files/actionmailer/lib/action_mailer_rb.html +++ b/src/files/actionmailer/lib/action_mailer_rb.html @@ -15,6 +15,8 @@

  • actionmailer/lib/action_mailer.rb + on GitHub +
  • diff --git a/src/files/actionpack/README_rdoc.html b/src/files/actionpack/README_rdoc.html index 4798a19ff9..3ae5cf3dab 100644 --- a/src/files/actionpack/README_rdoc.html +++ b/src/files/actionpack/README_rdoc.html @@ -15,6 +15,8 @@

  • actionpack/README.rdoc + on GitHub +
  • diff --git a/src/files/actionpack/lib/abstract_controller/asset_paths_rb.html b/src/files/actionpack/lib/abstract_controller/asset_paths_rb.html index a9bec85970..8c171155a5 100644 --- a/src/files/actionpack/lib/abstract_controller/asset_paths_rb.html +++ b/src/files/actionpack/lib/abstract_controller/asset_paths_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/abstract_controller/asset_paths.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/abstract_controller/base_rb.html b/src/files/actionpack/lib/abstract_controller/base_rb.html index c0bfc623d4..12874e68b4 100644 --- a/src/files/actionpack/lib/abstract_controller/base_rb.html +++ b/src/files/actionpack/lib/abstract_controller/base_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/abstract_controller/base.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/abstract_controller/caching/fragments_rb.html b/src/files/actionpack/lib/abstract_controller/caching/fragments_rb.html index dee234aa65..91b829144b 100644 --- a/src/files/actionpack/lib/abstract_controller/caching/fragments_rb.html +++ b/src/files/actionpack/lib/abstract_controller/caching/fragments_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/abstract_controller/caching/fragments.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/abstract_controller/caching_rb.html b/src/files/actionpack/lib/abstract_controller/caching_rb.html index 2776392f50..e5e3056a7e 100644 --- a/src/files/actionpack/lib/abstract_controller/caching_rb.html +++ b/src/files/actionpack/lib/abstract_controller/caching_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/abstract_controller/caching.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/abstract_controller/callbacks_rb.html b/src/files/actionpack/lib/abstract_controller/callbacks_rb.html index c63a2bf4d5..53278478ab 100644 --- a/src/files/actionpack/lib/abstract_controller/callbacks_rb.html +++ b/src/files/actionpack/lib/abstract_controller/callbacks_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/abstract_controller/callbacks.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/abstract_controller/collector_rb.html b/src/files/actionpack/lib/abstract_controller/collector_rb.html index 2aeafd09f0..56652caec1 100644 --- a/src/files/actionpack/lib/abstract_controller/collector_rb.html +++ b/src/files/actionpack/lib/abstract_controller/collector_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/abstract_controller/collector.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/abstract_controller/deprecator_rb.html b/src/files/actionpack/lib/abstract_controller/deprecator_rb.html index e9b792af4c..403fa324bb 100644 --- a/src/files/actionpack/lib/abstract_controller/deprecator_rb.html +++ b/src/files/actionpack/lib/abstract_controller/deprecator_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/abstract_controller/deprecator.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/abstract_controller/error_rb.html b/src/files/actionpack/lib/abstract_controller/error_rb.html index 303cb70eaf..7b54de395a 100644 --- a/src/files/actionpack/lib/abstract_controller/error_rb.html +++ b/src/files/actionpack/lib/abstract_controller/error_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/abstract_controller/error.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/abstract_controller/helpers_rb.html b/src/files/actionpack/lib/abstract_controller/helpers_rb.html index 4017174af3..8949dca2e9 100644 --- a/src/files/actionpack/lib/abstract_controller/helpers_rb.html +++ b/src/files/actionpack/lib/abstract_controller/helpers_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/abstract_controller/helpers.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/abstract_controller/logger_rb.html b/src/files/actionpack/lib/abstract_controller/logger_rb.html index cd0230b3f6..f0db7f9b1a 100644 --- a/src/files/actionpack/lib/abstract_controller/logger_rb.html +++ b/src/files/actionpack/lib/abstract_controller/logger_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/abstract_controller/logger.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/abstract_controller/railties/routes_helpers_rb.html b/src/files/actionpack/lib/abstract_controller/railties/routes_helpers_rb.html index bf1c574ff6..7458347c14 100644 --- a/src/files/actionpack/lib/abstract_controller/railties/routes_helpers_rb.html +++ b/src/files/actionpack/lib/abstract_controller/railties/routes_helpers_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/abstract_controller/railties/routes_helpers.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/abstract_controller/rendering_rb.html b/src/files/actionpack/lib/abstract_controller/rendering_rb.html index e07ce50dc9..bb8ab40594 100644 --- a/src/files/actionpack/lib/abstract_controller/rendering_rb.html +++ b/src/files/actionpack/lib/abstract_controller/rendering_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/abstract_controller/rendering.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/abstract_controller/translation_rb.html b/src/files/actionpack/lib/abstract_controller/translation_rb.html index 488e9a849f..ab3fded7c9 100644 --- a/src/files/actionpack/lib/abstract_controller/translation_rb.html +++ b/src/files/actionpack/lib/abstract_controller/translation_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/abstract_controller/translation.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/abstract_controller/url_for_rb.html b/src/files/actionpack/lib/abstract_controller/url_for_rb.html index e881c2bddd..57803d2d73 100644 --- a/src/files/actionpack/lib/abstract_controller/url_for_rb.html +++ b/src/files/actionpack/lib/abstract_controller/url_for_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/abstract_controller/url_for.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/api/api_rendering_rb.html b/src/files/actionpack/lib/action_controller/api/api_rendering_rb.html index a4dda72c2a..b00168eaa3 100644 --- a/src/files/actionpack/lib/action_controller/api/api_rendering_rb.html +++ b/src/files/actionpack/lib/action_controller/api/api_rendering_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/api/api_rendering.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/api_rb.html b/src/files/actionpack/lib/action_controller/api_rb.html index c05d5612ce..8a33050072 100644 --- a/src/files/actionpack/lib/action_controller/api_rb.html +++ b/src/files/actionpack/lib/action_controller/api_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/api.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/base_rb.html b/src/files/actionpack/lib/action_controller/base_rb.html index 9d616bd5b9..a255f87aa3 100644 --- a/src/files/actionpack/lib/action_controller/base_rb.html +++ b/src/files/actionpack/lib/action_controller/base_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/base.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/caching_rb.html b/src/files/actionpack/lib/action_controller/caching_rb.html index 6adc2a75a1..7d52bdb178 100644 --- a/src/files/actionpack/lib/action_controller/caching_rb.html +++ b/src/files/actionpack/lib/action_controller/caching_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/caching.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/deprecator_rb.html b/src/files/actionpack/lib/action_controller/deprecator_rb.html index d96be5b0f5..ae39dc5eb3 100644 --- a/src/files/actionpack/lib/action_controller/deprecator_rb.html +++ b/src/files/actionpack/lib/action_controller/deprecator_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/deprecator.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/form_builder_rb.html b/src/files/actionpack/lib/action_controller/form_builder_rb.html index e5c7c8877a..6b0e1fac45 100644 --- a/src/files/actionpack/lib/action_controller/form_builder_rb.html +++ b/src/files/actionpack/lib/action_controller/form_builder_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/form_builder.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/log_subscriber_rb.html b/src/files/actionpack/lib/action_controller/log_subscriber_rb.html index bedc1c0f7b..492d7088c3 100644 --- a/src/files/actionpack/lib/action_controller/log_subscriber_rb.html +++ b/src/files/actionpack/lib/action_controller/log_subscriber_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/log_subscriber.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal/basic_implicit_render_rb.html b/src/files/actionpack/lib/action_controller/metal/basic_implicit_render_rb.html index 10cf06e39f..5bfab698cf 100644 --- a/src/files/actionpack/lib/action_controller/metal/basic_implicit_render_rb.html +++ b/src/files/actionpack/lib/action_controller/metal/basic_implicit_render_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal/basic_implicit_render.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal/conditional_get_rb.html b/src/files/actionpack/lib/action_controller/metal/conditional_get_rb.html index 05612eae42..c3ef1212c8 100644 --- a/src/files/actionpack/lib/action_controller/metal/conditional_get_rb.html +++ b/src/files/actionpack/lib/action_controller/metal/conditional_get_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal/conditional_get.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal/content_security_policy_rb.html b/src/files/actionpack/lib/action_controller/metal/content_security_policy_rb.html index b355ba5488..2452e2b40d 100644 --- a/src/files/actionpack/lib/action_controller/metal/content_security_policy_rb.html +++ b/src/files/actionpack/lib/action_controller/metal/content_security_policy_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal/content_security_policy.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal/cookies_rb.html b/src/files/actionpack/lib/action_controller/metal/cookies_rb.html index 2e57289791..0c2242f979 100644 --- a/src/files/actionpack/lib/action_controller/metal/cookies_rb.html +++ b/src/files/actionpack/lib/action_controller/metal/cookies_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal/cookies.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal/data_streaming_rb.html b/src/files/actionpack/lib/action_controller/metal/data_streaming_rb.html index 7b626eb66c..13d89119bb 100644 --- a/src/files/actionpack/lib/action_controller/metal/data_streaming_rb.html +++ b/src/files/actionpack/lib/action_controller/metal/data_streaming_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal/data_streaming.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal/default_headers_rb.html b/src/files/actionpack/lib/action_controller/metal/default_headers_rb.html index 32cd936bcc..a3ba4adac9 100644 --- a/src/files/actionpack/lib/action_controller/metal/default_headers_rb.html +++ b/src/files/actionpack/lib/action_controller/metal/default_headers_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal/default_headers.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal/etag_with_flash_rb.html b/src/files/actionpack/lib/action_controller/metal/etag_with_flash_rb.html index ab77fbdcc6..c54556ce9d 100644 --- a/src/files/actionpack/lib/action_controller/metal/etag_with_flash_rb.html +++ b/src/files/actionpack/lib/action_controller/metal/etag_with_flash_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal/etag_with_flash.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal/etag_with_template_digest_rb.html b/src/files/actionpack/lib/action_controller/metal/etag_with_template_digest_rb.html index b383df09b3..5d457c62cb 100644 --- a/src/files/actionpack/lib/action_controller/metal/etag_with_template_digest_rb.html +++ b/src/files/actionpack/lib/action_controller/metal/etag_with_template_digest_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal/etag_with_template_digest.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal/exceptions_rb.html b/src/files/actionpack/lib/action_controller/metal/exceptions_rb.html index fea348eac7..67baebf284 100644 --- a/src/files/actionpack/lib/action_controller/metal/exceptions_rb.html +++ b/src/files/actionpack/lib/action_controller/metal/exceptions_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal/exceptions.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal/flash_rb.html b/src/files/actionpack/lib/action_controller/metal/flash_rb.html index 14d9ac3eea..8f4bfb6193 100644 --- a/src/files/actionpack/lib/action_controller/metal/flash_rb.html +++ b/src/files/actionpack/lib/action_controller/metal/flash_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal/flash.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal/force_ssl_rb.html b/src/files/actionpack/lib/action_controller/metal/force_ssl_rb.html deleted file mode 100644 index 24ace6a97c..0000000000 --- a/src/files/actionpack/lib/action_controller/metal/force_ssl_rb.html +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: force_ssl.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • active_support/core_ext/hash/except
    • - -
    • active_support/core_ext/hash/slice
    • - -
    - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/actionpack/lib/action_controller/metal/head_rb.html b/src/files/actionpack/lib/action_controller/metal/head_rb.html index 6f610e4dcb..4ae7308d31 100644 --- a/src/files/actionpack/lib/action_controller/metal/head_rb.html +++ b/src/files/actionpack/lib/action_controller/metal/head_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal/head.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal/helpers_rb.html b/src/files/actionpack/lib/action_controller/metal/helpers_rb.html index 819b8ac061..cb6e19a5b0 100644 --- a/src/files/actionpack/lib/action_controller/metal/helpers_rb.html +++ b/src/files/actionpack/lib/action_controller/metal/helpers_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal/helpers.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal/http_authentication_rb.html b/src/files/actionpack/lib/action_controller/metal/http_authentication_rb.html index da7e24d3a4..54788d73c9 100644 --- a/src/files/actionpack/lib/action_controller/metal/http_authentication_rb.html +++ b/src/files/actionpack/lib/action_controller/metal/http_authentication_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal/http_authentication.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal/implicit_render_rb.html b/src/files/actionpack/lib/action_controller/metal/implicit_render_rb.html index a9ca5b1820..f721112ddd 100644 --- a/src/files/actionpack/lib/action_controller/metal/implicit_render_rb.html +++ b/src/files/actionpack/lib/action_controller/metal/implicit_render_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal/implicit_render.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal/instrumentation_rb.html b/src/files/actionpack/lib/action_controller/metal/instrumentation_rb.html index 79ddc1b49b..e4ea2c239c 100644 --- a/src/files/actionpack/lib/action_controller/metal/instrumentation_rb.html +++ b/src/files/actionpack/lib/action_controller/metal/instrumentation_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal/instrumentation.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal/live_rb.html b/src/files/actionpack/lib/action_controller/metal/live_rb.html index 26bc08b0d1..1a44fdb60e 100644 --- a/src/files/actionpack/lib/action_controller/metal/live_rb.html +++ b/src/files/actionpack/lib/action_controller/metal/live_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal/live.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal/logging_rb.html b/src/files/actionpack/lib/action_controller/metal/logging_rb.html index e7ca341f5e..410707dfdf 100644 --- a/src/files/actionpack/lib/action_controller/metal/logging_rb.html +++ b/src/files/actionpack/lib/action_controller/metal/logging_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal/logging.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal/mime_responds_rb.html b/src/files/actionpack/lib/action_controller/metal/mime_responds_rb.html index 6c413ede27..c3e758e001 100644 --- a/src/files/actionpack/lib/action_controller/metal/mime_responds_rb.html +++ b/src/files/actionpack/lib/action_controller/metal/mime_responds_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal/mime_responds.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal/parameter_encoding_rb.html b/src/files/actionpack/lib/action_controller/metal/parameter_encoding_rb.html index 0a99c92c18..e504427797 100644 --- a/src/files/actionpack/lib/action_controller/metal/parameter_encoding_rb.html +++ b/src/files/actionpack/lib/action_controller/metal/parameter_encoding_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal/parameter_encoding.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal/params_wrapper_rb.html b/src/files/actionpack/lib/action_controller/metal/params_wrapper_rb.html index 182511b1d6..2a7458283a 100644 --- a/src/files/actionpack/lib/action_controller/metal/params_wrapper_rb.html +++ b/src/files/actionpack/lib/action_controller/metal/params_wrapper_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal/params_wrapper.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal/permissions_policy_rb.html b/src/files/actionpack/lib/action_controller/metal/permissions_policy_rb.html index 749938ad86..1db3d5dc05 100644 --- a/src/files/actionpack/lib/action_controller/metal/permissions_policy_rb.html +++ b/src/files/actionpack/lib/action_controller/metal/permissions_policy_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal/permissions_policy.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal/query_tags_rb.html b/src/files/actionpack/lib/action_controller/metal/query_tags_rb.html deleted file mode 100644 index 226851fe0b..0000000000 --- a/src/files/actionpack/lib/action_controller/metal/query_tags_rb.html +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: query_tags.rb -layout: default ---- -
    - - -
    -
    - - - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/actionpack/lib/action_controller/metal/redirecting_rb.html b/src/files/actionpack/lib/action_controller/metal/redirecting_rb.html index 0d7993dd5b..b73bc0c188 100644 --- a/src/files/actionpack/lib/action_controller/metal/redirecting_rb.html +++ b/src/files/actionpack/lib/action_controller/metal/redirecting_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal/redirecting.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal/renderers_rb.html b/src/files/actionpack/lib/action_controller/metal/renderers_rb.html index f6f7531dcd..1a379ebf6d 100644 --- a/src/files/actionpack/lib/action_controller/metal/renderers_rb.html +++ b/src/files/actionpack/lib/action_controller/metal/renderers_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal/renderers.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal/rendering_rb.html b/src/files/actionpack/lib/action_controller/metal/rendering_rb.html index 5176563a3c..b2ddc8280a 100644 --- a/src/files/actionpack/lib/action_controller/metal/rendering_rb.html +++ b/src/files/actionpack/lib/action_controller/metal/rendering_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal/rendering.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal/request_forgery_protection_rb.html b/src/files/actionpack/lib/action_controller/metal/request_forgery_protection_rb.html index ef686e6744..46055ea9f8 100644 --- a/src/files/actionpack/lib/action_controller/metal/request_forgery_protection_rb.html +++ b/src/files/actionpack/lib/action_controller/metal/request_forgery_protection_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal/request_forgery_protection.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal/rescue_rb.html b/src/files/actionpack/lib/action_controller/metal/rescue_rb.html index 6ad5c176a4..59ae5e389e 100644 --- a/src/files/actionpack/lib/action_controller/metal/rescue_rb.html +++ b/src/files/actionpack/lib/action_controller/metal/rescue_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal/rescue.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal/streaming_rb.html b/src/files/actionpack/lib/action_controller/metal/streaming_rb.html index dfd45815c3..0310e07300 100644 --- a/src/files/actionpack/lib/action_controller/metal/streaming_rb.html +++ b/src/files/actionpack/lib/action_controller/metal/streaming_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal/streaming.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal/strong_parameters_rb.html b/src/files/actionpack/lib/action_controller/metal/strong_parameters_rb.html index 812b2b0bac..2ec4d64c56 100644 --- a/src/files/actionpack/lib/action_controller/metal/strong_parameters_rb.html +++ b/src/files/actionpack/lib/action_controller/metal/strong_parameters_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal/strong_parameters.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal/testing_rb.html b/src/files/actionpack/lib/action_controller/metal/testing_rb.html index ce3601cf6b..ca0301b5b5 100644 --- a/src/files/actionpack/lib/action_controller/metal/testing_rb.html +++ b/src/files/actionpack/lib/action_controller/metal/testing_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal/testing.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal/url_for_rb.html b/src/files/actionpack/lib/action_controller/metal/url_for_rb.html index 4cb1639f40..6536f7c242 100644 --- a/src/files/actionpack/lib/action_controller/metal/url_for_rb.html +++ b/src/files/actionpack/lib/action_controller/metal/url_for_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal/url_for.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/metal_rb.html b/src/files/actionpack/lib/action_controller/metal_rb.html index b814c352fc..878eabd811 100644 --- a/src/files/actionpack/lib/action_controller/metal_rb.html +++ b/src/files/actionpack/lib/action_controller/metal_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/metal.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/railtie_rb.html b/src/files/actionpack/lib/action_controller/railtie_rb.html index 9acd88088e..fccfda4411 100644 --- a/src/files/actionpack/lib/action_controller/railtie_rb.html +++ b/src/files/actionpack/lib/action_controller/railtie_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/railtie.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/railties/helpers_rb.html b/src/files/actionpack/lib/action_controller/railties/helpers_rb.html index cb1530f342..22ff107027 100644 --- a/src/files/actionpack/lib/action_controller/railties/helpers_rb.html +++ b/src/files/actionpack/lib/action_controller/railties/helpers_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/railties/helpers.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/renderer_rb.html b/src/files/actionpack/lib/action_controller/renderer_rb.html index 4bb6b66dac..1555366270 100644 --- a/src/files/actionpack/lib/action_controller/renderer_rb.html +++ b/src/files/actionpack/lib/action_controller/renderer_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/renderer.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/template_assertions_rb.html b/src/files/actionpack/lib/action_controller/template_assertions_rb.html index 5af149f1e7..118d082491 100644 --- a/src/files/actionpack/lib/action_controller/template_assertions_rb.html +++ b/src/files/actionpack/lib/action_controller/template_assertions_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/template_assertions.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller/test_case_rb.html b/src/files/actionpack/lib/action_controller/test_case_rb.html index 3ae955c827..253cc259f7 100644 --- a/src/files/actionpack/lib/action_controller/test_case_rb.html +++ b/src/files/actionpack/lib/action_controller/test_case_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller/test_case.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_controller_rb.html b/src/files/actionpack/lib/action_controller_rb.html index 796073c8af..f489b794ee 100644 --- a/src/files/actionpack/lib/action_controller_rb.html +++ b/src/files/actionpack/lib/action_controller_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_controller.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/constants_rb.html b/src/files/actionpack/lib/action_dispatch/constants_rb.html index 6cca0fc238..45b60fa72a 100644 --- a/src/files/actionpack/lib/action_dispatch/constants_rb.html +++ b/src/files/actionpack/lib/action_dispatch/constants_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/constants.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/deprecator_rb.html b/src/files/actionpack/lib/action_dispatch/deprecator_rb.html index 6fbcf77e55..0689cab6e6 100644 --- a/src/files/actionpack/lib/action_dispatch/deprecator_rb.html +++ b/src/files/actionpack/lib/action_dispatch/deprecator_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/deprecator.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/http/cache_rb.html b/src/files/actionpack/lib/action_dispatch/http/cache_rb.html index 66c1ec8867..f79d23293d 100644 --- a/src/files/actionpack/lib/action_dispatch/http/cache_rb.html +++ b/src/files/actionpack/lib/action_dispatch/http/cache_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/http/cache.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/http/content_disposition_rb.html b/src/files/actionpack/lib/action_dispatch/http/content_disposition_rb.html index a4fa576f44..1953b4363d 100644 --- a/src/files/actionpack/lib/action_dispatch/http/content_disposition_rb.html +++ b/src/files/actionpack/lib/action_dispatch/http/content_disposition_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/http/content_disposition.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/http/content_security_policy_rb.html b/src/files/actionpack/lib/action_dispatch/http/content_security_policy_rb.html index 2902627d71..8a5033514c 100644 --- a/src/files/actionpack/lib/action_dispatch/http/content_security_policy_rb.html +++ b/src/files/actionpack/lib/action_dispatch/http/content_security_policy_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/http/content_security_policy.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/http/filter_parameters_rb.html b/src/files/actionpack/lib/action_dispatch/http/filter_parameters_rb.html index 7d6fb06177..262e9babfe 100644 --- a/src/files/actionpack/lib/action_dispatch/http/filter_parameters_rb.html +++ b/src/files/actionpack/lib/action_dispatch/http/filter_parameters_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/http/filter_parameters.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/http/filter_redirect_rb.html b/src/files/actionpack/lib/action_dispatch/http/filter_redirect_rb.html index d305b49b62..48dbda5503 100644 --- a/src/files/actionpack/lib/action_dispatch/http/filter_redirect_rb.html +++ b/src/files/actionpack/lib/action_dispatch/http/filter_redirect_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/http/filter_redirect.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/http/headers_rb.html b/src/files/actionpack/lib/action_dispatch/http/headers_rb.html index 38e966b145..ac4825bc13 100644 --- a/src/files/actionpack/lib/action_dispatch/http/headers_rb.html +++ b/src/files/actionpack/lib/action_dispatch/http/headers_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/http/headers.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/http/mime_negotiation_rb.html b/src/files/actionpack/lib/action_dispatch/http/mime_negotiation_rb.html index d1ebe28e0f..fcf975e282 100644 --- a/src/files/actionpack/lib/action_dispatch/http/mime_negotiation_rb.html +++ b/src/files/actionpack/lib/action_dispatch/http/mime_negotiation_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/http/mime_negotiation.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/http/mime_type_rb.html b/src/files/actionpack/lib/action_dispatch/http/mime_type_rb.html index 3dfcefde21..4a87709b1e 100644 --- a/src/files/actionpack/lib/action_dispatch/http/mime_type_rb.html +++ b/src/files/actionpack/lib/action_dispatch/http/mime_type_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/http/mime_type.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/http/mime_types_rb.html b/src/files/actionpack/lib/action_dispatch/http/mime_types_rb.html index 2c648df288..5c778c13c9 100644 --- a/src/files/actionpack/lib/action_dispatch/http/mime_types_rb.html +++ b/src/files/actionpack/lib/action_dispatch/http/mime_types_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/http/mime_types.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/http/parameter_filter_rb.html b/src/files/actionpack/lib/action_dispatch/http/parameter_filter_rb.html deleted file mode 100644 index 0104a171ba..0000000000 --- a/src/files/actionpack/lib/action_dispatch/http/parameter_filter_rb.html +++ /dev/null @@ -1,80 +0,0 @@ ---- -title: parameter_filter.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • active_support/deprecation/constant_accessor
    • - -
    • active_support/parameter_filter
    • - -
    - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/actionpack/lib/action_dispatch/http/parameters_rb.html b/src/files/actionpack/lib/action_dispatch/http/parameters_rb.html index 80fc52856e..7b2f462070 100644 --- a/src/files/actionpack/lib/action_dispatch/http/parameters_rb.html +++ b/src/files/actionpack/lib/action_dispatch/http/parameters_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/http/parameters.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/http/permissions_policy_rb.html b/src/files/actionpack/lib/action_dispatch/http/permissions_policy_rb.html index 434dd09ae0..38486c4f3e 100644 --- a/src/files/actionpack/lib/action_dispatch/http/permissions_policy_rb.html +++ b/src/files/actionpack/lib/action_dispatch/http/permissions_policy_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/http/permissions_policy.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/http/rack_cache_rb.html b/src/files/actionpack/lib/action_dispatch/http/rack_cache_rb.html index bdb0d8d8be..2819f8b10e 100644 --- a/src/files/actionpack/lib/action_dispatch/http/rack_cache_rb.html +++ b/src/files/actionpack/lib/action_dispatch/http/rack_cache_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/http/rack_cache.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/http/request_rb.html b/src/files/actionpack/lib/action_dispatch/http/request_rb.html index a3034daa00..d3e18fc2e6 100644 --- a/src/files/actionpack/lib/action_dispatch/http/request_rb.html +++ b/src/files/actionpack/lib/action_dispatch/http/request_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/http/request.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/http/response_rb.html b/src/files/actionpack/lib/action_dispatch/http/response_rb.html index de1219cba0..24e9322227 100644 --- a/src/files/actionpack/lib/action_dispatch/http/response_rb.html +++ b/src/files/actionpack/lib/action_dispatch/http/response_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/http/response.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/http/upload_rb.html b/src/files/actionpack/lib/action_dispatch/http/upload_rb.html index fe4f706256..3a836a4d20 100644 --- a/src/files/actionpack/lib/action_dispatch/http/upload_rb.html +++ b/src/files/actionpack/lib/action_dispatch/http/upload_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/http/upload.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/http/url_rb.html b/src/files/actionpack/lib/action_dispatch/http/url_rb.html index 0408dbaa25..d94c7ad5ea 100644 --- a/src/files/actionpack/lib/action_dispatch/http/url_rb.html +++ b/src/files/actionpack/lib/action_dispatch/http/url_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/http/url.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/journey/formatter_rb.html b/src/files/actionpack/lib/action_dispatch/journey/formatter_rb.html index 9be5c104a1..2beca93906 100644 --- a/src/files/actionpack/lib/action_dispatch/journey/formatter_rb.html +++ b/src/files/actionpack/lib/action_dispatch/journey/formatter_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/journey/formatter.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/journey/gtg/builder_rb.html b/src/files/actionpack/lib/action_dispatch/journey/gtg/builder_rb.html index adf0d035b8..b91fa4095f 100644 --- a/src/files/actionpack/lib/action_dispatch/journey/gtg/builder_rb.html +++ b/src/files/actionpack/lib/action_dispatch/journey/gtg/builder_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/journey/gtg/builder.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/journey/gtg/simulator_rb.html b/src/files/actionpack/lib/action_dispatch/journey/gtg/simulator_rb.html index 1ad0402fd1..4a1e14a2c2 100644 --- a/src/files/actionpack/lib/action_dispatch/journey/gtg/simulator_rb.html +++ b/src/files/actionpack/lib/action_dispatch/journey/gtg/simulator_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/journey/gtg/simulator.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/journey/gtg/transition_table_rb.html b/src/files/actionpack/lib/action_dispatch/journey/gtg/transition_table_rb.html index 2691eeb5bb..29635338d6 100644 --- a/src/files/actionpack/lib/action_dispatch/journey/gtg/transition_table_rb.html +++ b/src/files/actionpack/lib/action_dispatch/journey/gtg/transition_table_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/journey/gtg/transition_table.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/journey/nfa/builder_rb.html b/src/files/actionpack/lib/action_dispatch/journey/nfa/builder_rb.html deleted file mode 100644 index 7ba16adcd3..0000000000 --- a/src/files/actionpack/lib/action_dispatch/journey/nfa/builder_rb.html +++ /dev/null @@ -1,80 +0,0 @@ ---- -title: builder.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • action_dispatch/journey/nfa/transition_table
    • - -
    • action_dispatch/journey/gtg/transition_table
    • - -
    - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/actionpack/lib/action_dispatch/journey/nfa/dot_rb.html b/src/files/actionpack/lib/action_dispatch/journey/nfa/dot_rb.html index a0fbfee5a8..faefe8a6f3 100644 --- a/src/files/actionpack/lib/action_dispatch/journey/nfa/dot_rb.html +++ b/src/files/actionpack/lib/action_dispatch/journey/nfa/dot_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/journey/nfa/dot.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/journey/nfa/simulator_rb.html b/src/files/actionpack/lib/action_dispatch/journey/nfa/simulator_rb.html deleted file mode 100644 index 66f77acf2a..0000000000 --- a/src/files/actionpack/lib/action_dispatch/journey/nfa/simulator_rb.html +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: simulator.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • strscan
    • - -
    - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/actionpack/lib/action_dispatch/journey/nfa/transition_table_rb.html b/src/files/actionpack/lib/action_dispatch/journey/nfa/transition_table_rb.html deleted file mode 100644 index f86450e5b0..0000000000 --- a/src/files/actionpack/lib/action_dispatch/journey/nfa/transition_table_rb.html +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: transition_table.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • action_dispatch/journey/nfa/dot
    • - -
    - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/actionpack/lib/action_dispatch/journey/nodes/node_rb.html b/src/files/actionpack/lib/action_dispatch/journey/nodes/node_rb.html index 449ede5732..04e576b096 100644 --- a/src/files/actionpack/lib/action_dispatch/journey/nodes/node_rb.html +++ b/src/files/actionpack/lib/action_dispatch/journey/nodes/node_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/journey/nodes/node.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/journey/parser_extras_rb.html b/src/files/actionpack/lib/action_dispatch/journey/parser_extras_rb.html index 841c93cb7e..07be19a63f 100644 --- a/src/files/actionpack/lib/action_dispatch/journey/parser_extras_rb.html +++ b/src/files/actionpack/lib/action_dispatch/journey/parser_extras_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/journey/parser_extras.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/journey/parser_rb.html b/src/files/actionpack/lib/action_dispatch/journey/parser_rb.html index bd3dad19dd..67a0a6ec87 100644 --- a/src/files/actionpack/lib/action_dispatch/journey/parser_rb.html +++ b/src/files/actionpack/lib/action_dispatch/journey/parser_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/journey/parser.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/journey/path/pattern_rb.html b/src/files/actionpack/lib/action_dispatch/journey/path/pattern_rb.html index 73f91f1c8e..98de114807 100644 --- a/src/files/actionpack/lib/action_dispatch/journey/path/pattern_rb.html +++ b/src/files/actionpack/lib/action_dispatch/journey/path/pattern_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/journey/path/pattern.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/journey/route_rb.html b/src/files/actionpack/lib/action_dispatch/journey/route_rb.html index 9db383faef..76b21ee0bf 100644 --- a/src/files/actionpack/lib/action_dispatch/journey/route_rb.html +++ b/src/files/actionpack/lib/action_dispatch/journey/route_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/journey/route.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/journey/router/utils_rb.html b/src/files/actionpack/lib/action_dispatch/journey/router/utils_rb.html index 5506cdab71..440ffe20d3 100644 --- a/src/files/actionpack/lib/action_dispatch/journey/router/utils_rb.html +++ b/src/files/actionpack/lib/action_dispatch/journey/router/utils_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/journey/router/utils.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/journey/router_rb.html b/src/files/actionpack/lib/action_dispatch/journey/router_rb.html index 4776c21024..455a967ce1 100644 --- a/src/files/actionpack/lib/action_dispatch/journey/router_rb.html +++ b/src/files/actionpack/lib/action_dispatch/journey/router_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/journey/router.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/journey/routes_rb.html b/src/files/actionpack/lib/action_dispatch/journey/routes_rb.html index 39f2607cc5..59a3479d36 100644 --- a/src/files/actionpack/lib/action_dispatch/journey/routes_rb.html +++ b/src/files/actionpack/lib/action_dispatch/journey/routes_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/journey/routes.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/journey/scanner_rb.html b/src/files/actionpack/lib/action_dispatch/journey/scanner_rb.html index e61a088839..901ce79868 100644 --- a/src/files/actionpack/lib/action_dispatch/journey/scanner_rb.html +++ b/src/files/actionpack/lib/action_dispatch/journey/scanner_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/journey/scanner.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/journey/visitors_rb.html b/src/files/actionpack/lib/action_dispatch/journey/visitors_rb.html index db4449ae29..37b794297f 100644 --- a/src/files/actionpack/lib/action_dispatch/journey/visitors_rb.html +++ b/src/files/actionpack/lib/action_dispatch/journey/visitors_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/journey/visitors.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/journey_rb.html b/src/files/actionpack/lib/action_dispatch/journey_rb.html index 77e9e4f954..6e4b27df5f 100644 --- a/src/files/actionpack/lib/action_dispatch/journey_rb.html +++ b/src/files/actionpack/lib/action_dispatch/journey_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/journey.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/log_subscriber_rb.html b/src/files/actionpack/lib/action_dispatch/log_subscriber_rb.html index a3ea75295c..c4cc42461e 100644 --- a/src/files/actionpack/lib/action_dispatch/log_subscriber_rb.html +++ b/src/files/actionpack/lib/action_dispatch/log_subscriber_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/log_subscriber.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/middleware/actionable_exceptions_rb.html b/src/files/actionpack/lib/action_dispatch/middleware/actionable_exceptions_rb.html index d02237051e..72304e197a 100644 --- a/src/files/actionpack/lib/action_dispatch/middleware/actionable_exceptions_rb.html +++ b/src/files/actionpack/lib/action_dispatch/middleware/actionable_exceptions_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/middleware/actionable_exceptions.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/middleware/assume_ssl_rb.html b/src/files/actionpack/lib/action_dispatch/middleware/assume_ssl_rb.html index 152557584f..aa442b9ff7 100644 --- a/src/files/actionpack/lib/action_dispatch/middleware/assume_ssl_rb.html +++ b/src/files/actionpack/lib/action_dispatch/middleware/assume_ssl_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/middleware/assume_ssl.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/middleware/callbacks_rb.html b/src/files/actionpack/lib/action_dispatch/middleware/callbacks_rb.html index e46e68fbae..b99cc705d2 100644 --- a/src/files/actionpack/lib/action_dispatch/middleware/callbacks_rb.html +++ b/src/files/actionpack/lib/action_dispatch/middleware/callbacks_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/middleware/callbacks.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/middleware/cookies_rb.html b/src/files/actionpack/lib/action_dispatch/middleware/cookies_rb.html index 5f1af94842..4f75a06b15 100644 --- a/src/files/actionpack/lib/action_dispatch/middleware/cookies_rb.html +++ b/src/files/actionpack/lib/action_dispatch/middleware/cookies_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/middleware/cookies.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/middleware/debug_exceptions_rb.html b/src/files/actionpack/lib/action_dispatch/middleware/debug_exceptions_rb.html index 8140ef00d2..c77c205fac 100644 --- a/src/files/actionpack/lib/action_dispatch/middleware/debug_exceptions_rb.html +++ b/src/files/actionpack/lib/action_dispatch/middleware/debug_exceptions_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/middleware/debug_exceptions.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/middleware/debug_locks_rb.html b/src/files/actionpack/lib/action_dispatch/middleware/debug_locks_rb.html index 4a00197b47..494aa51ac0 100644 --- a/src/files/actionpack/lib/action_dispatch/middleware/debug_locks_rb.html +++ b/src/files/actionpack/lib/action_dispatch/middleware/debug_locks_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/middleware/debug_locks.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/middleware/debug_view_rb.html b/src/files/actionpack/lib/action_dispatch/middleware/debug_view_rb.html index 48c5d9c29b..fb743db725 100644 --- a/src/files/actionpack/lib/action_dispatch/middleware/debug_view_rb.html +++ b/src/files/actionpack/lib/action_dispatch/middleware/debug_view_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/middleware/debug_view.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/middleware/exception_wrapper_rb.html b/src/files/actionpack/lib/action_dispatch/middleware/exception_wrapper_rb.html index 8722d41aa4..5dbdc9358e 100644 --- a/src/files/actionpack/lib/action_dispatch/middleware/exception_wrapper_rb.html +++ b/src/files/actionpack/lib/action_dispatch/middleware/exception_wrapper_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/middleware/exception_wrapper.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/middleware/executor_rb.html b/src/files/actionpack/lib/action_dispatch/middleware/executor_rb.html index 3411103f3d..f9a53589d0 100644 --- a/src/files/actionpack/lib/action_dispatch/middleware/executor_rb.html +++ b/src/files/actionpack/lib/action_dispatch/middleware/executor_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/middleware/executor.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/middleware/flash_rb.html b/src/files/actionpack/lib/action_dispatch/middleware/flash_rb.html index 507dd42fb0..d2523318ac 100644 --- a/src/files/actionpack/lib/action_dispatch/middleware/flash_rb.html +++ b/src/files/actionpack/lib/action_dispatch/middleware/flash_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/middleware/flash.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/middleware/host_authorization_rb.html b/src/files/actionpack/lib/action_dispatch/middleware/host_authorization_rb.html index 44a1f84531..c3fe794d44 100644 --- a/src/files/actionpack/lib/action_dispatch/middleware/host_authorization_rb.html +++ b/src/files/actionpack/lib/action_dispatch/middleware/host_authorization_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/middleware/host_authorization.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/middleware/public_exceptions_rb.html b/src/files/actionpack/lib/action_dispatch/middleware/public_exceptions_rb.html index 7dae7722ae..7293f47078 100644 --- a/src/files/actionpack/lib/action_dispatch/middleware/public_exceptions_rb.html +++ b/src/files/actionpack/lib/action_dispatch/middleware/public_exceptions_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/middleware/public_exceptions.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/middleware/reloader_rb.html b/src/files/actionpack/lib/action_dispatch/middleware/reloader_rb.html index f6f34b9d12..1d16212297 100644 --- a/src/files/actionpack/lib/action_dispatch/middleware/reloader_rb.html +++ b/src/files/actionpack/lib/action_dispatch/middleware/reloader_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/middleware/reloader.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/middleware/remote_ip_rb.html b/src/files/actionpack/lib/action_dispatch/middleware/remote_ip_rb.html index 24f249492c..72aa946ecd 100644 --- a/src/files/actionpack/lib/action_dispatch/middleware/remote_ip_rb.html +++ b/src/files/actionpack/lib/action_dispatch/middleware/remote_ip_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/middleware/remote_ip.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/middleware/request_id_rb.html b/src/files/actionpack/lib/action_dispatch/middleware/request_id_rb.html index 204e5e9c39..67b3bf260b 100644 --- a/src/files/actionpack/lib/action_dispatch/middleware/request_id_rb.html +++ b/src/files/actionpack/lib/action_dispatch/middleware/request_id_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/middleware/request_id.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/middleware/server_timing_rb.html b/src/files/actionpack/lib/action_dispatch/middleware/server_timing_rb.html index 627846afcd..de6687ce78 100644 --- a/src/files/actionpack/lib/action_dispatch/middleware/server_timing_rb.html +++ b/src/files/actionpack/lib/action_dispatch/middleware/server_timing_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/middleware/server_timing.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/middleware/session/abstract_store_rb.html b/src/files/actionpack/lib/action_dispatch/middleware/session/abstract_store_rb.html index e87f7e1312..8f5fd2f1fa 100644 --- a/src/files/actionpack/lib/action_dispatch/middleware/session/abstract_store_rb.html +++ b/src/files/actionpack/lib/action_dispatch/middleware/session/abstract_store_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/middleware/session/abstract_store.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/middleware/session/cache_store_rb.html b/src/files/actionpack/lib/action_dispatch/middleware/session/cache_store_rb.html index 6eb02cd3d1..33f20660f5 100644 --- a/src/files/actionpack/lib/action_dispatch/middleware/session/cache_store_rb.html +++ b/src/files/actionpack/lib/action_dispatch/middleware/session/cache_store_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/middleware/session/cache_store.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/middleware/session/cookie_store_rb.html b/src/files/actionpack/lib/action_dispatch/middleware/session/cookie_store_rb.html index 5ad2b9d5ce..8e1ebc35bc 100644 --- a/src/files/actionpack/lib/action_dispatch/middleware/session/cookie_store_rb.html +++ b/src/files/actionpack/lib/action_dispatch/middleware/session/cookie_store_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/middleware/session/cookie_store.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/middleware/session/mem_cache_store_rb.html b/src/files/actionpack/lib/action_dispatch/middleware/session/mem_cache_store_rb.html index ac0dab0bb7..20eceda682 100644 --- a/src/files/actionpack/lib/action_dispatch/middleware/session/mem_cache_store_rb.html +++ b/src/files/actionpack/lib/action_dispatch/middleware/session/mem_cache_store_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/middleware/show_exceptions_rb.html b/src/files/actionpack/lib/action_dispatch/middleware/show_exceptions_rb.html index 5d68ca1c63..954f416f02 100644 --- a/src/files/actionpack/lib/action_dispatch/middleware/show_exceptions_rb.html +++ b/src/files/actionpack/lib/action_dispatch/middleware/show_exceptions_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/middleware/show_exceptions.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/middleware/ssl_rb.html b/src/files/actionpack/lib/action_dispatch/middleware/ssl_rb.html index dbaff03f7e..f6d581632d 100644 --- a/src/files/actionpack/lib/action_dispatch/middleware/ssl_rb.html +++ b/src/files/actionpack/lib/action_dispatch/middleware/ssl_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/middleware/ssl.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/middleware/stack_rb.html b/src/files/actionpack/lib/action_dispatch/middleware/stack_rb.html index 93156dc40c..edc8775ef8 100644 --- a/src/files/actionpack/lib/action_dispatch/middleware/stack_rb.html +++ b/src/files/actionpack/lib/action_dispatch/middleware/stack_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/middleware/stack.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/middleware/static_rb.html b/src/files/actionpack/lib/action_dispatch/middleware/static_rb.html index bac5f70e9d..18cf485924 100644 --- a/src/files/actionpack/lib/action_dispatch/middleware/static_rb.html +++ b/src/files/actionpack/lib/action_dispatch/middleware/static_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/middleware/static.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/railtie_rb.html b/src/files/actionpack/lib/action_dispatch/railtie_rb.html index d582690762..0f6b61b652 100644 --- a/src/files/actionpack/lib/action_dispatch/railtie_rb.html +++ b/src/files/actionpack/lib/action_dispatch/railtie_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/railtie.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/request/session_rb.html b/src/files/actionpack/lib/action_dispatch/request/session_rb.html index 037ab23446..431fa1e1b2 100644 --- a/src/files/actionpack/lib/action_dispatch/request/session_rb.html +++ b/src/files/actionpack/lib/action_dispatch/request/session_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/request/session.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/request/utils_rb.html b/src/files/actionpack/lib/action_dispatch/request/utils_rb.html index 26f5773266..7e84326ce2 100644 --- a/src/files/actionpack/lib/action_dispatch/request/utils_rb.html +++ b/src/files/actionpack/lib/action_dispatch/request/utils_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/request/utils.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/routing/endpoint_rb.html b/src/files/actionpack/lib/action_dispatch/routing/endpoint_rb.html index bfb3015bcc..42e41aad37 100644 --- a/src/files/actionpack/lib/action_dispatch/routing/endpoint_rb.html +++ b/src/files/actionpack/lib/action_dispatch/routing/endpoint_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/routing/endpoint.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/routing/inspector_rb.html b/src/files/actionpack/lib/action_dispatch/routing/inspector_rb.html index 894a7ee539..b6e1ffe901 100644 --- a/src/files/actionpack/lib/action_dispatch/routing/inspector_rb.html +++ b/src/files/actionpack/lib/action_dispatch/routing/inspector_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/routing/inspector.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/routing/mapper_rb.html b/src/files/actionpack/lib/action_dispatch/routing/mapper_rb.html index f4e0c9b7ad..31af6c3733 100644 --- a/src/files/actionpack/lib/action_dispatch/routing/mapper_rb.html +++ b/src/files/actionpack/lib/action_dispatch/routing/mapper_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/routing/mapper.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/routing/polymorphic_routes_rb.html b/src/files/actionpack/lib/action_dispatch/routing/polymorphic_routes_rb.html index 30ad708482..c660c162d4 100644 --- a/src/files/actionpack/lib/action_dispatch/routing/polymorphic_routes_rb.html +++ b/src/files/actionpack/lib/action_dispatch/routing/polymorphic_routes_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/routing/polymorphic_routes.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/routing/redirection_rb.html b/src/files/actionpack/lib/action_dispatch/routing/redirection_rb.html index 6421fb864c..3e74ee5475 100644 --- a/src/files/actionpack/lib/action_dispatch/routing/redirection_rb.html +++ b/src/files/actionpack/lib/action_dispatch/routing/redirection_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/routing/redirection.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/routing/route_set_rb.html b/src/files/actionpack/lib/action_dispatch/routing/route_set_rb.html index 770493381e..e09c143836 100644 --- a/src/files/actionpack/lib/action_dispatch/routing/route_set_rb.html +++ b/src/files/actionpack/lib/action_dispatch/routing/route_set_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/routing/route_set.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/routing/routes_proxy_rb.html b/src/files/actionpack/lib/action_dispatch/routing/routes_proxy_rb.html index 9a1a2eb2a8..054a1efcfa 100644 --- a/src/files/actionpack/lib/action_dispatch/routing/routes_proxy_rb.html +++ b/src/files/actionpack/lib/action_dispatch/routing/routes_proxy_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/routing/routes_proxy.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/routing/url_for_rb.html b/src/files/actionpack/lib/action_dispatch/routing/url_for_rb.html index 8425ca4a52..5c31c92af5 100644 --- a/src/files/actionpack/lib/action_dispatch/routing/url_for_rb.html +++ b/src/files/actionpack/lib/action_dispatch/routing/url_for_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/routing/url_for.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/routing_rb.html b/src/files/actionpack/lib/action_dispatch/routing_rb.html index 4fec0ed76f..63d07a4325 100644 --- a/src/files/actionpack/lib/action_dispatch/routing_rb.html +++ b/src/files/actionpack/lib/action_dispatch/routing_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/routing.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/system_test_case_rb.html b/src/files/actionpack/lib/action_dispatch/system_test_case_rb.html index 182c20b4b8..346142ca36 100644 --- a/src/files/actionpack/lib/action_dispatch/system_test_case_rb.html +++ b/src/files/actionpack/lib/action_dispatch/system_test_case_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/system_test_case.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/system_testing/browser_rb.html b/src/files/actionpack/lib/action_dispatch/system_testing/browser_rb.html index 93fd6e8cd8..69eb855611 100644 --- a/src/files/actionpack/lib/action_dispatch/system_testing/browser_rb.html +++ b/src/files/actionpack/lib/action_dispatch/system_testing/browser_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/system_testing/browser.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/system_testing/driver_rb.html b/src/files/actionpack/lib/action_dispatch/system_testing/driver_rb.html index 3a03194e43..c1cf177509 100644 --- a/src/files/actionpack/lib/action_dispatch/system_testing/driver_rb.html +++ b/src/files/actionpack/lib/action_dispatch/system_testing/driver_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/system_testing/driver.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/system_testing/server_rb.html b/src/files/actionpack/lib/action_dispatch/system_testing/server_rb.html index 3be18dbacc..5cd77a01ab 100644 --- a/src/files/actionpack/lib/action_dispatch/system_testing/server_rb.html +++ b/src/files/actionpack/lib/action_dispatch/system_testing/server_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/system_testing/server.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper_rb.html b/src/files/actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper_rb.html index e2c4ddf9f7..09fcddaba3 100644 --- a/src/files/actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper_rb.html +++ b/src/files/actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown_rb.html b/src/files/actionpack/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown_rb.html index 7c4110ccbd..6924591ee1 100644 --- a/src/files/actionpack/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown_rb.html +++ b/src/files/actionpack/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/system_testing/test_helpers/setup_and_teardown.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/system_testing/test_helpers/undef_methods_rb.html b/src/files/actionpack/lib/action_dispatch/system_testing/test_helpers/undef_methods_rb.html deleted file mode 100644 index 0f8eec4327..0000000000 --- a/src/files/actionpack/lib/action_dispatch/system_testing/test_helpers/undef_methods_rb.html +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: undef_methods.rb -layout: default ---- -
    - - -
    -
    - - - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/actionpack/lib/action_dispatch/testing/assertion_response_rb.html b/src/files/actionpack/lib/action_dispatch/testing/assertion_response_rb.html index 25079b423e..caba0ba9a5 100644 --- a/src/files/actionpack/lib/action_dispatch/testing/assertion_response_rb.html +++ b/src/files/actionpack/lib/action_dispatch/testing/assertion_response_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/testing/assertion_response.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/testing/assertions/response_rb.html b/src/files/actionpack/lib/action_dispatch/testing/assertions/response_rb.html index 2aeed24dfb..dd8540db48 100644 --- a/src/files/actionpack/lib/action_dispatch/testing/assertions/response_rb.html +++ b/src/files/actionpack/lib/action_dispatch/testing/assertions/response_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/testing/assertions/response.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/testing/assertions/routing_rb.html b/src/files/actionpack/lib/action_dispatch/testing/assertions/routing_rb.html index 3cd13a12fa..5fdd498a3f 100644 --- a/src/files/actionpack/lib/action_dispatch/testing/assertions/routing_rb.html +++ b/src/files/actionpack/lib/action_dispatch/testing/assertions/routing_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/testing/assertions/routing.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/testing/assertions_rb.html b/src/files/actionpack/lib/action_dispatch/testing/assertions_rb.html index e32bda7b6e..79d7422f19 100644 --- a/src/files/actionpack/lib/action_dispatch/testing/assertions_rb.html +++ b/src/files/actionpack/lib/action_dispatch/testing/assertions_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/testing/assertions.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/testing/integration_rb.html b/src/files/actionpack/lib/action_dispatch/testing/integration_rb.html index 52f8d660e6..51ea7104c3 100644 --- a/src/files/actionpack/lib/action_dispatch/testing/integration_rb.html +++ b/src/files/actionpack/lib/action_dispatch/testing/integration_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/testing/integration.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/testing/request_encoder_rb.html b/src/files/actionpack/lib/action_dispatch/testing/request_encoder_rb.html index 47f3f6140b..293ab2069f 100644 --- a/src/files/actionpack/lib/action_dispatch/testing/request_encoder_rb.html +++ b/src/files/actionpack/lib/action_dispatch/testing/request_encoder_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/testing/request_encoder.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/testing/test_process_rb.html b/src/files/actionpack/lib/action_dispatch/testing/test_process_rb.html index 429749fd62..8d55b91308 100644 --- a/src/files/actionpack/lib/action_dispatch/testing/test_process_rb.html +++ b/src/files/actionpack/lib/action_dispatch/testing/test_process_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/testing/test_process.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/testing/test_request_rb.html b/src/files/actionpack/lib/action_dispatch/testing/test_request_rb.html index 8573279cd8..81f124c8bd 100644 --- a/src/files/actionpack/lib/action_dispatch/testing/test_request_rb.html +++ b/src/files/actionpack/lib/action_dispatch/testing/test_request_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/testing/test_request.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch/testing/test_response_rb.html b/src/files/actionpack/lib/action_dispatch/testing/test_response_rb.html index b85f92a162..bd52b3cf37 100644 --- a/src/files/actionpack/lib/action_dispatch/testing/test_response_rb.html +++ b/src/files/actionpack/lib/action_dispatch/testing/test_response_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch/testing/test_response.rb + on GitHub +
  • diff --git a/src/files/actionpack/lib/action_dispatch_rb.html b/src/files/actionpack/lib/action_dispatch_rb.html index 8d2cd52b4a..641af42e9f 100644 --- a/src/files/actionpack/lib/action_dispatch_rb.html +++ b/src/files/actionpack/lib/action_dispatch_rb.html @@ -15,6 +15,8 @@

  • actionpack/lib/action_dispatch.rb + on GitHub +
  • diff --git a/src/files/actiontext/README_md.html b/src/files/actiontext/README_md.html index dd052151bb..2647a8d9dc 100644 --- a/src/files/actiontext/README_md.html +++ b/src/files/actiontext/README_md.html @@ -15,6 +15,8 @@

  • actiontext/README.md + on GitHub +
  • diff --git a/src/files/actiontext/app/helpers/action_text/content_helper_rb.html b/src/files/actiontext/app/helpers/action_text/content_helper_rb.html index c42a457a37..9c2c432462 100644 --- a/src/files/actiontext/app/helpers/action_text/content_helper_rb.html +++ b/src/files/actiontext/app/helpers/action_text/content_helper_rb.html @@ -15,6 +15,8 @@

  • actiontext/app/helpers/action_text/content_helper.rb + on GitHub +
  • diff --git a/src/files/actiontext/app/helpers/action_text/tag_helper_rb.html b/src/files/actiontext/app/helpers/action_text/tag_helper_rb.html index c96a14a0ea..8d0187ce45 100644 --- a/src/files/actiontext/app/helpers/action_text/tag_helper_rb.html +++ b/src/files/actiontext/app/helpers/action_text/tag_helper_rb.html @@ -15,6 +15,8 @@

  • actiontext/app/helpers/action_text/tag_helper.rb + on GitHub +
  • diff --git a/src/files/actiontext/app/models/action_text/encrypted_rich_text_rb.html b/src/files/actiontext/app/models/action_text/encrypted_rich_text_rb.html index 84be6ec56f..376fa2af1b 100644 --- a/src/files/actiontext/app/models/action_text/encrypted_rich_text_rb.html +++ b/src/files/actiontext/app/models/action_text/encrypted_rich_text_rb.html @@ -15,6 +15,8 @@

  • actiontext/app/models/action_text/encrypted_rich_text.rb + on GitHub +
  • diff --git a/src/files/actiontext/app/models/action_text/record_rb.html b/src/files/actiontext/app/models/action_text/record_rb.html index b4b88a6467..fd30c2728e 100644 --- a/src/files/actiontext/app/models/action_text/record_rb.html +++ b/src/files/actiontext/app/models/action_text/record_rb.html @@ -15,6 +15,8 @@

  • actiontext/app/models/action_text/record.rb + on GitHub +
  • diff --git a/src/files/actiontext/app/models/action_text/rich_text_rb.html b/src/files/actiontext/app/models/action_text/rich_text_rb.html index dc80c17f76..b425b18188 100644 --- a/src/files/actiontext/app/models/action_text/rich_text_rb.html +++ b/src/files/actiontext/app/models/action_text/rich_text_rb.html @@ -15,6 +15,8 @@

  • actiontext/app/models/action_text/rich_text.rb + on GitHub +
  • diff --git a/src/files/actiontext/lib/action_text/attachable_rb.html b/src/files/actiontext/lib/action_text/attachable_rb.html index 84c7f139df..031cf11352 100644 --- a/src/files/actiontext/lib/action_text/attachable_rb.html +++ b/src/files/actiontext/lib/action_text/attachable_rb.html @@ -15,6 +15,8 @@

  • actiontext/lib/action_text/attachable.rb + on GitHub +
  • diff --git a/src/files/actiontext/lib/action_text/attachables/content_attachment_rb.html b/src/files/actiontext/lib/action_text/attachables/content_attachment_rb.html index 4bba03a7e1..a4f47ee18c 100644 --- a/src/files/actiontext/lib/action_text/attachables/content_attachment_rb.html +++ b/src/files/actiontext/lib/action_text/attachables/content_attachment_rb.html @@ -15,6 +15,8 @@

  • actiontext/lib/action_text/attachables/content_attachment.rb + on GitHub +
  • diff --git a/src/files/actiontext/lib/action_text/attachables/missing_attachable_rb.html b/src/files/actiontext/lib/action_text/attachables/missing_attachable_rb.html index 3af3dc49a4..23cb3f6ff8 100644 --- a/src/files/actiontext/lib/action_text/attachables/missing_attachable_rb.html +++ b/src/files/actiontext/lib/action_text/attachables/missing_attachable_rb.html @@ -15,6 +15,8 @@

  • actiontext/lib/action_text/attachables/missing_attachable.rb + on GitHub +
  • diff --git a/src/files/actiontext/lib/action_text/attachables/remote_image_rb.html b/src/files/actiontext/lib/action_text/attachables/remote_image_rb.html index f08d34fe9d..c959ba1887 100644 --- a/src/files/actiontext/lib/action_text/attachables/remote_image_rb.html +++ b/src/files/actiontext/lib/action_text/attachables/remote_image_rb.html @@ -15,6 +15,8 @@

  • actiontext/lib/action_text/attachables/remote_image.rb + on GitHub +
  • diff --git a/src/files/actiontext/lib/action_text/attachment_gallery_rb.html b/src/files/actiontext/lib/action_text/attachment_gallery_rb.html index a1f368e3c4..3deaf0fcbd 100644 --- a/src/files/actiontext/lib/action_text/attachment_gallery_rb.html +++ b/src/files/actiontext/lib/action_text/attachment_gallery_rb.html @@ -15,6 +15,8 @@

  • actiontext/lib/action_text/attachment_gallery.rb + on GitHub +
  • diff --git a/src/files/actiontext/lib/action_text/attachment_rb.html b/src/files/actiontext/lib/action_text/attachment_rb.html index 87c80b13c0..67a34bcd4e 100644 --- a/src/files/actiontext/lib/action_text/attachment_rb.html +++ b/src/files/actiontext/lib/action_text/attachment_rb.html @@ -15,6 +15,8 @@

  • actiontext/lib/action_text/attachment.rb + on GitHub +
  • diff --git a/src/files/actiontext/lib/action_text/attachments/caching_rb.html b/src/files/actiontext/lib/action_text/attachments/caching_rb.html index f2b7bdd9f6..7cdadb9790 100644 --- a/src/files/actiontext/lib/action_text/attachments/caching_rb.html +++ b/src/files/actiontext/lib/action_text/attachments/caching_rb.html @@ -15,6 +15,8 @@

  • actiontext/lib/action_text/attachments/caching.rb + on GitHub +
  • diff --git a/src/files/actiontext/lib/action_text/attachments/minification_rb.html b/src/files/actiontext/lib/action_text/attachments/minification_rb.html index 5d4b264750..6a9e759c42 100644 --- a/src/files/actiontext/lib/action_text/attachments/minification_rb.html +++ b/src/files/actiontext/lib/action_text/attachments/minification_rb.html @@ -15,6 +15,8 @@

  • actiontext/lib/action_text/attachments/minification.rb + on GitHub +
  • diff --git a/src/files/actiontext/lib/action_text/attachments/trix_conversion_rb.html b/src/files/actiontext/lib/action_text/attachments/trix_conversion_rb.html index ed0d27b3b6..ce10381760 100644 --- a/src/files/actiontext/lib/action_text/attachments/trix_conversion_rb.html +++ b/src/files/actiontext/lib/action_text/attachments/trix_conversion_rb.html @@ -15,6 +15,8 @@

  • actiontext/lib/action_text/attachments/trix_conversion.rb + on GitHub +
  • diff --git a/src/files/actiontext/lib/action_text/attribute_rb.html b/src/files/actiontext/lib/action_text/attribute_rb.html index 10c4ab49b7..4c274fa08c 100644 --- a/src/files/actiontext/lib/action_text/attribute_rb.html +++ b/src/files/actiontext/lib/action_text/attribute_rb.html @@ -15,6 +15,8 @@

  • actiontext/lib/action_text/attribute.rb + on GitHub +
  • diff --git a/src/files/actiontext/lib/action_text/content_rb.html b/src/files/actiontext/lib/action_text/content_rb.html index a9e1cffa00..19aecd6bf6 100644 --- a/src/files/actiontext/lib/action_text/content_rb.html +++ b/src/files/actiontext/lib/action_text/content_rb.html @@ -15,6 +15,8 @@

  • actiontext/lib/action_text/content.rb + on GitHub +
  • diff --git a/src/files/actiontext/lib/action_text/deprecator_rb.html b/src/files/actiontext/lib/action_text/deprecator_rb.html index 12ed832dfc..39243bd3ed 100644 --- a/src/files/actiontext/lib/action_text/deprecator_rb.html +++ b/src/files/actiontext/lib/action_text/deprecator_rb.html @@ -15,6 +15,8 @@

  • actiontext/lib/action_text/deprecator.rb + on GitHub +
  • diff --git a/src/files/actiontext/lib/action_text/encryption_rb.html b/src/files/actiontext/lib/action_text/encryption_rb.html index d829d8f3b6..24d03a1b68 100644 --- a/src/files/actiontext/lib/action_text/encryption_rb.html +++ b/src/files/actiontext/lib/action_text/encryption_rb.html @@ -15,6 +15,8 @@

  • actiontext/lib/action_text/encryption.rb + on GitHub +
  • diff --git a/src/files/actiontext/lib/action_text/engine_rb.html b/src/files/actiontext/lib/action_text/engine_rb.html index 09e28e0330..0a37a0bce2 100644 --- a/src/files/actiontext/lib/action_text/engine_rb.html +++ b/src/files/actiontext/lib/action_text/engine_rb.html @@ -15,6 +15,8 @@

  • actiontext/lib/action_text/engine.rb + on GitHub +
  • diff --git a/src/files/actiontext/lib/action_text/fixture_set_rb.html b/src/files/actiontext/lib/action_text/fixture_set_rb.html index c0ca09afc8..e6a46e387d 100644 --- a/src/files/actiontext/lib/action_text/fixture_set_rb.html +++ b/src/files/actiontext/lib/action_text/fixture_set_rb.html @@ -15,6 +15,8 @@

  • actiontext/lib/action_text/fixture_set.rb + on GitHub +
  • diff --git a/src/files/actiontext/lib/action_text/fragment_rb.html b/src/files/actiontext/lib/action_text/fragment_rb.html index 0359e39760..08d54041d6 100644 --- a/src/files/actiontext/lib/action_text/fragment_rb.html +++ b/src/files/actiontext/lib/action_text/fragment_rb.html @@ -15,6 +15,8 @@

  • actiontext/lib/action_text/fragment.rb + on GitHub +
  • diff --git a/src/files/actiontext/lib/action_text/gem_version_rb.html b/src/files/actiontext/lib/action_text/gem_version_rb.html index b1526a021c..8fbf9c6537 100644 --- a/src/files/actiontext/lib/action_text/gem_version_rb.html +++ b/src/files/actiontext/lib/action_text/gem_version_rb.html @@ -15,6 +15,8 @@

  • actiontext/lib/action_text/gem_version.rb + on GitHub +
  • diff --git a/src/files/actiontext/lib/action_text/html_conversion_rb.html b/src/files/actiontext/lib/action_text/html_conversion_rb.html index 9474d07018..e36e28e757 100644 --- a/src/files/actiontext/lib/action_text/html_conversion_rb.html +++ b/src/files/actiontext/lib/action_text/html_conversion_rb.html @@ -15,6 +15,8 @@

  • actiontext/lib/action_text/html_conversion.rb + on GitHub +
  • diff --git a/src/files/actiontext/lib/action_text/plain_text_conversion_rb.html b/src/files/actiontext/lib/action_text/plain_text_conversion_rb.html index 5bdab03317..053c307e57 100644 --- a/src/files/actiontext/lib/action_text/plain_text_conversion_rb.html +++ b/src/files/actiontext/lib/action_text/plain_text_conversion_rb.html @@ -15,6 +15,8 @@

  • actiontext/lib/action_text/plain_text_conversion.rb + on GitHub +
  • diff --git a/src/files/actiontext/lib/action_text/rendering_rb.html b/src/files/actiontext/lib/action_text/rendering_rb.html index 3c2b7751dc..4ed39baa9e 100644 --- a/src/files/actiontext/lib/action_text/rendering_rb.html +++ b/src/files/actiontext/lib/action_text/rendering_rb.html @@ -15,6 +15,8 @@

  • actiontext/lib/action_text/rendering.rb + on GitHub +
  • diff --git a/src/files/actiontext/lib/action_text/serialization_rb.html b/src/files/actiontext/lib/action_text/serialization_rb.html index 31e6430ea3..999a470848 100644 --- a/src/files/actiontext/lib/action_text/serialization_rb.html +++ b/src/files/actiontext/lib/action_text/serialization_rb.html @@ -15,6 +15,8 @@

  • actiontext/lib/action_text/serialization.rb + on GitHub +
  • diff --git a/src/files/actiontext/lib/action_text/system_test_helper_rb.html b/src/files/actiontext/lib/action_text/system_test_helper_rb.html index f90f92b4ae..4374be04f7 100644 --- a/src/files/actiontext/lib/action_text/system_test_helper_rb.html +++ b/src/files/actiontext/lib/action_text/system_test_helper_rb.html @@ -15,6 +15,8 @@

  • actiontext/lib/action_text/system_test_helper.rb + on GitHub +
  • diff --git a/src/files/actiontext/lib/action_text/trix_attachment_rb.html b/src/files/actiontext/lib/action_text/trix_attachment_rb.html index 96c4a6c949..3587b56910 100644 --- a/src/files/actiontext/lib/action_text/trix_attachment_rb.html +++ b/src/files/actiontext/lib/action_text/trix_attachment_rb.html @@ -15,6 +15,8 @@

  • actiontext/lib/action_text/trix_attachment.rb + on GitHub +
  • diff --git a/src/files/actiontext/lib/action_text/version_rb.html b/src/files/actiontext/lib/action_text/version_rb.html index 705f9e941a..1b44d09a38 100644 --- a/src/files/actiontext/lib/action_text/version_rb.html +++ b/src/files/actiontext/lib/action_text/version_rb.html @@ -15,6 +15,8 @@

  • actiontext/lib/action_text/version.rb + on GitHub +
  • diff --git a/src/files/actiontext/lib/action_text_rb.html b/src/files/actiontext/lib/action_text_rb.html index 54741a9f21..a61711661e 100644 --- a/src/files/actiontext/lib/action_text_rb.html +++ b/src/files/actiontext/lib/action_text_rb.html @@ -15,6 +15,8 @@

  • actiontext/lib/action_text.rb + on GitHub +
  • diff --git a/src/files/actionview/README_rdoc.html b/src/files/actionview/README_rdoc.html index 2c168ab39f..aa628b78c7 100644 --- a/src/files/actionview/README_rdoc.html +++ b/src/files/actionview/README_rdoc.html @@ -15,6 +15,8 @@

  • actionview/README.rdoc + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/base_rb.html b/src/files/actionview/lib/action_view/base_rb.html index d16685ef5d..92fe9e1b71 100644 --- a/src/files/actionview/lib/action_view/base_rb.html +++ b/src/files/actionview/lib/action_view/base_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/base.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/buffers_rb.html b/src/files/actionview/lib/action_view/buffers_rb.html index aad811e021..27ad2951c0 100644 --- a/src/files/actionview/lib/action_view/buffers_rb.html +++ b/src/files/actionview/lib/action_view/buffers_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/buffers.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/cache_expiry_rb.html b/src/files/actionview/lib/action_view/cache_expiry_rb.html index a38c24724d..d5f2b3f782 100644 --- a/src/files/actionview/lib/action_view/cache_expiry_rb.html +++ b/src/files/actionview/lib/action_view/cache_expiry_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/cache_expiry.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/context_rb.html b/src/files/actionview/lib/action_view/context_rb.html index 40c0ad54c4..8f1ae26ee5 100644 --- a/src/files/actionview/lib/action_view/context_rb.html +++ b/src/files/actionview/lib/action_view/context_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/context.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/dependency_tracker/erb_tracker_rb.html b/src/files/actionview/lib/action_view/dependency_tracker/erb_tracker_rb.html index 04e85d259d..1972876b83 100644 --- a/src/files/actionview/lib/action_view/dependency_tracker/erb_tracker_rb.html +++ b/src/files/actionview/lib/action_view/dependency_tracker/erb_tracker_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/dependency_tracker/erb_tracker.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/dependency_tracker/ripper_tracker_rb.html b/src/files/actionview/lib/action_view/dependency_tracker/ripper_tracker_rb.html index dde8925ff7..23c589758c 100644 --- a/src/files/actionview/lib/action_view/dependency_tracker/ripper_tracker_rb.html +++ b/src/files/actionview/lib/action_view/dependency_tracker/ripper_tracker_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/dependency_tracker/ripper_tracker.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/dependency_tracker_rb.html b/src/files/actionview/lib/action_view/dependency_tracker_rb.html index 5844d59408..2300273731 100644 --- a/src/files/actionview/lib/action_view/dependency_tracker_rb.html +++ b/src/files/actionview/lib/action_view/dependency_tracker_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/dependency_tracker.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/deprecator_rb.html b/src/files/actionview/lib/action_view/deprecator_rb.html index 055a4718a3..125e722f33 100644 --- a/src/files/actionview/lib/action_view/deprecator_rb.html +++ b/src/files/actionview/lib/action_view/deprecator_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/deprecator.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/digestor_rb.html b/src/files/actionview/lib/action_view/digestor_rb.html index e3578bc13e..47f2c267f1 100644 --- a/src/files/actionview/lib/action_view/digestor_rb.html +++ b/src/files/actionview/lib/action_view/digestor_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/digestor.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/file_template_rb.html b/src/files/actionview/lib/action_view/file_template_rb.html deleted file mode 100644 index 076fa534e3..0000000000 --- a/src/files/actionview/lib/action_view/file_template_rb.html +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: file_template.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • action_view/template
    • - -
    - - - - - - - -

    Namespace

    - - -

    Module

    - - - - -

    Class

    - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/actionview/lib/action_view/flows_rb.html b/src/files/actionview/lib/action_view/flows_rb.html index 0fafc65a9e..41136ab0ce 100644 --- a/src/files/actionview/lib/action_view/flows_rb.html +++ b/src/files/actionview/lib/action_view/flows_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/flows.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/gem_version_rb.html b/src/files/actionview/lib/action_view/gem_version_rb.html index 86618b49ce..d8d1893d7f 100644 --- a/src/files/actionview/lib/action_view/gem_version_rb.html +++ b/src/files/actionview/lib/action_view/gem_version_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/gem_version.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/active_model_helper_rb.html b/src/files/actionview/lib/action_view/helpers/active_model_helper_rb.html index 03b6378938..2780a5fa20 100644 --- a/src/files/actionview/lib/action_view/helpers/active_model_helper_rb.html +++ b/src/files/actionview/lib/action_view/helpers/active_model_helper_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/active_model_helper.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/asset_tag_helper_rb.html b/src/files/actionview/lib/action_view/helpers/asset_tag_helper_rb.html index 1c86db0eaa..c9f12318f1 100644 --- a/src/files/actionview/lib/action_view/helpers/asset_tag_helper_rb.html +++ b/src/files/actionview/lib/action_view/helpers/asset_tag_helper_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/asset_tag_helper.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/asset_url_helper_rb.html b/src/files/actionview/lib/action_view/helpers/asset_url_helper_rb.html index dae98e8cb9..310ff406c4 100644 --- a/src/files/actionview/lib/action_view/helpers/asset_url_helper_rb.html +++ b/src/files/actionview/lib/action_view/helpers/asset_url_helper_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/asset_url_helper.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/atom_feed_helper_rb.html b/src/files/actionview/lib/action_view/helpers/atom_feed_helper_rb.html index e2caaf6fe0..b897d7a1b6 100644 --- a/src/files/actionview/lib/action_view/helpers/atom_feed_helper_rb.html +++ b/src/files/actionview/lib/action_view/helpers/atom_feed_helper_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/atom_feed_helper.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/cache_helper_rb.html b/src/files/actionview/lib/action_view/helpers/cache_helper_rb.html index 0de4552771..8024ffdf39 100644 --- a/src/files/actionview/lib/action_view/helpers/cache_helper_rb.html +++ b/src/files/actionview/lib/action_view/helpers/cache_helper_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/cache_helper.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/capture_helper_rb.html b/src/files/actionview/lib/action_view/helpers/capture_helper_rb.html index efa695e275..5da014081f 100644 --- a/src/files/actionview/lib/action_view/helpers/capture_helper_rb.html +++ b/src/files/actionview/lib/action_view/helpers/capture_helper_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/capture_helper.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/content_exfiltration_prevention_helper_rb.html b/src/files/actionview/lib/action_view/helpers/content_exfiltration_prevention_helper_rb.html index 185c5e3f78..b5081f4c63 100644 --- a/src/files/actionview/lib/action_view/helpers/content_exfiltration_prevention_helper_rb.html +++ b/src/files/actionview/lib/action_view/helpers/content_exfiltration_prevention_helper_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/content_exfiltration_prevention_helper.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/controller_helper_rb.html b/src/files/actionview/lib/action_view/helpers/controller_helper_rb.html index 64a286968c..b64a2251f6 100644 --- a/src/files/actionview/lib/action_view/helpers/controller_helper_rb.html +++ b/src/files/actionview/lib/action_view/helpers/controller_helper_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/controller_helper.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/csp_helper_rb.html b/src/files/actionview/lib/action_view/helpers/csp_helper_rb.html index b121297de5..f376aef974 100644 --- a/src/files/actionview/lib/action_view/helpers/csp_helper_rb.html +++ b/src/files/actionview/lib/action_view/helpers/csp_helper_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/csp_helper.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/csrf_helper_rb.html b/src/files/actionview/lib/action_view/helpers/csrf_helper_rb.html index 4e97d4640c..40512d876f 100644 --- a/src/files/actionview/lib/action_view/helpers/csrf_helper_rb.html +++ b/src/files/actionview/lib/action_view/helpers/csrf_helper_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/csrf_helper.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/date_helper_rb.html b/src/files/actionview/lib/action_view/helpers/date_helper_rb.html index 1a398ce686..04e0a6a4a3 100644 --- a/src/files/actionview/lib/action_view/helpers/date_helper_rb.html +++ b/src/files/actionview/lib/action_view/helpers/date_helper_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/date_helper.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/debug_helper_rb.html b/src/files/actionview/lib/action_view/helpers/debug_helper_rb.html index c1a06eca49..fd7e921c22 100644 --- a/src/files/actionview/lib/action_view/helpers/debug_helper_rb.html +++ b/src/files/actionview/lib/action_view/helpers/debug_helper_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/debug_helper.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/form_helper_rb.html b/src/files/actionview/lib/action_view/helpers/form_helper_rb.html index 3174aae02e..30a6183df3 100644 --- a/src/files/actionview/lib/action_view/helpers/form_helper_rb.html +++ b/src/files/actionview/lib/action_view/helpers/form_helper_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/form_helper.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/form_options_helper_rb.html b/src/files/actionview/lib/action_view/helpers/form_options_helper_rb.html index 812897cbdd..3b8301b736 100644 --- a/src/files/actionview/lib/action_view/helpers/form_options_helper_rb.html +++ b/src/files/actionview/lib/action_view/helpers/form_options_helper_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/form_options_helper.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/form_tag_helper_rb.html b/src/files/actionview/lib/action_view/helpers/form_tag_helper_rb.html index e56839b8ee..c753392ea9 100644 --- a/src/files/actionview/lib/action_view/helpers/form_tag_helper_rb.html +++ b/src/files/actionview/lib/action_view/helpers/form_tag_helper_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/form_tag_helper.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/javascript_helper_rb.html b/src/files/actionview/lib/action_view/helpers/javascript_helper_rb.html index e69be2cb34..ca59b5c75e 100644 --- a/src/files/actionview/lib/action_view/helpers/javascript_helper_rb.html +++ b/src/files/actionview/lib/action_view/helpers/javascript_helper_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/javascript_helper.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/number_helper_rb.html b/src/files/actionview/lib/action_view/helpers/number_helper_rb.html index 2bacf680ca..4eb9e64ede 100644 --- a/src/files/actionview/lib/action_view/helpers/number_helper_rb.html +++ b/src/files/actionview/lib/action_view/helpers/number_helper_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/number_helper.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/output_safety_helper_rb.html b/src/files/actionview/lib/action_view/helpers/output_safety_helper_rb.html index cfb810a948..ee59902cb7 100644 --- a/src/files/actionview/lib/action_view/helpers/output_safety_helper_rb.html +++ b/src/files/actionview/lib/action_view/helpers/output_safety_helper_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/output_safety_helper.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/record_tag_helper_rb.html b/src/files/actionview/lib/action_view/helpers/record_tag_helper_rb.html deleted file mode 100644 index b11c5048a1..0000000000 --- a/src/files/actionview/lib/action_view/helpers/record_tag_helper_rb.html +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: record_tag_helper.rb -layout: default ---- -
    - - -
    -
    - - - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/actionview/lib/action_view/helpers/rendering_helper_rb.html b/src/files/actionview/lib/action_view/helpers/rendering_helper_rb.html index df75dba821..e6dc3dbf08 100644 --- a/src/files/actionview/lib/action_view/helpers/rendering_helper_rb.html +++ b/src/files/actionview/lib/action_view/helpers/rendering_helper_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/rendering_helper.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/sanitize_helper_rb.html b/src/files/actionview/lib/action_view/helpers/sanitize_helper_rb.html index 9458b40aad..2e90796672 100644 --- a/src/files/actionview/lib/action_view/helpers/sanitize_helper_rb.html +++ b/src/files/actionview/lib/action_view/helpers/sanitize_helper_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/sanitize_helper.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tag_helper_rb.html b/src/files/actionview/lib/action_view/helpers/tag_helper_rb.html index a4693416db..1bc047bb0a 100644 --- a/src/files/actionview/lib/action_view/helpers/tag_helper_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tag_helper_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tag_helper.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/base_rb.html b/src/files/actionview/lib/action_view/helpers/tags/base_rb.html index 9540fa0a16..996c51cfe7 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/base_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/base_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/base.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/check_box_rb.html b/src/files/actionview/lib/action_view/helpers/tags/check_box_rb.html index 42d36b9a57..897e16358c 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/check_box_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/check_box_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/check_box.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/checkable_rb.html b/src/files/actionview/lib/action_view/helpers/tags/checkable_rb.html index 23df51f8ca..4d72221b7a 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/checkable_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/checkable_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/checkable.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/collection_check_boxes_rb.html b/src/files/actionview/lib/action_view/helpers/tags/collection_check_boxes_rb.html index e8892f852a..844ec01129 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/collection_check_boxes_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/collection_check_boxes_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/collection_check_boxes.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/collection_helpers_rb.html b/src/files/actionview/lib/action_view/helpers/tags/collection_helpers_rb.html index ecaafeb468..0530b1d8e3 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/collection_helpers_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/collection_helpers_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/collection_helpers.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/collection_radio_buttons_rb.html b/src/files/actionview/lib/action_view/helpers/tags/collection_radio_buttons_rb.html index 21c47098e0..40bee98aad 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/collection_radio_buttons_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/collection_radio_buttons_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/collection_select_rb.html b/src/files/actionview/lib/action_view/helpers/tags/collection_select_rb.html index 24666c90d5..7d855fb1e0 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/collection_select_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/collection_select_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/collection_select.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/color_field_rb.html b/src/files/actionview/lib/action_view/helpers/tags/color_field_rb.html index ec83011842..fe2c1b15ae 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/color_field_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/color_field_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/color_field.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/date_field_rb.html b/src/files/actionview/lib/action_view/helpers/tags/date_field_rb.html index 4ab9452261..a11898a5a9 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/date_field_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/date_field_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/date_field.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/date_select_rb.html b/src/files/actionview/lib/action_view/helpers/tags/date_select_rb.html index a069a1e63b..35240cae2a 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/date_select_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/date_select_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/date_select.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/datetime_field_rb.html b/src/files/actionview/lib/action_view/helpers/tags/datetime_field_rb.html index ca6fa7992f..98dc17ed88 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/datetime_field_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/datetime_field_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/datetime_field.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/datetime_local_field_rb.html b/src/files/actionview/lib/action_view/helpers/tags/datetime_local_field_rb.html index 20b5ce5b89..99aaa4d588 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/datetime_local_field_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/datetime_local_field_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/datetime_local_field.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/datetime_select_rb.html b/src/files/actionview/lib/action_view/helpers/tags/datetime_select_rb.html index c83509b587..dc567c0877 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/datetime_select_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/datetime_select_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/datetime_select.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/email_field_rb.html b/src/files/actionview/lib/action_view/helpers/tags/email_field_rb.html index b77d23b1ca..756c4d6880 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/email_field_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/email_field_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/email_field.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/file_field_rb.html b/src/files/actionview/lib/action_view/helpers/tags/file_field_rb.html index 8530eda2f6..d18f8dcc7b 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/file_field_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/file_field_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/file_field.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/grouped_collection_select_rb.html b/src/files/actionview/lib/action_view/helpers/tags/grouped_collection_select_rb.html index 4443271ddf..cc0b720d1c 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/grouped_collection_select_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/grouped_collection_select_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/grouped_collection_select.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/hidden_field_rb.html b/src/files/actionview/lib/action_view/helpers/tags/hidden_field_rb.html index 5ae63fe5a7..55dcb142c4 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/hidden_field_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/hidden_field_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/hidden_field.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/label_rb.html b/src/files/actionview/lib/action_view/helpers/tags/label_rb.html index f361d62c0f..7d5e615764 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/label_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/label_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/label.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/month_field_rb.html b/src/files/actionview/lib/action_view/helpers/tags/month_field_rb.html index 1957ce9994..276a68f575 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/month_field_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/month_field_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/month_field.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/number_field_rb.html b/src/files/actionview/lib/action_view/helpers/tags/number_field_rb.html index e062f4d367..fd6c7269b9 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/number_field_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/number_field_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/number_field.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/password_field_rb.html b/src/files/actionview/lib/action_view/helpers/tags/password_field_rb.html index e057ba329d..7f562cb1f4 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/password_field_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/password_field_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/password_field.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/placeholderable_rb.html b/src/files/actionview/lib/action_view/helpers/tags/placeholderable_rb.html index 56d2f6cfa7..78b445d276 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/placeholderable_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/placeholderable_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/placeholderable.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/radio_button_rb.html b/src/files/actionview/lib/action_view/helpers/tags/radio_button_rb.html index d88ea3b5fb..d35615aadd 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/radio_button_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/radio_button_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/radio_button.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/range_field_rb.html b/src/files/actionview/lib/action_view/helpers/tags/range_field_rb.html index 6748ba1e56..62f03e9730 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/range_field_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/range_field_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/range_field.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/search_field_rb.html b/src/files/actionview/lib/action_view/helpers/tags/search_field_rb.html index f6705e29dd..c8636a8e0b 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/search_field_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/search_field_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/search_field.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/select_rb.html b/src/files/actionview/lib/action_view/helpers/tags/select_rb.html index 779eb8a119..636e7c837a 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/select_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/select_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/select.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/tel_field_rb.html b/src/files/actionview/lib/action_view/helpers/tags/tel_field_rb.html index 4ea0625ed1..e56d004221 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/tel_field_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/tel_field_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/tel_field.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/text_area_rb.html b/src/files/actionview/lib/action_view/helpers/tags/text_area_rb.html index c1d87f05e8..93847c8a18 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/text_area_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/text_area_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/text_area.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/text_field_rb.html b/src/files/actionview/lib/action_view/helpers/tags/text_field_rb.html index 6918675551..1a772384a4 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/text_field_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/text_field_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/text_field.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/time_field_rb.html b/src/files/actionview/lib/action_view/helpers/tags/time_field_rb.html index a19858fb71..8f06dbe4cc 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/time_field_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/time_field_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/time_field.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/time_select_rb.html b/src/files/actionview/lib/action_view/helpers/tags/time_select_rb.html index 2a52777508..05d8d82a36 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/time_select_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/time_select_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/time_select.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/time_zone_select_rb.html b/src/files/actionview/lib/action_view/helpers/tags/time_zone_select_rb.html index a3d6fac657..3d7fe3483d 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/time_zone_select_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/time_zone_select_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/time_zone_select.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/translator_rb.html b/src/files/actionview/lib/action_view/helpers/tags/translator_rb.html index ee1571195f..26bac798a6 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/translator_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/translator_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/translator.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/url_field_rb.html b/src/files/actionview/lib/action_view/helpers/tags/url_field_rb.html index d083e09c5d..1d947a54a5 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/url_field_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/url_field_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/url_field.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/week_field_rb.html b/src/files/actionview/lib/action_view/helpers/tags/week_field_rb.html index c7ef45e588..83ea677dc8 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/week_field_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/week_field_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/week_field.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags/weekday_select_rb.html b/src/files/actionview/lib/action_view/helpers/tags/weekday_select_rb.html index 2f6ce8670c..46ff1e81c5 100644 --- a/src/files/actionview/lib/action_view/helpers/tags/weekday_select_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags/weekday_select_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags/weekday_select.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/tags_rb.html b/src/files/actionview/lib/action_view/helpers/tags_rb.html index c9c6a9c440..13492b582d 100644 --- a/src/files/actionview/lib/action_view/helpers/tags_rb.html +++ b/src/files/actionview/lib/action_view/helpers/tags_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/tags.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/text_helper_rb.html b/src/files/actionview/lib/action_view/helpers/text_helper_rb.html index 9e3f2551f3..978b8f4786 100644 --- a/src/files/actionview/lib/action_view/helpers/text_helper_rb.html +++ b/src/files/actionview/lib/action_view/helpers/text_helper_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/text_helper.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/translation_helper_rb.html b/src/files/actionview/lib/action_view/helpers/translation_helper_rb.html index 847f2e7440..dcaeec495f 100644 --- a/src/files/actionview/lib/action_view/helpers/translation_helper_rb.html +++ b/src/files/actionview/lib/action_view/helpers/translation_helper_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/translation_helper.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers/url_helper_rb.html b/src/files/actionview/lib/action_view/helpers/url_helper_rb.html index 9db6547dd4..5a4147b395 100644 --- a/src/files/actionview/lib/action_view/helpers/url_helper_rb.html +++ b/src/files/actionview/lib/action_view/helpers/url_helper_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers/url_helper.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/helpers_rb.html b/src/files/actionview/lib/action_view/helpers_rb.html index ae4e62acb0..242a9d8a02 100644 --- a/src/files/actionview/lib/action_view/helpers_rb.html +++ b/src/files/actionview/lib/action_view/helpers_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/helpers.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/layouts_rb.html b/src/files/actionview/lib/action_view/layouts_rb.html index 2f0bbc0dc8..b2e65afe81 100644 --- a/src/files/actionview/lib/action_view/layouts_rb.html +++ b/src/files/actionview/lib/action_view/layouts_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/layouts.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/log_subscriber_rb.html b/src/files/actionview/lib/action_view/log_subscriber_rb.html index 00ec3729db..9c438830e0 100644 --- a/src/files/actionview/lib/action_view/log_subscriber_rb.html +++ b/src/files/actionview/lib/action_view/log_subscriber_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/log_subscriber.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/lookup_context_rb.html b/src/files/actionview/lib/action_view/lookup_context_rb.html index c29cfb3bb2..e75fe4f005 100644 --- a/src/files/actionview/lib/action_view/lookup_context_rb.html +++ b/src/files/actionview/lib/action_view/lookup_context_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/lookup_context.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/model_naming_rb.html b/src/files/actionview/lib/action_view/model_naming_rb.html index cd2d9fd625..e2c1cde177 100644 --- a/src/files/actionview/lib/action_view/model_naming_rb.html +++ b/src/files/actionview/lib/action_view/model_naming_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/model_naming.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/path_registry_rb.html b/src/files/actionview/lib/action_view/path_registry_rb.html index 2922438568..c403ee94b1 100644 --- a/src/files/actionview/lib/action_view/path_registry_rb.html +++ b/src/files/actionview/lib/action_view/path_registry_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/path_registry.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/path_set_rb.html b/src/files/actionview/lib/action_view/path_set_rb.html index 9328fe235f..5d72325fd2 100644 --- a/src/files/actionview/lib/action_view/path_set_rb.html +++ b/src/files/actionview/lib/action_view/path_set_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/path_set.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/railtie_rb.html b/src/files/actionview/lib/action_view/railtie_rb.html index b964d695f1..39e6c63b56 100644 --- a/src/files/actionview/lib/action_view/railtie_rb.html +++ b/src/files/actionview/lib/action_view/railtie_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/railtie.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/record_identifier_rb.html b/src/files/actionview/lib/action_view/record_identifier_rb.html index 62eb7d7505..820c308dc6 100644 --- a/src/files/actionview/lib/action_view/record_identifier_rb.html +++ b/src/files/actionview/lib/action_view/record_identifier_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/record_identifier.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/render_parser_rb.html b/src/files/actionview/lib/action_view/render_parser_rb.html index a42c83a2f1..8814307367 100644 --- a/src/files/actionview/lib/action_view/render_parser_rb.html +++ b/src/files/actionview/lib/action_view/render_parser_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/render_parser.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/renderer/abstract_renderer_rb.html b/src/files/actionview/lib/action_view/renderer/abstract_renderer_rb.html index fcbd496ade..41fc7ad22a 100644 --- a/src/files/actionview/lib/action_view/renderer/abstract_renderer_rb.html +++ b/src/files/actionview/lib/action_view/renderer/abstract_renderer_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/renderer/abstract_renderer.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/renderer/collection_renderer_rb.html b/src/files/actionview/lib/action_view/renderer/collection_renderer_rb.html index bdada24eb7..770da3dac6 100644 --- a/src/files/actionview/lib/action_view/renderer/collection_renderer_rb.html +++ b/src/files/actionview/lib/action_view/renderer/collection_renderer_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/renderer/collection_renderer.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/renderer/object_renderer_rb.html b/src/files/actionview/lib/action_view/renderer/object_renderer_rb.html index 6649063f5b..055bc7bcfc 100644 --- a/src/files/actionview/lib/action_view/renderer/object_renderer_rb.html +++ b/src/files/actionview/lib/action_view/renderer/object_renderer_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/renderer/object_renderer.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/renderer/partial_renderer/collection_caching_rb.html b/src/files/actionview/lib/action_view/renderer/partial_renderer/collection_caching_rb.html index 95a98a979f..980acd2eeb 100644 --- a/src/files/actionview/lib/action_view/renderer/partial_renderer/collection_caching_rb.html +++ b/src/files/actionview/lib/action_view/renderer/partial_renderer/collection_caching_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/renderer/partial_renderer_rb.html b/src/files/actionview/lib/action_view/renderer/partial_renderer_rb.html index a56ec96d0d..d01419fe46 100644 --- a/src/files/actionview/lib/action_view/renderer/partial_renderer_rb.html +++ b/src/files/actionview/lib/action_view/renderer/partial_renderer_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/renderer/partial_renderer.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/renderer/renderer_rb.html b/src/files/actionview/lib/action_view/renderer/renderer_rb.html index 3ab4d0339b..390429b92b 100644 --- a/src/files/actionview/lib/action_view/renderer/renderer_rb.html +++ b/src/files/actionview/lib/action_view/renderer/renderer_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/renderer/renderer.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/renderer/streaming_template_renderer_rb.html b/src/files/actionview/lib/action_view/renderer/streaming_template_renderer_rb.html index 233038ba94..7fbd2f40b3 100644 --- a/src/files/actionview/lib/action_view/renderer/streaming_template_renderer_rb.html +++ b/src/files/actionview/lib/action_view/renderer/streaming_template_renderer_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/renderer/streaming_template_renderer.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/renderer/template_renderer_rb.html b/src/files/actionview/lib/action_view/renderer/template_renderer_rb.html index e5929991da..f26da87c52 100644 --- a/src/files/actionview/lib/action_view/renderer/template_renderer_rb.html +++ b/src/files/actionview/lib/action_view/renderer/template_renderer_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/renderer/template_renderer.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/rendering_rb.html b/src/files/actionview/lib/action_view/rendering_rb.html index d508d83a65..97a6d70f01 100644 --- a/src/files/actionview/lib/action_view/rendering_rb.html +++ b/src/files/actionview/lib/action_view/rendering_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/rendering.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/ripper_ast_parser_rb.html b/src/files/actionview/lib/action_view/ripper_ast_parser_rb.html index 37523eeb5f..6e4e9ffbae 100644 --- a/src/files/actionview/lib/action_view/ripper_ast_parser_rb.html +++ b/src/files/actionview/lib/action_view/ripper_ast_parser_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/ripper_ast_parser.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/routing_url_for_rb.html b/src/files/actionview/lib/action_view/routing_url_for_rb.html index 00e6111ea0..f5832af793 100644 --- a/src/files/actionview/lib/action_view/routing_url_for_rb.html +++ b/src/files/actionview/lib/action_view/routing_url_for_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/routing_url_for.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/template/error_rb.html b/src/files/actionview/lib/action_view/template/error_rb.html index ec2c167004..ec14d9d1e2 100644 --- a/src/files/actionview/lib/action_view/template/error_rb.html +++ b/src/files/actionview/lib/action_view/template/error_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/template/error.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/template/handlers/builder_rb.html b/src/files/actionview/lib/action_view/template/handlers/builder_rb.html index 8d53181168..7113882b6f 100644 --- a/src/files/actionview/lib/action_view/template/handlers/builder_rb.html +++ b/src/files/actionview/lib/action_view/template/handlers/builder_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/template/handlers/builder.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/template/handlers/erb/erubi_rb.html b/src/files/actionview/lib/action_view/template/handlers/erb/erubi_rb.html index 325a481119..af8cf42f74 100644 --- a/src/files/actionview/lib/action_view/template/handlers/erb/erubi_rb.html +++ b/src/files/actionview/lib/action_view/template/handlers/erb/erubi_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/template/handlers/erb/erubi.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/template/handlers/erb_rb.html b/src/files/actionview/lib/action_view/template/handlers/erb_rb.html index c984215fcd..9f8c15aac6 100644 --- a/src/files/actionview/lib/action_view/template/handlers/erb_rb.html +++ b/src/files/actionview/lib/action_view/template/handlers/erb_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/template/handlers/erb.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/template/handlers/html_rb.html b/src/files/actionview/lib/action_view/template/handlers/html_rb.html index b9ce551624..ef8cde74e4 100644 --- a/src/files/actionview/lib/action_view/template/handlers/html_rb.html +++ b/src/files/actionview/lib/action_view/template/handlers/html_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/template/handlers/html.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/template/handlers/raw_rb.html b/src/files/actionview/lib/action_view/template/handlers/raw_rb.html index 229a1fb59a..1187a27165 100644 --- a/src/files/actionview/lib/action_view/template/handlers/raw_rb.html +++ b/src/files/actionview/lib/action_view/template/handlers/raw_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/template/handlers/raw.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/template/handlers_rb.html b/src/files/actionview/lib/action_view/template/handlers_rb.html index 4f8e882dc4..7fe4b9f433 100644 --- a/src/files/actionview/lib/action_view/template/handlers_rb.html +++ b/src/files/actionview/lib/action_view/template/handlers_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/template/handlers.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/template/html_rb.html b/src/files/actionview/lib/action_view/template/html_rb.html index e2ed713b46..943aaaebef 100644 --- a/src/files/actionview/lib/action_view/template/html_rb.html +++ b/src/files/actionview/lib/action_view/template/html_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/template/html.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/template/inline_rb.html b/src/files/actionview/lib/action_view/template/inline_rb.html index 4c6882f04b..22937f8c58 100644 --- a/src/files/actionview/lib/action_view/template/inline_rb.html +++ b/src/files/actionview/lib/action_view/template/inline_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/template/inline.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/template/raw_file_rb.html b/src/files/actionview/lib/action_view/template/raw_file_rb.html index d4a2055c88..67a9413c9d 100644 --- a/src/files/actionview/lib/action_view/template/raw_file_rb.html +++ b/src/files/actionview/lib/action_view/template/raw_file_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/template/raw_file.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/template/renderable_rb.html b/src/files/actionview/lib/action_view/template/renderable_rb.html index 9280508039..9fcf5b7ade 100644 --- a/src/files/actionview/lib/action_view/template/renderable_rb.html +++ b/src/files/actionview/lib/action_view/template/renderable_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/template/renderable.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/template/resolver_rb.html b/src/files/actionview/lib/action_view/template/resolver_rb.html index 7fe3f5f466..fea225f5e6 100644 --- a/src/files/actionview/lib/action_view/template/resolver_rb.html +++ b/src/files/actionview/lib/action_view/template/resolver_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/template/resolver.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/template/sources/file_rb.html b/src/files/actionview/lib/action_view/template/sources/file_rb.html index 24c5fd0bc6..2173d34ddd 100644 --- a/src/files/actionview/lib/action_view/template/sources/file_rb.html +++ b/src/files/actionview/lib/action_view/template/sources/file_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/template/sources/file.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/template/sources_rb.html b/src/files/actionview/lib/action_view/template/sources_rb.html index 4e3a13e7e3..b47ae146a7 100644 --- a/src/files/actionview/lib/action_view/template/sources_rb.html +++ b/src/files/actionview/lib/action_view/template/sources_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/template/sources.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/template/text_rb.html b/src/files/actionview/lib/action_view/template/text_rb.html index 582f036054..7cc858302c 100644 --- a/src/files/actionview/lib/action_view/template/text_rb.html +++ b/src/files/actionview/lib/action_view/template/text_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/template/text.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/template/types_rb.html b/src/files/actionview/lib/action_view/template/types_rb.html index b921c8c832..ae20957750 100644 --- a/src/files/actionview/lib/action_view/template/types_rb.html +++ b/src/files/actionview/lib/action_view/template/types_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/template/types.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/template_details_rb.html b/src/files/actionview/lib/action_view/template_details_rb.html index 2230fdb73d..dd76d057fd 100644 --- a/src/files/actionview/lib/action_view/template_details_rb.html +++ b/src/files/actionview/lib/action_view/template_details_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/template_details.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/template_path_rb.html b/src/files/actionview/lib/action_view/template_path_rb.html index b973eba27a..565c652ebd 100644 --- a/src/files/actionview/lib/action_view/template_path_rb.html +++ b/src/files/actionview/lib/action_view/template_path_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/template_path.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/template_rb.html b/src/files/actionview/lib/action_view/template_rb.html index 1c59bc6ec2..504e40cf1e 100644 --- a/src/files/actionview/lib/action_view/template_rb.html +++ b/src/files/actionview/lib/action_view/template_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/template.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/test_case_rb.html b/src/files/actionview/lib/action_view/test_case_rb.html index b0405e7e4e..896d5c6c0e 100644 --- a/src/files/actionview/lib/action_view/test_case_rb.html +++ b/src/files/actionview/lib/action_view/test_case_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/test_case.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/testing/resolvers_rb.html b/src/files/actionview/lib/action_view/testing/resolvers_rb.html index 87ecbdddbd..4dad757080 100644 --- a/src/files/actionview/lib/action_view/testing/resolvers_rb.html +++ b/src/files/actionview/lib/action_view/testing/resolvers_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/testing/resolvers.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/unbound_template_rb.html b/src/files/actionview/lib/action_view/unbound_template_rb.html index 16c4431b6f..d129d13256 100644 --- a/src/files/actionview/lib/action_view/unbound_template_rb.html +++ b/src/files/actionview/lib/action_view/unbound_template_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/unbound_template.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/version_rb.html b/src/files/actionview/lib/action_view/version_rb.html index cd94d1b4fc..977e00e33b 100644 --- a/src/files/actionview/lib/action_view/version_rb.html +++ b/src/files/actionview/lib/action_view/version_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/version.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view/view_paths_rb.html b/src/files/actionview/lib/action_view/view_paths_rb.html index c7e9c49bf7..b257e273a1 100644 --- a/src/files/actionview/lib/action_view/view_paths_rb.html +++ b/src/files/actionview/lib/action_view/view_paths_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view/view_paths.rb + on GitHub +
  • diff --git a/src/files/actionview/lib/action_view_rb.html b/src/files/actionview/lib/action_view_rb.html index 5b649b254e..dcf32d2f01 100644 --- a/src/files/actionview/lib/action_view_rb.html +++ b/src/files/actionview/lib/action_view_rb.html @@ -15,6 +15,8 @@

  • actionview/lib/action_view.rb + on GitHub +
  • diff --git a/src/files/activejob/README_md.html b/src/files/activejob/README_md.html index cd438f051e..04f3c0ad6c 100644 --- a/src/files/activejob/README_md.html +++ b/src/files/activejob/README_md.html @@ -15,6 +15,8 @@

  • activejob/README.md + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/arguments_rb.html b/src/files/activejob/lib/active_job/arguments_rb.html index 9178df7284..29e94295e5 100644 --- a/src/files/activejob/lib/active_job/arguments_rb.html +++ b/src/files/activejob/lib/active_job/arguments_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/arguments.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/base_rb.html b/src/files/activejob/lib/active_job/base_rb.html index 0ab60731a1..eec9ebbd98 100644 --- a/src/files/activejob/lib/active_job/base_rb.html +++ b/src/files/activejob/lib/active_job/base_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/base.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/callbacks_rb.html b/src/files/activejob/lib/active_job/callbacks_rb.html index d303b7c849..8ea071da94 100644 --- a/src/files/activejob/lib/active_job/callbacks_rb.html +++ b/src/files/activejob/lib/active_job/callbacks_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/callbacks.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/configured_job_rb.html b/src/files/activejob/lib/active_job/configured_job_rb.html index 918947fd7c..9ab5c06eee 100644 --- a/src/files/activejob/lib/active_job/configured_job_rb.html +++ b/src/files/activejob/lib/active_job/configured_job_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/configured_job.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/core_rb.html b/src/files/activejob/lib/active_job/core_rb.html index 13a8465cda..dcd2e2690e 100644 --- a/src/files/activejob/lib/active_job/core_rb.html +++ b/src/files/activejob/lib/active_job/core_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/core.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/deprecator_rb.html b/src/files/activejob/lib/active_job/deprecator_rb.html index ca7f092886..67ca9b2450 100644 --- a/src/files/activejob/lib/active_job/deprecator_rb.html +++ b/src/files/activejob/lib/active_job/deprecator_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/deprecator.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/enqueuing_rb.html b/src/files/activejob/lib/active_job/enqueuing_rb.html index 9edc1c18c1..e83c05ff11 100644 --- a/src/files/activejob/lib/active_job/enqueuing_rb.html +++ b/src/files/activejob/lib/active_job/enqueuing_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/enqueuing.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/exceptions_rb.html b/src/files/activejob/lib/active_job/exceptions_rb.html index 2d95d3f471..228f17dbbf 100644 --- a/src/files/activejob/lib/active_job/exceptions_rb.html +++ b/src/files/activejob/lib/active_job/exceptions_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/exceptions.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/execution_rb.html b/src/files/activejob/lib/active_job/execution_rb.html index bf6cb5f07a..e524101b46 100644 --- a/src/files/activejob/lib/active_job/execution_rb.html +++ b/src/files/activejob/lib/active_job/execution_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/execution.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/gem_version_rb.html b/src/files/activejob/lib/active_job/gem_version_rb.html index 76b6a24618..b5515d8ef2 100644 --- a/src/files/activejob/lib/active_job/gem_version_rb.html +++ b/src/files/activejob/lib/active_job/gem_version_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/gem_version.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/instrumentation_rb.html b/src/files/activejob/lib/active_job/instrumentation_rb.html index fdce129557..59ae3b399a 100644 --- a/src/files/activejob/lib/active_job/instrumentation_rb.html +++ b/src/files/activejob/lib/active_job/instrumentation_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/instrumentation.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/log_subscriber_rb.html b/src/files/activejob/lib/active_job/log_subscriber_rb.html index 478e52cfb7..f8a27aad62 100644 --- a/src/files/activejob/lib/active_job/log_subscriber_rb.html +++ b/src/files/activejob/lib/active_job/log_subscriber_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/log_subscriber.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/logging_rb.html b/src/files/activejob/lib/active_job/logging_rb.html index f043c16b36..18c16a5672 100644 --- a/src/files/activejob/lib/active_job/logging_rb.html +++ b/src/files/activejob/lib/active_job/logging_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/logging.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/query_tags_rb.html b/src/files/activejob/lib/active_job/query_tags_rb.html deleted file mode 100644 index a5bc05d793..0000000000 --- a/src/files/activejob/lib/active_job/query_tags_rb.html +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: query_tags.rb -layout: default ---- -
    - - -
    -
    - - - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activejob/lib/active_job/queue_adapter_rb.html b/src/files/activejob/lib/active_job/queue_adapter_rb.html index f1b16f64aa..d8e8c28892 100644 --- a/src/files/activejob/lib/active_job/queue_adapter_rb.html +++ b/src/files/activejob/lib/active_job/queue_adapter_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/queue_adapter.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/queue_adapters/async_adapter_rb.html b/src/files/activejob/lib/active_job/queue_adapters/async_adapter_rb.html index 146fab3e7b..f3369e8b98 100644 --- a/src/files/activejob/lib/active_job/queue_adapters/async_adapter_rb.html +++ b/src/files/activejob/lib/active_job/queue_adapters/async_adapter_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/queue_adapters/async_adapter.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/queue_adapters/backburner_adapter_rb.html b/src/files/activejob/lib/active_job/queue_adapters/backburner_adapter_rb.html index d626a11c4a..ac7456e701 100644 --- a/src/files/activejob/lib/active_job/queue_adapters/backburner_adapter_rb.html +++ b/src/files/activejob/lib/active_job/queue_adapters/backburner_adapter_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/queue_adapters/backburner_adapter.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/queue_adapters/delayed_job_adapter_rb.html b/src/files/activejob/lib/active_job/queue_adapters/delayed_job_adapter_rb.html index 2219d92e94..696f657216 100644 --- a/src/files/activejob/lib/active_job/queue_adapters/delayed_job_adapter_rb.html +++ b/src/files/activejob/lib/active_job/queue_adapters/delayed_job_adapter_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/queue_adapters/delayed_job_adapter.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/queue_adapters/inline_adapter_rb.html b/src/files/activejob/lib/active_job/queue_adapters/inline_adapter_rb.html index 6e306d8abf..1b873f6fd7 100644 --- a/src/files/activejob/lib/active_job/queue_adapters/inline_adapter_rb.html +++ b/src/files/activejob/lib/active_job/queue_adapters/inline_adapter_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/queue_adapters/inline_adapter.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/queue_adapters/qu_adapter_rb.html b/src/files/activejob/lib/active_job/queue_adapters/qu_adapter_rb.html deleted file mode 100644 index 9e0c1c560d..0000000000 --- a/src/files/activejob/lib/active_job/queue_adapters/qu_adapter_rb.html +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: qu_adapter.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • qu
    • - -
    - - - - - - - -

    Namespace

    - - -

    Module

    - - - - -

    Class

    - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activejob/lib/active_job/queue_adapters/que_adapter_rb.html b/src/files/activejob/lib/active_job/queue_adapters/que_adapter_rb.html deleted file mode 100644 index cf29edafaf..0000000000 --- a/src/files/activejob/lib/active_job/queue_adapters/que_adapter_rb.html +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: que_adapter.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • que
    • - -
    - - - - - - - -

    Namespace

    - - -

    Module

    - - - - -

    Class

    - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activejob/lib/active_job/queue_adapters/queue_classic_adapter_rb.html b/src/files/activejob/lib/active_job/queue_adapters/queue_classic_adapter_rb.html index 671168ad70..660390463a 100644 --- a/src/files/activejob/lib/active_job/queue_adapters/queue_classic_adapter_rb.html +++ b/src/files/activejob/lib/active_job/queue_adapters/queue_classic_adapter_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/queue_adapters/queue_classic_adapter.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/queue_adapters/resque_adapter_rb.html b/src/files/activejob/lib/active_job/queue_adapters/resque_adapter_rb.html index 09f12b915b..3c3171875a 100644 --- a/src/files/activejob/lib/active_job/queue_adapters/resque_adapter_rb.html +++ b/src/files/activejob/lib/active_job/queue_adapters/resque_adapter_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/queue_adapters/resque_adapter.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/queue_adapters/sidekiq_adapter_rb.html b/src/files/activejob/lib/active_job/queue_adapters/sidekiq_adapter_rb.html index c58f64106d..7db9b24a82 100644 --- a/src/files/activejob/lib/active_job/queue_adapters/sidekiq_adapter_rb.html +++ b/src/files/activejob/lib/active_job/queue_adapters/sidekiq_adapter_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/queue_adapters/sidekiq_adapter.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/queue_adapters/sneakers_adapter_rb.html b/src/files/activejob/lib/active_job/queue_adapters/sneakers_adapter_rb.html index 12a8f2303f..151a17b045 100644 --- a/src/files/activejob/lib/active_job/queue_adapters/sneakers_adapter_rb.html +++ b/src/files/activejob/lib/active_job/queue_adapters/sneakers_adapter_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/queue_adapters/sneakers_adapter.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/queue_adapters/sucker_punch_adapter_rb.html b/src/files/activejob/lib/active_job/queue_adapters/sucker_punch_adapter_rb.html index 4e29c150ca..c63fa97e99 100644 --- a/src/files/activejob/lib/active_job/queue_adapters/sucker_punch_adapter_rb.html +++ b/src/files/activejob/lib/active_job/queue_adapters/sucker_punch_adapter_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/queue_adapters/sucker_punch_adapter.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/queue_adapters/test_adapter_rb.html b/src/files/activejob/lib/active_job/queue_adapters/test_adapter_rb.html index fb21831e87..fbca323762 100644 --- a/src/files/activejob/lib/active_job/queue_adapters/test_adapter_rb.html +++ b/src/files/activejob/lib/active_job/queue_adapters/test_adapter_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/queue_adapters/test_adapter.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/queue_adapters_rb.html b/src/files/activejob/lib/active_job/queue_adapters_rb.html index 5e9eff1d7f..efc6601767 100644 --- a/src/files/activejob/lib/active_job/queue_adapters_rb.html +++ b/src/files/activejob/lib/active_job/queue_adapters_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/queue_adapters.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/queue_name_rb.html b/src/files/activejob/lib/active_job/queue_name_rb.html index efaa10eae8..f8600e2196 100644 --- a/src/files/activejob/lib/active_job/queue_name_rb.html +++ b/src/files/activejob/lib/active_job/queue_name_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/queue_name.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/queue_priority_rb.html b/src/files/activejob/lib/active_job/queue_priority_rb.html index a88cc7f3c5..f7234862a2 100644 --- a/src/files/activejob/lib/active_job/queue_priority_rb.html +++ b/src/files/activejob/lib/active_job/queue_priority_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/queue_priority.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/railtie_rb.html b/src/files/activejob/lib/active_job/railtie_rb.html index 52f422a242..3ef753607d 100644 --- a/src/files/activejob/lib/active_job/railtie_rb.html +++ b/src/files/activejob/lib/active_job/railtie_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/railtie.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/serializers/big_decimal_serializer_rb.html b/src/files/activejob/lib/active_job/serializers/big_decimal_serializer_rb.html index e4c6cce3e2..208d2985ec 100644 --- a/src/files/activejob/lib/active_job/serializers/big_decimal_serializer_rb.html +++ b/src/files/activejob/lib/active_job/serializers/big_decimal_serializer_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/serializers/big_decimal_serializer.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/serializers/date_serializer_rb.html b/src/files/activejob/lib/active_job/serializers/date_serializer_rb.html index 9aa3062aae..4a66a6e03e 100644 --- a/src/files/activejob/lib/active_job/serializers/date_serializer_rb.html +++ b/src/files/activejob/lib/active_job/serializers/date_serializer_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/serializers/date_serializer.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/serializers/date_time_serializer_rb.html b/src/files/activejob/lib/active_job/serializers/date_time_serializer_rb.html index 6dfbbb834c..e5d20ddaa7 100644 --- a/src/files/activejob/lib/active_job/serializers/date_time_serializer_rb.html +++ b/src/files/activejob/lib/active_job/serializers/date_time_serializer_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/serializers/date_time_serializer.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/serializers/duration_serializer_rb.html b/src/files/activejob/lib/active_job/serializers/duration_serializer_rb.html index 55531863bc..ffd3a5f375 100644 --- a/src/files/activejob/lib/active_job/serializers/duration_serializer_rb.html +++ b/src/files/activejob/lib/active_job/serializers/duration_serializer_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/serializers/duration_serializer.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/serializers/module_serializer_rb.html b/src/files/activejob/lib/active_job/serializers/module_serializer_rb.html index 55fc84e88a..0c95e21132 100644 --- a/src/files/activejob/lib/active_job/serializers/module_serializer_rb.html +++ b/src/files/activejob/lib/active_job/serializers/module_serializer_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/serializers/module_serializer.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/serializers/object_serializer_rb.html b/src/files/activejob/lib/active_job/serializers/object_serializer_rb.html index 2221b94869..4caf2afed4 100644 --- a/src/files/activejob/lib/active_job/serializers/object_serializer_rb.html +++ b/src/files/activejob/lib/active_job/serializers/object_serializer_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/serializers/object_serializer.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/serializers/range_serializer_rb.html b/src/files/activejob/lib/active_job/serializers/range_serializer_rb.html index ff2e3efb44..c640955c4b 100644 --- a/src/files/activejob/lib/active_job/serializers/range_serializer_rb.html +++ b/src/files/activejob/lib/active_job/serializers/range_serializer_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/serializers/range_serializer.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/serializers/symbol_serializer_rb.html b/src/files/activejob/lib/active_job/serializers/symbol_serializer_rb.html index abd385a08a..a781c81ded 100644 --- a/src/files/activejob/lib/active_job/serializers/symbol_serializer_rb.html +++ b/src/files/activejob/lib/active_job/serializers/symbol_serializer_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/serializers/symbol_serializer.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/serializers/time_object_serializer_rb.html b/src/files/activejob/lib/active_job/serializers/time_object_serializer_rb.html index 1dc99c9674..ef59416673 100644 --- a/src/files/activejob/lib/active_job/serializers/time_object_serializer_rb.html +++ b/src/files/activejob/lib/active_job/serializers/time_object_serializer_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/serializers/time_object_serializer.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/serializers/time_serializer_rb.html b/src/files/activejob/lib/active_job/serializers/time_serializer_rb.html index 351142d395..ffe6cd4473 100644 --- a/src/files/activejob/lib/active_job/serializers/time_serializer_rb.html +++ b/src/files/activejob/lib/active_job/serializers/time_serializer_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/serializers/time_serializer.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/serializers/time_with_zone_serializer_rb.html b/src/files/activejob/lib/active_job/serializers/time_with_zone_serializer_rb.html index 5a6d88a3bf..60eefa28a3 100644 --- a/src/files/activejob/lib/active_job/serializers/time_with_zone_serializer_rb.html +++ b/src/files/activejob/lib/active_job/serializers/time_with_zone_serializer_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/serializers/time_with_zone_serializer.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/serializers_rb.html b/src/files/activejob/lib/active_job/serializers_rb.html index 9d77c96d26..bbe98bb671 100644 --- a/src/files/activejob/lib/active_job/serializers_rb.html +++ b/src/files/activejob/lib/active_job/serializers_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/serializers.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/test_case_rb.html b/src/files/activejob/lib/active_job/test_case_rb.html index 2f3a360e24..3b9dc98caf 100644 --- a/src/files/activejob/lib/active_job/test_case_rb.html +++ b/src/files/activejob/lib/active_job/test_case_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/test_case.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/test_helper_rb.html b/src/files/activejob/lib/active_job/test_helper_rb.html index 004c4ca206..cd9221196a 100644 --- a/src/files/activejob/lib/active_job/test_helper_rb.html +++ b/src/files/activejob/lib/active_job/test_helper_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/test_helper.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/timezones_rb.html b/src/files/activejob/lib/active_job/timezones_rb.html index 5c8820b550..a0e0aa0ff7 100644 --- a/src/files/activejob/lib/active_job/timezones_rb.html +++ b/src/files/activejob/lib/active_job/timezones_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/timezones.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/translation_rb.html b/src/files/activejob/lib/active_job/translation_rb.html index d0d1ac3b44..f94d83996a 100644 --- a/src/files/activejob/lib/active_job/translation_rb.html +++ b/src/files/activejob/lib/active_job/translation_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/translation.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job/version_rb.html b/src/files/activejob/lib/active_job/version_rb.html index a64d96b78c..da0da71fb1 100644 --- a/src/files/activejob/lib/active_job/version_rb.html +++ b/src/files/activejob/lib/active_job/version_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job/version.rb + on GitHub +
  • diff --git a/src/files/activejob/lib/active_job_rb.html b/src/files/activejob/lib/active_job_rb.html index c9483b7f21..7efed6845d 100644 --- a/src/files/activejob/lib/active_job_rb.html +++ b/src/files/activejob/lib/active_job_rb.html @@ -15,6 +15,8 @@

  • activejob/lib/active_job.rb + on GitHub +
  • diff --git a/src/files/activemodel/README_rdoc.html b/src/files/activemodel/README_rdoc.html index 781af7c72e..3c3db27159 100644 --- a/src/files/activemodel/README_rdoc.html +++ b/src/files/activemodel/README_rdoc.html @@ -15,6 +15,8 @@

  • activemodel/README.rdoc + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/access_rb.html b/src/files/activemodel/lib/active_model/access_rb.html index 027b63d221..bd1d10c508 100644 --- a/src/files/activemodel/lib/active_model/access_rb.html +++ b/src/files/activemodel/lib/active_model/access_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/access.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/api_rb.html b/src/files/activemodel/lib/active_model/api_rb.html index b9d3ef07db..fbfbcc05ae 100644 --- a/src/files/activemodel/lib/active_model/api_rb.html +++ b/src/files/activemodel/lib/active_model/api_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/api.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/attribute/user_provided_default_rb.html b/src/files/activemodel/lib/active_model/attribute/user_provided_default_rb.html index 23d9458d16..a554d97316 100644 --- a/src/files/activemodel/lib/active_model/attribute/user_provided_default_rb.html +++ b/src/files/activemodel/lib/active_model/attribute/user_provided_default_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/attribute/user_provided_default.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/attribute_assignment_rb.html b/src/files/activemodel/lib/active_model/attribute_assignment_rb.html index 35ac50321b..c76c7cdf82 100644 --- a/src/files/activemodel/lib/active_model/attribute_assignment_rb.html +++ b/src/files/activemodel/lib/active_model/attribute_assignment_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/attribute_assignment.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/attribute_methods_rb.html b/src/files/activemodel/lib/active_model/attribute_methods_rb.html index 26a9b17615..7b1cd277c9 100644 --- a/src/files/activemodel/lib/active_model/attribute_methods_rb.html +++ b/src/files/activemodel/lib/active_model/attribute_methods_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/attribute_methods.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/attribute_mutation_tracker_rb.html b/src/files/activemodel/lib/active_model/attribute_mutation_tracker_rb.html index 22fbae4e87..91b33c1016 100644 --- a/src/files/activemodel/lib/active_model/attribute_mutation_tracker_rb.html +++ b/src/files/activemodel/lib/active_model/attribute_mutation_tracker_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/attribute_mutation_tracker.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/attribute_rb.html b/src/files/activemodel/lib/active_model/attribute_rb.html index 09284296f9..dca7868c37 100644 --- a/src/files/activemodel/lib/active_model/attribute_rb.html +++ b/src/files/activemodel/lib/active_model/attribute_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/attribute.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/attribute_registration_rb.html b/src/files/activemodel/lib/active_model/attribute_registration_rb.html index fbb596f138..9f1bc903a3 100644 --- a/src/files/activemodel/lib/active_model/attribute_registration_rb.html +++ b/src/files/activemodel/lib/active_model/attribute_registration_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/attribute_registration.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/attribute_set/builder_rb.html b/src/files/activemodel/lib/active_model/attribute_set/builder_rb.html index b076e61b34..a20497aacd 100644 --- a/src/files/activemodel/lib/active_model/attribute_set/builder_rb.html +++ b/src/files/activemodel/lib/active_model/attribute_set/builder_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/attribute_set/builder.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/attribute_set/yaml_encoder_rb.html b/src/files/activemodel/lib/active_model/attribute_set/yaml_encoder_rb.html index 755dd76388..a0598e6782 100644 --- a/src/files/activemodel/lib/active_model/attribute_set/yaml_encoder_rb.html +++ b/src/files/activemodel/lib/active_model/attribute_set/yaml_encoder_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/attribute_set/yaml_encoder.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/attribute_set_rb.html b/src/files/activemodel/lib/active_model/attribute_set_rb.html index e4df3fa770..128f8ad831 100644 --- a/src/files/activemodel/lib/active_model/attribute_set_rb.html +++ b/src/files/activemodel/lib/active_model/attribute_set_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/attribute_set.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/attributes_rb.html b/src/files/activemodel/lib/active_model/attributes_rb.html index ecc3d5989c..8e117ac50f 100644 --- a/src/files/activemodel/lib/active_model/attributes_rb.html +++ b/src/files/activemodel/lib/active_model/attributes_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/attributes.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/callbacks_rb.html b/src/files/activemodel/lib/active_model/callbacks_rb.html index 6e4819ef9b..e8e0b7f147 100644 --- a/src/files/activemodel/lib/active_model/callbacks_rb.html +++ b/src/files/activemodel/lib/active_model/callbacks_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/callbacks.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/conversion_rb.html b/src/files/activemodel/lib/active_model/conversion_rb.html index af4c22f70b..34a142efa4 100644 --- a/src/files/activemodel/lib/active_model/conversion_rb.html +++ b/src/files/activemodel/lib/active_model/conversion_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/conversion.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/deprecator_rb.html b/src/files/activemodel/lib/active_model/deprecator_rb.html index 2d982fac7f..fa32f075c7 100644 --- a/src/files/activemodel/lib/active_model/deprecator_rb.html +++ b/src/files/activemodel/lib/active_model/deprecator_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/deprecator.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/dirty_rb.html b/src/files/activemodel/lib/active_model/dirty_rb.html index f802a4d2b5..768040e871 100644 --- a/src/files/activemodel/lib/active_model/dirty_rb.html +++ b/src/files/activemodel/lib/active_model/dirty_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/dirty.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/error_rb.html b/src/files/activemodel/lib/active_model/error_rb.html index 044d068251..fc5d302c51 100644 --- a/src/files/activemodel/lib/active_model/error_rb.html +++ b/src/files/activemodel/lib/active_model/error_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/error.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/errors_rb.html b/src/files/activemodel/lib/active_model/errors_rb.html index 1b48467660..4b65a0ea34 100644 --- a/src/files/activemodel/lib/active_model/errors_rb.html +++ b/src/files/activemodel/lib/active_model/errors_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/errors.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/forbidden_attributes_protection_rb.html b/src/files/activemodel/lib/active_model/forbidden_attributes_protection_rb.html index b9a3c7bc57..100ba901e3 100644 --- a/src/files/activemodel/lib/active_model/forbidden_attributes_protection_rb.html +++ b/src/files/activemodel/lib/active_model/forbidden_attributes_protection_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/forbidden_attributes_protection.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/gem_version_rb.html b/src/files/activemodel/lib/active_model/gem_version_rb.html index c345dddcb4..a509e57d3e 100644 --- a/src/files/activemodel/lib/active_model/gem_version_rb.html +++ b/src/files/activemodel/lib/active_model/gem_version_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/gem_version.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/lint_rb.html b/src/files/activemodel/lib/active_model/lint_rb.html index 800e1a15f5..643d55e9e6 100644 --- a/src/files/activemodel/lib/active_model/lint_rb.html +++ b/src/files/activemodel/lib/active_model/lint_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/lint.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/model_rb.html b/src/files/activemodel/lib/active_model/model_rb.html index 71ec57cebf..cd758d7ff3 100644 --- a/src/files/activemodel/lib/active_model/model_rb.html +++ b/src/files/activemodel/lib/active_model/model_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/model.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/naming_rb.html b/src/files/activemodel/lib/active_model/naming_rb.html index d424a6611c..f06b4cad37 100644 --- a/src/files/activemodel/lib/active_model/naming_rb.html +++ b/src/files/activemodel/lib/active_model/naming_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/naming.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/nested_error_rb.html b/src/files/activemodel/lib/active_model/nested_error_rb.html index 9a415dc469..1bf0299129 100644 --- a/src/files/activemodel/lib/active_model/nested_error_rb.html +++ b/src/files/activemodel/lib/active_model/nested_error_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/nested_error.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/railtie_rb.html b/src/files/activemodel/lib/active_model/railtie_rb.html index 0648a800af..24ad3c0b0c 100644 --- a/src/files/activemodel/lib/active_model/railtie_rb.html +++ b/src/files/activemodel/lib/active_model/railtie_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/railtie.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/secure_password_rb.html b/src/files/activemodel/lib/active_model/secure_password_rb.html index 88ad78d879..edac473d80 100644 --- a/src/files/activemodel/lib/active_model/secure_password_rb.html +++ b/src/files/activemodel/lib/active_model/secure_password_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/secure_password.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/serialization_rb.html b/src/files/activemodel/lib/active_model/serialization_rb.html index 5ac94119f6..92731648a4 100644 --- a/src/files/activemodel/lib/active_model/serialization_rb.html +++ b/src/files/activemodel/lib/active_model/serialization_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/serialization.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/serializers/json_rb.html b/src/files/activemodel/lib/active_model/serializers/json_rb.html index 96ec28a637..72483a4472 100644 --- a/src/files/activemodel/lib/active_model/serializers/json_rb.html +++ b/src/files/activemodel/lib/active_model/serializers/json_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/serializers/json.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/translation_rb.html b/src/files/activemodel/lib/active_model/translation_rb.html index e1dd4a2f51..94201810b2 100644 --- a/src/files/activemodel/lib/active_model/translation_rb.html +++ b/src/files/activemodel/lib/active_model/translation_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/translation.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/type/big_integer_rb.html b/src/files/activemodel/lib/active_model/type/big_integer_rb.html index 10fa164e75..b4b96b4d45 100644 --- a/src/files/activemodel/lib/active_model/type/big_integer_rb.html +++ b/src/files/activemodel/lib/active_model/type/big_integer_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/type/big_integer.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/type/binary_rb.html b/src/files/activemodel/lib/active_model/type/binary_rb.html index 2f5f6e2982..73c21a794c 100644 --- a/src/files/activemodel/lib/active_model/type/binary_rb.html +++ b/src/files/activemodel/lib/active_model/type/binary_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/type/binary.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/type/boolean_rb.html b/src/files/activemodel/lib/active_model/type/boolean_rb.html index c6be908fe3..556e329489 100644 --- a/src/files/activemodel/lib/active_model/type/boolean_rb.html +++ b/src/files/activemodel/lib/active_model/type/boolean_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/type/boolean.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/type/date_rb.html b/src/files/activemodel/lib/active_model/type/date_rb.html index f8ad187531..930c721cd4 100644 --- a/src/files/activemodel/lib/active_model/type/date_rb.html +++ b/src/files/activemodel/lib/active_model/type/date_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/type/date.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/type/date_time_rb.html b/src/files/activemodel/lib/active_model/type/date_time_rb.html index 559118dd2d..c5175e2549 100644 --- a/src/files/activemodel/lib/active_model/type/date_time_rb.html +++ b/src/files/activemodel/lib/active_model/type/date_time_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/type/date_time.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/type/decimal_rb.html b/src/files/activemodel/lib/active_model/type/decimal_rb.html index 076c3f000a..5b2200957a 100644 --- a/src/files/activemodel/lib/active_model/type/decimal_rb.html +++ b/src/files/activemodel/lib/active_model/type/decimal_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/type/decimal.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/type/float_rb.html b/src/files/activemodel/lib/active_model/type/float_rb.html index 5e1db1c2e6..0b99fb4956 100644 --- a/src/files/activemodel/lib/active_model/type/float_rb.html +++ b/src/files/activemodel/lib/active_model/type/float_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/type/float.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/type/helpers/accepts_multiparameter_time_rb.html b/src/files/activemodel/lib/active_model/type/helpers/accepts_multiparameter_time_rb.html index 583ced1f0a..d0fce14cc6 100644 --- a/src/files/activemodel/lib/active_model/type/helpers/accepts_multiparameter_time_rb.html +++ b/src/files/activemodel/lib/active_model/type/helpers/accepts_multiparameter_time_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/type/helpers/accepts_multiparameter_time.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/type/helpers/mutable_rb.html b/src/files/activemodel/lib/active_model/type/helpers/mutable_rb.html index 798f90d83c..93bf809502 100644 --- a/src/files/activemodel/lib/active_model/type/helpers/mutable_rb.html +++ b/src/files/activemodel/lib/active_model/type/helpers/mutable_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/type/helpers/mutable.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/type/helpers/numeric_rb.html b/src/files/activemodel/lib/active_model/type/helpers/numeric_rb.html index 16cee2f599..e29e247993 100644 --- a/src/files/activemodel/lib/active_model/type/helpers/numeric_rb.html +++ b/src/files/activemodel/lib/active_model/type/helpers/numeric_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/type/helpers/numeric.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/type/helpers/time_value_rb.html b/src/files/activemodel/lib/active_model/type/helpers/time_value_rb.html index e060c0d605..6fb275d547 100644 --- a/src/files/activemodel/lib/active_model/type/helpers/time_value_rb.html +++ b/src/files/activemodel/lib/active_model/type/helpers/time_value_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/type/helpers/time_value.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/type/helpers/timezone_rb.html b/src/files/activemodel/lib/active_model/type/helpers/timezone_rb.html index cf587198c6..1671d3510b 100644 --- a/src/files/activemodel/lib/active_model/type/helpers/timezone_rb.html +++ b/src/files/activemodel/lib/active_model/type/helpers/timezone_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/type/helpers/timezone.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/type/helpers_rb.html b/src/files/activemodel/lib/active_model/type/helpers_rb.html index 9dceded717..42ebc287b1 100644 --- a/src/files/activemodel/lib/active_model/type/helpers_rb.html +++ b/src/files/activemodel/lib/active_model/type/helpers_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/type/helpers.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/type/immutable_string_rb.html b/src/files/activemodel/lib/active_model/type/immutable_string_rb.html index 5a9c5baf0d..c9e8afbd37 100644 --- a/src/files/activemodel/lib/active_model/type/immutable_string_rb.html +++ b/src/files/activemodel/lib/active_model/type/immutable_string_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/type/immutable_string.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/type/integer_rb.html b/src/files/activemodel/lib/active_model/type/integer_rb.html index 4d256acbca..4808cc8af6 100644 --- a/src/files/activemodel/lib/active_model/type/integer_rb.html +++ b/src/files/activemodel/lib/active_model/type/integer_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/type/integer.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/type/registry_rb.html b/src/files/activemodel/lib/active_model/type/registry_rb.html index a9ca638f10..7c0ea632b0 100644 --- a/src/files/activemodel/lib/active_model/type/registry_rb.html +++ b/src/files/activemodel/lib/active_model/type/registry_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/type/registry.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/type/serialize_cast_value_rb.html b/src/files/activemodel/lib/active_model/type/serialize_cast_value_rb.html index bd975d6053..50d160557c 100644 --- a/src/files/activemodel/lib/active_model/type/serialize_cast_value_rb.html +++ b/src/files/activemodel/lib/active_model/type/serialize_cast_value_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/type/serialize_cast_value.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/type/string_rb.html b/src/files/activemodel/lib/active_model/type/string_rb.html index 332d2553a9..546afb80d9 100644 --- a/src/files/activemodel/lib/active_model/type/string_rb.html +++ b/src/files/activemodel/lib/active_model/type/string_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/type/string.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/type/time_rb.html b/src/files/activemodel/lib/active_model/type/time_rb.html index 1a2823f2d3..b08b464768 100644 --- a/src/files/activemodel/lib/active_model/type/time_rb.html +++ b/src/files/activemodel/lib/active_model/type/time_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/type/time.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/type/value_rb.html b/src/files/activemodel/lib/active_model/type/value_rb.html index a4e3131057..e8e260e83c 100644 --- a/src/files/activemodel/lib/active_model/type/value_rb.html +++ b/src/files/activemodel/lib/active_model/type/value_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/type/value.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/type_rb.html b/src/files/activemodel/lib/active_model/type_rb.html index 792ba73845..d07cf95be5 100644 --- a/src/files/activemodel/lib/active_model/type_rb.html +++ b/src/files/activemodel/lib/active_model/type_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/type.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/validations/absence_rb.html b/src/files/activemodel/lib/active_model/validations/absence_rb.html index 77720f1929..aee0e28aa6 100644 --- a/src/files/activemodel/lib/active_model/validations/absence_rb.html +++ b/src/files/activemodel/lib/active_model/validations/absence_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/validations/absence.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/validations/acceptance_rb.html b/src/files/activemodel/lib/active_model/validations/acceptance_rb.html index 9b3bb83570..cfeb630b88 100644 --- a/src/files/activemodel/lib/active_model/validations/acceptance_rb.html +++ b/src/files/activemodel/lib/active_model/validations/acceptance_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/validations/acceptance.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/validations/callbacks_rb.html b/src/files/activemodel/lib/active_model/validations/callbacks_rb.html index b4a4a7f35b..1fd8cd202f 100644 --- a/src/files/activemodel/lib/active_model/validations/callbacks_rb.html +++ b/src/files/activemodel/lib/active_model/validations/callbacks_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/validations/callbacks.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/validations/clusivity_rb.html b/src/files/activemodel/lib/active_model/validations/clusivity_rb.html index 026f6e9d39..af0e853d5c 100644 --- a/src/files/activemodel/lib/active_model/validations/clusivity_rb.html +++ b/src/files/activemodel/lib/active_model/validations/clusivity_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/validations/clusivity.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/validations/comparability_rb.html b/src/files/activemodel/lib/active_model/validations/comparability_rb.html index 525d35855f..72c3e4eff8 100644 --- a/src/files/activemodel/lib/active_model/validations/comparability_rb.html +++ b/src/files/activemodel/lib/active_model/validations/comparability_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/validations/comparability.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/validations/comparison_rb.html b/src/files/activemodel/lib/active_model/validations/comparison_rb.html index 2b022c444a..0dc3b59811 100644 --- a/src/files/activemodel/lib/active_model/validations/comparison_rb.html +++ b/src/files/activemodel/lib/active_model/validations/comparison_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/validations/comparison.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/validations/confirmation_rb.html b/src/files/activemodel/lib/active_model/validations/confirmation_rb.html index 881b60192c..f8820b01d2 100644 --- a/src/files/activemodel/lib/active_model/validations/confirmation_rb.html +++ b/src/files/activemodel/lib/active_model/validations/confirmation_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/validations/confirmation.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/validations/exclusion_rb.html b/src/files/activemodel/lib/active_model/validations/exclusion_rb.html index 5526ba9002..138a261139 100644 --- a/src/files/activemodel/lib/active_model/validations/exclusion_rb.html +++ b/src/files/activemodel/lib/active_model/validations/exclusion_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/validations/exclusion.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/validations/format_rb.html b/src/files/activemodel/lib/active_model/validations/format_rb.html index 1c04f6631d..13f80960be 100644 --- a/src/files/activemodel/lib/active_model/validations/format_rb.html +++ b/src/files/activemodel/lib/active_model/validations/format_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/validations/format.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/validations/helper_methods_rb.html b/src/files/activemodel/lib/active_model/validations/helper_methods_rb.html index 7c8b22935b..0fd613fd47 100644 --- a/src/files/activemodel/lib/active_model/validations/helper_methods_rb.html +++ b/src/files/activemodel/lib/active_model/validations/helper_methods_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/validations/helper_methods.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/validations/inclusion_rb.html b/src/files/activemodel/lib/active_model/validations/inclusion_rb.html index d587276b28..3d5753ac3c 100644 --- a/src/files/activemodel/lib/active_model/validations/inclusion_rb.html +++ b/src/files/activemodel/lib/active_model/validations/inclusion_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/validations/inclusion.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/validations/length_rb.html b/src/files/activemodel/lib/active_model/validations/length_rb.html index 7677f9b5e9..0e68f9e042 100644 --- a/src/files/activemodel/lib/active_model/validations/length_rb.html +++ b/src/files/activemodel/lib/active_model/validations/length_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/validations/length.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/validations/numericality_rb.html b/src/files/activemodel/lib/active_model/validations/numericality_rb.html index 14f112ef0f..4d50344846 100644 --- a/src/files/activemodel/lib/active_model/validations/numericality_rb.html +++ b/src/files/activemodel/lib/active_model/validations/numericality_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/validations/numericality.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/validations/presence_rb.html b/src/files/activemodel/lib/active_model/validations/presence_rb.html index 33f9e36f1f..5ce33452db 100644 --- a/src/files/activemodel/lib/active_model/validations/presence_rb.html +++ b/src/files/activemodel/lib/active_model/validations/presence_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/validations/presence.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/validations/resolve_value_rb.html b/src/files/activemodel/lib/active_model/validations/resolve_value_rb.html index 76d65d147b..48a6077cfb 100644 --- a/src/files/activemodel/lib/active_model/validations/resolve_value_rb.html +++ b/src/files/activemodel/lib/active_model/validations/resolve_value_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/validations/resolve_value.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/validations/validates_rb.html b/src/files/activemodel/lib/active_model/validations/validates_rb.html index fc62263bb0..9209ed05de 100644 --- a/src/files/activemodel/lib/active_model/validations/validates_rb.html +++ b/src/files/activemodel/lib/active_model/validations/validates_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/validations/validates.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/validations/with_rb.html b/src/files/activemodel/lib/active_model/validations/with_rb.html index 2b918d7057..b954e13c48 100644 --- a/src/files/activemodel/lib/active_model/validations/with_rb.html +++ b/src/files/activemodel/lib/active_model/validations/with_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/validations/with.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/validations_rb.html b/src/files/activemodel/lib/active_model/validations_rb.html index e889b1efca..8dc4663cee 100644 --- a/src/files/activemodel/lib/active_model/validations_rb.html +++ b/src/files/activemodel/lib/active_model/validations_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/validations.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/validator_rb.html b/src/files/activemodel/lib/active_model/validator_rb.html index 8f60ff4e25..4f538224dd 100644 --- a/src/files/activemodel/lib/active_model/validator_rb.html +++ b/src/files/activemodel/lib/active_model/validator_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/validator.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model/version_rb.html b/src/files/activemodel/lib/active_model/version_rb.html index 3ba396bb23..b528a45675 100644 --- a/src/files/activemodel/lib/active_model/version_rb.html +++ b/src/files/activemodel/lib/active_model/version_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model/version.rb + on GitHub +
  • diff --git a/src/files/activemodel/lib/active_model_rb.html b/src/files/activemodel/lib/active_model_rb.html index 662ec09d90..37f407f79c 100644 --- a/src/files/activemodel/lib/active_model_rb.html +++ b/src/files/activemodel/lib/active_model_rb.html @@ -15,6 +15,8 @@

  • activemodel/lib/active_model.rb + on GitHub +
  • diff --git a/src/files/activerecord/README_rdoc.html b/src/files/activerecord/README_rdoc.html index 952b599dba..881dd95e8e 100644 --- a/src/files/activerecord/README_rdoc.html +++ b/src/files/activerecord/README_rdoc.html @@ -15,6 +15,8 @@

  • activerecord/README.rdoc + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/advisory_lock_base_rb.html b/src/files/activerecord/lib/active_record/advisory_lock_base_rb.html deleted file mode 100644 index 6190c703aa..0000000000 --- a/src/files/activerecord/lib/active_record/advisory_lock_base_rb.html +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: advisory_lock_base.rb -layout: default ---- -
    - - -
    -
    - - - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activerecord/lib/active_record/aggregations_rb.html b/src/files/activerecord/lib/active_record/aggregations_rb.html index 3442a10db1..399d435624 100644 --- a/src/files/activerecord/lib/active_record/aggregations_rb.html +++ b/src/files/activerecord/lib/active_record/aggregations_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/aggregations.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/association_relation_rb.html b/src/files/activerecord/lib/active_record/association_relation_rb.html index a4e28f3433..afb66b3058 100644 --- a/src/files/activerecord/lib/active_record/association_relation_rb.html +++ b/src/files/activerecord/lib/active_record/association_relation_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/association_relation.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/alias_tracker_rb.html b/src/files/activerecord/lib/active_record/associations/alias_tracker_rb.html index dc32dca772..ee5925a325 100644 --- a/src/files/activerecord/lib/active_record/associations/alias_tracker_rb.html +++ b/src/files/activerecord/lib/active_record/associations/alias_tracker_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/alias_tracker.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/association_rb.html b/src/files/activerecord/lib/active_record/associations/association_rb.html index 3222cf4622..45bdcad758 100644 --- a/src/files/activerecord/lib/active_record/associations/association_rb.html +++ b/src/files/activerecord/lib/active_record/associations/association_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/association.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/association_scope_rb.html b/src/files/activerecord/lib/active_record/associations/association_scope_rb.html index d1c7dd9af0..9c2ae93a13 100644 --- a/src/files/activerecord/lib/active_record/associations/association_scope_rb.html +++ b/src/files/activerecord/lib/active_record/associations/association_scope_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/association_scope.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/belongs_to_association_rb.html b/src/files/activerecord/lib/active_record/associations/belongs_to_association_rb.html index f3a54650f7..c0473155e5 100644 --- a/src/files/activerecord/lib/active_record/associations/belongs_to_association_rb.html +++ b/src/files/activerecord/lib/active_record/associations/belongs_to_association_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/belongs_to_association.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/belongs_to_polymorphic_association_rb.html b/src/files/activerecord/lib/active_record/associations/belongs_to_polymorphic_association_rb.html index 4cebabcd58..8f9d73874c 100644 --- a/src/files/activerecord/lib/active_record/associations/belongs_to_polymorphic_association_rb.html +++ b/src/files/activerecord/lib/active_record/associations/belongs_to_polymorphic_association_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/builder/association_rb.html b/src/files/activerecord/lib/active_record/associations/builder/association_rb.html index 562982535e..1f2506f2f1 100644 --- a/src/files/activerecord/lib/active_record/associations/builder/association_rb.html +++ b/src/files/activerecord/lib/active_record/associations/builder/association_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/builder/association.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/builder/belongs_to_rb.html b/src/files/activerecord/lib/active_record/associations/builder/belongs_to_rb.html index 133fe2fbd1..f84f44322a 100644 --- a/src/files/activerecord/lib/active_record/associations/builder/belongs_to_rb.html +++ b/src/files/activerecord/lib/active_record/associations/builder/belongs_to_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/builder/belongs_to.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/builder/collection_association_rb.html b/src/files/activerecord/lib/active_record/associations/builder/collection_association_rb.html index 6c4132547d..3bf19f960b 100644 --- a/src/files/activerecord/lib/active_record/associations/builder/collection_association_rb.html +++ b/src/files/activerecord/lib/active_record/associations/builder/collection_association_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/builder/collection_association.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/builder/has_and_belongs_to_many_rb.html b/src/files/activerecord/lib/active_record/associations/builder/has_and_belongs_to_many_rb.html index 838c97bce0..c9ef306976 100644 --- a/src/files/activerecord/lib/active_record/associations/builder/has_and_belongs_to_many_rb.html +++ b/src/files/activerecord/lib/active_record/associations/builder/has_and_belongs_to_many_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/builder/has_many_rb.html b/src/files/activerecord/lib/active_record/associations/builder/has_many_rb.html index 4811177f0e..53c8b55cf2 100644 --- a/src/files/activerecord/lib/active_record/associations/builder/has_many_rb.html +++ b/src/files/activerecord/lib/active_record/associations/builder/has_many_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/builder/has_many.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/builder/has_one_rb.html b/src/files/activerecord/lib/active_record/associations/builder/has_one_rb.html index 5e7be97db7..3a662d2ca7 100644 --- a/src/files/activerecord/lib/active_record/associations/builder/has_one_rb.html +++ b/src/files/activerecord/lib/active_record/associations/builder/has_one_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/builder/has_one.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/builder/singular_association_rb.html b/src/files/activerecord/lib/active_record/associations/builder/singular_association_rb.html index 513bbcd5fe..755a0bfa47 100644 --- a/src/files/activerecord/lib/active_record/associations/builder/singular_association_rb.html +++ b/src/files/activerecord/lib/active_record/associations/builder/singular_association_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/builder/singular_association.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/collection_association_rb.html b/src/files/activerecord/lib/active_record/associations/collection_association_rb.html index d58c76fbf3..49a7446ec8 100644 --- a/src/files/activerecord/lib/active_record/associations/collection_association_rb.html +++ b/src/files/activerecord/lib/active_record/associations/collection_association_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/collection_association.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/collection_proxy_rb.html b/src/files/activerecord/lib/active_record/associations/collection_proxy_rb.html index 39b649b151..85c83b137b 100644 --- a/src/files/activerecord/lib/active_record/associations/collection_proxy_rb.html +++ b/src/files/activerecord/lib/active_record/associations/collection_proxy_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/collection_proxy.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/disable_joins_association_scope_rb.html b/src/files/activerecord/lib/active_record/associations/disable_joins_association_scope_rb.html index 36c1703744..e68c8a0a6c 100644 --- a/src/files/activerecord/lib/active_record/associations/disable_joins_association_scope_rb.html +++ b/src/files/activerecord/lib/active_record/associations/disable_joins_association_scope_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/disable_joins_association_scope.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/foreign_association_rb.html b/src/files/activerecord/lib/active_record/associations/foreign_association_rb.html index d416e60bbf..72f339926b 100644 --- a/src/files/activerecord/lib/active_record/associations/foreign_association_rb.html +++ b/src/files/activerecord/lib/active_record/associations/foreign_association_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/foreign_association.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/has_many_association_rb.html b/src/files/activerecord/lib/active_record/associations/has_many_association_rb.html index 913750031c..bc8f840709 100644 --- a/src/files/activerecord/lib/active_record/associations/has_many_association_rb.html +++ b/src/files/activerecord/lib/active_record/associations/has_many_association_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/has_many_association.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/has_many_through_association_rb.html b/src/files/activerecord/lib/active_record/associations/has_many_through_association_rb.html index fc54e16271..17827dae24 100644 --- a/src/files/activerecord/lib/active_record/associations/has_many_through_association_rb.html +++ b/src/files/activerecord/lib/active_record/associations/has_many_through_association_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/has_many_through_association.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/has_one_association_rb.html b/src/files/activerecord/lib/active_record/associations/has_one_association_rb.html index 69d1b04c64..60388c3acc 100644 --- a/src/files/activerecord/lib/active_record/associations/has_one_association_rb.html +++ b/src/files/activerecord/lib/active_record/associations/has_one_association_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/has_one_association.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/has_one_through_association_rb.html b/src/files/activerecord/lib/active_record/associations/has_one_through_association_rb.html index 1ea9fec469..04a531956f 100644 --- a/src/files/activerecord/lib/active_record/associations/has_one_through_association_rb.html +++ b/src/files/activerecord/lib/active_record/associations/has_one_through_association_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/has_one_through_association.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/join_dependency/join_association_rb.html b/src/files/activerecord/lib/active_record/associations/join_dependency/join_association_rb.html index 40c92142be..863051aaa3 100644 --- a/src/files/activerecord/lib/active_record/associations/join_dependency/join_association_rb.html +++ b/src/files/activerecord/lib/active_record/associations/join_dependency/join_association_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/join_dependency/join_association.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/join_dependency/join_base_rb.html b/src/files/activerecord/lib/active_record/associations/join_dependency/join_base_rb.html index b55384513e..2132d77623 100644 --- a/src/files/activerecord/lib/active_record/associations/join_dependency/join_base_rb.html +++ b/src/files/activerecord/lib/active_record/associations/join_dependency/join_base_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/join_dependency/join_base.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/join_dependency/join_part_rb.html b/src/files/activerecord/lib/active_record/associations/join_dependency/join_part_rb.html index f0109155a0..a0f37ceafd 100644 --- a/src/files/activerecord/lib/active_record/associations/join_dependency/join_part_rb.html +++ b/src/files/activerecord/lib/active_record/associations/join_dependency/join_part_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/join_dependency/join_part.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/join_dependency_rb.html b/src/files/activerecord/lib/active_record/associations/join_dependency_rb.html index 26887c7ff9..8059b64b6c 100644 --- a/src/files/activerecord/lib/active_record/associations/join_dependency_rb.html +++ b/src/files/activerecord/lib/active_record/associations/join_dependency_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/join_dependency.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/preloader/association_rb.html b/src/files/activerecord/lib/active_record/associations/preloader/association_rb.html index 32d8041d24..0d45eef797 100644 --- a/src/files/activerecord/lib/active_record/associations/preloader/association_rb.html +++ b/src/files/activerecord/lib/active_record/associations/preloader/association_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/preloader/association.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/preloader/batch_rb.html b/src/files/activerecord/lib/active_record/associations/preloader/batch_rb.html index cbbb89dd77..e5142b4c0f 100644 --- a/src/files/activerecord/lib/active_record/associations/preloader/batch_rb.html +++ b/src/files/activerecord/lib/active_record/associations/preloader/batch_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/preloader/batch.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/preloader/branch_rb.html b/src/files/activerecord/lib/active_record/associations/preloader/branch_rb.html index 7cefc2df28..fc754cf115 100644 --- a/src/files/activerecord/lib/active_record/associations/preloader/branch_rb.html +++ b/src/files/activerecord/lib/active_record/associations/preloader/branch_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/preloader/branch.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/preloader/through_association_rb.html b/src/files/activerecord/lib/active_record/associations/preloader/through_association_rb.html index a0de25b216..6b2766b5a4 100644 --- a/src/files/activerecord/lib/active_record/associations/preloader/through_association_rb.html +++ b/src/files/activerecord/lib/active_record/associations/preloader/through_association_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/preloader/through_association.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/preloader_rb.html b/src/files/activerecord/lib/active_record/associations/preloader_rb.html index 82b3665a8b..ef3bc232a9 100644 --- a/src/files/activerecord/lib/active_record/associations/preloader_rb.html +++ b/src/files/activerecord/lib/active_record/associations/preloader_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/preloader.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/singular_association_rb.html b/src/files/activerecord/lib/active_record/associations/singular_association_rb.html index 6662ce0c48..6006963ed7 100644 --- a/src/files/activerecord/lib/active_record/associations/singular_association_rb.html +++ b/src/files/activerecord/lib/active_record/associations/singular_association_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/singular_association.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations/through_association_rb.html b/src/files/activerecord/lib/active_record/associations/through_association_rb.html index bf3e570171..63daac1988 100644 --- a/src/files/activerecord/lib/active_record/associations/through_association_rb.html +++ b/src/files/activerecord/lib/active_record/associations/through_association_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations/through_association.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/associations_rb.html b/src/files/activerecord/lib/active_record/associations_rb.html index 8dbbf4ab4e..c10ee16d19 100644 --- a/src/files/activerecord/lib/active_record/associations_rb.html +++ b/src/files/activerecord/lib/active_record/associations_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/associations.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/asynchronous_queries_tracker_rb.html b/src/files/activerecord/lib/active_record/asynchronous_queries_tracker_rb.html index 54318c42a1..c98ff571e9 100644 --- a/src/files/activerecord/lib/active_record/asynchronous_queries_tracker_rb.html +++ b/src/files/activerecord/lib/active_record/asynchronous_queries_tracker_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/asynchronous_queries_tracker.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/attribute_assignment_rb.html b/src/files/activerecord/lib/active_record/attribute_assignment_rb.html index 4c1b97afb0..a75354a7db 100644 --- a/src/files/activerecord/lib/active_record/attribute_assignment_rb.html +++ b/src/files/activerecord/lib/active_record/attribute_assignment_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/attribute_assignment.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/attribute_decorators_rb.html b/src/files/activerecord/lib/active_record/attribute_decorators_rb.html deleted file mode 100644 index 19ad7d4c56..0000000000 --- a/src/files/activerecord/lib/active_record/attribute_decorators_rb.html +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: attribute_decorators.rb -layout: default ---- -
    - - -
    -
    - - - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activerecord/lib/active_record/attribute_methods/before_type_cast_rb.html b/src/files/activerecord/lib/active_record/attribute_methods/before_type_cast_rb.html index 9b900fc5a5..5a5f11b5e0 100644 --- a/src/files/activerecord/lib/active_record/attribute_methods/before_type_cast_rb.html +++ b/src/files/activerecord/lib/active_record/attribute_methods/before_type_cast_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/attribute_methods/before_type_cast.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/attribute_methods/dirty_rb.html b/src/files/activerecord/lib/active_record/attribute_methods/dirty_rb.html index 041e348a71..a637fb4a48 100644 --- a/src/files/activerecord/lib/active_record/attribute_methods/dirty_rb.html +++ b/src/files/activerecord/lib/active_record/attribute_methods/dirty_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/attribute_methods/dirty.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/attribute_methods/primary_key_rb.html b/src/files/activerecord/lib/active_record/attribute_methods/primary_key_rb.html index 5df34b8315..e11835a247 100644 --- a/src/files/activerecord/lib/active_record/attribute_methods/primary_key_rb.html +++ b/src/files/activerecord/lib/active_record/attribute_methods/primary_key_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/attribute_methods/primary_key.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/attribute_methods/query_rb.html b/src/files/activerecord/lib/active_record/attribute_methods/query_rb.html index f95713902b..e931fe0daa 100644 --- a/src/files/activerecord/lib/active_record/attribute_methods/query_rb.html +++ b/src/files/activerecord/lib/active_record/attribute_methods/query_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/attribute_methods/query.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/attribute_methods/read_rb.html b/src/files/activerecord/lib/active_record/attribute_methods/read_rb.html index 2ebad20b0a..9a70d0ea1f 100644 --- a/src/files/activerecord/lib/active_record/attribute_methods/read_rb.html +++ b/src/files/activerecord/lib/active_record/attribute_methods/read_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/attribute_methods/read.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/attribute_methods/serialization_rb.html b/src/files/activerecord/lib/active_record/attribute_methods/serialization_rb.html index f2bf96c280..eba7a43e87 100644 --- a/src/files/activerecord/lib/active_record/attribute_methods/serialization_rb.html +++ b/src/files/activerecord/lib/active_record/attribute_methods/serialization_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/attribute_methods/serialization.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/attribute_methods/time_zone_conversion_rb.html b/src/files/activerecord/lib/active_record/attribute_methods/time_zone_conversion_rb.html index 670a0028c4..b765bc444d 100644 --- a/src/files/activerecord/lib/active_record/attribute_methods/time_zone_conversion_rb.html +++ b/src/files/activerecord/lib/active_record/attribute_methods/time_zone_conversion_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/attribute_methods/write_rb.html b/src/files/activerecord/lib/active_record/attribute_methods/write_rb.html index acbd1922e3..43c6e4f441 100644 --- a/src/files/activerecord/lib/active_record/attribute_methods/write_rb.html +++ b/src/files/activerecord/lib/active_record/attribute_methods/write_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/attribute_methods/write.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/attribute_methods_rb.html b/src/files/activerecord/lib/active_record/attribute_methods_rb.html index 6058775365..c8b40f99ef 100644 --- a/src/files/activerecord/lib/active_record/attribute_methods_rb.html +++ b/src/files/activerecord/lib/active_record/attribute_methods_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/attribute_methods.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/attributes_rb.html b/src/files/activerecord/lib/active_record/attributes_rb.html index 7b2e9f3aef..c39cd53142 100644 --- a/src/files/activerecord/lib/active_record/attributes_rb.html +++ b/src/files/activerecord/lib/active_record/attributes_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/attributes.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/autosave_association_rb.html b/src/files/activerecord/lib/active_record/autosave_association_rb.html index d6b64d167c..b5b3abc0c8 100644 --- a/src/files/activerecord/lib/active_record/autosave_association_rb.html +++ b/src/files/activerecord/lib/active_record/autosave_association_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/autosave_association.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/base_rb.html b/src/files/activerecord/lib/active_record/base_rb.html index 3f9077e9a2..1e58c752c7 100644 --- a/src/files/activerecord/lib/active_record/base_rb.html +++ b/src/files/activerecord/lib/active_record/base_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/base.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/callbacks_rb.html b/src/files/activerecord/lib/active_record/callbacks_rb.html index 99cb75da5f..4ca73fc2bb 100644 --- a/src/files/activerecord/lib/active_record/callbacks_rb.html +++ b/src/files/activerecord/lib/active_record/callbacks_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/callbacks.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/coders/column_serializer_rb.html b/src/files/activerecord/lib/active_record/coders/column_serializer_rb.html index 94e3b5fdb2..aff0d63e5d 100644 --- a/src/files/activerecord/lib/active_record/coders/column_serializer_rb.html +++ b/src/files/activerecord/lib/active_record/coders/column_serializer_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/coders/column_serializer.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/coders/json_rb.html b/src/files/activerecord/lib/active_record/coders/json_rb.html index c8974c2e25..32d51eedc5 100644 --- a/src/files/activerecord/lib/active_record/coders/json_rb.html +++ b/src/files/activerecord/lib/active_record/coders/json_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/coders/json.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/coders/yaml_column_rb.html b/src/files/activerecord/lib/active_record/coders/yaml_column_rb.html index 5f644709c0..29d5bff8ac 100644 --- a/src/files/activerecord/lib/active_record/coders/yaml_column_rb.html +++ b/src/files/activerecord/lib/active_record/coders/yaml_column_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/coders/yaml_column.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/collection_cache_key_rb.html b/src/files/activerecord/lib/active_record/collection_cache_key_rb.html deleted file mode 100644 index ea76735926..0000000000 --- a/src/files/activerecord/lib/active_record/collection_cache_key_rb.html +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: collection_cache_key.rb -layout: default ---- -
    - - -
    -
    - - - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activerecord/lib/active_record/connection_adapters/abstract/connection_handler_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/abstract/connection_handler_rb.html index eb95fd77ff..8332f715c5 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/abstract/connection_handler_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/abstract/connection_handler_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue_rb.html index 1f9c5b52b9..6783e48e0b 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/abstract/connection_pool/queue.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/abstract/connection_pool/reaper_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/abstract/connection_pool/reaper_rb.html index 8d4241aa2c..aac9369f0c 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/abstract/connection_pool/reaper_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/abstract/connection_pool/reaper_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/abstract/connection_pool/reaper.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/abstract/connection_pool_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/abstract/connection_pool_rb.html index 208749dd5b..daa475b1a2 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/abstract/connection_pool_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/abstract/connection_pool_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/abstract/database_limits_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/abstract/database_limits_rb.html index 9a0db85d11..3545176c83 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/abstract/database_limits_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/abstract/database_limits_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/abstract/database_statements_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/abstract/database_statements_rb.html index dd7c9bd0d9..b1cc2a4fea 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/abstract/database_statements_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/abstract/database_statements_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/abstract/query_cache_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/abstract/query_cache_rb.html index cb4e5c209a..4090168857 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/abstract/query_cache_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/abstract/query_cache_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/abstract/quoting_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/abstract/quoting_rb.html index fcf864a28e..591a93c1d3 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/abstract/quoting_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/abstract/quoting_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/abstract/quoting.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/abstract/savepoints_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/abstract/savepoints_rb.html index 6fefdce64d..289692f36b 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/abstract/savepoints_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/abstract/savepoints_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/abstract/savepoints.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/abstract/schema_creation_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/abstract/schema_creation_rb.html index 4728bd722c..d04fc3b8c9 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/abstract/schema_creation_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/abstract/schema_creation_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/abstract/schema_creation.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions_rb.html index ba0bf23c41..728254823c 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/abstract/schema_dumper_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/abstract/schema_dumper_rb.html index cd14e87db2..8feadc7516 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/abstract/schema_dumper_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/abstract/schema_dumper_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/abstract/schema_dumper.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/abstract/schema_statements_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/abstract/schema_statements_rb.html index 3b88013358..50bdd1e475 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/abstract/schema_statements_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/abstract/schema_statements_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/abstract/transaction_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/abstract/transaction_rb.html index 295b7a280e..4562ffa3cc 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/abstract/transaction_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/abstract/transaction_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/abstract/transaction.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/abstract_adapter_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/abstract_adapter_rb.html index 719d918e31..7412765045 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/abstract_adapter_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/abstract_adapter_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/abstract_adapter.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter_rb.html index d30b4bfda7..746de29289 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/column_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/column_rb.html index 6790f263e8..e06cb3382a 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/column_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/column_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/column.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/connection_specification_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/connection_specification_rb.html deleted file mode 100644 index d7729bb1bd..0000000000 --- a/src/files/activerecord/lib/active_record/connection_adapters/connection_specification_rb.html +++ /dev/null @@ -1,80 +0,0 @@ ---- -title: connection_specification.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • uri
    • - -
    - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activerecord/lib/active_record/connection_adapters/deduplicable_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/deduplicable_rb.html index 2e36948269..e9efab2716 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/deduplicable_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/deduplicable_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/deduplicable.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/determine_if_preparable_visitor_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/determine_if_preparable_visitor_rb.html deleted file mode 100644 index 6ca8f7666b..0000000000 --- a/src/files/activerecord/lib/active_record/connection_adapters/determine_if_preparable_visitor_rb.html +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: determine_if_preparable_visitor.rb -layout: default ---- -
    - - -
    -
    - - - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activerecord/lib/active_record/connection_adapters/legacy_pool_manager_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/legacy_pool_manager_rb.html deleted file mode 100644 index 8e9ec8c0d2..0000000000 --- a/src/files/activerecord/lib/active_record/connection_adapters/legacy_pool_manager_rb.html +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: legacy_pool_manager.rb -layout: default ---- -
    - - -
    -
    - - - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activerecord/lib/active_record/connection_adapters/mysql/column_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/mysql/column_rb.html index 75cac5c6f0..bd8f76147c 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/mysql/column_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/mysql/column_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/mysql/column.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/mysql/database_statements_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/mysql/database_statements_rb.html index ded6143877..567ddc139a 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/mysql/database_statements_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/mysql/database_statements_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/mysql/database_statements.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/mysql/explain_pretty_printer_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/mysql/explain_pretty_printer_rb.html index 83a2b3b335..a8d0ff9bae 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/mysql/explain_pretty_printer_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/mysql/explain_pretty_printer_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/mysql/explain_pretty_printer.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/mysql/quoting_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/mysql/quoting_rb.html index c72d87b9c8..4f5e276441 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/mysql/quoting_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/mysql/quoting_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/mysql/quoting.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/mysql/schema_creation_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/mysql/schema_creation_rb.html index cfd18f4f34..b9bef81ba7 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/mysql/schema_creation_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/mysql/schema_creation_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/mysql/schema_creation.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/mysql/schema_definitions_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/mysql/schema_definitions_rb.html index fb6d55624d..ef3048e847 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/mysql/schema_definitions_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/mysql/schema_definitions_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/mysql/schema_dumper_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/mysql/schema_dumper_rb.html index cba6986db0..136971da4e 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/mysql/schema_dumper_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/mysql/schema_dumper_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/mysql/schema_dumper.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/mysql/schema_statements_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/mysql/schema_statements_rb.html index 9a3c8d652e..180cc83544 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/mysql/schema_statements_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/mysql/schema_statements_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/mysql/schema_statements.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/mysql/type_metadata_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/mysql/type_metadata_rb.html index 606764414d..55f0547113 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/mysql/type_metadata_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/mysql/type_metadata_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/mysql/type_metadata.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/mysql2/database_statements_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/mysql2/database_statements_rb.html index 99f14a577a..8ac49c5d3d 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/mysql2/database_statements_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/mysql2/database_statements_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/mysql2/database_statements.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/mysql2_adapter_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/mysql2_adapter_rb.html index 7e5089a04d..ce0b9c4fcd 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/mysql2_adapter_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/mysql2_adapter_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/pool_config_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/pool_config_rb.html index 703384b064..e02aa38594 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/pool_config_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/pool_config_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/pool_config.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/pool_manager_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/pool_manager_rb.html index 6a0abe97c6..7cdfe4e3dc 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/pool_manager_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/pool_manager_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/pool_manager.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/column_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/column_rb.html index 339ced8a77..ec652f8542 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/column_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/column_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/column.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/database_statements_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/database_statements_rb.html index 2c7b2ba948..208756be01 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/database_statements_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/database_statements_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/explain_pretty_printer_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/explain_pretty_printer_rb.html index 166b0c08a3..d251bed0c9 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/explain_pretty_printer_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/explain_pretty_printer_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/explain_pretty_printer.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/array_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/array_rb.html index 7b9d754674..6ecbd0d116 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/array_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/array_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/oid/array.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/bit_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/bit_rb.html index 06d37303b2..dc04127906 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/bit_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/bit_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/bit_varying_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/bit_varying_rb.html index d1c3f4f76d..419e06451a 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/bit_varying_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/bit_varying_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/oid/bit_varying.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/bytea_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/bytea_rb.html index 023417c677..1b216596ce 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/bytea_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/bytea_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/oid/bytea.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/cidr_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/cidr_rb.html index 547f0d3529..1f227cdd2d 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/cidr_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/cidr_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/oid/cidr.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/date_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/date_rb.html index 3a75f3b844..d5abbb1ba6 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/date_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/date_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/oid/date.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/date_time_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/date_time_rb.html index 92a6ac8216..c87c2d93b7 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/date_time_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/date_time_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/oid/date_time.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/decimal_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/decimal_rb.html index 545693ae28..29d6568171 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/decimal_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/decimal_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/oid/decimal.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/enum_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/enum_rb.html index fd50fba5b1..b63d9ec2fd 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/enum_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/enum_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/oid/enum.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/hstore_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/hstore_rb.html index 2adac1e583..5d6b481eb6 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/hstore_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/hstore_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/oid/hstore.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/inet_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/inet_rb.html index b118977aa8..9c30ef25d0 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/inet_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/inet_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/oid/inet.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/interval_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/interval_rb.html index 2da745e398..67af26bed0 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/interval_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/interval_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/oid/interval.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/jsonb_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/jsonb_rb.html index 1db3cb1a43..49ad1e6961 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/jsonb_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/jsonb_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/oid/jsonb.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/legacy_point_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/legacy_point_rb.html index 33a95fee03..20e7971730 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/legacy_point_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/legacy_point_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/oid/legacy_point.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/macaddr_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/macaddr_rb.html index b4a331b1aa..a111231ba0 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/macaddr_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/macaddr_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/oid/macaddr.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/money_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/money_rb.html index 688dec5c7d..dc30ee57e0 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/money_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/money_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/oid/money.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/oid_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/oid_rb.html index ead0c67df3..f607756c0d 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/oid_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/oid_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/oid/oid.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/point_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/point_rb.html index 5cb04066a2..a03a58d118 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/point_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/point_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/oid/point.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/range_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/range_rb.html index 4ed8dff571..bbc2b55c09 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/range_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/range_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/specialized_string_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/specialized_string_rb.html index 9971ade10c..df37f9589a 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/specialized_string_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/specialized_string_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/oid/specialized_string.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/timestamp_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/timestamp_rb.html index 09b5387b95..aec5affd6a 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/timestamp_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/timestamp_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/oid/timestamp.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/timestamp_with_time_zone_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/timestamp_with_time_zone_rb.html index 18ab48fc09..f5cde65be5 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/timestamp_with_time_zone_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/timestamp_with_time_zone_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/oid/timestamp_with_time_zone.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer_rb.html index 70b3d27ae3..f775e85c70 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/oid/type_map_initializer.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/uuid_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/uuid_rb.html index 2848da0157..e230f96825 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/uuid_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/uuid_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/oid/uuid.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/vector_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/vector_rb.html index becf2073e4..d686308f42 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/vector_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/vector_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/oid/vector.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/xml_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/xml_rb.html index a7386774e7..33a0188782 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/xml_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid/xml_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/oid/xml.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid_rb.html index c405b38111..bb1044fa17 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/oid_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/oid.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/quoting_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/quoting_rb.html index 45152b0cf4..349d78a779 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/quoting_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/quoting_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/referential_integrity_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/referential_integrity_rb.html index f5047ce4dc..f185b9ebe1 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/referential_integrity_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/referential_integrity_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/referential_integrity.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/schema_creation_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/schema_creation_rb.html index 47f01346b0..6d839e12ec 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/schema_creation_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/schema_creation_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/schema_creation.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions_rb.html index 6d49d0cce9..9ac2e660f1 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/schema_dumper_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/schema_dumper_rb.html index 935e351223..3c979315ef 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/schema_dumper_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/schema_dumper_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/schema_dumper.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements_rb.html index 50575b3eb2..b6d30f8c1b 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/type_metadata_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/type_metadata_rb.html index 76c87f5c06..73b785d0d9 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/type_metadata_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/type_metadata_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/type_metadata.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/utils_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/utils_rb.html index a70e17fecf..7079d47334 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql/utils_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql/utils_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql/utils.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/postgresql_adapter_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/postgresql_adapter_rb.html index 8e710dc409..f0303d52f9 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/postgresql_adapter_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/postgresql_adapter_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/schema_cache_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/schema_cache_rb.html index a02fd473ba..23e6a04856 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/schema_cache_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/schema_cache_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/schema_cache.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/sql_type_metadata_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/sql_type_metadata_rb.html index d8fe038594..c12e98f3dc 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/sql_type_metadata_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/sql_type_metadata_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/sql_type_metadata.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/column_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/column_rb.html index b3fc5ac895..d29003f92b 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/column_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/column_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/sqlite3/column.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/database_statements_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/database_statements_rb.html index 2fe4ae87af..1cd5e58cc9 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/database_statements_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/database_statements_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/sqlite3/database_statements.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/explain_pretty_printer_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/explain_pretty_printer_rb.html index 929f3bc10a..27594ecc1a 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/explain_pretty_printer_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/explain_pretty_printer_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/sqlite3/explain_pretty_printer.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/quoting_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/quoting_rb.html index cb7b71613c..811716c803 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/quoting_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/quoting_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/sqlite3/quoting.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/schema_creation_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/schema_creation_rb.html index f0f4d7fd16..ca38f5090c 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/schema_creation_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/schema_creation_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/sqlite3/schema_creation.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/schema_definitions_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/schema_definitions_rb.html index d639368af2..960de67786 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/schema_definitions_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/schema_definitions_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/sqlite3/schema_definitions.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/schema_dumper_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/schema_dumper_rb.html index 93051ec16d..93c72695b4 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/schema_dumper_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/schema_dumper_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/sqlite3/schema_dumper.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/schema_statements_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/schema_statements_rb.html index e0fb5aec6f..91d937098c 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/schema_statements_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/sqlite3/schema_statements_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/sqlite3/schema_statements.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/sqlite3_adapter_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/sqlite3_adapter_rb.html index 246d7e3974..415ca1a6f7 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/sqlite3_adapter_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/sqlite3_adapter_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/statement_pool_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/statement_pool_rb.html index 52ed11fab7..338b815b96 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/statement_pool_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/statement_pool_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/statement_pool.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/trilogy/database_statements_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/trilogy/database_statements_rb.html index 41728d05f7..e5511cb5be 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/trilogy/database_statements_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/trilogy/database_statements_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/trilogy/database_statements.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters/trilogy_adapter_rb.html b/src/files/activerecord/lib/active_record/connection_adapters/trilogy_adapter_rb.html index 95625085e8..6caa3d2697 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters/trilogy_adapter_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters/trilogy_adapter_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters/trilogy_adapter.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_adapters_rb.html b/src/files/activerecord/lib/active_record/connection_adapters_rb.html index 51185e11f8..6e030599b2 100644 --- a/src/files/activerecord/lib/active_record/connection_adapters_rb.html +++ b/src/files/activerecord/lib/active_record/connection_adapters_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_adapters.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/connection_handling_rb.html b/src/files/activerecord/lib/active_record/connection_handling_rb.html index f2c43bcd1b..52ab608170 100644 --- a/src/files/activerecord/lib/active_record/connection_handling_rb.html +++ b/src/files/activerecord/lib/active_record/connection_handling_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/connection_handling.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/core_rb.html b/src/files/activerecord/lib/active_record/core_rb.html index 9339a89671..24a1e968c1 100644 --- a/src/files/activerecord/lib/active_record/core_rb.html +++ b/src/files/activerecord/lib/active_record/core_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/core.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/counter_cache_rb.html b/src/files/activerecord/lib/active_record/counter_cache_rb.html index bda94204f8..565a960b29 100644 --- a/src/files/activerecord/lib/active_record/counter_cache_rb.html +++ b/src/files/activerecord/lib/active_record/counter_cache_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/counter_cache.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/database_configurations/connection_url_resolver_rb.html b/src/files/activerecord/lib/active_record/database_configurations/connection_url_resolver_rb.html index e4687d6888..36a980ce42 100644 --- a/src/files/activerecord/lib/active_record/database_configurations/connection_url_resolver_rb.html +++ b/src/files/activerecord/lib/active_record/database_configurations/connection_url_resolver_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/database_configurations/connection_url_resolver.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/database_configurations/database_config_rb.html b/src/files/activerecord/lib/active_record/database_configurations/database_config_rb.html index 2a01eb5b60..49090f30c5 100644 --- a/src/files/activerecord/lib/active_record/database_configurations/database_config_rb.html +++ b/src/files/activerecord/lib/active_record/database_configurations/database_config_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/database_configurations/database_config.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/database_configurations/hash_config_rb.html b/src/files/activerecord/lib/active_record/database_configurations/hash_config_rb.html index f8685ebecb..94f0085dea 100644 --- a/src/files/activerecord/lib/active_record/database_configurations/hash_config_rb.html +++ b/src/files/activerecord/lib/active_record/database_configurations/hash_config_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/database_configurations/hash_config.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/database_configurations/url_config_rb.html b/src/files/activerecord/lib/active_record/database_configurations/url_config_rb.html index 326322b7d7..b38bfbeb60 100644 --- a/src/files/activerecord/lib/active_record/database_configurations/url_config_rb.html +++ b/src/files/activerecord/lib/active_record/database_configurations/url_config_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/database_configurations/url_config.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/database_configurations_rb.html b/src/files/activerecord/lib/active_record/database_configurations_rb.html index 078590c0e4..9fc99d50b8 100644 --- a/src/files/activerecord/lib/active_record/database_configurations_rb.html +++ b/src/files/activerecord/lib/active_record/database_configurations_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/database_configurations.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/define_callbacks_rb.html b/src/files/activerecord/lib/active_record/define_callbacks_rb.html deleted file mode 100644 index d5a1c35ac0..0000000000 --- a/src/files/activerecord/lib/active_record/define_callbacks_rb.html +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: define_callbacks.rb -layout: default ---- -
    - - -
    -
    - - - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activerecord/lib/active_record/delegated_type_rb.html b/src/files/activerecord/lib/active_record/delegated_type_rb.html index d3b2815c72..33a280c4d6 100644 --- a/src/files/activerecord/lib/active_record/delegated_type_rb.html +++ b/src/files/activerecord/lib/active_record/delegated_type_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/delegated_type.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/deprecator_rb.html b/src/files/activerecord/lib/active_record/deprecator_rb.html index 78bd0a8429..da8a92d3ae 100644 --- a/src/files/activerecord/lib/active_record/deprecator_rb.html +++ b/src/files/activerecord/lib/active_record/deprecator_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/deprecator.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/destroy_association_async_job_rb.html b/src/files/activerecord/lib/active_record/destroy_association_async_job_rb.html index 75b47b94c4..e8eebe9585 100644 --- a/src/files/activerecord/lib/active_record/destroy_association_async_job_rb.html +++ b/src/files/activerecord/lib/active_record/destroy_association_async_job_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/destroy_association_async_job.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/disable_joins_association_relation_rb.html b/src/files/activerecord/lib/active_record/disable_joins_association_relation_rb.html index 20101ce55e..463b528cf7 100644 --- a/src/files/activerecord/lib/active_record/disable_joins_association_relation_rb.html +++ b/src/files/activerecord/lib/active_record/disable_joins_association_relation_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/disable_joins_association_relation.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/dynamic_matchers_rb.html b/src/files/activerecord/lib/active_record/dynamic_matchers_rb.html index bc16e0ee64..d78c8e050f 100644 --- a/src/files/activerecord/lib/active_record/dynamic_matchers_rb.html +++ b/src/files/activerecord/lib/active_record/dynamic_matchers_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/dynamic_matchers.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/encryption/auto_filtered_parameters_rb.html b/src/files/activerecord/lib/active_record/encryption/auto_filtered_parameters_rb.html index a0bdd207ed..602c6d70ea 100644 --- a/src/files/activerecord/lib/active_record/encryption/auto_filtered_parameters_rb.html +++ b/src/files/activerecord/lib/active_record/encryption/auto_filtered_parameters_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/encryption/auto_filtered_parameters.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/encryption/cipher/aes256_gcm_rb.html b/src/files/activerecord/lib/active_record/encryption/cipher/aes256_gcm_rb.html index 4e7dd57676..206ce28138 100644 --- a/src/files/activerecord/lib/active_record/encryption/cipher/aes256_gcm_rb.html +++ b/src/files/activerecord/lib/active_record/encryption/cipher/aes256_gcm_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/encryption/cipher/aes256_gcm.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/encryption/cipher_rb.html b/src/files/activerecord/lib/active_record/encryption/cipher_rb.html index 12cbb09222..b3c53cddff 100644 --- a/src/files/activerecord/lib/active_record/encryption/cipher_rb.html +++ b/src/files/activerecord/lib/active_record/encryption/cipher_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/encryption/cipher.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/encryption/config_rb.html b/src/files/activerecord/lib/active_record/encryption/config_rb.html index 598d3135fe..0738dc985c 100644 --- a/src/files/activerecord/lib/active_record/encryption/config_rb.html +++ b/src/files/activerecord/lib/active_record/encryption/config_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/encryption/config.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/encryption/configurable_rb.html b/src/files/activerecord/lib/active_record/encryption/configurable_rb.html index dc3ff60624..c38d57c30d 100644 --- a/src/files/activerecord/lib/active_record/encryption/configurable_rb.html +++ b/src/files/activerecord/lib/active_record/encryption/configurable_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/encryption/configurable.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/encryption/context_rb.html b/src/files/activerecord/lib/active_record/encryption/context_rb.html index 68f420c04a..f6a8c30e6a 100644 --- a/src/files/activerecord/lib/active_record/encryption/context_rb.html +++ b/src/files/activerecord/lib/active_record/encryption/context_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/encryption/context.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/encryption/contexts_rb.html b/src/files/activerecord/lib/active_record/encryption/contexts_rb.html index ab46b9d9f4..a340ca269b 100644 --- a/src/files/activerecord/lib/active_record/encryption/contexts_rb.html +++ b/src/files/activerecord/lib/active_record/encryption/contexts_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/encryption/contexts.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/encryption/derived_secret_key_provider_rb.html b/src/files/activerecord/lib/active_record/encryption/derived_secret_key_provider_rb.html index b39b8738ca..b2c2c5b022 100644 --- a/src/files/activerecord/lib/active_record/encryption/derived_secret_key_provider_rb.html +++ b/src/files/activerecord/lib/active_record/encryption/derived_secret_key_provider_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/encryption/derived_secret_key_provider.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/encryption/deterministic_key_provider_rb.html b/src/files/activerecord/lib/active_record/encryption/deterministic_key_provider_rb.html index 7ca0290196..2eb07124b8 100644 --- a/src/files/activerecord/lib/active_record/encryption/deterministic_key_provider_rb.html +++ b/src/files/activerecord/lib/active_record/encryption/deterministic_key_provider_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/encryption/deterministic_key_provider.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/encryption/encryptable_record_rb.html b/src/files/activerecord/lib/active_record/encryption/encryptable_record_rb.html index 9abee917c1..cf6f6bb139 100644 --- a/src/files/activerecord/lib/active_record/encryption/encryptable_record_rb.html +++ b/src/files/activerecord/lib/active_record/encryption/encryptable_record_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/encryption/encryptable_record.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/encryption/encrypted_attribute_type_rb.html b/src/files/activerecord/lib/active_record/encryption/encrypted_attribute_type_rb.html index 9bdd84bce5..2496c0341d 100644 --- a/src/files/activerecord/lib/active_record/encryption/encrypted_attribute_type_rb.html +++ b/src/files/activerecord/lib/active_record/encryption/encrypted_attribute_type_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/encryption/encrypted_attribute_type.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/encryption/encrypted_fixtures_rb.html b/src/files/activerecord/lib/active_record/encryption/encrypted_fixtures_rb.html index 0b0907ae12..7c0f174d35 100644 --- a/src/files/activerecord/lib/active_record/encryption/encrypted_fixtures_rb.html +++ b/src/files/activerecord/lib/active_record/encryption/encrypted_fixtures_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/encryption/encrypted_fixtures.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/encryption/encrypting_only_encryptor_rb.html b/src/files/activerecord/lib/active_record/encryption/encrypting_only_encryptor_rb.html index 317258ba18..c9248fe525 100644 --- a/src/files/activerecord/lib/active_record/encryption/encrypting_only_encryptor_rb.html +++ b/src/files/activerecord/lib/active_record/encryption/encrypting_only_encryptor_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/encryption/encrypting_only_encryptor.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/encryption/encryptor_rb.html b/src/files/activerecord/lib/active_record/encryption/encryptor_rb.html index 3f4126d0c7..5cf6702f5d 100644 --- a/src/files/activerecord/lib/active_record/encryption/encryptor_rb.html +++ b/src/files/activerecord/lib/active_record/encryption/encryptor_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/encryption/encryptor.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/encryption/envelope_encryption_key_provider_rb.html b/src/files/activerecord/lib/active_record/encryption/envelope_encryption_key_provider_rb.html index 45795f11a7..257df40517 100644 --- a/src/files/activerecord/lib/active_record/encryption/envelope_encryption_key_provider_rb.html +++ b/src/files/activerecord/lib/active_record/encryption/envelope_encryption_key_provider_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/encryption/envelope_encryption_key_provider.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/encryption/errors_rb.html b/src/files/activerecord/lib/active_record/encryption/errors_rb.html index ee96d06851..94ad89586e 100644 --- a/src/files/activerecord/lib/active_record/encryption/errors_rb.html +++ b/src/files/activerecord/lib/active_record/encryption/errors_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/encryption/errors.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/encryption/extended_deterministic_queries_rb.html b/src/files/activerecord/lib/active_record/encryption/extended_deterministic_queries_rb.html index 474df8425d..2690bf0f4d 100644 --- a/src/files/activerecord/lib/active_record/encryption/extended_deterministic_queries_rb.html +++ b/src/files/activerecord/lib/active_record/encryption/extended_deterministic_queries_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/encryption/extended_deterministic_queries.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/encryption/extended_deterministic_uniqueness_validator_rb.html b/src/files/activerecord/lib/active_record/encryption/extended_deterministic_uniqueness_validator_rb.html index e689cd9e53..fcc569c4e8 100644 --- a/src/files/activerecord/lib/active_record/encryption/extended_deterministic_uniqueness_validator_rb.html +++ b/src/files/activerecord/lib/active_record/encryption/extended_deterministic_uniqueness_validator_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/encryption/extended_deterministic_uniqueness_validator.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/encryption/key_generator_rb.html b/src/files/activerecord/lib/active_record/encryption/key_generator_rb.html index 0ea390966c..a9eb3e822d 100644 --- a/src/files/activerecord/lib/active_record/encryption/key_generator_rb.html +++ b/src/files/activerecord/lib/active_record/encryption/key_generator_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/encryption/key_generator.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/encryption/key_provider_rb.html b/src/files/activerecord/lib/active_record/encryption/key_provider_rb.html index b6b23b7be5..d04226857f 100644 --- a/src/files/activerecord/lib/active_record/encryption/key_provider_rb.html +++ b/src/files/activerecord/lib/active_record/encryption/key_provider_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/encryption/key_provider.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/encryption/key_rb.html b/src/files/activerecord/lib/active_record/encryption/key_rb.html index 30d4a5a7a5..f6458d2810 100644 --- a/src/files/activerecord/lib/active_record/encryption/key_rb.html +++ b/src/files/activerecord/lib/active_record/encryption/key_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/encryption/key.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/encryption/message_rb.html b/src/files/activerecord/lib/active_record/encryption/message_rb.html index 0790ef75c2..6c2f0dc373 100644 --- a/src/files/activerecord/lib/active_record/encryption/message_rb.html +++ b/src/files/activerecord/lib/active_record/encryption/message_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/encryption/message.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/encryption/message_serializer_rb.html b/src/files/activerecord/lib/active_record/encryption/message_serializer_rb.html index eb960f1bd8..bf3a939fab 100644 --- a/src/files/activerecord/lib/active_record/encryption/message_serializer_rb.html +++ b/src/files/activerecord/lib/active_record/encryption/message_serializer_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/encryption/message_serializer.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/encryption/null_encryptor_rb.html b/src/files/activerecord/lib/active_record/encryption/null_encryptor_rb.html index 4d28ced87d..4ba9165fd5 100644 --- a/src/files/activerecord/lib/active_record/encryption/null_encryptor_rb.html +++ b/src/files/activerecord/lib/active_record/encryption/null_encryptor_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/encryption/null_encryptor.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/encryption/properties_rb.html b/src/files/activerecord/lib/active_record/encryption/properties_rb.html index fbf8ff9789..c9e93b6994 100644 --- a/src/files/activerecord/lib/active_record/encryption/properties_rb.html +++ b/src/files/activerecord/lib/active_record/encryption/properties_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/encryption/properties.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/encryption/read_only_null_encryptor_rb.html b/src/files/activerecord/lib/active_record/encryption/read_only_null_encryptor_rb.html index c65147bcdf..671340e8f0 100644 --- a/src/files/activerecord/lib/active_record/encryption/read_only_null_encryptor_rb.html +++ b/src/files/activerecord/lib/active_record/encryption/read_only_null_encryptor_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/encryption/read_only_null_encryptor.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/encryption/scheme_rb.html b/src/files/activerecord/lib/active_record/encryption/scheme_rb.html index e8b8536290..e3faed4ec8 100644 --- a/src/files/activerecord/lib/active_record/encryption/scheme_rb.html +++ b/src/files/activerecord/lib/active_record/encryption/scheme_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/encryption/scheme.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/encryption_rb.html b/src/files/activerecord/lib/active_record/encryption_rb.html index 6acdbf65f0..f0ecba2b02 100644 --- a/src/files/activerecord/lib/active_record/encryption_rb.html +++ b/src/files/activerecord/lib/active_record/encryption_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/encryption.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/enum_rb.html b/src/files/activerecord/lib/active_record/enum_rb.html index 530c91f68d..3011ca1836 100644 --- a/src/files/activerecord/lib/active_record/enum_rb.html +++ b/src/files/activerecord/lib/active_record/enum_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/enum.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/errors_rb.html b/src/files/activerecord/lib/active_record/errors_rb.html index 3c0ff9acb3..696da578c5 100644 --- a/src/files/activerecord/lib/active_record/errors_rb.html +++ b/src/files/activerecord/lib/active_record/errors_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/errors.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/explain_rb.html b/src/files/activerecord/lib/active_record/explain_rb.html index ffb00de044..92eaf8d5ff 100644 --- a/src/files/activerecord/lib/active_record/explain_rb.html +++ b/src/files/activerecord/lib/active_record/explain_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/explain.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/explain_registry_rb.html b/src/files/activerecord/lib/active_record/explain_registry_rb.html index 8795b498f8..7c4d070511 100644 --- a/src/files/activerecord/lib/active_record/explain_registry_rb.html +++ b/src/files/activerecord/lib/active_record/explain_registry_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/explain_registry.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/explain_subscriber_rb.html b/src/files/activerecord/lib/active_record/explain_subscriber_rb.html index a6a8b5e5a5..87b43209cb 100644 --- a/src/files/activerecord/lib/active_record/explain_subscriber_rb.html +++ b/src/files/activerecord/lib/active_record/explain_subscriber_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/explain_subscriber.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/fixture_set/file_rb.html b/src/files/activerecord/lib/active_record/fixture_set/file_rb.html index 6e4a0dc0ab..64c2c3f822 100644 --- a/src/files/activerecord/lib/active_record/fixture_set/file_rb.html +++ b/src/files/activerecord/lib/active_record/fixture_set/file_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/fixture_set/file.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/fixture_set/model_metadata_rb.html b/src/files/activerecord/lib/active_record/fixture_set/model_metadata_rb.html index aa4f96a4b1..55eec44eb0 100644 --- a/src/files/activerecord/lib/active_record/fixture_set/model_metadata_rb.html +++ b/src/files/activerecord/lib/active_record/fixture_set/model_metadata_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/fixture_set/model_metadata.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/fixture_set/render_context_rb.html b/src/files/activerecord/lib/active_record/fixture_set/render_context_rb.html index ae2ecd3338..a992512c01 100644 --- a/src/files/activerecord/lib/active_record/fixture_set/render_context_rb.html +++ b/src/files/activerecord/lib/active_record/fixture_set/render_context_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/fixture_set/render_context.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/fixture_set/table_row_rb.html b/src/files/activerecord/lib/active_record/fixture_set/table_row_rb.html index e8ff090d09..4330ee7be2 100644 --- a/src/files/activerecord/lib/active_record/fixture_set/table_row_rb.html +++ b/src/files/activerecord/lib/active_record/fixture_set/table_row_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/fixture_set/table_row.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/fixture_set/table_rows_rb.html b/src/files/activerecord/lib/active_record/fixture_set/table_rows_rb.html index b202984fa5..a7b037e935 100644 --- a/src/files/activerecord/lib/active_record/fixture_set/table_rows_rb.html +++ b/src/files/activerecord/lib/active_record/fixture_set/table_rows_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/fixture_set/table_rows.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/fixtures_rb.html b/src/files/activerecord/lib/active_record/fixtures_rb.html index 2936738e00..20d4f70eb7 100644 --- a/src/files/activerecord/lib/active_record/fixtures_rb.html +++ b/src/files/activerecord/lib/active_record/fixtures_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/fixtures.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/future_result_rb.html b/src/files/activerecord/lib/active_record/future_result_rb.html index 081da0e62b..3331fc2277 100644 --- a/src/files/activerecord/lib/active_record/future_result_rb.html +++ b/src/files/activerecord/lib/active_record/future_result_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/future_result.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/gem_version_rb.html b/src/files/activerecord/lib/active_record/gem_version_rb.html index d8dcd3e970..86429f21ef 100644 --- a/src/files/activerecord/lib/active_record/gem_version_rb.html +++ b/src/files/activerecord/lib/active_record/gem_version_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/gem_version.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/inheritance_rb.html b/src/files/activerecord/lib/active_record/inheritance_rb.html index 0dd3ef7600..c012c72258 100644 --- a/src/files/activerecord/lib/active_record/inheritance_rb.html +++ b/src/files/activerecord/lib/active_record/inheritance_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/inheritance.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/insert_all_rb.html b/src/files/activerecord/lib/active_record/insert_all_rb.html index 4d8e9c4b3d..fe1cc5666c 100644 --- a/src/files/activerecord/lib/active_record/insert_all_rb.html +++ b/src/files/activerecord/lib/active_record/insert_all_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/insert_all.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/integration_rb.html b/src/files/activerecord/lib/active_record/integration_rb.html index f7ed6332a9..ae080714f6 100644 --- a/src/files/activerecord/lib/active_record/integration_rb.html +++ b/src/files/activerecord/lib/active_record/integration_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/integration.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/internal_metadata_rb.html b/src/files/activerecord/lib/active_record/internal_metadata_rb.html index 7be73c7e4e..2e3331e0b7 100644 --- a/src/files/activerecord/lib/active_record/internal_metadata_rb.html +++ b/src/files/activerecord/lib/active_record/internal_metadata_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/internal_metadata.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/legacy_yaml_adapter_rb.html b/src/files/activerecord/lib/active_record/legacy_yaml_adapter_rb.html index 2b958c2bbe..2a875d6b12 100644 --- a/src/files/activerecord/lib/active_record/legacy_yaml_adapter_rb.html +++ b/src/files/activerecord/lib/active_record/legacy_yaml_adapter_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/legacy_yaml_adapter.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/locking/optimistic_rb.html b/src/files/activerecord/lib/active_record/locking/optimistic_rb.html index 531b5b9402..5f1082cc47 100644 --- a/src/files/activerecord/lib/active_record/locking/optimistic_rb.html +++ b/src/files/activerecord/lib/active_record/locking/optimistic_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/locking/optimistic.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/locking/pessimistic_rb.html b/src/files/activerecord/lib/active_record/locking/pessimistic_rb.html index 49c2a016d4..12bf8fe354 100644 --- a/src/files/activerecord/lib/active_record/locking/pessimistic_rb.html +++ b/src/files/activerecord/lib/active_record/locking/pessimistic_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/locking/pessimistic.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/log_subscriber_rb.html b/src/files/activerecord/lib/active_record/log_subscriber_rb.html index dbf89f927c..ec87309b24 100644 --- a/src/files/activerecord/lib/active_record/log_subscriber_rb.html +++ b/src/files/activerecord/lib/active_record/log_subscriber_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/log_subscriber.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/marshalling_rb.html b/src/files/activerecord/lib/active_record/marshalling_rb.html index 327e111303..ae9ebe89d2 100644 --- a/src/files/activerecord/lib/active_record/marshalling_rb.html +++ b/src/files/activerecord/lib/active_record/marshalling_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/marshalling.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/message_pack_rb.html b/src/files/activerecord/lib/active_record/message_pack_rb.html index ddea0af7e2..6517f42a87 100644 --- a/src/files/activerecord/lib/active_record/message_pack_rb.html +++ b/src/files/activerecord/lib/active_record/message_pack_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/message_pack.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/middleware/database_selector/resolver/session_rb.html b/src/files/activerecord/lib/active_record/middleware/database_selector/resolver/session_rb.html index c78e41cb25..7f06f07490 100644 --- a/src/files/activerecord/lib/active_record/middleware/database_selector/resolver/session_rb.html +++ b/src/files/activerecord/lib/active_record/middleware/database_selector/resolver/session_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/middleware/database_selector/resolver/session.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/middleware/database_selector/resolver_rb.html b/src/files/activerecord/lib/active_record/middleware/database_selector/resolver_rb.html index d9a34c6e18..c11151a74d 100644 --- a/src/files/activerecord/lib/active_record/middleware/database_selector/resolver_rb.html +++ b/src/files/activerecord/lib/active_record/middleware/database_selector/resolver_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/middleware/database_selector/resolver.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/middleware/database_selector_rb.html b/src/files/activerecord/lib/active_record/middleware/database_selector_rb.html index 099b913988..af6d06e23d 100644 --- a/src/files/activerecord/lib/active_record/middleware/database_selector_rb.html +++ b/src/files/activerecord/lib/active_record/middleware/database_selector_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/middleware/database_selector.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/middleware/shard_selector_rb.html b/src/files/activerecord/lib/active_record/middleware/shard_selector_rb.html index 0093060e74..d23962a09c 100644 --- a/src/files/activerecord/lib/active_record/middleware/shard_selector_rb.html +++ b/src/files/activerecord/lib/active_record/middleware/shard_selector_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/middleware/shard_selector.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/migration/command_recorder_rb.html b/src/files/activerecord/lib/active_record/migration/command_recorder_rb.html index 34605b292d..a687fe0258 100644 --- a/src/files/activerecord/lib/active_record/migration/command_recorder_rb.html +++ b/src/files/activerecord/lib/active_record/migration/command_recorder_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/migration/command_recorder.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/migration/compatibility_rb.html b/src/files/activerecord/lib/active_record/migration/compatibility_rb.html index 88bd845349..8f950373fd 100644 --- a/src/files/activerecord/lib/active_record/migration/compatibility_rb.html +++ b/src/files/activerecord/lib/active_record/migration/compatibility_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/migration/compatibility.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/migration/default_strategy_rb.html b/src/files/activerecord/lib/active_record/migration/default_strategy_rb.html index 4cc89d6b5c..c5d5050555 100644 --- a/src/files/activerecord/lib/active_record/migration/default_strategy_rb.html +++ b/src/files/activerecord/lib/active_record/migration/default_strategy_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/migration/default_strategy.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/migration/execution_strategy_rb.html b/src/files/activerecord/lib/active_record/migration/execution_strategy_rb.html index ee62e92fbb..7b03899416 100644 --- a/src/files/activerecord/lib/active_record/migration/execution_strategy_rb.html +++ b/src/files/activerecord/lib/active_record/migration/execution_strategy_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/migration/execution_strategy.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/migration/join_table_rb.html b/src/files/activerecord/lib/active_record/migration/join_table_rb.html index 06ef8e5307..2f3de19a9f 100644 --- a/src/files/activerecord/lib/active_record/migration/join_table_rb.html +++ b/src/files/activerecord/lib/active_record/migration/join_table_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/migration/join_table.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/migration_rb.html b/src/files/activerecord/lib/active_record/migration_rb.html index 94350fbfe2..6d0e97d5bc 100644 --- a/src/files/activerecord/lib/active_record/migration_rb.html +++ b/src/files/activerecord/lib/active_record/migration_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/migration.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/model_schema_rb.html b/src/files/activerecord/lib/active_record/model_schema_rb.html index c74ec0c58f..7bcbe56f4e 100644 --- a/src/files/activerecord/lib/active_record/model_schema_rb.html +++ b/src/files/activerecord/lib/active_record/model_schema_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/model_schema.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/nested_attributes_rb.html b/src/files/activerecord/lib/active_record/nested_attributes_rb.html index c714f8cfc2..aee662b21f 100644 --- a/src/files/activerecord/lib/active_record/nested_attributes_rb.html +++ b/src/files/activerecord/lib/active_record/nested_attributes_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/nested_attributes.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/no_touching_rb.html b/src/files/activerecord/lib/active_record/no_touching_rb.html index 384b784be5..ac210acd75 100644 --- a/src/files/activerecord/lib/active_record/no_touching_rb.html +++ b/src/files/activerecord/lib/active_record/no_touching_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/no_touching.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/normalization_rb.html b/src/files/activerecord/lib/active_record/normalization_rb.html index 652ea61801..87727a8aa7 100644 --- a/src/files/activerecord/lib/active_record/normalization_rb.html +++ b/src/files/activerecord/lib/active_record/normalization_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/normalization.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/null_relation_rb.html b/src/files/activerecord/lib/active_record/null_relation_rb.html deleted file mode 100644 index 0e71a62e29..0000000000 --- a/src/files/activerecord/lib/active_record/null_relation_rb.html +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: null_relation.rb -layout: default ---- -
    - - -
    -
    - - - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activerecord/lib/active_record/persistence_rb.html b/src/files/activerecord/lib/active_record/persistence_rb.html index 4569fb9f5f..1ba8bf1c0c 100644 --- a/src/files/activerecord/lib/active_record/persistence_rb.html +++ b/src/files/activerecord/lib/active_record/persistence_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/persistence.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/promise_rb.html b/src/files/activerecord/lib/active_record/promise_rb.html index f031ee616d..ef37a03257 100644 --- a/src/files/activerecord/lib/active_record/promise_rb.html +++ b/src/files/activerecord/lib/active_record/promise_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/promise.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/query_cache_rb.html b/src/files/activerecord/lib/active_record/query_cache_rb.html index f006cb5522..8eda619d1c 100644 --- a/src/files/activerecord/lib/active_record/query_cache_rb.html +++ b/src/files/activerecord/lib/active_record/query_cache_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/query_cache.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/query_logs_formatter_rb.html b/src/files/activerecord/lib/active_record/query_logs_formatter_rb.html index d9c2e6a6c3..c0fa9979a2 100644 --- a/src/files/activerecord/lib/active_record/query_logs_formatter_rb.html +++ b/src/files/activerecord/lib/active_record/query_logs_formatter_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/query_logs_formatter.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/query_logs_rb.html b/src/files/activerecord/lib/active_record/query_logs_rb.html index 3841b95883..a95c58397f 100644 --- a/src/files/activerecord/lib/active_record/query_logs_rb.html +++ b/src/files/activerecord/lib/active_record/query_logs_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/query_logs.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/querying_rb.html b/src/files/activerecord/lib/active_record/querying_rb.html index 313945fd33..68e0d1d12d 100644 --- a/src/files/activerecord/lib/active_record/querying_rb.html +++ b/src/files/activerecord/lib/active_record/querying_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/querying.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/railtie_rb.html b/src/files/activerecord/lib/active_record/railtie_rb.html index 2216a2589b..edc73dc591 100644 --- a/src/files/activerecord/lib/active_record/railtie_rb.html +++ b/src/files/activerecord/lib/active_record/railtie_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/railtie.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/railties/collection_cache_association_loading_rb.html b/src/files/activerecord/lib/active_record/railties/collection_cache_association_loading_rb.html deleted file mode 100644 index 8fd482099f..0000000000 --- a/src/files/activerecord/lib/active_record/railties/collection_cache_association_loading_rb.html +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: collection_cache_association_loading.rb -layout: default ---- -
    - - -
    -
    - - - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activerecord/lib/active_record/railties/console_sandbox_rb.html b/src/files/activerecord/lib/active_record/railties/console_sandbox_rb.html index f01049582b..ee13b81562 100644 --- a/src/files/activerecord/lib/active_record/railties/console_sandbox_rb.html +++ b/src/files/activerecord/lib/active_record/railties/console_sandbox_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/railties/console_sandbox.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/railties/controller_runtime_rb.html b/src/files/activerecord/lib/active_record/railties/controller_runtime_rb.html index 0e5eb662a5..30d6a352ee 100644 --- a/src/files/activerecord/lib/active_record/railties/controller_runtime_rb.html +++ b/src/files/activerecord/lib/active_record/railties/controller_runtime_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/railties/controller_runtime.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/railties/job_runtime_rb.html b/src/files/activerecord/lib/active_record/railties/job_runtime_rb.html index 18b4feee58..a1177b2910 100644 --- a/src/files/activerecord/lib/active_record/railties/job_runtime_rb.html +++ b/src/files/activerecord/lib/active_record/railties/job_runtime_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/railties/job_runtime.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/readonly_attributes_rb.html b/src/files/activerecord/lib/active_record/readonly_attributes_rb.html index 25316984ca..34ab67bba4 100644 --- a/src/files/activerecord/lib/active_record/readonly_attributes_rb.html +++ b/src/files/activerecord/lib/active_record/readonly_attributes_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/readonly_attributes.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/reflection_rb.html b/src/files/activerecord/lib/active_record/reflection_rb.html index 8ae5c3115c..0d32809524 100644 --- a/src/files/activerecord/lib/active_record/reflection_rb.html +++ b/src/files/activerecord/lib/active_record/reflection_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/reflection.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/relation/batches/batch_enumerator_rb.html b/src/files/activerecord/lib/active_record/relation/batches/batch_enumerator_rb.html index f2b3f060f4..b217c1ca2f 100644 --- a/src/files/activerecord/lib/active_record/relation/batches/batch_enumerator_rb.html +++ b/src/files/activerecord/lib/active_record/relation/batches/batch_enumerator_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/relation/batches/batch_enumerator.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/relation/batches_rb.html b/src/files/activerecord/lib/active_record/relation/batches_rb.html index 0e878ddf56..861c696d5b 100644 --- a/src/files/activerecord/lib/active_record/relation/batches_rb.html +++ b/src/files/activerecord/lib/active_record/relation/batches_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/relation/batches.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/relation/calculations_rb.html b/src/files/activerecord/lib/active_record/relation/calculations_rb.html index 7626f44bf9..e2419b7392 100644 --- a/src/files/activerecord/lib/active_record/relation/calculations_rb.html +++ b/src/files/activerecord/lib/active_record/relation/calculations_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/relation/calculations.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/relation/delegation_rb.html b/src/files/activerecord/lib/active_record/relation/delegation_rb.html index 356501cfc3..5e677b2209 100644 --- a/src/files/activerecord/lib/active_record/relation/delegation_rb.html +++ b/src/files/activerecord/lib/active_record/relation/delegation_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/relation/delegation.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/relation/finder_methods_rb.html b/src/files/activerecord/lib/active_record/relation/finder_methods_rb.html index 9373e0c984..2ef343639b 100644 --- a/src/files/activerecord/lib/active_record/relation/finder_methods_rb.html +++ b/src/files/activerecord/lib/active_record/relation/finder_methods_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/relation/finder_methods.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/relation/from_clause_rb.html b/src/files/activerecord/lib/active_record/relation/from_clause_rb.html index bb245c1d3f..dff58ee9ac 100644 --- a/src/files/activerecord/lib/active_record/relation/from_clause_rb.html +++ b/src/files/activerecord/lib/active_record/relation/from_clause_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/relation/from_clause.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/relation/merger_rb.html b/src/files/activerecord/lib/active_record/relation/merger_rb.html index eb5968e337..2aa000dbe5 100644 --- a/src/files/activerecord/lib/active_record/relation/merger_rb.html +++ b/src/files/activerecord/lib/active_record/relation/merger_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/relation/merger.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/relation/predicate_builder/array_handler_rb.html b/src/files/activerecord/lib/active_record/relation/predicate_builder/array_handler_rb.html index 0502fecc3b..87dacd0718 100644 --- a/src/files/activerecord/lib/active_record/relation/predicate_builder/array_handler_rb.html +++ b/src/files/activerecord/lib/active_record/relation/predicate_builder/array_handler_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/relation/predicate_builder/array_handler.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/relation/predicate_builder/association_query_value_rb.html b/src/files/activerecord/lib/active_record/relation/predicate_builder/association_query_value_rb.html index 1702c38c18..d45358ad10 100644 --- a/src/files/activerecord/lib/active_record/relation/predicate_builder/association_query_value_rb.html +++ b/src/files/activerecord/lib/active_record/relation/predicate_builder/association_query_value_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/relation/predicate_builder/association_query_value.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/relation/predicate_builder/base_handler_rb.html b/src/files/activerecord/lib/active_record/relation/predicate_builder/base_handler_rb.html deleted file mode 100644 index 8066d1fa08..0000000000 --- a/src/files/activerecord/lib/active_record/relation/predicate_builder/base_handler_rb.html +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: base_handler.rb -layout: default ---- -
    - - -
    -
    - - - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activerecord/lib/active_record/relation/predicate_builder/basic_object_handler_rb.html b/src/files/activerecord/lib/active_record/relation/predicate_builder/basic_object_handler_rb.html index 9044bf256a..9439edc3f2 100644 --- a/src/files/activerecord/lib/active_record/relation/predicate_builder/basic_object_handler_rb.html +++ b/src/files/activerecord/lib/active_record/relation/predicate_builder/basic_object_handler_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/relation/predicate_builder/basic_object_handler.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/relation/predicate_builder/polymorphic_array_value_rb.html b/src/files/activerecord/lib/active_record/relation/predicate_builder/polymorphic_array_value_rb.html index 716eaa381b..5272a3ecd9 100644 --- a/src/files/activerecord/lib/active_record/relation/predicate_builder/polymorphic_array_value_rb.html +++ b/src/files/activerecord/lib/active_record/relation/predicate_builder/polymorphic_array_value_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/relation/predicate_builder/polymorphic_array_value.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/relation/predicate_builder/range_handler_rb.html b/src/files/activerecord/lib/active_record/relation/predicate_builder/range_handler_rb.html index 8cdc3c9793..9149cfc2ea 100644 --- a/src/files/activerecord/lib/active_record/relation/predicate_builder/range_handler_rb.html +++ b/src/files/activerecord/lib/active_record/relation/predicate_builder/range_handler_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/relation/predicate_builder/range_handler.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/relation/predicate_builder/relation_handler_rb.html b/src/files/activerecord/lib/active_record/relation/predicate_builder/relation_handler_rb.html index ca1fa08695..438a5cb293 100644 --- a/src/files/activerecord/lib/active_record/relation/predicate_builder/relation_handler_rb.html +++ b/src/files/activerecord/lib/active_record/relation/predicate_builder/relation_handler_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/relation/predicate_builder/relation_handler.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/relation/predicate_builder_rb.html b/src/files/activerecord/lib/active_record/relation/predicate_builder_rb.html index 2d912459f6..52e38fdd65 100644 --- a/src/files/activerecord/lib/active_record/relation/predicate_builder_rb.html +++ b/src/files/activerecord/lib/active_record/relation/predicate_builder_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/relation/predicate_builder.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/relation/query_attribute_rb.html b/src/files/activerecord/lib/active_record/relation/query_attribute_rb.html index 30a797fc81..924bfa9de8 100644 --- a/src/files/activerecord/lib/active_record/relation/query_attribute_rb.html +++ b/src/files/activerecord/lib/active_record/relation/query_attribute_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/relation/query_attribute.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/relation/query_methods_rb.html b/src/files/activerecord/lib/active_record/relation/query_methods_rb.html index 5a7222b79e..451d0af6bd 100644 --- a/src/files/activerecord/lib/active_record/relation/query_methods_rb.html +++ b/src/files/activerecord/lib/active_record/relation/query_methods_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/relation/query_methods.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/relation/record_fetch_warning_rb.html b/src/files/activerecord/lib/active_record/relation/record_fetch_warning_rb.html index de1a8ccd81..07941701c8 100644 --- a/src/files/activerecord/lib/active_record/relation/record_fetch_warning_rb.html +++ b/src/files/activerecord/lib/active_record/relation/record_fetch_warning_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/relation/record_fetch_warning.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/relation/spawn_methods_rb.html b/src/files/activerecord/lib/active_record/relation/spawn_methods_rb.html index bf631476ff..154ee93526 100644 --- a/src/files/activerecord/lib/active_record/relation/spawn_methods_rb.html +++ b/src/files/activerecord/lib/active_record/relation/spawn_methods_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/relation/spawn_methods.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/relation/where_clause_factory_rb.html b/src/files/activerecord/lib/active_record/relation/where_clause_factory_rb.html deleted file mode 100644 index f2477aeca5..0000000000 --- a/src/files/activerecord/lib/active_record/relation/where_clause_factory_rb.html +++ /dev/null @@ -1,77 +0,0 @@ ---- -title: where_clause_factory.rb -layout: default ---- -
    - - -
    -
    - - - - - - - - - -

    Namespace

    - - -

    Module

    - - - - -

    Class

    - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activerecord/lib/active_record/relation/where_clause_rb.html b/src/files/activerecord/lib/active_record/relation/where_clause_rb.html index ba5444b461..34790a58f1 100644 --- a/src/files/activerecord/lib/active_record/relation/where_clause_rb.html +++ b/src/files/activerecord/lib/active_record/relation/where_clause_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/relation/where_clause.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/relation_rb.html b/src/files/activerecord/lib/active_record/relation_rb.html index 1008f23844..aa917f013a 100644 --- a/src/files/activerecord/lib/active_record/relation_rb.html +++ b/src/files/activerecord/lib/active_record/relation_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/relation.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/result_rb.html b/src/files/activerecord/lib/active_record/result_rb.html index 16b6a0f463..eec51b3714 100644 --- a/src/files/activerecord/lib/active_record/result_rb.html +++ b/src/files/activerecord/lib/active_record/result_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/result.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/runtime_registry_rb.html b/src/files/activerecord/lib/active_record/runtime_registry_rb.html index 180fd51bdf..6681c37a97 100644 --- a/src/files/activerecord/lib/active_record/runtime_registry_rb.html +++ b/src/files/activerecord/lib/active_record/runtime_registry_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/runtime_registry.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/sanitization_rb.html b/src/files/activerecord/lib/active_record/sanitization_rb.html index 7e212d682d..fb24eab606 100644 --- a/src/files/activerecord/lib/active_record/sanitization_rb.html +++ b/src/files/activerecord/lib/active_record/sanitization_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/sanitization.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/schema_dumper_rb.html b/src/files/activerecord/lib/active_record/schema_dumper_rb.html index e9ab59dd3e..a280feb714 100644 --- a/src/files/activerecord/lib/active_record/schema_dumper_rb.html +++ b/src/files/activerecord/lib/active_record/schema_dumper_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/schema_dumper.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/schema_migration_rb.html b/src/files/activerecord/lib/active_record/schema_migration_rb.html index 492696f818..c4550e9db1 100644 --- a/src/files/activerecord/lib/active_record/schema_migration_rb.html +++ b/src/files/activerecord/lib/active_record/schema_migration_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/schema_migration.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/schema_rb.html b/src/files/activerecord/lib/active_record/schema_rb.html index ed0e43af06..e640b61852 100644 --- a/src/files/activerecord/lib/active_record/schema_rb.html +++ b/src/files/activerecord/lib/active_record/schema_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/schema.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/scoping/default_rb.html b/src/files/activerecord/lib/active_record/scoping/default_rb.html index 295111aeff..ad64caeed5 100644 --- a/src/files/activerecord/lib/active_record/scoping/default_rb.html +++ b/src/files/activerecord/lib/active_record/scoping/default_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/scoping/default.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/scoping/named_rb.html b/src/files/activerecord/lib/active_record/scoping/named_rb.html index 7f4c7066ec..21f4466178 100644 --- a/src/files/activerecord/lib/active_record/scoping/named_rb.html +++ b/src/files/activerecord/lib/active_record/scoping/named_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/scoping/named.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/scoping_rb.html b/src/files/activerecord/lib/active_record/scoping_rb.html index 94cea72ff7..e81cf40d30 100644 --- a/src/files/activerecord/lib/active_record/scoping_rb.html +++ b/src/files/activerecord/lib/active_record/scoping_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/scoping.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/secure_password_rb.html b/src/files/activerecord/lib/active_record/secure_password_rb.html index f53630a29a..b9508a849b 100644 --- a/src/files/activerecord/lib/active_record/secure_password_rb.html +++ b/src/files/activerecord/lib/active_record/secure_password_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/secure_password.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/secure_token_rb.html b/src/files/activerecord/lib/active_record/secure_token_rb.html index de048eac9a..5e9633220e 100644 --- a/src/files/activerecord/lib/active_record/secure_token_rb.html +++ b/src/files/activerecord/lib/active_record/secure_token_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/secure_token.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/serialization_rb.html b/src/files/activerecord/lib/active_record/serialization_rb.html index 490e88e4cd..4b835c1178 100644 --- a/src/files/activerecord/lib/active_record/serialization_rb.html +++ b/src/files/activerecord/lib/active_record/serialization_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/serialization.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/signed_id_rb.html b/src/files/activerecord/lib/active_record/signed_id_rb.html index e400251b73..d457e9b05e 100644 --- a/src/files/activerecord/lib/active_record/signed_id_rb.html +++ b/src/files/activerecord/lib/active_record/signed_id_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/signed_id.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/statement_cache_rb.html b/src/files/activerecord/lib/active_record/statement_cache_rb.html index 7b6b36bd93..d4f4d08f9b 100644 --- a/src/files/activerecord/lib/active_record/statement_cache_rb.html +++ b/src/files/activerecord/lib/active_record/statement_cache_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/statement_cache.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/store_rb.html b/src/files/activerecord/lib/active_record/store_rb.html index 7bc6da2908..60ada49f10 100644 --- a/src/files/activerecord/lib/active_record/store_rb.html +++ b/src/files/activerecord/lib/active_record/store_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/store.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/suppressor_rb.html b/src/files/activerecord/lib/active_record/suppressor_rb.html index ae91d0b710..e59777e9f6 100644 --- a/src/files/activerecord/lib/active_record/suppressor_rb.html +++ b/src/files/activerecord/lib/active_record/suppressor_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/suppressor.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/table_metadata_rb.html b/src/files/activerecord/lib/active_record/table_metadata_rb.html index 83e626b51b..cd14736b44 100644 --- a/src/files/activerecord/lib/active_record/table_metadata_rb.html +++ b/src/files/activerecord/lib/active_record/table_metadata_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/table_metadata.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/tasks/database_tasks_rb.html b/src/files/activerecord/lib/active_record/tasks/database_tasks_rb.html index 37a235873e..631aa92503 100644 --- a/src/files/activerecord/lib/active_record/tasks/database_tasks_rb.html +++ b/src/files/activerecord/lib/active_record/tasks/database_tasks_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/tasks/database_tasks.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/tasks/mysql_database_tasks_rb.html b/src/files/activerecord/lib/active_record/tasks/mysql_database_tasks_rb.html index 4df61d9e70..25120e7891 100644 --- a/src/files/activerecord/lib/active_record/tasks/mysql_database_tasks_rb.html +++ b/src/files/activerecord/lib/active_record/tasks/mysql_database_tasks_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/tasks/mysql_database_tasks.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/tasks/postgresql_database_tasks_rb.html b/src/files/activerecord/lib/active_record/tasks/postgresql_database_tasks_rb.html index ef9747c6ad..713846d04d 100644 --- a/src/files/activerecord/lib/active_record/tasks/postgresql_database_tasks_rb.html +++ b/src/files/activerecord/lib/active_record/tasks/postgresql_database_tasks_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/tasks/postgresql_database_tasks.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/tasks/sqlite_database_tasks_rb.html b/src/files/activerecord/lib/active_record/tasks/sqlite_database_tasks_rb.html index 750baa899a..d92148c49f 100644 --- a/src/files/activerecord/lib/active_record/tasks/sqlite_database_tasks_rb.html +++ b/src/files/activerecord/lib/active_record/tasks/sqlite_database_tasks_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/tasks/sqlite_database_tasks.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/test_databases_rb.html b/src/files/activerecord/lib/active_record/test_databases_rb.html index cc6e9651d8..29a4070d6c 100644 --- a/src/files/activerecord/lib/active_record/test_databases_rb.html +++ b/src/files/activerecord/lib/active_record/test_databases_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/test_databases.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/test_fixtures_rb.html b/src/files/activerecord/lib/active_record/test_fixtures_rb.html index 9c47031786..20e6305f7a 100644 --- a/src/files/activerecord/lib/active_record/test_fixtures_rb.html +++ b/src/files/activerecord/lib/active_record/test_fixtures_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/test_fixtures.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/timestamp_rb.html b/src/files/activerecord/lib/active_record/timestamp_rb.html index c221e718a0..306ea1253b 100644 --- a/src/files/activerecord/lib/active_record/timestamp_rb.html +++ b/src/files/activerecord/lib/active_record/timestamp_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/timestamp.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/token_for_rb.html b/src/files/activerecord/lib/active_record/token_for_rb.html index f86549f502..247ec7f028 100644 --- a/src/files/activerecord/lib/active_record/token_for_rb.html +++ b/src/files/activerecord/lib/active_record/token_for_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/token_for.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/touch_later_rb.html b/src/files/activerecord/lib/active_record/touch_later_rb.html index 412aa40f67..86ffa828aa 100644 --- a/src/files/activerecord/lib/active_record/touch_later_rb.html +++ b/src/files/activerecord/lib/active_record/touch_later_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/touch_later.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/transactions_rb.html b/src/files/activerecord/lib/active_record/transactions_rb.html index 66435032d4..760ba1ec7d 100644 --- a/src/files/activerecord/lib/active_record/transactions_rb.html +++ b/src/files/activerecord/lib/active_record/transactions_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/transactions.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/translation_rb.html b/src/files/activerecord/lib/active_record/translation_rb.html index 1c2df79625..ac5b849222 100644 --- a/src/files/activerecord/lib/active_record/translation_rb.html +++ b/src/files/activerecord/lib/active_record/translation_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/translation.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/type/adapter_specific_registry_rb.html b/src/files/activerecord/lib/active_record/type/adapter_specific_registry_rb.html index 8b6c961d7c..276d94a582 100644 --- a/src/files/activerecord/lib/active_record/type/adapter_specific_registry_rb.html +++ b/src/files/activerecord/lib/active_record/type/adapter_specific_registry_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/type/adapter_specific_registry.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/type/date_rb.html b/src/files/activerecord/lib/active_record/type/date_rb.html index 2337167365..2bcca54a85 100644 --- a/src/files/activerecord/lib/active_record/type/date_rb.html +++ b/src/files/activerecord/lib/active_record/type/date_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/type/date.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/type/date_time_rb.html b/src/files/activerecord/lib/active_record/type/date_time_rb.html index bf6a3170ac..7c82887809 100644 --- a/src/files/activerecord/lib/active_record/type/date_time_rb.html +++ b/src/files/activerecord/lib/active_record/type/date_time_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/type/date_time.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/type/decimal_without_scale_rb.html b/src/files/activerecord/lib/active_record/type/decimal_without_scale_rb.html index d5548d964b..24838105d9 100644 --- a/src/files/activerecord/lib/active_record/type/decimal_without_scale_rb.html +++ b/src/files/activerecord/lib/active_record/type/decimal_without_scale_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/type/decimal_without_scale.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/type/hash_lookup_type_map_rb.html b/src/files/activerecord/lib/active_record/type/hash_lookup_type_map_rb.html index b5d0e5f4b5..0352e3c1df 100644 --- a/src/files/activerecord/lib/active_record/type/hash_lookup_type_map_rb.html +++ b/src/files/activerecord/lib/active_record/type/hash_lookup_type_map_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/type/hash_lookup_type_map.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/type/internal/timezone_rb.html b/src/files/activerecord/lib/active_record/type/internal/timezone_rb.html index f280107c7e..1d9dce2325 100644 --- a/src/files/activerecord/lib/active_record/type/internal/timezone_rb.html +++ b/src/files/activerecord/lib/active_record/type/internal/timezone_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/type/internal/timezone.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/type/json_rb.html b/src/files/activerecord/lib/active_record/type/json_rb.html index 144d0f515c..58fcafba81 100644 --- a/src/files/activerecord/lib/active_record/type/json_rb.html +++ b/src/files/activerecord/lib/active_record/type/json_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/type/json.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/type/serialized_rb.html b/src/files/activerecord/lib/active_record/type/serialized_rb.html index 6ab669d651..b3a5c7623a 100644 --- a/src/files/activerecord/lib/active_record/type/serialized_rb.html +++ b/src/files/activerecord/lib/active_record/type/serialized_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/type/serialized.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/type/text_rb.html b/src/files/activerecord/lib/active_record/type/text_rb.html index cc8bdf75ee..04f4b15c27 100644 --- a/src/files/activerecord/lib/active_record/type/text_rb.html +++ b/src/files/activerecord/lib/active_record/type/text_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/type/text.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/type/time_rb.html b/src/files/activerecord/lib/active_record/type/time_rb.html index 73b3265e34..0add950c42 100644 --- a/src/files/activerecord/lib/active_record/type/time_rb.html +++ b/src/files/activerecord/lib/active_record/type/time_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/type/time.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/type/type_map_rb.html b/src/files/activerecord/lib/active_record/type/type_map_rb.html index 024caa3ab2..2f9aeb0a4b 100644 --- a/src/files/activerecord/lib/active_record/type/type_map_rb.html +++ b/src/files/activerecord/lib/active_record/type/type_map_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/type/type_map.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/type/unsigned_integer_rb.html b/src/files/activerecord/lib/active_record/type/unsigned_integer_rb.html index e15f0b199a..9681548277 100644 --- a/src/files/activerecord/lib/active_record/type/unsigned_integer_rb.html +++ b/src/files/activerecord/lib/active_record/type/unsigned_integer_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/type/unsigned_integer.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/type_caster/connection_rb.html b/src/files/activerecord/lib/active_record/type_caster/connection_rb.html index bcf58df06c..76d4aae5cd 100644 --- a/src/files/activerecord/lib/active_record/type_caster/connection_rb.html +++ b/src/files/activerecord/lib/active_record/type_caster/connection_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/type_caster/connection.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/type_caster/map_rb.html b/src/files/activerecord/lib/active_record/type_caster/map_rb.html index 1b83d5b832..fe1eae6897 100644 --- a/src/files/activerecord/lib/active_record/type_caster/map_rb.html +++ b/src/files/activerecord/lib/active_record/type_caster/map_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/type_caster/map.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/type_caster_rb.html b/src/files/activerecord/lib/active_record/type_caster_rb.html index 7ecf084b79..b2f04b78ea 100644 --- a/src/files/activerecord/lib/active_record/type_caster_rb.html +++ b/src/files/activerecord/lib/active_record/type_caster_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/type_caster.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/type_rb.html b/src/files/activerecord/lib/active_record/type_rb.html index 2cfbff8edb..d77e1ef1f0 100644 --- a/src/files/activerecord/lib/active_record/type_rb.html +++ b/src/files/activerecord/lib/active_record/type_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/type.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/validations/absence_rb.html b/src/files/activerecord/lib/active_record/validations/absence_rb.html index a561b99e72..ad39f9405d 100644 --- a/src/files/activerecord/lib/active_record/validations/absence_rb.html +++ b/src/files/activerecord/lib/active_record/validations/absence_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/validations/absence.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/validations/associated_rb.html b/src/files/activerecord/lib/active_record/validations/associated_rb.html index 3d7fe00be4..da62bdd965 100644 --- a/src/files/activerecord/lib/active_record/validations/associated_rb.html +++ b/src/files/activerecord/lib/active_record/validations/associated_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/validations/associated.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/validations/length_rb.html b/src/files/activerecord/lib/active_record/validations/length_rb.html index d4a315638d..3a61e2fa47 100644 --- a/src/files/activerecord/lib/active_record/validations/length_rb.html +++ b/src/files/activerecord/lib/active_record/validations/length_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/validations/length.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/validations/numericality_rb.html b/src/files/activerecord/lib/active_record/validations/numericality_rb.html index c3c53d08cd..787f35e945 100644 --- a/src/files/activerecord/lib/active_record/validations/numericality_rb.html +++ b/src/files/activerecord/lib/active_record/validations/numericality_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/validations/numericality.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/validations/presence_rb.html b/src/files/activerecord/lib/active_record/validations/presence_rb.html index 052519a7d7..f0e12313ea 100644 --- a/src/files/activerecord/lib/active_record/validations/presence_rb.html +++ b/src/files/activerecord/lib/active_record/validations/presence_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/validations/presence.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/validations/uniqueness_rb.html b/src/files/activerecord/lib/active_record/validations/uniqueness_rb.html index d111cf349e..971ad80cd1 100644 --- a/src/files/activerecord/lib/active_record/validations/uniqueness_rb.html +++ b/src/files/activerecord/lib/active_record/validations/uniqueness_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/validations/uniqueness.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/validations_rb.html b/src/files/activerecord/lib/active_record/validations_rb.html index f64567ecd3..d24653a546 100644 --- a/src/files/activerecord/lib/active_record/validations_rb.html +++ b/src/files/activerecord/lib/active_record/validations_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/validations.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record/version_rb.html b/src/files/activerecord/lib/active_record/version_rb.html index 177032d4d2..0d68721578 100644 --- a/src/files/activerecord/lib/active_record/version_rb.html +++ b/src/files/activerecord/lib/active_record/version_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record/version.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/active_record_rb.html b/src/files/activerecord/lib/active_record_rb.html index 3e7e1fe48a..ca42cbd123 100644 --- a/src/files/activerecord/lib/active_record_rb.html +++ b/src/files/activerecord/lib/active_record_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/active_record.rb + on GitHub +
  • diff --git a/src/files/activerecord/lib/arel_rb.html b/src/files/activerecord/lib/arel_rb.html index 4bf4fda1c5..e634c79c80 100644 --- a/src/files/activerecord/lib/arel_rb.html +++ b/src/files/activerecord/lib/arel_rb.html @@ -15,6 +15,8 @@

  • activerecord/lib/arel.rb + on GitHub +
  • diff --git a/src/files/activestorage/README_md.html b/src/files/activestorage/README_md.html index 873e59cd81..7739a05d04 100644 --- a/src/files/activestorage/README_md.html +++ b/src/files/activestorage/README_md.html @@ -15,6 +15,8 @@

  • activestorage/README.md + on GitHub +
  • diff --git a/src/files/activestorage/app/controllers/active_storage/base_controller_rb.html b/src/files/activestorage/app/controllers/active_storage/base_controller_rb.html index 79dba76f26..77ca6a68dd 100644 --- a/src/files/activestorage/app/controllers/active_storage/base_controller_rb.html +++ b/src/files/activestorage/app/controllers/active_storage/base_controller_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/controllers/active_storage/base_controller.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/controllers/active_storage/blobs/proxy_controller_rb.html b/src/files/activestorage/app/controllers/active_storage/blobs/proxy_controller_rb.html index aae71b7f0f..4753235994 100644 --- a/src/files/activestorage/app/controllers/active_storage/blobs/proxy_controller_rb.html +++ b/src/files/activestorage/app/controllers/active_storage/blobs/proxy_controller_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/controllers/active_storage/blobs/proxy_controller.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/controllers/active_storage/blobs/redirect_controller_rb.html b/src/files/activestorage/app/controllers/active_storage/blobs/redirect_controller_rb.html index 70bdda39dc..a547e7bfd3 100644 --- a/src/files/activestorage/app/controllers/active_storage/blobs/redirect_controller_rb.html +++ b/src/files/activestorage/app/controllers/active_storage/blobs/redirect_controller_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/controllers/active_storage/blobs/redirect_controller.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/controllers/active_storage/blobs_controller_rb.html b/src/files/activestorage/app/controllers/active_storage/blobs_controller_rb.html deleted file mode 100644 index cc70a0be80..0000000000 --- a/src/files/activestorage/app/controllers/active_storage/blobs_controller_rb.html +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: blobs_controller.rb -layout: default ---- -
    - - -
    -
    - -
    - -

    Take a signed permanent reference for a blob and turn it into an expiring service URL for download. Note: These URLs are publicly accessible. If you need to enforce access protection beyond the security-through-obscurity factor of the signed blob references, you'll need to implement your own authenticated redirection controller.

    - -
    - - - - - - - - - -

    Namespace

    - - -

    Module

    - - - - -

    Class

    - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activestorage/app/controllers/active_storage/direct_uploads_controller_rb.html b/src/files/activestorage/app/controllers/active_storage/direct_uploads_controller_rb.html index 430d688047..8f46a83ced 100644 --- a/src/files/activestorage/app/controllers/active_storage/direct_uploads_controller_rb.html +++ b/src/files/activestorage/app/controllers/active_storage/direct_uploads_controller_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/controllers/active_storage/direct_uploads_controller.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/controllers/active_storage/disk_controller_rb.html b/src/files/activestorage/app/controllers/active_storage/disk_controller_rb.html index 114934d1ed..a1f0021792 100644 --- a/src/files/activestorage/app/controllers/active_storage/disk_controller_rb.html +++ b/src/files/activestorage/app/controllers/active_storage/disk_controller_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/controllers/active_storage/disk_controller.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/controllers/active_storage/representations/base_controller_rb.html b/src/files/activestorage/app/controllers/active_storage/representations/base_controller_rb.html index bfcff5179f..2b2d376c7a 100644 --- a/src/files/activestorage/app/controllers/active_storage/representations/base_controller_rb.html +++ b/src/files/activestorage/app/controllers/active_storage/representations/base_controller_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/controllers/active_storage/representations/base_controller.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/controllers/active_storage/representations/proxy_controller_rb.html b/src/files/activestorage/app/controllers/active_storage/representations/proxy_controller_rb.html index 60196fe97d..3dc2a9b705 100644 --- a/src/files/activestorage/app/controllers/active_storage/representations/proxy_controller_rb.html +++ b/src/files/activestorage/app/controllers/active_storage/representations/proxy_controller_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/controllers/active_storage/representations/proxy_controller.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/controllers/active_storage/representations/redirect_controller_rb.html b/src/files/activestorage/app/controllers/active_storage/representations/redirect_controller_rb.html index 27705c7dc0..4f56e100cf 100644 --- a/src/files/activestorage/app/controllers/active_storage/representations/redirect_controller_rb.html +++ b/src/files/activestorage/app/controllers/active_storage/representations/redirect_controller_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/controllers/active_storage/representations/redirect_controller.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/controllers/active_storage/representations_controller_rb.html b/src/files/activestorage/app/controllers/active_storage/representations_controller_rb.html deleted file mode 100644 index 12bb66d079..0000000000 --- a/src/files/activestorage/app/controllers/active_storage/representations_controller_rb.html +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: representations_controller.rb -layout: default ---- -
    - - -
    -
    - -
    - -

    Take a signed permanent reference for a blob representation and turn it into an expiring service URL for download. Note: These URLs are publicly accessible. If you need to enforce access protection beyond the security-through-obscurity factor of the signed blob and variation reference, you'll need to implement your own authenticated redirection controller.

    - -
    - - - - - - - - - -

    Namespace

    - - -

    Module

    - - - - -

    Class

    - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activestorage/app/controllers/concerns/active_storage/disable_session_rb.html b/src/files/activestorage/app/controllers/concerns/active_storage/disable_session_rb.html index b1bf08f767..b85a07254e 100644 --- a/src/files/activestorage/app/controllers/concerns/active_storage/disable_session_rb.html +++ b/src/files/activestorage/app/controllers/concerns/active_storage/disable_session_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/controllers/concerns/active_storage/disable_session.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/controllers/concerns/active_storage/file_server_rb.html b/src/files/activestorage/app/controllers/concerns/active_storage/file_server_rb.html index 470c791a50..8fafe1ee2b 100644 --- a/src/files/activestorage/app/controllers/concerns/active_storage/file_server_rb.html +++ b/src/files/activestorage/app/controllers/concerns/active_storage/file_server_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/controllers/concerns/active_storage/file_server.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/controllers/concerns/active_storage/set_blob_rb.html b/src/files/activestorage/app/controllers/concerns/active_storage/set_blob_rb.html index c3d56086ac..a46369d300 100644 --- a/src/files/activestorage/app/controllers/concerns/active_storage/set_blob_rb.html +++ b/src/files/activestorage/app/controllers/concerns/active_storage/set_blob_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/controllers/concerns/active_storage/set_blob.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/controllers/concerns/active_storage/set_current_rb.html b/src/files/activestorage/app/controllers/concerns/active_storage/set_current_rb.html index 00c5d58c0c..9eab52c18e 100644 --- a/src/files/activestorage/app/controllers/concerns/active_storage/set_current_rb.html +++ b/src/files/activestorage/app/controllers/concerns/active_storage/set_current_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/controllers/concerns/active_storage/set_current.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/controllers/concerns/active_storage/set_headers_rb.html b/src/files/activestorage/app/controllers/concerns/active_storage/set_headers_rb.html deleted file mode 100644 index ea247ddbe5..0000000000 --- a/src/files/activestorage/app/controllers/concerns/active_storage/set_headers_rb.html +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: set_headers.rb -layout: default ---- -
    - - -
    -
    - - - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activestorage/app/controllers/concerns/active_storage/streaming_rb.html b/src/files/activestorage/app/controllers/concerns/active_storage/streaming_rb.html index 6bfaede5c3..805adfe3cb 100644 --- a/src/files/activestorage/app/controllers/concerns/active_storage/streaming_rb.html +++ b/src/files/activestorage/app/controllers/concerns/active_storage/streaming_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/controllers/concerns/active_storage/streaming.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/jobs/active_storage/analyze_job_rb.html b/src/files/activestorage/app/jobs/active_storage/analyze_job_rb.html index dc7edc52d6..d63804f5b9 100644 --- a/src/files/activestorage/app/jobs/active_storage/analyze_job_rb.html +++ b/src/files/activestorage/app/jobs/active_storage/analyze_job_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/jobs/active_storage/analyze_job.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/jobs/active_storage/base_job_rb.html b/src/files/activestorage/app/jobs/active_storage/base_job_rb.html index 0a4639d98c..f8835d62b0 100644 --- a/src/files/activestorage/app/jobs/active_storage/base_job_rb.html +++ b/src/files/activestorage/app/jobs/active_storage/base_job_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/jobs/active_storage/base_job.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/jobs/active_storage/mirror_job_rb.html b/src/files/activestorage/app/jobs/active_storage/mirror_job_rb.html index e8f523fad7..dec4071959 100644 --- a/src/files/activestorage/app/jobs/active_storage/mirror_job_rb.html +++ b/src/files/activestorage/app/jobs/active_storage/mirror_job_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/jobs/active_storage/mirror_job.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/jobs/active_storage/purge_job_rb.html b/src/files/activestorage/app/jobs/active_storage/purge_job_rb.html index b5ef725f48..3bfecaaec9 100644 --- a/src/files/activestorage/app/jobs/active_storage/purge_job_rb.html +++ b/src/files/activestorage/app/jobs/active_storage/purge_job_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/jobs/active_storage/purge_job.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/jobs/active_storage/transform_job_rb.html b/src/files/activestorage/app/jobs/active_storage/transform_job_rb.html index 9309f23e7d..9c53e2170c 100644 --- a/src/files/activestorage/app/jobs/active_storage/transform_job_rb.html +++ b/src/files/activestorage/app/jobs/active_storage/transform_job_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/jobs/active_storage/transform_job.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/models/active_storage/attachment_rb.html b/src/files/activestorage/app/models/active_storage/attachment_rb.html index 38dc2bdb98..0312a33455 100644 --- a/src/files/activestorage/app/models/active_storage/attachment_rb.html +++ b/src/files/activestorage/app/models/active_storage/attachment_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/models/active_storage/attachment.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/models/active_storage/blob/analyzable_rb.html b/src/files/activestorage/app/models/active_storage/blob/analyzable_rb.html index db6ecc52d7..4a34b133b0 100644 --- a/src/files/activestorage/app/models/active_storage/blob/analyzable_rb.html +++ b/src/files/activestorage/app/models/active_storage/blob/analyzable_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/models/active_storage/blob/analyzable.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/models/active_storage/blob/identifiable_rb.html b/src/files/activestorage/app/models/active_storage/blob/identifiable_rb.html index a4f2a0c7f3..2e4fa6cb92 100644 --- a/src/files/activestorage/app/models/active_storage/blob/identifiable_rb.html +++ b/src/files/activestorage/app/models/active_storage/blob/identifiable_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/models/active_storage/blob/identifiable.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/models/active_storage/blob/representable_rb.html b/src/files/activestorage/app/models/active_storage/blob/representable_rb.html index 7d86ba2fba..4cf6467fba 100644 --- a/src/files/activestorage/app/models/active_storage/blob/representable_rb.html +++ b/src/files/activestorage/app/models/active_storage/blob/representable_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/models/active_storage/blob/representable.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/models/active_storage/blob_rb.html b/src/files/activestorage/app/models/active_storage/blob_rb.html index d504950aa6..d37d96610b 100644 --- a/src/files/activestorage/app/models/active_storage/blob_rb.html +++ b/src/files/activestorage/app/models/active_storage/blob_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/models/active_storage/blob.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/models/active_storage/current_rb.html b/src/files/activestorage/app/models/active_storage/current_rb.html index c727b94474..9132a0b076 100644 --- a/src/files/activestorage/app/models/active_storage/current_rb.html +++ b/src/files/activestorage/app/models/active_storage/current_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/models/active_storage/current.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/models/active_storage/filename/parameters_rb.html b/src/files/activestorage/app/models/active_storage/filename/parameters_rb.html deleted file mode 100644 index ad936a9863..0000000000 --- a/src/files/activestorage/app/models/active_storage/filename/parameters_rb.html +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: parameters.rb -layout: default ---- -
    - - -
    -
    - - - - - - - - - -

    Namespace

    - - -

    Module

    - - - - -

    Class

    - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activestorage/app/models/active_storage/filename_rb.html b/src/files/activestorage/app/models/active_storage/filename_rb.html index d6b6500b07..9b00604e0b 100644 --- a/src/files/activestorage/app/models/active_storage/filename_rb.html +++ b/src/files/activestorage/app/models/active_storage/filename_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/models/active_storage/filename.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/models/active_storage/named_variant_rb.html b/src/files/activestorage/app/models/active_storage/named_variant_rb.html index 0ac7ce7fe3..5e453673e2 100644 --- a/src/files/activestorage/app/models/active_storage/named_variant_rb.html +++ b/src/files/activestorage/app/models/active_storage/named_variant_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/models/active_storage/named_variant.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/models/active_storage/preview_rb.html b/src/files/activestorage/app/models/active_storage/preview_rb.html index d0ecd4e1ff..677c8303ff 100644 --- a/src/files/activestorage/app/models/active_storage/preview_rb.html +++ b/src/files/activestorage/app/models/active_storage/preview_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/models/active_storage/preview.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/models/active_storage/record_rb.html b/src/files/activestorage/app/models/active_storage/record_rb.html index cd3f2b5ed2..e63008b313 100644 --- a/src/files/activestorage/app/models/active_storage/record_rb.html +++ b/src/files/activestorage/app/models/active_storage/record_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/models/active_storage/record.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/models/active_storage/variant_rb.html b/src/files/activestorage/app/models/active_storage/variant_rb.html index 9f03d517da..2e2fc58e6b 100644 --- a/src/files/activestorage/app/models/active_storage/variant_rb.html +++ b/src/files/activestorage/app/models/active_storage/variant_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/models/active_storage/variant.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/models/active_storage/variant_record_rb.html b/src/files/activestorage/app/models/active_storage/variant_record_rb.html index 0ba335f4b8..6bb5903fa8 100644 --- a/src/files/activestorage/app/models/active_storage/variant_record_rb.html +++ b/src/files/activestorage/app/models/active_storage/variant_record_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/models/active_storage/variant_record.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/models/active_storage/variant_with_record_rb.html b/src/files/activestorage/app/models/active_storage/variant_with_record_rb.html index 7af32c4eb8..e7106c2b98 100644 --- a/src/files/activestorage/app/models/active_storage/variant_with_record_rb.html +++ b/src/files/activestorage/app/models/active_storage/variant_with_record_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/models/active_storage/variant_with_record.rb + on GitHub +
  • diff --git a/src/files/activestorage/app/models/active_storage/variation_rb.html b/src/files/activestorage/app/models/active_storage/variation_rb.html index 9e3736d52a..6afb76919c 100644 --- a/src/files/activestorage/app/models/active_storage/variation_rb.html +++ b/src/files/activestorage/app/models/active_storage/variation_rb.html @@ -15,6 +15,8 @@

  • activestorage/app/models/active_storage/variation.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/analyzer/audio_analyzer_rb.html b/src/files/activestorage/lib/active_storage/analyzer/audio_analyzer_rb.html index 125e97465f..3acbc570ef 100644 --- a/src/files/activestorage/lib/active_storage/analyzer/audio_analyzer_rb.html +++ b/src/files/activestorage/lib/active_storage/analyzer/audio_analyzer_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/analyzer/audio_analyzer.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/analyzer/image_analyzer/image_magick_rb.html b/src/files/activestorage/lib/active_storage/analyzer/image_analyzer/image_magick_rb.html index da5e265fc9..5b3063e308 100644 --- a/src/files/activestorage/lib/active_storage/analyzer/image_analyzer/image_magick_rb.html +++ b/src/files/activestorage/lib/active_storage/analyzer/image_analyzer/image_magick_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/analyzer/image_analyzer/image_magick.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/analyzer/image_analyzer/vips_rb.html b/src/files/activestorage/lib/active_storage/analyzer/image_analyzer/vips_rb.html index dc3406cca6..32d51685ce 100644 --- a/src/files/activestorage/lib/active_storage/analyzer/image_analyzer/vips_rb.html +++ b/src/files/activestorage/lib/active_storage/analyzer/image_analyzer/vips_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/analyzer/image_analyzer/vips.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/analyzer/image_analyzer_rb.html b/src/files/activestorage/lib/active_storage/analyzer/image_analyzer_rb.html index 2c3cdbdae2..86dfa08085 100644 --- a/src/files/activestorage/lib/active_storage/analyzer/image_analyzer_rb.html +++ b/src/files/activestorage/lib/active_storage/analyzer/image_analyzer_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/analyzer/image_analyzer.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/analyzer/null_analyzer_rb.html b/src/files/activestorage/lib/active_storage/analyzer/null_analyzer_rb.html index aefbccccc6..64815beb33 100644 --- a/src/files/activestorage/lib/active_storage/analyzer/null_analyzer_rb.html +++ b/src/files/activestorage/lib/active_storage/analyzer/null_analyzer_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/analyzer/null_analyzer.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/analyzer/video_analyzer_rb.html b/src/files/activestorage/lib/active_storage/analyzer/video_analyzer_rb.html index 90d4e887f7..3f30b47692 100644 --- a/src/files/activestorage/lib/active_storage/analyzer/video_analyzer_rb.html +++ b/src/files/activestorage/lib/active_storage/analyzer/video_analyzer_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/analyzer/video_analyzer.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/analyzer_rb.html b/src/files/activestorage/lib/active_storage/analyzer_rb.html index 42e448c40e..7b508756aa 100644 --- a/src/files/activestorage/lib/active_storage/analyzer_rb.html +++ b/src/files/activestorage/lib/active_storage/analyzer_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/analyzer.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/attached/changes/create_many_rb.html b/src/files/activestorage/lib/active_storage/attached/changes/create_many_rb.html index 43b59b7c60..1e40bfac99 100644 --- a/src/files/activestorage/lib/active_storage/attached/changes/create_many_rb.html +++ b/src/files/activestorage/lib/active_storage/attached/changes/create_many_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/attached/changes/create_many.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/attached/changes/create_one_of_many_rb.html b/src/files/activestorage/lib/active_storage/attached/changes/create_one_of_many_rb.html index fe000364e0..67a889305c 100644 --- a/src/files/activestorage/lib/active_storage/attached/changes/create_one_of_many_rb.html +++ b/src/files/activestorage/lib/active_storage/attached/changes/create_one_of_many_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/attached/changes/create_one_of_many.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/attached/changes/create_one_rb.html b/src/files/activestorage/lib/active_storage/attached/changes/create_one_rb.html index 6818dbb2a7..8769117048 100644 --- a/src/files/activestorage/lib/active_storage/attached/changes/create_one_rb.html +++ b/src/files/activestorage/lib/active_storage/attached/changes/create_one_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/attached/changes/create_one.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/attached/changes/delete_many_rb.html b/src/files/activestorage/lib/active_storage/attached/changes/delete_many_rb.html index 3e053f5421..9e6b8f944b 100644 --- a/src/files/activestorage/lib/active_storage/attached/changes/delete_many_rb.html +++ b/src/files/activestorage/lib/active_storage/attached/changes/delete_many_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/attached/changes/delete_many.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/attached/changes/delete_one_rb.html b/src/files/activestorage/lib/active_storage/attached/changes/delete_one_rb.html index 510ac6cb90..4f95d696ff 100644 --- a/src/files/activestorage/lib/active_storage/attached/changes/delete_one_rb.html +++ b/src/files/activestorage/lib/active_storage/attached/changes/delete_one_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/attached/changes/delete_one.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/attached/changes/detach_many_rb.html b/src/files/activestorage/lib/active_storage/attached/changes/detach_many_rb.html index f37fdbdc53..79cdaad62c 100644 --- a/src/files/activestorage/lib/active_storage/attached/changes/detach_many_rb.html +++ b/src/files/activestorage/lib/active_storage/attached/changes/detach_many_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/attached/changes/detach_many.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/attached/changes/detach_one_rb.html b/src/files/activestorage/lib/active_storage/attached/changes/detach_one_rb.html index c3c6059e9d..9ad5a9eb4f 100644 --- a/src/files/activestorage/lib/active_storage/attached/changes/detach_one_rb.html +++ b/src/files/activestorage/lib/active_storage/attached/changes/detach_one_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/attached/changes/detach_one.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/attached/changes/purge_many_rb.html b/src/files/activestorage/lib/active_storage/attached/changes/purge_many_rb.html index b72568bacd..14fce02b29 100644 --- a/src/files/activestorage/lib/active_storage/attached/changes/purge_many_rb.html +++ b/src/files/activestorage/lib/active_storage/attached/changes/purge_many_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/attached/changes/purge_many.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/attached/changes/purge_one_rb.html b/src/files/activestorage/lib/active_storage/attached/changes/purge_one_rb.html index 4b63c3e3dc..8ffe0f341b 100644 --- a/src/files/activestorage/lib/active_storage/attached/changes/purge_one_rb.html +++ b/src/files/activestorage/lib/active_storage/attached/changes/purge_one_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/attached/changes/purge_one.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/attached/changes_rb.html b/src/files/activestorage/lib/active_storage/attached/changes_rb.html index 62675a68b9..4eb7d7af79 100644 --- a/src/files/activestorage/lib/active_storage/attached/changes_rb.html +++ b/src/files/activestorage/lib/active_storage/attached/changes_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/attached/changes.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/attached/macros_rb.html b/src/files/activestorage/lib/active_storage/attached/macros_rb.html deleted file mode 100644 index 1f3ce5d792..0000000000 --- a/src/files/activestorage/lib/active_storage/attached/macros_rb.html +++ /dev/null @@ -1,77 +0,0 @@ ---- -title: macros.rb -layout: default ---- -
    - - -
    -
    - - - - - - - - - -

    Namespace

    - - -

    Module

    - - - - -

    Class

    - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activestorage/lib/active_storage/attached/many_rb.html b/src/files/activestorage/lib/active_storage/attached/many_rb.html index 2312c222ab..6124f83eec 100644 --- a/src/files/activestorage/lib/active_storage/attached/many_rb.html +++ b/src/files/activestorage/lib/active_storage/attached/many_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/attached/many.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/attached/model_rb.html b/src/files/activestorage/lib/active_storage/attached/model_rb.html index 13ef663999..4accc331af 100644 --- a/src/files/activestorage/lib/active_storage/attached/model_rb.html +++ b/src/files/activestorage/lib/active_storage/attached/model_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/attached/model.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/attached/one_rb.html b/src/files/activestorage/lib/active_storage/attached/one_rb.html index 16b5b3deb3..29e4d677ed 100644 --- a/src/files/activestorage/lib/active_storage/attached/one_rb.html +++ b/src/files/activestorage/lib/active_storage/attached/one_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/attached/one.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/attached_rb.html b/src/files/activestorage/lib/active_storage/attached_rb.html index d9a9491ca1..255e43907f 100644 --- a/src/files/activestorage/lib/active_storage/attached_rb.html +++ b/src/files/activestorage/lib/active_storage/attached_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/attached.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/deprecator_rb.html b/src/files/activestorage/lib/active_storage/deprecator_rb.html index 84df573f66..eb87006d54 100644 --- a/src/files/activestorage/lib/active_storage/deprecator_rb.html +++ b/src/files/activestorage/lib/active_storage/deprecator_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/deprecator.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/downloader_rb.html b/src/files/activestorage/lib/active_storage/downloader_rb.html index 2aff61e1a0..9bc5503b01 100644 --- a/src/files/activestorage/lib/active_storage/downloader_rb.html +++ b/src/files/activestorage/lib/active_storage/downloader_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/downloader.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/downloading_rb.html b/src/files/activestorage/lib/active_storage/downloading_rb.html deleted file mode 100644 index f0e50f3d45..0000000000 --- a/src/files/activestorage/lib/active_storage/downloading_rb.html +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: downloading.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • tmpdir
    • - -
    • active_support/core_ext/string/filters
    • - -
    - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activestorage/lib/active_storage/engine_rb.html b/src/files/activestorage/lib/active_storage/engine_rb.html index ce7134aa1d..f7030a33a6 100644 --- a/src/files/activestorage/lib/active_storage/engine_rb.html +++ b/src/files/activestorage/lib/active_storage/engine_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/engine.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/errors_rb.html b/src/files/activestorage/lib/active_storage/errors_rb.html index 0dc71c5bf6..61faa4c606 100644 --- a/src/files/activestorage/lib/active_storage/errors_rb.html +++ b/src/files/activestorage/lib/active_storage/errors_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/errors.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/fixture_set_rb.html b/src/files/activestorage/lib/active_storage/fixture_set_rb.html index 23cf496ca6..0e5306652a 100644 --- a/src/files/activestorage/lib/active_storage/fixture_set_rb.html +++ b/src/files/activestorage/lib/active_storage/fixture_set_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/fixture_set.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/gem_version_rb.html b/src/files/activestorage/lib/active_storage/gem_version_rb.html index 2f3c32222d..57496c25c2 100644 --- a/src/files/activestorage/lib/active_storage/gem_version_rb.html +++ b/src/files/activestorage/lib/active_storage/gem_version_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/gem_version.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/log_subscriber_rb.html b/src/files/activestorage/lib/active_storage/log_subscriber_rb.html index 20fa1bd1e4..0ba85b19a3 100644 --- a/src/files/activestorage/lib/active_storage/log_subscriber_rb.html +++ b/src/files/activestorage/lib/active_storage/log_subscriber_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/log_subscriber.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/previewer/mupdf_previewer_rb.html b/src/files/activestorage/lib/active_storage/previewer/mupdf_previewer_rb.html index 1d50d339b1..5b2898845c 100644 --- a/src/files/activestorage/lib/active_storage/previewer/mupdf_previewer_rb.html +++ b/src/files/activestorage/lib/active_storage/previewer/mupdf_previewer_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/previewer/mupdf_previewer.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/previewer/poppler_pdf_previewer_rb.html b/src/files/activestorage/lib/active_storage/previewer/poppler_pdf_previewer_rb.html index 70975047a5..0d9cc26cd5 100644 --- a/src/files/activestorage/lib/active_storage/previewer/poppler_pdf_previewer_rb.html +++ b/src/files/activestorage/lib/active_storage/previewer/poppler_pdf_previewer_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/previewer/poppler_pdf_previewer.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/previewer/video_previewer_rb.html b/src/files/activestorage/lib/active_storage/previewer/video_previewer_rb.html index 2d494f7215..9ece0db507 100644 --- a/src/files/activestorage/lib/active_storage/previewer/video_previewer_rb.html +++ b/src/files/activestorage/lib/active_storage/previewer/video_previewer_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/previewer/video_previewer.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/previewer_rb.html b/src/files/activestorage/lib/active_storage/previewer_rb.html index dbd9c1454b..2840abee4f 100644 --- a/src/files/activestorage/lib/active_storage/previewer_rb.html +++ b/src/files/activestorage/lib/active_storage/previewer_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/previewer.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/reflection_rb.html b/src/files/activestorage/lib/active_storage/reflection_rb.html index 4926d58d38..5927e3ca9f 100644 --- a/src/files/activestorage/lib/active_storage/reflection_rb.html +++ b/src/files/activestorage/lib/active_storage/reflection_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/reflection.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/service/azure_storage_service_rb.html b/src/files/activestorage/lib/active_storage/service/azure_storage_service_rb.html index 6f45c11088..eefe91e089 100644 --- a/src/files/activestorage/lib/active_storage/service/azure_storage_service_rb.html +++ b/src/files/activestorage/lib/active_storage/service/azure_storage_service_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/service/azure_storage_service.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/service/configurator_rb.html b/src/files/activestorage/lib/active_storage/service/configurator_rb.html index a477690bfb..5007984aa3 100644 --- a/src/files/activestorage/lib/active_storage/service/configurator_rb.html +++ b/src/files/activestorage/lib/active_storage/service/configurator_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/service/configurator.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/service/disk_service_rb.html b/src/files/activestorage/lib/active_storage/service/disk_service_rb.html index 96c0713686..92704c498a 100644 --- a/src/files/activestorage/lib/active_storage/service/disk_service_rb.html +++ b/src/files/activestorage/lib/active_storage/service/disk_service_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/service/disk_service.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/service/gcs_service_rb.html b/src/files/activestorage/lib/active_storage/service/gcs_service_rb.html index 390dfb57f8..2e7578bf21 100644 --- a/src/files/activestorage/lib/active_storage/service/gcs_service_rb.html +++ b/src/files/activestorage/lib/active_storage/service/gcs_service_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/service/gcs_service.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/service/mirror_service_rb.html b/src/files/activestorage/lib/active_storage/service/mirror_service_rb.html index 1caedc1f90..af0dd482a9 100644 --- a/src/files/activestorage/lib/active_storage/service/mirror_service_rb.html +++ b/src/files/activestorage/lib/active_storage/service/mirror_service_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/service/mirror_service.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/service/registry_rb.html b/src/files/activestorage/lib/active_storage/service/registry_rb.html index 8ddc113da0..c46d14f5ca 100644 --- a/src/files/activestorage/lib/active_storage/service/registry_rb.html +++ b/src/files/activestorage/lib/active_storage/service/registry_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/service/registry.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/service/s3_service_rb.html b/src/files/activestorage/lib/active_storage/service/s3_service_rb.html index 7625370f2d..91a9e1020e 100644 --- a/src/files/activestorage/lib/active_storage/service/s3_service_rb.html +++ b/src/files/activestorage/lib/active_storage/service/s3_service_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/service/s3_service.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/service_rb.html b/src/files/activestorage/lib/active_storage/service_rb.html index f155cfd7a3..2e1dad7304 100644 --- a/src/files/activestorage/lib/active_storage/service_rb.html +++ b/src/files/activestorage/lib/active_storage/service_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/service.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/transformers/image_processing_transformer_rb.html b/src/files/activestorage/lib/active_storage/transformers/image_processing_transformer_rb.html index c96c441b4c..6670af33bd 100644 --- a/src/files/activestorage/lib/active_storage/transformers/image_processing_transformer_rb.html +++ b/src/files/activestorage/lib/active_storage/transformers/image_processing_transformer_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/transformers/image_processing_transformer.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/transformers/mini_magick_transformer_rb.html b/src/files/activestorage/lib/active_storage/transformers/mini_magick_transformer_rb.html deleted file mode 100644 index 795b6d7eb0..0000000000 --- a/src/files/activestorage/lib/active_storage/transformers/mini_magick_transformer_rb.html +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: mini_magick_transformer.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • mini_magick
    • - -
    - - - - - - - -

    Namespace

    - - -

    Module

    - - - - -

    Class

    - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activestorage/lib/active_storage/transformers/transformer_rb.html b/src/files/activestorage/lib/active_storage/transformers/transformer_rb.html index 81f934bc0d..9428372b36 100644 --- a/src/files/activestorage/lib/active_storage/transformers/transformer_rb.html +++ b/src/files/activestorage/lib/active_storage/transformers/transformer_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/transformers/transformer.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage/version_rb.html b/src/files/activestorage/lib/active_storage/version_rb.html index ee4057197b..90b4d9542c 100644 --- a/src/files/activestorage/lib/active_storage/version_rb.html +++ b/src/files/activestorage/lib/active_storage/version_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage/version.rb + on GitHub +
  • diff --git a/src/files/activestorage/lib/active_storage_rb.html b/src/files/activestorage/lib/active_storage_rb.html index c34354f54b..6e04dd0eec 100644 --- a/src/files/activestorage/lib/active_storage_rb.html +++ b/src/files/activestorage/lib/active_storage_rb.html @@ -15,6 +15,8 @@

  • activestorage/lib/active_storage.rb + on GitHub +
  • diff --git a/src/files/activesupport/README_rdoc.html b/src/files/activesupport/README_rdoc.html index 194f8f8a15..45db576279 100644 --- a/src/files/activesupport/README_rdoc.html +++ b/src/files/activesupport/README_rdoc.html @@ -15,6 +15,8 @@

  • activesupport/README.rdoc + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/actionable_error_rb.html b/src/files/activesupport/lib/active_support/actionable_error_rb.html index 4d34ea7ae1..ae9a1fb894 100644 --- a/src/files/activesupport/lib/active_support/actionable_error_rb.html +++ b/src/files/activesupport/lib/active_support/actionable_error_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/actionable_error.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/all_rb.html b/src/files/activesupport/lib/active_support/all_rb.html index 12ed1195e1..35bd2006c7 100644 --- a/src/files/activesupport/lib/active_support/all_rb.html +++ b/src/files/activesupport/lib/active_support/all_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/all.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/array_inquirer_rb.html b/src/files/activesupport/lib/active_support/array_inquirer_rb.html index 493f1763fe..5c9b8145d7 100644 --- a/src/files/activesupport/lib/active_support/array_inquirer_rb.html +++ b/src/files/activesupport/lib/active_support/array_inquirer_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/array_inquirer.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/backtrace_cleaner_rb.html b/src/files/activesupport/lib/active_support/backtrace_cleaner_rb.html index 8d76a7f7cc..6bc22bf052 100644 --- a/src/files/activesupport/lib/active_support/backtrace_cleaner_rb.html +++ b/src/files/activesupport/lib/active_support/backtrace_cleaner_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/backtrace_cleaner.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/benchmarkable_rb.html b/src/files/activesupport/lib/active_support/benchmarkable_rb.html index c4980a8360..8073f6a544 100644 --- a/src/files/activesupport/lib/active_support/benchmarkable_rb.html +++ b/src/files/activesupport/lib/active_support/benchmarkable_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/benchmarkable.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/broadcast_logger_rb.html b/src/files/activesupport/lib/active_support/broadcast_logger_rb.html index 953de976b9..302c485631 100644 --- a/src/files/activesupport/lib/active_support/broadcast_logger_rb.html +++ b/src/files/activesupport/lib/active_support/broadcast_logger_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/broadcast_logger.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/builder_rb.html b/src/files/activesupport/lib/active_support/builder_rb.html index 3abda34419..7148cf0360 100644 --- a/src/files/activesupport/lib/active_support/builder_rb.html +++ b/src/files/activesupport/lib/active_support/builder_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/builder.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/cache/coder_rb.html b/src/files/activesupport/lib/active_support/cache/coder_rb.html index 89bba8d8dd..24e5e8a32d 100644 --- a/src/files/activesupport/lib/active_support/cache/coder_rb.html +++ b/src/files/activesupport/lib/active_support/cache/coder_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/cache/coder.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/cache/entry_rb.html b/src/files/activesupport/lib/active_support/cache/entry_rb.html index dfc13524c6..222db4e014 100644 --- a/src/files/activesupport/lib/active_support/cache/entry_rb.html +++ b/src/files/activesupport/lib/active_support/cache/entry_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/cache/entry.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/cache/file_store_rb.html b/src/files/activesupport/lib/active_support/cache/file_store_rb.html index 7df236d4e1..9c1c3ca5f6 100644 --- a/src/files/activesupport/lib/active_support/cache/file_store_rb.html +++ b/src/files/activesupport/lib/active_support/cache/file_store_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/cache/file_store.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/cache/mem_cache_store_rb.html b/src/files/activesupport/lib/active_support/cache/mem_cache_store_rb.html index cade3daf9f..70d8434e5c 100644 --- a/src/files/activesupport/lib/active_support/cache/mem_cache_store_rb.html +++ b/src/files/activesupport/lib/active_support/cache/mem_cache_store_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/cache/mem_cache_store.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/cache/memory_store_rb.html b/src/files/activesupport/lib/active_support/cache/memory_store_rb.html index 4d18c23383..d6e31a7388 100644 --- a/src/files/activesupport/lib/active_support/cache/memory_store_rb.html +++ b/src/files/activesupport/lib/active_support/cache/memory_store_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/cache/memory_store.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/cache/null_store_rb.html b/src/files/activesupport/lib/active_support/cache/null_store_rb.html index 52ab86853d..1f02f755df 100644 --- a/src/files/activesupport/lib/active_support/cache/null_store_rb.html +++ b/src/files/activesupport/lib/active_support/cache/null_store_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/cache/null_store.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/cache/redis_cache_store_rb.html b/src/files/activesupport/lib/active_support/cache/redis_cache_store_rb.html index 114d09f0e9..9e1427d045 100644 --- a/src/files/activesupport/lib/active_support/cache/redis_cache_store_rb.html +++ b/src/files/activesupport/lib/active_support/cache/redis_cache_store_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/cache/redis_cache_store.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/cache/serializer_with_fallback_rb.html b/src/files/activesupport/lib/active_support/cache/serializer_with_fallback_rb.html index 89571b56e4..2e00449c28 100644 --- a/src/files/activesupport/lib/active_support/cache/serializer_with_fallback_rb.html +++ b/src/files/activesupport/lib/active_support/cache/serializer_with_fallback_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/cache/serializer_with_fallback.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/cache/strategy/local_cache_middleware_rb.html b/src/files/activesupport/lib/active_support/cache/strategy/local_cache_middleware_rb.html index 346950f304..1cca1b1b87 100644 --- a/src/files/activesupport/lib/active_support/cache/strategy/local_cache_middleware_rb.html +++ b/src/files/activesupport/lib/active_support/cache/strategy/local_cache_middleware_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/cache/strategy/local_cache_middleware.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/cache/strategy/local_cache_rb.html b/src/files/activesupport/lib/active_support/cache/strategy/local_cache_rb.html index 78fe98a1da..5b10d2eea9 100644 --- a/src/files/activesupport/lib/active_support/cache/strategy/local_cache_rb.html +++ b/src/files/activesupport/lib/active_support/cache/strategy/local_cache_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/cache/strategy/local_cache.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/cache_rb.html b/src/files/activesupport/lib/active_support/cache_rb.html index e30d1dc1e7..d007c5bcb5 100644 --- a/src/files/activesupport/lib/active_support/cache_rb.html +++ b/src/files/activesupport/lib/active_support/cache_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/cache.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/callbacks_rb.html b/src/files/activesupport/lib/active_support/callbacks_rb.html index 6c953fd5ee..52faaa817f 100644 --- a/src/files/activesupport/lib/active_support/callbacks_rb.html +++ b/src/files/activesupport/lib/active_support/callbacks_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/callbacks.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/code_generator_rb.html b/src/files/activesupport/lib/active_support/code_generator_rb.html index b96b6e5017..3ff03ea05b 100644 --- a/src/files/activesupport/lib/active_support/code_generator_rb.html +++ b/src/files/activesupport/lib/active_support/code_generator_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/code_generator.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/concern_rb.html b/src/files/activesupport/lib/active_support/concern_rb.html index 378a1d3792..bcc7f84bcc 100644 --- a/src/files/activesupport/lib/active_support/concern_rb.html +++ b/src/files/activesupport/lib/active_support/concern_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/concern.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/concurrency/load_interlock_aware_monitor_rb.html b/src/files/activesupport/lib/active_support/concurrency/load_interlock_aware_monitor_rb.html index 2d81abb3a6..f9462dc9dd 100644 --- a/src/files/activesupport/lib/active_support/concurrency/load_interlock_aware_monitor_rb.html +++ b/src/files/activesupport/lib/active_support/concurrency/load_interlock_aware_monitor_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/concurrency/load_interlock_aware_monitor.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/concurrency/null_lock_rb.html b/src/files/activesupport/lib/active_support/concurrency/null_lock_rb.html index fd33390f5c..9d685e927c 100644 --- a/src/files/activesupport/lib/active_support/concurrency/null_lock_rb.html +++ b/src/files/activesupport/lib/active_support/concurrency/null_lock_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/concurrency/null_lock.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/concurrency/share_lock_rb.html b/src/files/activesupport/lib/active_support/concurrency/share_lock_rb.html index bf0a1d5d04..bd4d7ddf16 100644 --- a/src/files/activesupport/lib/active_support/concurrency/share_lock_rb.html +++ b/src/files/activesupport/lib/active_support/concurrency/share_lock_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/concurrency/share_lock.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/configurable_rb.html b/src/files/activesupport/lib/active_support/configurable_rb.html index 45f04d7963..35c72c6705 100644 --- a/src/files/activesupport/lib/active_support/configurable_rb.html +++ b/src/files/activesupport/lib/active_support/configurable_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/configurable.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/configuration_file_rb.html b/src/files/activesupport/lib/active_support/configuration_file_rb.html index 6b68045518..9a13573f0d 100644 --- a/src/files/activesupport/lib/active_support/configuration_file_rb.html +++ b/src/files/activesupport/lib/active_support/configuration_file_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/configuration_file.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/array/access_rb.html b/src/files/activesupport/lib/active_support/core_ext/array/access_rb.html index a6968c77d1..fcd44983d3 100644 --- a/src/files/activesupport/lib/active_support/core_ext/array/access_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/array/access_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/array/access.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/array/conversions_rb.html b/src/files/activesupport/lib/active_support/core_ext/array/conversions_rb.html index e0d248f7f8..0592159486 100644 --- a/src/files/activesupport/lib/active_support/core_ext/array/conversions_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/array/conversions_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/array/conversions.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/array/deprecated_conversions_rb.html b/src/files/activesupport/lib/active_support/core_ext/array/deprecated_conversions_rb.html deleted file mode 100644 index 00db5c7670..0000000000 --- a/src/files/activesupport/lib/active_support/core_ext/array/deprecated_conversions_rb.html +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: deprecated_conversions.rb -layout: default ---- -
    - - -
    -
    - - - - - - - - - -

    Namespace

    - - -

    Module

    - - - - -

    Class

    - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activesupport/lib/active_support/core_ext/array/extract_options_rb.html b/src/files/activesupport/lib/active_support/core_ext/array/extract_options_rb.html index 6be050d0ae..e0d5cd3003 100644 --- a/src/files/activesupport/lib/active_support/core_ext/array/extract_options_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/array/extract_options_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/array/extract_options.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/array/extract_rb.html b/src/files/activesupport/lib/active_support/core_ext/array/extract_rb.html index 92b7d5f664..b0c9f2a056 100644 --- a/src/files/activesupport/lib/active_support/core_ext/array/extract_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/array/extract_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/array/extract.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/array/grouping_rb.html b/src/files/activesupport/lib/active_support/core_ext/array/grouping_rb.html index 7d52888690..f26e55f559 100644 --- a/src/files/activesupport/lib/active_support/core_ext/array/grouping_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/array/grouping_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/array/grouping.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/array/inquiry_rb.html b/src/files/activesupport/lib/active_support/core_ext/array/inquiry_rb.html index 725294234e..e507d8f595 100644 --- a/src/files/activesupport/lib/active_support/core_ext/array/inquiry_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/array/inquiry_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/array/inquiry.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/array/prepend_and_append_rb.html b/src/files/activesupport/lib/active_support/core_ext/array/prepend_and_append_rb.html deleted file mode 100644 index 84e6de786c..0000000000 --- a/src/files/activesupport/lib/active_support/core_ext/array/prepend_and_append_rb.html +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: prepend_and_append.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • active_support/deprecation
    • - -
    - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activesupport/lib/active_support/core_ext/array/wrap_rb.html b/src/files/activesupport/lib/active_support/core_ext/array/wrap_rb.html index 56a5f60d56..63f9409e03 100644 --- a/src/files/activesupport/lib/active_support/core_ext/array/wrap_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/array/wrap_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/array/wrap.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/array_rb.html b/src/files/activesupport/lib/active_support/core_ext/array_rb.html index fc70010a9f..db178ab174 100644 --- a/src/files/activesupport/lib/active_support/core_ext/array_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/array_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/array.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/benchmark_rb.html b/src/files/activesupport/lib/active_support/core_ext/benchmark_rb.html index 4749c28d30..6e2bdf07b6 100644 --- a/src/files/activesupport/lib/active_support/core_ext/benchmark_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/benchmark_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/benchmark.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/big_decimal/conversions_rb.html b/src/files/activesupport/lib/active_support/core_ext/big_decimal/conversions_rb.html index edf77ce519..66a1cf2e8a 100644 --- a/src/files/activesupport/lib/active_support/core_ext/big_decimal/conversions_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/big_decimal/conversions_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/big_decimal/conversions.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/big_decimal_rb.html b/src/files/activesupport/lib/active_support/core_ext/big_decimal_rb.html index d82ff0490e..b3a0db2547 100644 --- a/src/files/activesupport/lib/active_support/core_ext/big_decimal_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/big_decimal_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/big_decimal.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/class/attribute_accessors_rb.html b/src/files/activesupport/lib/active_support/core_ext/class/attribute_accessors_rb.html index d111378d7e..f060d7695c 100644 --- a/src/files/activesupport/lib/active_support/core_ext/class/attribute_accessors_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/class/attribute_accessors_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/class/attribute_accessors.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/class/attribute_rb.html b/src/files/activesupport/lib/active_support/core_ext/class/attribute_rb.html index 4f57e1138e..445325156d 100644 --- a/src/files/activesupport/lib/active_support/core_ext/class/attribute_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/class/attribute_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/class/attribute.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/class/subclasses_rb.html b/src/files/activesupport/lib/active_support/core_ext/class/subclasses_rb.html index f087042fd8..ed2e966435 100644 --- a/src/files/activesupport/lib/active_support/core_ext/class/subclasses_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/class/subclasses_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/class/subclasses.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/class_rb.html b/src/files/activesupport/lib/active_support/core_ext/class_rb.html index 17773faad9..96a29cd274 100644 --- a/src/files/activesupport/lib/active_support/core_ext/class_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/class_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/class.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/date/acts_like_rb.html b/src/files/activesupport/lib/active_support/core_ext/date/acts_like_rb.html index 21b7e683aa..a4ea690be9 100644 --- a/src/files/activesupport/lib/active_support/core_ext/date/acts_like_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/date/acts_like_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/date/acts_like.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/date/blank_rb.html b/src/files/activesupport/lib/active_support/core_ext/date/blank_rb.html index db77e553e0..f930e45cfa 100644 --- a/src/files/activesupport/lib/active_support/core_ext/date/blank_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/date/blank_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/date/blank.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/date/calculations_rb.html b/src/files/activesupport/lib/active_support/core_ext/date/calculations_rb.html index 5c088e59ee..683639a705 100644 --- a/src/files/activesupport/lib/active_support/core_ext/date/calculations_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/date/calculations_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/date/calculations.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/date/conversions_rb.html b/src/files/activesupport/lib/active_support/core_ext/date/conversions_rb.html index 5974382ebc..99585d0913 100644 --- a/src/files/activesupport/lib/active_support/core_ext/date/conversions_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/date/conversions_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/date/conversions.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/date/deprecated_conversions_rb.html b/src/files/activesupport/lib/active_support/core_ext/date/deprecated_conversions_rb.html deleted file mode 100644 index 86c925e663..0000000000 --- a/src/files/activesupport/lib/active_support/core_ext/date/deprecated_conversions_rb.html +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: deprecated_conversions.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • date
    • - -
    - - - - - - - -

    Namespace

    - - -

    Module

    - - - - -

    Class

    - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activesupport/lib/active_support/core_ext/date/zones_rb.html b/src/files/activesupport/lib/active_support/core_ext/date/zones_rb.html index fa62bc9cc4..eb9419379d 100644 --- a/src/files/activesupport/lib/active_support/core_ext/date/zones_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/date/zones_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/date/zones.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/date_and_time/calculations_rb.html b/src/files/activesupport/lib/active_support/core_ext/date_and_time/calculations_rb.html index 2af2c6d509..0fe3060de7 100644 --- a/src/files/activesupport/lib/active_support/core_ext/date_and_time/calculations_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/date_and_time/calculations_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/date_and_time/calculations.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/date_and_time/compatibility_rb.html b/src/files/activesupport/lib/active_support/core_ext/date_and_time/compatibility_rb.html index 867cf9be26..5deba7c9c7 100644 --- a/src/files/activesupport/lib/active_support/core_ext/date_and_time/compatibility_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/date_and_time/compatibility_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/date_and_time/zones_rb.html b/src/files/activesupport/lib/active_support/core_ext/date_and_time/zones_rb.html index bc7df6026b..1ebd06da1a 100644 --- a/src/files/activesupport/lib/active_support/core_ext/date_and_time/zones_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/date_and_time/zones_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/date_and_time/zones.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/date_rb.html b/src/files/activesupport/lib/active_support/core_ext/date_rb.html index a78487243c..b2f2c30166 100644 --- a/src/files/activesupport/lib/active_support/core_ext/date_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/date_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/date.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/date_time/acts_like_rb.html b/src/files/activesupport/lib/active_support/core_ext/date_time/acts_like_rb.html index b700efa42d..78b6721a18 100644 --- a/src/files/activesupport/lib/active_support/core_ext/date_time/acts_like_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/date_time/acts_like_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/date_time/acts_like.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/date_time/blank_rb.html b/src/files/activesupport/lib/active_support/core_ext/date_time/blank_rb.html index 848e052b39..952ccad581 100644 --- a/src/files/activesupport/lib/active_support/core_ext/date_time/blank_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/date_time/blank_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/date_time/blank.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/date_time/calculations_rb.html b/src/files/activesupport/lib/active_support/core_ext/date_time/calculations_rb.html index e08b78aadb..5344010a48 100644 --- a/src/files/activesupport/lib/active_support/core_ext/date_time/calculations_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/date_time/calculations_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/date_time/calculations.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/date_time/compatibility_rb.html b/src/files/activesupport/lib/active_support/core_ext/date_time/compatibility_rb.html index 5ee9404b2d..44e30a0bc7 100644 --- a/src/files/activesupport/lib/active_support/core_ext/date_time/compatibility_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/date_time/compatibility_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/date_time/compatibility.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/date_time/conversions_rb.html b/src/files/activesupport/lib/active_support/core_ext/date_time/conversions_rb.html index bbafb718de..da708f4cda 100644 --- a/src/files/activesupport/lib/active_support/core_ext/date_time/conversions_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/date_time/conversions_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/date_time/conversions.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/date_time/deprecated_conversions_rb.html b/src/files/activesupport/lib/active_support/core_ext/date_time/deprecated_conversions_rb.html deleted file mode 100644 index a3f8cc52ec..0000000000 --- a/src/files/activesupport/lib/active_support/core_ext/date_time/deprecated_conversions_rb.html +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: deprecated_conversions.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • date
    • - -
    - - - - - - - -

    Namespace

    - - -

    Module

    - - - - -

    Class

    - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activesupport/lib/active_support/core_ext/date_time_rb.html b/src/files/activesupport/lib/active_support/core_ext/date_time_rb.html index 2c0588d400..b22b2b95a9 100644 --- a/src/files/activesupport/lib/active_support/core_ext/date_time_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/date_time_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/date_time.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/digest/uuid_rb.html b/src/files/activesupport/lib/active_support/core_ext/digest/uuid_rb.html index fed1247b68..8bf3aaa5ba 100644 --- a/src/files/activesupport/lib/active_support/core_ext/digest/uuid_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/digest/uuid_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/digest/uuid.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/digest_rb.html b/src/files/activesupport/lib/active_support/core_ext/digest_rb.html index 16c5a7449f..6298a37baa 100644 --- a/src/files/activesupport/lib/active_support/core_ext/digest_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/digest_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/digest.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/enumerable_rb.html b/src/files/activesupport/lib/active_support/core_ext/enumerable_rb.html index 6231cd3c2f..bc0288d476 100644 --- a/src/files/activesupport/lib/active_support/core_ext/enumerable_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/enumerable_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/enumerable.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/erb/util_rb.html b/src/files/activesupport/lib/active_support/core_ext/erb/util_rb.html index 3a0e54b82a..8907abf0e2 100644 --- a/src/files/activesupport/lib/active_support/core_ext/erb/util_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/erb/util_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/erb/util.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/file/atomic_rb.html b/src/files/activesupport/lib/active_support/core_ext/file/atomic_rb.html index 7e28f0bcab..bb6737a224 100644 --- a/src/files/activesupport/lib/active_support/core_ext/file/atomic_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/file/atomic_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/file/atomic.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/file_rb.html b/src/files/activesupport/lib/active_support/core_ext/file_rb.html index 9ac4cdf361..e868ba9457 100644 --- a/src/files/activesupport/lib/active_support/core_ext/file_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/file_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/file.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/hash/compact_rb.html b/src/files/activesupport/lib/active_support/core_ext/hash/compact_rb.html deleted file mode 100644 index 3a71e46251..0000000000 --- a/src/files/activesupport/lib/active_support/core_ext/hash/compact_rb.html +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: compact.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • active_support/deprecation
    • - -
    - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activesupport/lib/active_support/core_ext/hash/conversions_rb.html b/src/files/activesupport/lib/active_support/core_ext/hash/conversions_rb.html index 752cff56cf..a644e8ca1b 100644 --- a/src/files/activesupport/lib/active_support/core_ext/hash/conversions_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/hash/conversions_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/hash/conversions.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/hash/deep_merge_rb.html b/src/files/activesupport/lib/active_support/core_ext/hash/deep_merge_rb.html index 9a502692d9..3457ef92af 100644 --- a/src/files/activesupport/lib/active_support/core_ext/hash/deep_merge_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/hash/deep_merge_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/hash/deep_merge.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/hash/deep_transform_values_rb.html b/src/files/activesupport/lib/active_support/core_ext/hash/deep_transform_values_rb.html index a3616bda16..e07bc402cc 100644 --- a/src/files/activesupport/lib/active_support/core_ext/hash/deep_transform_values_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/hash/deep_transform_values_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/hash/deep_transform_values.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/hash/except_rb.html b/src/files/activesupport/lib/active_support/core_ext/hash/except_rb.html index 57bd0da001..2727d3fe9a 100644 --- a/src/files/activesupport/lib/active_support/core_ext/hash/except_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/hash/except_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/hash/except.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/hash/indifferent_access_rb.html b/src/files/activesupport/lib/active_support/core_ext/hash/indifferent_access_rb.html index d327742c93..a30bab44bf 100644 --- a/src/files/activesupport/lib/active_support/core_ext/hash/indifferent_access_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/hash/indifferent_access_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/hash/indifferent_access.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/hash/keys_rb.html b/src/files/activesupport/lib/active_support/core_ext/hash/keys_rb.html index 56503ebf96..1c7b59fd53 100644 --- a/src/files/activesupport/lib/active_support/core_ext/hash/keys_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/hash/keys_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/hash/keys.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/hash/reverse_merge_rb.html b/src/files/activesupport/lib/active_support/core_ext/hash/reverse_merge_rb.html index e2be296b1f..811fd7d856 100644 --- a/src/files/activesupport/lib/active_support/core_ext/hash/reverse_merge_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/hash/reverse_merge_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/hash/reverse_merge.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/hash/slice_rb.html b/src/files/activesupport/lib/active_support/core_ext/hash/slice_rb.html index d1264a7921..03aa15234c 100644 --- a/src/files/activesupport/lib/active_support/core_ext/hash/slice_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/hash/slice_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/hash/slice.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/hash/transform_values_rb.html b/src/files/activesupport/lib/active_support/core_ext/hash/transform_values_rb.html deleted file mode 100644 index 8b900b575e..0000000000 --- a/src/files/activesupport/lib/active_support/core_ext/hash/transform_values_rb.html +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: transform_values.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • active_support/deprecation
    • - -
    - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activesupport/lib/active_support/core_ext/hash_rb.html b/src/files/activesupport/lib/active_support/core_ext/hash_rb.html index 6bfd3a3afd..d8202a06f8 100644 --- a/src/files/activesupport/lib/active_support/core_ext/hash_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/hash_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/hash.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/integer/inflections_rb.html b/src/files/activesupport/lib/active_support/core_ext/integer/inflections_rb.html index f2623e5981..8499d393be 100644 --- a/src/files/activesupport/lib/active_support/core_ext/integer/inflections_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/integer/inflections_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/integer/inflections.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/integer/multiple_rb.html b/src/files/activesupport/lib/active_support/core_ext/integer/multiple_rb.html index c06c083735..a3766c2732 100644 --- a/src/files/activesupport/lib/active_support/core_ext/integer/multiple_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/integer/multiple_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/integer/multiple.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/integer/time_rb.html b/src/files/activesupport/lib/active_support/core_ext/integer/time_rb.html index a7bd7b9740..23fdcaa3ad 100644 --- a/src/files/activesupport/lib/active_support/core_ext/integer/time_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/integer/time_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/integer/time.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/integer_rb.html b/src/files/activesupport/lib/active_support/core_ext/integer_rb.html index 0a49622c46..9399c207a1 100644 --- a/src/files/activesupport/lib/active_support/core_ext/integer_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/integer_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/integer.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/kernel/agnostics_rb.html b/src/files/activesupport/lib/active_support/core_ext/kernel/agnostics_rb.html deleted file mode 100644 index 13b29e3bf3..0000000000 --- a/src/files/activesupport/lib/active_support/core_ext/kernel/agnostics_rb.html +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: agnostics.rb -layout: default ---- -
    - - -
    -
    - - - - - - - - - -

    Namespace

    - - - - -

    Class

    - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activesupport/lib/active_support/core_ext/kernel/concern_rb.html b/src/files/activesupport/lib/active_support/core_ext/kernel/concern_rb.html index a2ca82f0bb..c40e080cb9 100644 --- a/src/files/activesupport/lib/active_support/core_ext/kernel/concern_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/kernel/concern_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/kernel/concern.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/kernel/reporting_rb.html b/src/files/activesupport/lib/active_support/core_ext/kernel/reporting_rb.html index b55b61a5e1..e512d7d511 100644 --- a/src/files/activesupport/lib/active_support/core_ext/kernel/reporting_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/kernel/reporting_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/kernel/reporting.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/kernel/singleton_class_rb.html b/src/files/activesupport/lib/active_support/core_ext/kernel/singleton_class_rb.html index 63c4c49987..0f144f7cdc 100644 --- a/src/files/activesupport/lib/active_support/core_ext/kernel/singleton_class_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/kernel/singleton_class_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/kernel/singleton_class.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/kernel_rb.html b/src/files/activesupport/lib/active_support/core_ext/kernel_rb.html index 97385769ba..7715be26c9 100644 --- a/src/files/activesupport/lib/active_support/core_ext/kernel_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/kernel_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/kernel.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/load_error_rb.html b/src/files/activesupport/lib/active_support/core_ext/load_error_rb.html index 849a1da69f..25c3d910d5 100644 --- a/src/files/activesupport/lib/active_support/core_ext/load_error_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/load_error_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/load_error.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/marshal_rb.html b/src/files/activesupport/lib/active_support/core_ext/marshal_rb.html deleted file mode 100644 index c1e62cf7d3..0000000000 --- a/src/files/activesupport/lib/active_support/core_ext/marshal_rb.html +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: marshal.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • active_support/core_ext/string/inflections
    • - -
    - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activesupport/lib/active_support/core_ext/module/aliasing_rb.html b/src/files/activesupport/lib/active_support/core_ext/module/aliasing_rb.html index 5935253c4e..e49ca26633 100644 --- a/src/files/activesupport/lib/active_support/core_ext/module/aliasing_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/module/aliasing_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/module/aliasing.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/module/anonymous_rb.html b/src/files/activesupport/lib/active_support/core_ext/module/anonymous_rb.html index 7b4cd3d807..6b4e709208 100644 --- a/src/files/activesupport/lib/active_support/core_ext/module/anonymous_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/module/anonymous_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/module/anonymous.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/module/attr_internal_rb.html b/src/files/activesupport/lib/active_support/core_ext/module/attr_internal_rb.html index 62035e65b1..6e3a3f7599 100644 --- a/src/files/activesupport/lib/active_support/core_ext/module/attr_internal_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/module/attr_internal_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/module/attr_internal.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread_rb.html b/src/files/activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread_rb.html index c4377163fc..c3f2975aca 100644 --- a/src/files/activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/module/attribute_accessors_rb.html b/src/files/activesupport/lib/active_support/core_ext/module/attribute_accessors_rb.html index 4ab490fb3b..2e5da54e0e 100644 --- a/src/files/activesupport/lib/active_support/core_ext/module/attribute_accessors_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/module/attribute_accessors_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/module/attribute_accessors.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/module/concerning_rb.html b/src/files/activesupport/lib/active_support/core_ext/module/concerning_rb.html index a8921684c5..468152ccc3 100644 --- a/src/files/activesupport/lib/active_support/core_ext/module/concerning_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/module/concerning_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/module/concerning.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/module/delegation_rb.html b/src/files/activesupport/lib/active_support/core_ext/module/delegation_rb.html index 95ca5346cc..e09d4ad67f 100644 --- a/src/files/activesupport/lib/active_support/core_ext/module/delegation_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/module/delegation_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/module/delegation.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/module/deprecation_rb.html b/src/files/activesupport/lib/active_support/core_ext/module/deprecation_rb.html index 49803336af..749d180b67 100644 --- a/src/files/activesupport/lib/active_support/core_ext/module/deprecation_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/module/deprecation_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/module/deprecation.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/module/introspection_rb.html b/src/files/activesupport/lib/active_support/core_ext/module/introspection_rb.html index d4cc56d82b..156cc6c279 100644 --- a/src/files/activesupport/lib/active_support/core_ext/module/introspection_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/module/introspection_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/module/introspection.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/module/reachable_rb.html b/src/files/activesupport/lib/active_support/core_ext/module/reachable_rb.html deleted file mode 100644 index 16943cfe7d..0000000000 --- a/src/files/activesupport/lib/active_support/core_ext/module/reachable_rb.html +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: reachable.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • active_support/core_ext/module/anonymous
    • - -
    • active_support/core_ext/string/inflections
    • - -
    - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activesupport/lib/active_support/core_ext/module/redefine_method_rb.html b/src/files/activesupport/lib/active_support/core_ext/module/redefine_method_rb.html index 5e3afa2b70..3533f1996b 100644 --- a/src/files/activesupport/lib/active_support/core_ext/module/redefine_method_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/module/redefine_method_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/module/redefine_method.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/module/remove_method_rb.html b/src/files/activesupport/lib/active_support/core_ext/module/remove_method_rb.html index c07b635691..33c88370cd 100644 --- a/src/files/activesupport/lib/active_support/core_ext/module/remove_method_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/module/remove_method_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/module/remove_method.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/module_rb.html b/src/files/activesupport/lib/active_support/core_ext/module_rb.html index a8c5965519..bc731994ab 100644 --- a/src/files/activesupport/lib/active_support/core_ext/module_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/module_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/module.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/name_error_rb.html b/src/files/activesupport/lib/active_support/core_ext/name_error_rb.html index b7d319aab9..bfde3a233c 100644 --- a/src/files/activesupport/lib/active_support/core_ext/name_error_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/name_error_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/name_error.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/numeric/bytes_rb.html b/src/files/activesupport/lib/active_support/core_ext/numeric/bytes_rb.html index 7a33d762bc..88bcd1bbe4 100644 --- a/src/files/activesupport/lib/active_support/core_ext/numeric/bytes_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/numeric/bytes_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/numeric/bytes.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/numeric/conversions_rb.html b/src/files/activesupport/lib/active_support/core_ext/numeric/conversions_rb.html index b5dc95cc9f..a86918059b 100644 --- a/src/files/activesupport/lib/active_support/core_ext/numeric/conversions_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/numeric/conversions_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/numeric/conversions.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/numeric/deprecated_conversions_rb.html b/src/files/activesupport/lib/active_support/core_ext/numeric/deprecated_conversions_rb.html deleted file mode 100644 index 31b2068f77..0000000000 --- a/src/files/activesupport/lib/active_support/core_ext/numeric/deprecated_conversions_rb.html +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: deprecated_conversions.rb -layout: default ---- -
    - - -
    -
    - - - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activesupport/lib/active_support/core_ext/numeric/inquiry_rb.html b/src/files/activesupport/lib/active_support/core_ext/numeric/inquiry_rb.html deleted file mode 100644 index 8a83441992..0000000000 --- a/src/files/activesupport/lib/active_support/core_ext/numeric/inquiry_rb.html +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: inquiry.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • active_support/deprecation
    • - -
    - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activesupport/lib/active_support/core_ext/numeric/time_rb.html b/src/files/activesupport/lib/active_support/core_ext/numeric/time_rb.html index eb504dacea..fd3c354e82 100644 --- a/src/files/activesupport/lib/active_support/core_ext/numeric/time_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/numeric/time_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/numeric/time.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/numeric_rb.html b/src/files/activesupport/lib/active_support/core_ext/numeric_rb.html index 8049af6f66..138547a2b4 100644 --- a/src/files/activesupport/lib/active_support/core_ext/numeric_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/numeric_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/numeric.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/object/acts_like_rb.html b/src/files/activesupport/lib/active_support/core_ext/object/acts_like_rb.html index 38662f9ff0..8f0fb2e920 100644 --- a/src/files/activesupport/lib/active_support/core_ext/object/acts_like_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/object/acts_like_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/object/acts_like.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/object/blank_rb.html b/src/files/activesupport/lib/active_support/core_ext/object/blank_rb.html index 2881cbe6ce..5b08bd26c7 100644 --- a/src/files/activesupport/lib/active_support/core_ext/object/blank_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/object/blank_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/object/blank.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/object/conversions_rb.html b/src/files/activesupport/lib/active_support/core_ext/object/conversions_rb.html index 1982a9890f..dbc825655f 100644 --- a/src/files/activesupport/lib/active_support/core_ext/object/conversions_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/object/conversions_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/object/conversions.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/object/deep_dup_rb.html b/src/files/activesupport/lib/active_support/core_ext/object/deep_dup_rb.html index 903b04aaef..de627efe41 100644 --- a/src/files/activesupport/lib/active_support/core_ext/object/deep_dup_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/object/deep_dup_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/object/deep_dup.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/object/duplicable_rb.html b/src/files/activesupport/lib/active_support/core_ext/object/duplicable_rb.html index 761730445c..cf024b8098 100644 --- a/src/files/activesupport/lib/active_support/core_ext/object/duplicable_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/object/duplicable_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/object/duplicable.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/object/inclusion_rb.html b/src/files/activesupport/lib/active_support/core_ext/object/inclusion_rb.html index cb4f0c73d8..627d99ae32 100644 --- a/src/files/activesupport/lib/active_support/core_ext/object/inclusion_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/object/inclusion_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/object/inclusion.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/object/instance_variables_rb.html b/src/files/activesupport/lib/active_support/core_ext/object/instance_variables_rb.html index e40e1cd7e1..3f625f9b11 100644 --- a/src/files/activesupport/lib/active_support/core_ext/object/instance_variables_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/object/instance_variables_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/object/instance_variables.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/object/json_rb.html b/src/files/activesupport/lib/active_support/core_ext/object/json_rb.html index a7b18e02e4..733e5269b7 100644 --- a/src/files/activesupport/lib/active_support/core_ext/object/json_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/object/json_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/object/json.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/object/to_param_rb.html b/src/files/activesupport/lib/active_support/core_ext/object/to_param_rb.html index 70c01d78db..f7b746a0f9 100644 --- a/src/files/activesupport/lib/active_support/core_ext/object/to_param_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/object/to_param_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/object/to_param.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/object/to_query_rb.html b/src/files/activesupport/lib/active_support/core_ext/object/to_query_rb.html index dc5f153675..f4aeb5fed4 100644 --- a/src/files/activesupport/lib/active_support/core_ext/object/to_query_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/object/to_query_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/object/to_query.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/object/try_rb.html b/src/files/activesupport/lib/active_support/core_ext/object/try_rb.html index 6137008953..81b0424fed 100644 --- a/src/files/activesupport/lib/active_support/core_ext/object/try_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/object/try_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/object/try.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/object/with_options_rb.html b/src/files/activesupport/lib/active_support/core_ext/object/with_options_rb.html index 141fde100b..b78aa83bab 100644 --- a/src/files/activesupport/lib/active_support/core_ext/object/with_options_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/object/with_options_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/object/with_options.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/object/with_rb.html b/src/files/activesupport/lib/active_support/core_ext/object/with_rb.html index 3f23cddc4e..dbd0a4814d 100644 --- a/src/files/activesupport/lib/active_support/core_ext/object/with_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/object/with_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/object/with.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/object_rb.html b/src/files/activesupport/lib/active_support/core_ext/object_rb.html index 194b699317..0b9f049402 100644 --- a/src/files/activesupport/lib/active_support/core_ext/object_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/object_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/object.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/pathname/blank_rb.html b/src/files/activesupport/lib/active_support/core_ext/pathname/blank_rb.html index 1593c355de..a334ae0120 100644 --- a/src/files/activesupport/lib/active_support/core_ext/pathname/blank_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/pathname/blank_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/pathname/blank.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/pathname/existence_rb.html b/src/files/activesupport/lib/active_support/core_ext/pathname/existence_rb.html index 5e891c378d..44aac99d6d 100644 --- a/src/files/activesupport/lib/active_support/core_ext/pathname/existence_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/pathname/existence_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/pathname/existence.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/pathname_rb.html b/src/files/activesupport/lib/active_support/core_ext/pathname_rb.html index 36963b78c7..098804c112 100644 --- a/src/files/activesupport/lib/active_support/core_ext/pathname_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/pathname_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/pathname.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/range/compare_range_rb.html b/src/files/activesupport/lib/active_support/core_ext/range/compare_range_rb.html index 9f8966b652..65294de517 100644 --- a/src/files/activesupport/lib/active_support/core_ext/range/compare_range_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/range/compare_range_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/range/compare_range.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/range/conversions_rb.html b/src/files/activesupport/lib/active_support/core_ext/range/conversions_rb.html index e8cef68e6d..241b1c3767 100644 --- a/src/files/activesupport/lib/active_support/core_ext/range/conversions_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/range/conversions_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/range/conversions.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/range/deprecated_conversions_rb.html b/src/files/activesupport/lib/active_support/core_ext/range/deprecated_conversions_rb.html deleted file mode 100644 index 8c4de5eb1d..0000000000 --- a/src/files/activesupport/lib/active_support/core_ext/range/deprecated_conversions_rb.html +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: deprecated_conversions.rb -layout: default ---- -
    - - -
    -
    - - - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activesupport/lib/active_support/core_ext/range/each_rb.html b/src/files/activesupport/lib/active_support/core_ext/range/each_rb.html index 951e6087a3..207b698b35 100644 --- a/src/files/activesupport/lib/active_support/core_ext/range/each_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/range/each_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/range/each.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/range/include_range_rb.html b/src/files/activesupport/lib/active_support/core_ext/range/include_range_rb.html deleted file mode 100644 index 23b11a5dd4..0000000000 --- a/src/files/activesupport/lib/active_support/core_ext/range/include_range_rb.html +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: include_range.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • active_support/deprecation
    • - -
    • active_support/core_ext/range/compare_range
    • - -
    - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activesupport/lib/active_support/core_ext/range/include_time_with_zone_rb.html b/src/files/activesupport/lib/active_support/core_ext/range/include_time_with_zone_rb.html deleted file mode 100644 index 2220c553ee..0000000000 --- a/src/files/activesupport/lib/active_support/core_ext/range/include_time_with_zone_rb.html +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: include_time_with_zone.rb -layout: default ---- -
    - - -
    -
    - - - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activesupport/lib/active_support/core_ext/range/overlap_rb.html b/src/files/activesupport/lib/active_support/core_ext/range/overlap_rb.html index afcf1997f3..7c112a3522 100644 --- a/src/files/activesupport/lib/active_support/core_ext/range/overlap_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/range/overlap_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/range/overlap.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/range/overlaps_rb.html b/src/files/activesupport/lib/active_support/core_ext/range/overlaps_rb.html deleted file mode 100644 index 4737dd39cc..0000000000 --- a/src/files/activesupport/lib/active_support/core_ext/range/overlaps_rb.html +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: overlaps.rb -layout: default ---- -
    - - -
    -
    - - - - - - - - - -

    Namespace

    - - - - -

    Class

    - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activesupport/lib/active_support/core_ext/range_rb.html b/src/files/activesupport/lib/active_support/core_ext/range_rb.html index 6ebc4d6aa0..091b36aa13 100644 --- a/src/files/activesupport/lib/active_support/core_ext/range_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/range_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/range.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/regexp_rb.html b/src/files/activesupport/lib/active_support/core_ext/regexp_rb.html index 176763e2a3..ab8851c7b8 100644 --- a/src/files/activesupport/lib/active_support/core_ext/regexp_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/regexp_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/regexp.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/securerandom_rb.html b/src/files/activesupport/lib/active_support/core_ext/securerandom_rb.html index 14a0fef7bb..06d2cd5399 100644 --- a/src/files/activesupport/lib/active_support/core_ext/securerandom_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/securerandom_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/securerandom.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/string/access_rb.html b/src/files/activesupport/lib/active_support/core_ext/string/access_rb.html index 8ff13efa5e..eac5d5c02d 100644 --- a/src/files/activesupport/lib/active_support/core_ext/string/access_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/string/access_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/string/access.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/string/behavior_rb.html b/src/files/activesupport/lib/active_support/core_ext/string/behavior_rb.html index 57f84a2e33..0f229fe4bc 100644 --- a/src/files/activesupport/lib/active_support/core_ext/string/behavior_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/string/behavior_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/string/behavior.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/string/conversions_rb.html b/src/files/activesupport/lib/active_support/core_ext/string/conversions_rb.html index 0cf86172d0..6118861ca4 100644 --- a/src/files/activesupport/lib/active_support/core_ext/string/conversions_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/string/conversions_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/string/conversions.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/string/exclude_rb.html b/src/files/activesupport/lib/active_support/core_ext/string/exclude_rb.html index c99817aae1..f17448c202 100644 --- a/src/files/activesupport/lib/active_support/core_ext/string/exclude_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/string/exclude_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/string/exclude.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/string/filters_rb.html b/src/files/activesupport/lib/active_support/core_ext/string/filters_rb.html index cea6572f91..de844b6bfa 100644 --- a/src/files/activesupport/lib/active_support/core_ext/string/filters_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/string/filters_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/string/filters.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/string/indent_rb.html b/src/files/activesupport/lib/active_support/core_ext/string/indent_rb.html index 3d4164c0cd..d7cc09494d 100644 --- a/src/files/activesupport/lib/active_support/core_ext/string/indent_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/string/indent_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/string/indent.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/string/inflections_rb.html b/src/files/activesupport/lib/active_support/core_ext/string/inflections_rb.html index 669b817b49..e4d50cd9f3 100644 --- a/src/files/activesupport/lib/active_support/core_ext/string/inflections_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/string/inflections_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/string/inflections.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/string/inquiry_rb.html b/src/files/activesupport/lib/active_support/core_ext/string/inquiry_rb.html index 11933f5918..a3536f4ff9 100644 --- a/src/files/activesupport/lib/active_support/core_ext/string/inquiry_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/string/inquiry_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/string/inquiry.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/string/multibyte_rb.html b/src/files/activesupport/lib/active_support/core_ext/string/multibyte_rb.html index 26d40155e6..2ec9ebcde5 100644 --- a/src/files/activesupport/lib/active_support/core_ext/string/multibyte_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/string/multibyte_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/string/multibyte.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/string/output_safety_rb.html b/src/files/activesupport/lib/active_support/core_ext/string/output_safety_rb.html index db60d2b011..8bad07fc35 100644 --- a/src/files/activesupport/lib/active_support/core_ext/string/output_safety_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/string/output_safety_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/string/output_safety.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/string/starts_ends_with_rb.html b/src/files/activesupport/lib/active_support/core_ext/string/starts_ends_with_rb.html index 093a64eea4..0a253431a5 100644 --- a/src/files/activesupport/lib/active_support/core_ext/string/starts_ends_with_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/string/starts_ends_with_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/string/starts_ends_with.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/string/strip_rb.html b/src/files/activesupport/lib/active_support/core_ext/string/strip_rb.html index 2a7eee6c72..9072eac305 100644 --- a/src/files/activesupport/lib/active_support/core_ext/string/strip_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/string/strip_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/string/strip.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/string/zones_rb.html b/src/files/activesupport/lib/active_support/core_ext/string/zones_rb.html index 7cd788aac4..04ae17c0ad 100644 --- a/src/files/activesupport/lib/active_support/core_ext/string/zones_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/string/zones_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/string/zones.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/string_rb.html b/src/files/activesupport/lib/active_support/core_ext/string_rb.html index 19b41e8032..e98ba0d127 100644 --- a/src/files/activesupport/lib/active_support/core_ext/string_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/string_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/string.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/symbol/starts_ends_with_rb.html b/src/files/activesupport/lib/active_support/core_ext/symbol/starts_ends_with_rb.html index d60ee2fa6b..b5210f7e36 100644 --- a/src/files/activesupport/lib/active_support/core_ext/symbol/starts_ends_with_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/symbol/starts_ends_with_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/symbol/starts_ends_with.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/symbol_rb.html b/src/files/activesupport/lib/active_support/core_ext/symbol_rb.html index 62d3316507..c5281f9a78 100644 --- a/src/files/activesupport/lib/active_support/core_ext/symbol_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/symbol_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/symbol.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/thread/backtrace/location_rb.html b/src/files/activesupport/lib/active_support/core_ext/thread/backtrace/location_rb.html index ceec5afbbd..5a19e30065 100644 --- a/src/files/activesupport/lib/active_support/core_ext/thread/backtrace/location_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/thread/backtrace/location_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/thread/backtrace/location.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/time/acts_like_rb.html b/src/files/activesupport/lib/active_support/core_ext/time/acts_like_rb.html index 99462d5b30..2968f34ec0 100644 --- a/src/files/activesupport/lib/active_support/core_ext/time/acts_like_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/time/acts_like_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/time/acts_like.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/time/calculations_rb.html b/src/files/activesupport/lib/active_support/core_ext/time/calculations_rb.html index 0cd1aeca27..a0338cf335 100644 --- a/src/files/activesupport/lib/active_support/core_ext/time/calculations_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/time/calculations_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/time/calculations.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/time/compatibility_rb.html b/src/files/activesupport/lib/active_support/core_ext/time/compatibility_rb.html index a5a90889dd..037b6e7e70 100644 --- a/src/files/activesupport/lib/active_support/core_ext/time/compatibility_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/time/compatibility_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/time/compatibility.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/time/conversions_rb.html b/src/files/activesupport/lib/active_support/core_ext/time/conversions_rb.html index 75cbfbad52..6d53a3648c 100644 --- a/src/files/activesupport/lib/active_support/core_ext/time/conversions_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/time/conversions_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/time/conversions.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/time/deprecated_conversions_rb.html b/src/files/activesupport/lib/active_support/core_ext/time/deprecated_conversions_rb.html deleted file mode 100644 index 2afaec2de3..0000000000 --- a/src/files/activesupport/lib/active_support/core_ext/time/deprecated_conversions_rb.html +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: deprecated_conversions.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • time
    • - -
    - - - - - - - -

    Namespace

    - - -

    Module

    - - - - -

    Class

    - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activesupport/lib/active_support/core_ext/time/zones_rb.html b/src/files/activesupport/lib/active_support/core_ext/time/zones_rb.html index 280808182b..dc3d6cab2f 100644 --- a/src/files/activesupport/lib/active_support/core_ext/time/zones_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/time/zones_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/time/zones.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/time_rb.html b/src/files/activesupport/lib/active_support/core_ext/time_rb.html index 0d188be92d..3ce634a32a 100644 --- a/src/files/activesupport/lib/active_support/core_ext/time_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext/time_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext/time.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/core_ext/uri_rb.html b/src/files/activesupport/lib/active_support/core_ext/uri_rb.html deleted file mode 100644 index f0e7fd508d..0000000000 --- a/src/files/activesupport/lib/active_support/core_ext/uri_rb.html +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: uri.rb -layout: default ---- -
    - - -
    -
    - - - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activesupport/lib/active_support/core_ext_rb.html b/src/files/activesupport/lib/active_support/core_ext_rb.html index 51d8569731..77bf5994f7 100644 --- a/src/files/activesupport/lib/active_support/core_ext_rb.html +++ b/src/files/activesupport/lib/active_support/core_ext_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/core_ext.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/current_attributes/test_helper_rb.html b/src/files/activesupport/lib/active_support/current_attributes/test_helper_rb.html index da83033b5f..67edb6e176 100644 --- a/src/files/activesupport/lib/active_support/current_attributes/test_helper_rb.html +++ b/src/files/activesupport/lib/active_support/current_attributes/test_helper_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/current_attributes/test_helper.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/current_attributes_rb.html b/src/files/activesupport/lib/active_support/current_attributes_rb.html index b8a7aea0af..f766b0ca88 100644 --- a/src/files/activesupport/lib/active_support/current_attributes_rb.html +++ b/src/files/activesupport/lib/active_support/current_attributes_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/current_attributes.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/deep_mergeable_rb.html b/src/files/activesupport/lib/active_support/deep_mergeable_rb.html index b0b8978f6b..3a682e63bb 100644 --- a/src/files/activesupport/lib/active_support/deep_mergeable_rb.html +++ b/src/files/activesupport/lib/active_support/deep_mergeable_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/deep_mergeable.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/dependencies/autoload_rb.html b/src/files/activesupport/lib/active_support/dependencies/autoload_rb.html index 44e17fe1a5..2bde078e0a 100644 --- a/src/files/activesupport/lib/active_support/dependencies/autoload_rb.html +++ b/src/files/activesupport/lib/active_support/dependencies/autoload_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/dependencies/autoload.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/dependencies/interlock_rb.html b/src/files/activesupport/lib/active_support/dependencies/interlock_rb.html index 7ed257b34e..11bfb23ae9 100644 --- a/src/files/activesupport/lib/active_support/dependencies/interlock_rb.html +++ b/src/files/activesupport/lib/active_support/dependencies/interlock_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/dependencies/interlock.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/dependencies/require_dependency_rb.html b/src/files/activesupport/lib/active_support/dependencies/require_dependency_rb.html index c7759f61b5..7279869197 100644 --- a/src/files/activesupport/lib/active_support/dependencies/require_dependency_rb.html +++ b/src/files/activesupport/lib/active_support/dependencies/require_dependency_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/dependencies/require_dependency.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/dependencies/zeitwerk_integration_rb.html b/src/files/activesupport/lib/active_support/dependencies/zeitwerk_integration_rb.html deleted file mode 100644 index da25ac51bf..0000000000 --- a/src/files/activesupport/lib/active_support/dependencies/zeitwerk_integration_rb.html +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: zeitwerk_integration.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • set
    • - -
    • active_support/core_ext/string/inflections
    • - -
    - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activesupport/lib/active_support/dependencies_rb.html b/src/files/activesupport/lib/active_support/dependencies_rb.html index 0fde307681..6ad2e3116c 100644 --- a/src/files/activesupport/lib/active_support/dependencies_rb.html +++ b/src/files/activesupport/lib/active_support/dependencies_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/dependencies.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/deprecation/behaviors_rb.html b/src/files/activesupport/lib/active_support/deprecation/behaviors_rb.html index 51d8241353..877a36b7ca 100644 --- a/src/files/activesupport/lib/active_support/deprecation/behaviors_rb.html +++ b/src/files/activesupport/lib/active_support/deprecation/behaviors_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/deprecation/behaviors.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/deprecation/constant_accessor_rb.html b/src/files/activesupport/lib/active_support/deprecation/constant_accessor_rb.html index 8438d3ae38..6118c6c127 100644 --- a/src/files/activesupport/lib/active_support/deprecation/constant_accessor_rb.html +++ b/src/files/activesupport/lib/active_support/deprecation/constant_accessor_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/deprecation/constant_accessor.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/deprecation/deprecators_rb.html b/src/files/activesupport/lib/active_support/deprecation/deprecators_rb.html index a1c07ce4d2..fa8f1f003e 100644 --- a/src/files/activesupport/lib/active_support/deprecation/deprecators_rb.html +++ b/src/files/activesupport/lib/active_support/deprecation/deprecators_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/deprecation/deprecators.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/deprecation/disallowed_rb.html b/src/files/activesupport/lib/active_support/deprecation/disallowed_rb.html index bb2fe42c16..af61ffe567 100644 --- a/src/files/activesupport/lib/active_support/deprecation/disallowed_rb.html +++ b/src/files/activesupport/lib/active_support/deprecation/disallowed_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/deprecation/disallowed.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/deprecation/instance_delegator_rb.html b/src/files/activesupport/lib/active_support/deprecation/instance_delegator_rb.html index e670ce9ed0..a4d18916c2 100644 --- a/src/files/activesupport/lib/active_support/deprecation/instance_delegator_rb.html +++ b/src/files/activesupport/lib/active_support/deprecation/instance_delegator_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/deprecation/instance_delegator.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/deprecation/method_wrappers_rb.html b/src/files/activesupport/lib/active_support/deprecation/method_wrappers_rb.html index 22d27d294e..00509b2174 100644 --- a/src/files/activesupport/lib/active_support/deprecation/method_wrappers_rb.html +++ b/src/files/activesupport/lib/active_support/deprecation/method_wrappers_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/deprecation/method_wrappers.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/deprecation/proxy_wrappers_rb.html b/src/files/activesupport/lib/active_support/deprecation/proxy_wrappers_rb.html index 119ebf9240..500f4cf128 100644 --- a/src/files/activesupport/lib/active_support/deprecation/proxy_wrappers_rb.html +++ b/src/files/activesupport/lib/active_support/deprecation/proxy_wrappers_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/deprecation/proxy_wrappers.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/deprecation/reporting_rb.html b/src/files/activesupport/lib/active_support/deprecation/reporting_rb.html index 47c96b3943..15cb49b280 100644 --- a/src/files/activesupport/lib/active_support/deprecation/reporting_rb.html +++ b/src/files/activesupport/lib/active_support/deprecation/reporting_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/deprecation/reporting.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/deprecation_rb.html b/src/files/activesupport/lib/active_support/deprecation_rb.html index d5f58990fd..df96118b6b 100644 --- a/src/files/activesupport/lib/active_support/deprecation_rb.html +++ b/src/files/activesupport/lib/active_support/deprecation_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/deprecation.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/deprecator_rb.html b/src/files/activesupport/lib/active_support/deprecator_rb.html index 2e51ed05be..b49c6e0185 100644 --- a/src/files/activesupport/lib/active_support/deprecator_rb.html +++ b/src/files/activesupport/lib/active_support/deprecator_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/deprecator.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/descendants_tracker_rb.html b/src/files/activesupport/lib/active_support/descendants_tracker_rb.html index df3e4f310b..04c8c6cdfd 100644 --- a/src/files/activesupport/lib/active_support/descendants_tracker_rb.html +++ b/src/files/activesupport/lib/active_support/descendants_tracker_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/descendants_tracker.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/digest_rb.html b/src/files/activesupport/lib/active_support/digest_rb.html index 3d82a2431a..1ad233a663 100644 --- a/src/files/activesupport/lib/active_support/digest_rb.html +++ b/src/files/activesupport/lib/active_support/digest_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/digest.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/duration/iso8601_parser_rb.html b/src/files/activesupport/lib/active_support/duration/iso8601_parser_rb.html index 91704e767d..710c77cfc5 100644 --- a/src/files/activesupport/lib/active_support/duration/iso8601_parser_rb.html +++ b/src/files/activesupport/lib/active_support/duration/iso8601_parser_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/duration/iso8601_parser.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/duration/iso8601_serializer_rb.html b/src/files/activesupport/lib/active_support/duration/iso8601_serializer_rb.html index 8c44b9c076..16083fb0b9 100644 --- a/src/files/activesupport/lib/active_support/duration/iso8601_serializer_rb.html +++ b/src/files/activesupport/lib/active_support/duration/iso8601_serializer_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/duration/iso8601_serializer.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/duration_rb.html b/src/files/activesupport/lib/active_support/duration_rb.html index 9c259e290d..38f67761a7 100644 --- a/src/files/activesupport/lib/active_support/duration_rb.html +++ b/src/files/activesupport/lib/active_support/duration_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/duration.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/encrypted_configuration_rb.html b/src/files/activesupport/lib/active_support/encrypted_configuration_rb.html index aa31d8fa1f..90d7f3ccde 100644 --- a/src/files/activesupport/lib/active_support/encrypted_configuration_rb.html +++ b/src/files/activesupport/lib/active_support/encrypted_configuration_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/encrypted_configuration.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/encrypted_file_rb.html b/src/files/activesupport/lib/active_support/encrypted_file_rb.html index b4b695fc3f..07daa79b8c 100644 --- a/src/files/activesupport/lib/active_support/encrypted_file_rb.html +++ b/src/files/activesupport/lib/active_support/encrypted_file_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/encrypted_file.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/environment_inquirer_rb.html b/src/files/activesupport/lib/active_support/environment_inquirer_rb.html index fc97459d08..72b1146c1c 100644 --- a/src/files/activesupport/lib/active_support/environment_inquirer_rb.html +++ b/src/files/activesupport/lib/active_support/environment_inquirer_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/environment_inquirer.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/error_reporter/test_helper_rb.html b/src/files/activesupport/lib/active_support/error_reporter/test_helper_rb.html index 6a39dcf74d..facaff79d8 100644 --- a/src/files/activesupport/lib/active_support/error_reporter/test_helper_rb.html +++ b/src/files/activesupport/lib/active_support/error_reporter/test_helper_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/error_reporter/test_helper.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/error_reporter_rb.html b/src/files/activesupport/lib/active_support/error_reporter_rb.html index ed22379ae6..bf5e9f4fea 100644 --- a/src/files/activesupport/lib/active_support/error_reporter_rb.html +++ b/src/files/activesupport/lib/active_support/error_reporter_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/error_reporter.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/evented_file_update_checker_rb.html b/src/files/activesupport/lib/active_support/evented_file_update_checker_rb.html index 04d31a5cd7..f56111c8dc 100644 --- a/src/files/activesupport/lib/active_support/evented_file_update_checker_rb.html +++ b/src/files/activesupport/lib/active_support/evented_file_update_checker_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/evented_file_update_checker.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/execution_context/test_helper_rb.html b/src/files/activesupport/lib/active_support/execution_context/test_helper_rb.html index 17674753b8..2774df0471 100644 --- a/src/files/activesupport/lib/active_support/execution_context/test_helper_rb.html +++ b/src/files/activesupport/lib/active_support/execution_context/test_helper_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/execution_context/test_helper.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/execution_context_rb.html b/src/files/activesupport/lib/active_support/execution_context_rb.html index 78a49c3fc1..5b01fde9af 100644 --- a/src/files/activesupport/lib/active_support/execution_context_rb.html +++ b/src/files/activesupport/lib/active_support/execution_context_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/execution_context.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/execution_wrapper_rb.html b/src/files/activesupport/lib/active_support/execution_wrapper_rb.html index c3531e4ac8..b981de52ae 100644 --- a/src/files/activesupport/lib/active_support/execution_wrapper_rb.html +++ b/src/files/activesupport/lib/active_support/execution_wrapper_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/execution_wrapper.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/executor/test_helper_rb.html b/src/files/activesupport/lib/active_support/executor/test_helper_rb.html index 9eb9464a6e..2806562db9 100644 --- a/src/files/activesupport/lib/active_support/executor/test_helper_rb.html +++ b/src/files/activesupport/lib/active_support/executor/test_helper_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/executor/test_helper.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/executor_rb.html b/src/files/activesupport/lib/active_support/executor_rb.html index c4653fb45e..0423f22fa5 100644 --- a/src/files/activesupport/lib/active_support/executor_rb.html +++ b/src/files/activesupport/lib/active_support/executor_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/executor.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/file_update_checker_rb.html b/src/files/activesupport/lib/active_support/file_update_checker_rb.html index 7666c5ab64..318583ef4e 100644 --- a/src/files/activesupport/lib/active_support/file_update_checker_rb.html +++ b/src/files/activesupport/lib/active_support/file_update_checker_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/file_update_checker.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/fork_tracker_rb.html b/src/files/activesupport/lib/active_support/fork_tracker_rb.html index 4e7d8eb191..7044e9faed 100644 --- a/src/files/activesupport/lib/active_support/fork_tracker_rb.html +++ b/src/files/activesupport/lib/active_support/fork_tracker_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/fork_tracker.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/gem_version_rb.html b/src/files/activesupport/lib/active_support/gem_version_rb.html index 64373727b1..1ce722b6db 100644 --- a/src/files/activesupport/lib/active_support/gem_version_rb.html +++ b/src/files/activesupport/lib/active_support/gem_version_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/gem_version.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/gzip_rb.html b/src/files/activesupport/lib/active_support/gzip_rb.html index fd1220b871..12e909d4c8 100644 --- a/src/files/activesupport/lib/active_support/gzip_rb.html +++ b/src/files/activesupport/lib/active_support/gzip_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/gzip.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/hash_with_indifferent_access_rb.html b/src/files/activesupport/lib/active_support/hash_with_indifferent_access_rb.html index 3f99ef3ea5..797b3cde6e 100644 --- a/src/files/activesupport/lib/active_support/hash_with_indifferent_access_rb.html +++ b/src/files/activesupport/lib/active_support/hash_with_indifferent_access_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/hash_with_indifferent_access.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/html_safe_translation_rb.html b/src/files/activesupport/lib/active_support/html_safe_translation_rb.html index bb2d604ff3..208e51bf0f 100644 --- a/src/files/activesupport/lib/active_support/html_safe_translation_rb.html +++ b/src/files/activesupport/lib/active_support/html_safe_translation_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/html_safe_translation.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/i18n_railtie_rb.html b/src/files/activesupport/lib/active_support/i18n_railtie_rb.html index 55b551ef4d..3287098782 100644 --- a/src/files/activesupport/lib/active_support/i18n_railtie_rb.html +++ b/src/files/activesupport/lib/active_support/i18n_railtie_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/i18n_railtie.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/i18n_rb.html b/src/files/activesupport/lib/active_support/i18n_rb.html index b17b258e6c..2ff0f7e3c8 100644 --- a/src/files/activesupport/lib/active_support/i18n_rb.html +++ b/src/files/activesupport/lib/active_support/i18n_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/i18n.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/inflections_rb.html b/src/files/activesupport/lib/active_support/inflections_rb.html index 2260300e78..dc692281c7 100644 --- a/src/files/activesupport/lib/active_support/inflections_rb.html +++ b/src/files/activesupport/lib/active_support/inflections_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/inflections.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/inflector/inflections_rb.html b/src/files/activesupport/lib/active_support/inflector/inflections_rb.html index f6fe15c89f..5cbaaedecc 100644 --- a/src/files/activesupport/lib/active_support/inflector/inflections_rb.html +++ b/src/files/activesupport/lib/active_support/inflector/inflections_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/inflector/inflections.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/inflector/methods_rb.html b/src/files/activesupport/lib/active_support/inflector/methods_rb.html index 25243b0f16..9e18f804a9 100644 --- a/src/files/activesupport/lib/active_support/inflector/methods_rb.html +++ b/src/files/activesupport/lib/active_support/inflector/methods_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/inflector/methods.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/inflector/transliterate_rb.html b/src/files/activesupport/lib/active_support/inflector/transliterate_rb.html index 923cadc042..61b1f5e875 100644 --- a/src/files/activesupport/lib/active_support/inflector/transliterate_rb.html +++ b/src/files/activesupport/lib/active_support/inflector/transliterate_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/inflector/transliterate.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/inflector_rb.html b/src/files/activesupport/lib/active_support/inflector_rb.html index 2f0ea02e2f..568a756878 100644 --- a/src/files/activesupport/lib/active_support/inflector_rb.html +++ b/src/files/activesupport/lib/active_support/inflector_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/inflector.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/isolated_execution_state_rb.html b/src/files/activesupport/lib/active_support/isolated_execution_state_rb.html index 818336215e..095c149723 100644 --- a/src/files/activesupport/lib/active_support/isolated_execution_state_rb.html +++ b/src/files/activesupport/lib/active_support/isolated_execution_state_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/isolated_execution_state.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/json/decoding_rb.html b/src/files/activesupport/lib/active_support/json/decoding_rb.html index f080069752..afbe802283 100644 --- a/src/files/activesupport/lib/active_support/json/decoding_rb.html +++ b/src/files/activesupport/lib/active_support/json/decoding_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/json/decoding.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/json/encoding_rb.html b/src/files/activesupport/lib/active_support/json/encoding_rb.html index 213c0ac053..580def4dd4 100644 --- a/src/files/activesupport/lib/active_support/json/encoding_rb.html +++ b/src/files/activesupport/lib/active_support/json/encoding_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/json/encoding.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/json_rb.html b/src/files/activesupport/lib/active_support/json_rb.html index 73abec11b8..a52dbd5d82 100644 --- a/src/files/activesupport/lib/active_support/json_rb.html +++ b/src/files/activesupport/lib/active_support/json_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/json.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/key_generator_rb.html b/src/files/activesupport/lib/active_support/key_generator_rb.html index 5465f0eb03..7f2937ca53 100644 --- a/src/files/activesupport/lib/active_support/key_generator_rb.html +++ b/src/files/activesupport/lib/active_support/key_generator_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/key_generator.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/lazy_load_hooks_rb.html b/src/files/activesupport/lib/active_support/lazy_load_hooks_rb.html index 8d4644fde3..3d90532595 100644 --- a/src/files/activesupport/lib/active_support/lazy_load_hooks_rb.html +++ b/src/files/activesupport/lib/active_support/lazy_load_hooks_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/lazy_load_hooks.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/locale/en_rb.html b/src/files/activesupport/lib/active_support/locale/en_rb.html index ee80dc2c4c..a48a20e850 100644 --- a/src/files/activesupport/lib/active_support/locale/en_rb.html +++ b/src/files/activesupport/lib/active_support/locale/en_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/locale/en.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/log_subscriber/test_helper_rb.html b/src/files/activesupport/lib/active_support/log_subscriber/test_helper_rb.html index 5b82b7840d..d95c88adb8 100644 --- a/src/files/activesupport/lib/active_support/log_subscriber/test_helper_rb.html +++ b/src/files/activesupport/lib/active_support/log_subscriber/test_helper_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/log_subscriber/test_helper.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/log_subscriber_rb.html b/src/files/activesupport/lib/active_support/log_subscriber_rb.html index 4c0b3a957a..74474d37cb 100644 --- a/src/files/activesupport/lib/active_support/log_subscriber_rb.html +++ b/src/files/activesupport/lib/active_support/log_subscriber_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/log_subscriber.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/logger_rb.html b/src/files/activesupport/lib/active_support/logger_rb.html index 94f1be95ad..303eae7826 100644 --- a/src/files/activesupport/lib/active_support/logger_rb.html +++ b/src/files/activesupport/lib/active_support/logger_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/logger.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/logger_silence_rb.html b/src/files/activesupport/lib/active_support/logger_silence_rb.html index 2d2d493d52..e4d543e798 100644 --- a/src/files/activesupport/lib/active_support/logger_silence_rb.html +++ b/src/files/activesupport/lib/active_support/logger_silence_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/logger_silence.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/logger_thread_safe_level_rb.html b/src/files/activesupport/lib/active_support/logger_thread_safe_level_rb.html index 66962bd4cd..ba76d1ab0f 100644 --- a/src/files/activesupport/lib/active_support/logger_thread_safe_level_rb.html +++ b/src/files/activesupport/lib/active_support/logger_thread_safe_level_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/logger_thread_safe_level.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/message_encryptor_rb.html b/src/files/activesupport/lib/active_support/message_encryptor_rb.html index 448e577f9c..e4b71bd008 100644 --- a/src/files/activesupport/lib/active_support/message_encryptor_rb.html +++ b/src/files/activesupport/lib/active_support/message_encryptor_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/message_encryptor.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/message_encryptors_rb.html b/src/files/activesupport/lib/active_support/message_encryptors_rb.html index 0453663d20..48a9f3bf64 100644 --- a/src/files/activesupport/lib/active_support/message_encryptors_rb.html +++ b/src/files/activesupport/lib/active_support/message_encryptors_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/message_encryptors.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/message_pack/cache_serializer_rb.html b/src/files/activesupport/lib/active_support/message_pack/cache_serializer_rb.html index 4b69d617e8..f4eda044d2 100644 --- a/src/files/activesupport/lib/active_support/message_pack/cache_serializer_rb.html +++ b/src/files/activesupport/lib/active_support/message_pack/cache_serializer_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/message_pack/cache_serializer.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/message_pack/extensions_rb.html b/src/files/activesupport/lib/active_support/message_pack/extensions_rb.html index 069745c943..a4bc286bac 100644 --- a/src/files/activesupport/lib/active_support/message_pack/extensions_rb.html +++ b/src/files/activesupport/lib/active_support/message_pack/extensions_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/message_pack/extensions.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/message_pack/serializer_rb.html b/src/files/activesupport/lib/active_support/message_pack/serializer_rb.html index 286dc67bcb..1a8b0ba5e4 100644 --- a/src/files/activesupport/lib/active_support/message_pack/serializer_rb.html +++ b/src/files/activesupport/lib/active_support/message_pack/serializer_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/message_pack/serializer.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/message_pack_rb.html b/src/files/activesupport/lib/active_support/message_pack_rb.html index 453b31a33c..99718526c7 100644 --- a/src/files/activesupport/lib/active_support/message_pack_rb.html +++ b/src/files/activesupport/lib/active_support/message_pack_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/message_pack.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/message_verifier_rb.html b/src/files/activesupport/lib/active_support/message_verifier_rb.html index 395b8d82ae..b436d88b36 100644 --- a/src/files/activesupport/lib/active_support/message_verifier_rb.html +++ b/src/files/activesupport/lib/active_support/message_verifier_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/message_verifier.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/message_verifiers_rb.html b/src/files/activesupport/lib/active_support/message_verifiers_rb.html index 52a2147255..19821f2639 100644 --- a/src/files/activesupport/lib/active_support/message_verifiers_rb.html +++ b/src/files/activesupport/lib/active_support/message_verifiers_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/message_verifiers.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/messages/codec_rb.html b/src/files/activesupport/lib/active_support/messages/codec_rb.html index 0df3eb5913..06d4a3c6d7 100644 --- a/src/files/activesupport/lib/active_support/messages/codec_rb.html +++ b/src/files/activesupport/lib/active_support/messages/codec_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/messages/codec.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/messages/metadata_rb.html b/src/files/activesupport/lib/active_support/messages/metadata_rb.html index 81217119e2..d79dd89102 100644 --- a/src/files/activesupport/lib/active_support/messages/metadata_rb.html +++ b/src/files/activesupport/lib/active_support/messages/metadata_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/messages/metadata.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/messages/rotation_configuration_rb.html b/src/files/activesupport/lib/active_support/messages/rotation_configuration_rb.html index 1aa5d957b0..bac7359f2b 100644 --- a/src/files/activesupport/lib/active_support/messages/rotation_configuration_rb.html +++ b/src/files/activesupport/lib/active_support/messages/rotation_configuration_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/messages/rotation_configuration.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/messages/rotation_coordinator_rb.html b/src/files/activesupport/lib/active_support/messages/rotation_coordinator_rb.html index e1146aa2de..8ee0036a5e 100644 --- a/src/files/activesupport/lib/active_support/messages/rotation_coordinator_rb.html +++ b/src/files/activesupport/lib/active_support/messages/rotation_coordinator_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/messages/rotation_coordinator.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/messages/rotator_rb.html b/src/files/activesupport/lib/active_support/messages/rotator_rb.html index 4739288901..758f0a0b7b 100644 --- a/src/files/activesupport/lib/active_support/messages/rotator_rb.html +++ b/src/files/activesupport/lib/active_support/messages/rotator_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/messages/rotator.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/messages/serializer_with_fallback_rb.html b/src/files/activesupport/lib/active_support/messages/serializer_with_fallback_rb.html index 6f4d0be891..e3210efbfb 100644 --- a/src/files/activesupport/lib/active_support/messages/serializer_with_fallback_rb.html +++ b/src/files/activesupport/lib/active_support/messages/serializer_with_fallback_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/messages/serializer_with_fallback.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/multibyte/chars_rb.html b/src/files/activesupport/lib/active_support/multibyte/chars_rb.html index 2738727422..ff25d47632 100644 --- a/src/files/activesupport/lib/active_support/multibyte/chars_rb.html +++ b/src/files/activesupport/lib/active_support/multibyte/chars_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/multibyte/chars.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/multibyte/unicode_rb.html b/src/files/activesupport/lib/active_support/multibyte/unicode_rb.html index b6d5ea4722..7f23e6fa5a 100644 --- a/src/files/activesupport/lib/active_support/multibyte/unicode_rb.html +++ b/src/files/activesupport/lib/active_support/multibyte/unicode_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/multibyte/unicode.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/multibyte_rb.html b/src/files/activesupport/lib/active_support/multibyte_rb.html index b22af79d13..90fca569b9 100644 --- a/src/files/activesupport/lib/active_support/multibyte_rb.html +++ b/src/files/activesupport/lib/active_support/multibyte_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/multibyte.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/notifications/fanout_rb.html b/src/files/activesupport/lib/active_support/notifications/fanout_rb.html index e60f5461f0..c9c9678a5f 100644 --- a/src/files/activesupport/lib/active_support/notifications/fanout_rb.html +++ b/src/files/activesupport/lib/active_support/notifications/fanout_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/notifications/fanout.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/notifications/instrumenter_rb.html b/src/files/activesupport/lib/active_support/notifications/instrumenter_rb.html index 2ebb50a0d5..998d544d56 100644 --- a/src/files/activesupport/lib/active_support/notifications/instrumenter_rb.html +++ b/src/files/activesupport/lib/active_support/notifications/instrumenter_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/notifications/instrumenter.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/notifications_rb.html b/src/files/activesupport/lib/active_support/notifications_rb.html index a3459046e4..5b4c62bff8 100644 --- a/src/files/activesupport/lib/active_support/notifications_rb.html +++ b/src/files/activesupport/lib/active_support/notifications_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/notifications.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/number_helper/number_converter_rb.html b/src/files/activesupport/lib/active_support/number_helper/number_converter_rb.html index ce91ce6154..7c264420c7 100644 --- a/src/files/activesupport/lib/active_support/number_helper/number_converter_rb.html +++ b/src/files/activesupport/lib/active_support/number_helper/number_converter_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/number_helper/number_converter.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/number_helper/number_to_currency_converter_rb.html b/src/files/activesupport/lib/active_support/number_helper/number_to_currency_converter_rb.html index 499b98c63d..28fdc9e90c 100644 --- a/src/files/activesupport/lib/active_support/number_helper/number_to_currency_converter_rb.html +++ b/src/files/activesupport/lib/active_support/number_helper/number_to_currency_converter_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/number_helper/number_to_currency_converter.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/number_helper/number_to_delimited_converter_rb.html b/src/files/activesupport/lib/active_support/number_helper/number_to_delimited_converter_rb.html index a88a03f19f..c19b124411 100644 --- a/src/files/activesupport/lib/active_support/number_helper/number_to_delimited_converter_rb.html +++ b/src/files/activesupport/lib/active_support/number_helper/number_to_delimited_converter_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/number_helper/number_to_delimited_converter.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/number_helper/number_to_human_converter_rb.html b/src/files/activesupport/lib/active_support/number_helper/number_to_human_converter_rb.html index 73553cacef..e015cf2dcb 100644 --- a/src/files/activesupport/lib/active_support/number_helper/number_to_human_converter_rb.html +++ b/src/files/activesupport/lib/active_support/number_helper/number_to_human_converter_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/number_helper/number_to_human_converter.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/number_helper/number_to_human_size_converter_rb.html b/src/files/activesupport/lib/active_support/number_helper/number_to_human_size_converter_rb.html index 4e02230bb7..fab3be11ce 100644 --- a/src/files/activesupport/lib/active_support/number_helper/number_to_human_size_converter_rb.html +++ b/src/files/activesupport/lib/active_support/number_helper/number_to_human_size_converter_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/number_helper/number_to_human_size_converter.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/number_helper/number_to_percentage_converter_rb.html b/src/files/activesupport/lib/active_support/number_helper/number_to_percentage_converter_rb.html index ddf2e4aa30..8dd3b649f2 100644 --- a/src/files/activesupport/lib/active_support/number_helper/number_to_percentage_converter_rb.html +++ b/src/files/activesupport/lib/active_support/number_helper/number_to_percentage_converter_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/number_helper/number_to_percentage_converter.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/number_helper/number_to_phone_converter_rb.html b/src/files/activesupport/lib/active_support/number_helper/number_to_phone_converter_rb.html index 578b11b746..c93a3d09b6 100644 --- a/src/files/activesupport/lib/active_support/number_helper/number_to_phone_converter_rb.html +++ b/src/files/activesupport/lib/active_support/number_helper/number_to_phone_converter_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/number_helper/number_to_phone_converter.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/number_helper/number_to_rounded_converter_rb.html b/src/files/activesupport/lib/active_support/number_helper/number_to_rounded_converter_rb.html index c39e06802b..8b9b3025a0 100644 --- a/src/files/activesupport/lib/active_support/number_helper/number_to_rounded_converter_rb.html +++ b/src/files/activesupport/lib/active_support/number_helper/number_to_rounded_converter_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/number_helper/number_to_rounded_converter.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/number_helper/rounding_helper_rb.html b/src/files/activesupport/lib/active_support/number_helper/rounding_helper_rb.html index e794b359b6..66f6e75469 100644 --- a/src/files/activesupport/lib/active_support/number_helper/rounding_helper_rb.html +++ b/src/files/activesupport/lib/active_support/number_helper/rounding_helper_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/number_helper/rounding_helper.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/number_helper_rb.html b/src/files/activesupport/lib/active_support/number_helper_rb.html index 73cdea8463..64526f93c7 100644 --- a/src/files/activesupport/lib/active_support/number_helper_rb.html +++ b/src/files/activesupport/lib/active_support/number_helper_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/number_helper.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/option_merger_rb.html b/src/files/activesupport/lib/active_support/option_merger_rb.html index e3d2bc323e..c05b23bd74 100644 --- a/src/files/activesupport/lib/active_support/option_merger_rb.html +++ b/src/files/activesupport/lib/active_support/option_merger_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/option_merger.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/ordered_hash_rb.html b/src/files/activesupport/lib/active_support/ordered_hash_rb.html index 3da45520fd..dec0b4cdcc 100644 --- a/src/files/activesupport/lib/active_support/ordered_hash_rb.html +++ b/src/files/activesupport/lib/active_support/ordered_hash_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/ordered_hash.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/ordered_options_rb.html b/src/files/activesupport/lib/active_support/ordered_options_rb.html index d4d9517767..176cf3793e 100644 --- a/src/files/activesupport/lib/active_support/ordered_options_rb.html +++ b/src/files/activesupport/lib/active_support/ordered_options_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/ordered_options.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/parameter_filter_rb.html b/src/files/activesupport/lib/active_support/parameter_filter_rb.html index 297bbd61d3..98297dc1c4 100644 --- a/src/files/activesupport/lib/active_support/parameter_filter_rb.html +++ b/src/files/activesupport/lib/active_support/parameter_filter_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/parameter_filter.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/per_thread_registry_rb.html b/src/files/activesupport/lib/active_support/per_thread_registry_rb.html deleted file mode 100644 index 93186817e5..0000000000 --- a/src/files/activesupport/lib/active_support/per_thread_registry_rb.html +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: per_thread_registry.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • active_support/core_ext/module/delegation
    • - -
    - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/activesupport/lib/active_support/proxy_object_rb.html b/src/files/activesupport/lib/active_support/proxy_object_rb.html index 4bb2dec998..940302f97f 100644 --- a/src/files/activesupport/lib/active_support/proxy_object_rb.html +++ b/src/files/activesupport/lib/active_support/proxy_object_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/proxy_object.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/rails_rb.html b/src/files/activesupport/lib/active_support/rails_rb.html index 1aa9a2443a..977d2d32ad 100644 --- a/src/files/activesupport/lib/active_support/rails_rb.html +++ b/src/files/activesupport/lib/active_support/rails_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/rails.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/railtie_rb.html b/src/files/activesupport/lib/active_support/railtie_rb.html index ab25685b17..bcab17831f 100644 --- a/src/files/activesupport/lib/active_support/railtie_rb.html +++ b/src/files/activesupport/lib/active_support/railtie_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/railtie.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/reloader_rb.html b/src/files/activesupport/lib/active_support/reloader_rb.html index 4a4ed21a97..7aa7b3f67c 100644 --- a/src/files/activesupport/lib/active_support/reloader_rb.html +++ b/src/files/activesupport/lib/active_support/reloader_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/reloader.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/rescuable_rb.html b/src/files/activesupport/lib/active_support/rescuable_rb.html index 59255d60cc..68785a92d5 100644 --- a/src/files/activesupport/lib/active_support/rescuable_rb.html +++ b/src/files/activesupport/lib/active_support/rescuable_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/rescuable.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/ruby_features_rb.html b/src/files/activesupport/lib/active_support/ruby_features_rb.html index de025d5df9..4f9dd38e71 100644 --- a/src/files/activesupport/lib/active_support/ruby_features_rb.html +++ b/src/files/activesupport/lib/active_support/ruby_features_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/ruby_features.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/secure_compare_rotator_rb.html b/src/files/activesupport/lib/active_support/secure_compare_rotator_rb.html index 2d166b0022..e8f6771d77 100644 --- a/src/files/activesupport/lib/active_support/secure_compare_rotator_rb.html +++ b/src/files/activesupport/lib/active_support/secure_compare_rotator_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/secure_compare_rotator.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/security_utils_rb.html b/src/files/activesupport/lib/active_support/security_utils_rb.html index 928f15438d..81ee9b72c3 100644 --- a/src/files/activesupport/lib/active_support/security_utils_rb.html +++ b/src/files/activesupport/lib/active_support/security_utils_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/security_utils.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/string_inquirer_rb.html b/src/files/activesupport/lib/active_support/string_inquirer_rb.html index 3145fa1056..6a5de5c6ad 100644 --- a/src/files/activesupport/lib/active_support/string_inquirer_rb.html +++ b/src/files/activesupport/lib/active_support/string_inquirer_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/string_inquirer.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/subscriber_rb.html b/src/files/activesupport/lib/active_support/subscriber_rb.html index 9181f4d8ba..57fa3dc929 100644 --- a/src/files/activesupport/lib/active_support/subscriber_rb.html +++ b/src/files/activesupport/lib/active_support/subscriber_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/subscriber.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/syntax_error_proxy_rb.html b/src/files/activesupport/lib/active_support/syntax_error_proxy_rb.html index 758b400277..67bfd7dbd4 100644 --- a/src/files/activesupport/lib/active_support/syntax_error_proxy_rb.html +++ b/src/files/activesupport/lib/active_support/syntax_error_proxy_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/syntax_error_proxy.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/tagged_logging_rb.html b/src/files/activesupport/lib/active_support/tagged_logging_rb.html index 4931fbcf66..e8f7c42653 100644 --- a/src/files/activesupport/lib/active_support/tagged_logging_rb.html +++ b/src/files/activesupport/lib/active_support/tagged_logging_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/tagged_logging.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/test_case_rb.html b/src/files/activesupport/lib/active_support/test_case_rb.html index 5c01a1d5cd..05fdf9650e 100644 --- a/src/files/activesupport/lib/active_support/test_case_rb.html +++ b/src/files/activesupport/lib/active_support/test_case_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/test_case.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/testing/assertions_rb.html b/src/files/activesupport/lib/active_support/testing/assertions_rb.html index 608de36cd8..17f096227e 100644 --- a/src/files/activesupport/lib/active_support/testing/assertions_rb.html +++ b/src/files/activesupport/lib/active_support/testing/assertions_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/testing/assertions.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/testing/autorun_rb.html b/src/files/activesupport/lib/active_support/testing/autorun_rb.html index e7ed74ef8a..67816a8c04 100644 --- a/src/files/activesupport/lib/active_support/testing/autorun_rb.html +++ b/src/files/activesupport/lib/active_support/testing/autorun_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/testing/autorun.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/testing/constant_lookup_rb.html b/src/files/activesupport/lib/active_support/testing/constant_lookup_rb.html index 1d4e8b085c..325032d980 100644 --- a/src/files/activesupport/lib/active_support/testing/constant_lookup_rb.html +++ b/src/files/activesupport/lib/active_support/testing/constant_lookup_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/testing/constant_lookup.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/testing/constant_stubbing_rb.html b/src/files/activesupport/lib/active_support/testing/constant_stubbing_rb.html index f6d19933ef..589a3ca56b 100644 --- a/src/files/activesupport/lib/active_support/testing/constant_stubbing_rb.html +++ b/src/files/activesupport/lib/active_support/testing/constant_stubbing_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/testing/constant_stubbing.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/testing/declarative_rb.html b/src/files/activesupport/lib/active_support/testing/declarative_rb.html index 17e46f8d5a..77c44d084c 100644 --- a/src/files/activesupport/lib/active_support/testing/declarative_rb.html +++ b/src/files/activesupport/lib/active_support/testing/declarative_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/testing/declarative.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/testing/deprecation_rb.html b/src/files/activesupport/lib/active_support/testing/deprecation_rb.html index 50a4723163..97051fd66a 100644 --- a/src/files/activesupport/lib/active_support/testing/deprecation_rb.html +++ b/src/files/activesupport/lib/active_support/testing/deprecation_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/testing/deprecation.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/testing/error_reporter_assertions_rb.html b/src/files/activesupport/lib/active_support/testing/error_reporter_assertions_rb.html index b6016dfcac..a7b42a4309 100644 --- a/src/files/activesupport/lib/active_support/testing/error_reporter_assertions_rb.html +++ b/src/files/activesupport/lib/active_support/testing/error_reporter_assertions_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/testing/error_reporter_assertions.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/testing/file_fixtures_rb.html b/src/files/activesupport/lib/active_support/testing/file_fixtures_rb.html index 985f7f7ae2..0e66f357ed 100644 --- a/src/files/activesupport/lib/active_support/testing/file_fixtures_rb.html +++ b/src/files/activesupport/lib/active_support/testing/file_fixtures_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/testing/file_fixtures.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/testing/isolation_rb.html b/src/files/activesupport/lib/active_support/testing/isolation_rb.html index 2a9fbd9cfe..772d3c0291 100644 --- a/src/files/activesupport/lib/active_support/testing/isolation_rb.html +++ b/src/files/activesupport/lib/active_support/testing/isolation_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/testing/isolation.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/testing/method_call_assertions_rb.html b/src/files/activesupport/lib/active_support/testing/method_call_assertions_rb.html index 888f0a2457..391ca4cbf5 100644 --- a/src/files/activesupport/lib/active_support/testing/method_call_assertions_rb.html +++ b/src/files/activesupport/lib/active_support/testing/method_call_assertions_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/testing/method_call_assertions.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/testing/parallelization/server_rb.html b/src/files/activesupport/lib/active_support/testing/parallelization/server_rb.html index b388a64711..5b06cc3657 100644 --- a/src/files/activesupport/lib/active_support/testing/parallelization/server_rb.html +++ b/src/files/activesupport/lib/active_support/testing/parallelization/server_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/testing/parallelization/server.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/testing/parallelization/worker_rb.html b/src/files/activesupport/lib/active_support/testing/parallelization/worker_rb.html index 9d4b2ae883..c6761401b8 100644 --- a/src/files/activesupport/lib/active_support/testing/parallelization/worker_rb.html +++ b/src/files/activesupport/lib/active_support/testing/parallelization/worker_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/testing/parallelization/worker.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/testing/parallelization_rb.html b/src/files/activesupport/lib/active_support/testing/parallelization_rb.html index e8c010c9c9..eb3c846e19 100644 --- a/src/files/activesupport/lib/active_support/testing/parallelization_rb.html +++ b/src/files/activesupport/lib/active_support/testing/parallelization_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/testing/parallelization.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/testing/parallelize_executor_rb.html b/src/files/activesupport/lib/active_support/testing/parallelize_executor_rb.html index d16bc9af41..a45fc78565 100644 --- a/src/files/activesupport/lib/active_support/testing/parallelize_executor_rb.html +++ b/src/files/activesupport/lib/active_support/testing/parallelize_executor_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/testing/parallelize_executor.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/testing/setup_and_teardown_rb.html b/src/files/activesupport/lib/active_support/testing/setup_and_teardown_rb.html index 0d722be0e8..711dae4d4f 100644 --- a/src/files/activesupport/lib/active_support/testing/setup_and_teardown_rb.html +++ b/src/files/activesupport/lib/active_support/testing/setup_and_teardown_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/testing/setup_and_teardown.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/testing/stream_rb.html b/src/files/activesupport/lib/active_support/testing/stream_rb.html index 049ce95db7..17000b90dd 100644 --- a/src/files/activesupport/lib/active_support/testing/stream_rb.html +++ b/src/files/activesupport/lib/active_support/testing/stream_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/testing/stream.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/testing/strict_warnings_rb.html b/src/files/activesupport/lib/active_support/testing/strict_warnings_rb.html index 95e8ddb02b..4b1c6314d1 100644 --- a/src/files/activesupport/lib/active_support/testing/strict_warnings_rb.html +++ b/src/files/activesupport/lib/active_support/testing/strict_warnings_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/testing/strict_warnings.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/testing/tagged_logging_rb.html b/src/files/activesupport/lib/active_support/testing/tagged_logging_rb.html index e55a4e6795..d111697c7d 100644 --- a/src/files/activesupport/lib/active_support/testing/tagged_logging_rb.html +++ b/src/files/activesupport/lib/active_support/testing/tagged_logging_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/testing/tagged_logging.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/testing/time_helpers_rb.html b/src/files/activesupport/lib/active_support/testing/time_helpers_rb.html index a839d8aa2e..60c3559793 100644 --- a/src/files/activesupport/lib/active_support/testing/time_helpers_rb.html +++ b/src/files/activesupport/lib/active_support/testing/time_helpers_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/testing/time_helpers.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/time_rb.html b/src/files/activesupport/lib/active_support/time_rb.html index 186e48b229..ce42073bd7 100644 --- a/src/files/activesupport/lib/active_support/time_rb.html +++ b/src/files/activesupport/lib/active_support/time_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/time.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/time_with_zone_rb.html b/src/files/activesupport/lib/active_support/time_with_zone_rb.html index 902f7e0497..3f92fc5412 100644 --- a/src/files/activesupport/lib/active_support/time_with_zone_rb.html +++ b/src/files/activesupport/lib/active_support/time_with_zone_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/time_with_zone.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/values/time_zone_rb.html b/src/files/activesupport/lib/active_support/values/time_zone_rb.html index b5e94b598c..bffb1fb23b 100644 --- a/src/files/activesupport/lib/active_support/values/time_zone_rb.html +++ b/src/files/activesupport/lib/active_support/values/time_zone_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/values/time_zone.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/version_rb.html b/src/files/activesupport/lib/active_support/version_rb.html index fab97265fb..cddeff8bb5 100644 --- a/src/files/activesupport/lib/active_support/version_rb.html +++ b/src/files/activesupport/lib/active_support/version_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/version.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/xml_mini/jdom_rb.html b/src/files/activesupport/lib/active_support/xml_mini/jdom_rb.html index 1d48c6c556..b82c405619 100644 --- a/src/files/activesupport/lib/active_support/xml_mini/jdom_rb.html +++ b/src/files/activesupport/lib/active_support/xml_mini/jdom_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/xml_mini/jdom.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/xml_mini/libxml_rb.html b/src/files/activesupport/lib/active_support/xml_mini/libxml_rb.html index 2234cd90df..2ac89a8afd 100644 --- a/src/files/activesupport/lib/active_support/xml_mini/libxml_rb.html +++ b/src/files/activesupport/lib/active_support/xml_mini/libxml_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/xml_mini/libxml.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/xml_mini/libxmlsax_rb.html b/src/files/activesupport/lib/active_support/xml_mini/libxmlsax_rb.html index af63037185..e4204c919d 100644 --- a/src/files/activesupport/lib/active_support/xml_mini/libxmlsax_rb.html +++ b/src/files/activesupport/lib/active_support/xml_mini/libxmlsax_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/xml_mini/libxmlsax.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/xml_mini/nokogiri_rb.html b/src/files/activesupport/lib/active_support/xml_mini/nokogiri_rb.html index 75df6a3702..391a7f9e33 100644 --- a/src/files/activesupport/lib/active_support/xml_mini/nokogiri_rb.html +++ b/src/files/activesupport/lib/active_support/xml_mini/nokogiri_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/xml_mini/nokogiri.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/xml_mini/nokogirisax_rb.html b/src/files/activesupport/lib/active_support/xml_mini/nokogirisax_rb.html index 43a63765d4..721479e9c9 100644 --- a/src/files/activesupport/lib/active_support/xml_mini/nokogirisax_rb.html +++ b/src/files/activesupport/lib/active_support/xml_mini/nokogirisax_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/xml_mini/nokogirisax.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/xml_mini/rexml_rb.html b/src/files/activesupport/lib/active_support/xml_mini/rexml_rb.html index 0d6201c01b..2aa58de3bb 100644 --- a/src/files/activesupport/lib/active_support/xml_mini/rexml_rb.html +++ b/src/files/activesupport/lib/active_support/xml_mini/rexml_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/xml_mini/rexml.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support/xml_mini_rb.html b/src/files/activesupport/lib/active_support/xml_mini_rb.html index d5e5757f3e..498be9a62c 100644 --- a/src/files/activesupport/lib/active_support/xml_mini_rb.html +++ b/src/files/activesupport/lib/active_support/xml_mini_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support/xml_mini.rb + on GitHub +
  • diff --git a/src/files/activesupport/lib/active_support_rb.html b/src/files/activesupport/lib/active_support_rb.html index 5cb591430a..747259a310 100644 --- a/src/files/activesupport/lib/active_support_rb.html +++ b/src/files/activesupport/lib/active_support_rb.html @@ -15,6 +15,8 @@

  • activesupport/lib/active_support.rb + on GitHub +
  • diff --git a/src/files/railties/RDOC_MAIN_md.html b/src/files/railties/RDOC_MAIN_md.html index 323c75d6cc..67477502ea 100644 --- a/src/files/railties/RDOC_MAIN_md.html +++ b/src/files/railties/RDOC_MAIN_md.html @@ -15,6 +15,8 @@

  • railties/RDOC_MAIN.md + on GitHub +
  • diff --git a/src/files/railties/RDOC_MAIN_rdoc.html b/src/files/railties/RDOC_MAIN_rdoc.html deleted file mode 100644 index e98318ecf7..0000000000 --- a/src/files/railties/RDOC_MAIN_rdoc.html +++ /dev/null @@ -1,131 +0,0 @@ ---- -title: RDOC_MAIN.rdoc -layout: default ---- -
    - - -
    -
    - -
    - -

    Welcome to Rails

    - -

    What’s Rails

    - -

    Rails is a web-application framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern.

    - -

    Understanding the MVC pattern is key to understanding Rails. MVC divides your application into three layers: Model, View, and Controller, each with a specific responsibility.

    - -

    Model layer

    - -

    The Model layer represents the domain model (such as Account, Product, Person, Post, etc.) and encapsulates the business logic specific to your application. In Rails, database-backed model classes are derived from ActiveRecord::Base. Active Record allows you to present the data from database rows as objects and embellish these data objects with business logic methods. Although most Rails models are backed by a database, models can also be ordinary Ruby classes, or Ruby classes that implement a set of interfaces as provided by the Active Model module.

    - -

    Controller layer

    - -

    The Controller layer is responsible for handling incoming HTTP requests and providing a suitable response. Usually, this means returning HTML, but Rails controllers can also generate XML, JSON, PDFs, mobile-specific views, and more. Controllers load and manipulate models and render view templates in order to generate the appropriate HTTP response. In Rails, incoming requests are routed by Action Dispatch to an appropriate controller, and controller classes are derived from ActionController::Base. Action Dispatch and Action Controller are bundled together in Action Pack.

    - -

    View layer

    - -

    The View layer is composed of “templates” that are responsible for providing appropriate representations of your application’s resources. Templates can come in a variety of formats, but most view templates are HTML with embedded Ruby code (ERB files). Views are typically rendered to generate a controller response, or to generate the body of an email. In Rails, View generation is handled by Action View.

    - -

    Frameworks and libraries

    - -

    Active Record, Active Model, Action Pack, and Action View can each be used independently outside Rails. In addition to that, Rails also comes with Action Mailer, a library to generate and send emails; Action Mailbox, a library to receive emails within a Rails application; Active Job, a framework for declaring jobs and making them run on a variety of queueing backends; Action Cable, a framework to integrate WebSockets with a Rails application; Active Storage, a library to attach cloud and local files to Rails applications; Action Text, a library to handle rich text content; and Active Support, a collection of utility classes and standard library extensions that are useful for Rails, and may also be used independently outside Rails.

    - -

    Getting Started

    -
    1. -

      Install Rails at the command prompt if you haven’t yet:

      - -
      $ gem install rails
      -
      -
    2. -

      At the command prompt, create a new Rails application:

      - -
      $ rails new myapp
      -
      - -

      where “myapp” is the application name.

      -
    3. -

      Change directory to myapp and start the web server:

      - -
      $ cd myapp
      -$ bin/rails server
      -
      - -

      Run with --help or -h for options.

      -
    4. -

      Go to http://localhost:3000, and you’ll see: “Yay! You’re on Rails!”

      -
    5. -

      Follow the guidelines to start developing your application. You may find the following resources handy:

      - -
    - -

    Contributing

    - -

    We encourage you to contribute to Ruby on Rails! Please check out the Contributing to Ruby on Rails guide for guidelines about how to proceed. Join us!

    - -

    Trying to report a possible security vulnerability in Rails? Please check out our security policy for guidelines about how to proceed.

    - -

    Everyone interacting in Rails and its sub-projects’ codebases, issue trackers, chat rooms, and mailing lists is expected to follow the Rails code of conduct.

    - -

    License

    - -

    Ruby on Rails is released under the MIT License.

    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/railties/README_rdoc.html b/src/files/railties/README_rdoc.html index f189b9e1c7..f1cd2073f3 100644 --- a/src/files/railties/README_rdoc.html +++ b/src/files/railties/README_rdoc.html @@ -15,6 +15,8 @@

  • railties/README.rdoc + on GitHub +
  • diff --git a/src/files/railties/lib/minitest/rails_plugin_rb.html b/src/files/railties/lib/minitest/rails_plugin_rb.html index 718a3e32f7..4b08c9e15e 100644 --- a/src/files/railties/lib/minitest/rails_plugin_rb.html +++ b/src/files/railties/lib/minitest/rails_plugin_rb.html @@ -15,6 +15,8 @@

  • railties/lib/minitest/rails_plugin.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/all_rb.html b/src/files/railties/lib/rails/all_rb.html index bde5420fa6..050eb31a6a 100644 --- a/src/files/railties/lib/rails/all_rb.html +++ b/src/files/railties/lib/rails/all_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/all.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/api/task_rb.html b/src/files/railties/lib/rails/api/task_rb.html index bbd107867e..0aa8fd9c92 100644 --- a/src/files/railties/lib/rails/api/task_rb.html +++ b/src/files/railties/lib/rails/api/task_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/api/task.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/app_loader_rb.html b/src/files/railties/lib/rails/app_loader_rb.html index 7a28a3a907..8c2242b23d 100644 --- a/src/files/railties/lib/rails/app_loader_rb.html +++ b/src/files/railties/lib/rails/app_loader_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/app_loader.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/app_updater_rb.html b/src/files/railties/lib/rails/app_updater_rb.html index 95543bd04b..75c2153e61 100644 --- a/src/files/railties/lib/rails/app_updater_rb.html +++ b/src/files/railties/lib/rails/app_updater_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/app_updater.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/application/bootstrap_rb.html b/src/files/railties/lib/rails/application/bootstrap_rb.html index a66e460dcf..817b6ebcee 100644 --- a/src/files/railties/lib/rails/application/bootstrap_rb.html +++ b/src/files/railties/lib/rails/application/bootstrap_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/application/bootstrap.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/application/configuration_rb.html b/src/files/railties/lib/rails/application/configuration_rb.html index 4d2385cfb0..4d4708a3fb 100644 --- a/src/files/railties/lib/rails/application/configuration_rb.html +++ b/src/files/railties/lib/rails/application/configuration_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/application/configuration.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/application/default_middleware_stack_rb.html b/src/files/railties/lib/rails/application/default_middleware_stack_rb.html index 15e3fb0f11..582085fc39 100644 --- a/src/files/railties/lib/rails/application/default_middleware_stack_rb.html +++ b/src/files/railties/lib/rails/application/default_middleware_stack_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/application/default_middleware_stack.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/application/dummy_config_rb.html b/src/files/railties/lib/rails/application/dummy_config_rb.html index ba675387f4..99f57852fe 100644 --- a/src/files/railties/lib/rails/application/dummy_config_rb.html +++ b/src/files/railties/lib/rails/application/dummy_config_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/application/dummy_config.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/application/dummy_erb_compiler_rb.html b/src/files/railties/lib/rails/application/dummy_erb_compiler_rb.html deleted file mode 100644 index 0ab1941ca8..0000000000 --- a/src/files/railties/lib/rails/application/dummy_erb_compiler_rb.html +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: dummy_erb_compiler.rb -layout: default ---- -
    - - -
    -
    - -
    - -

    These classes are used to strip out the ERB configuration values so we can evaluate the database.yml without evaluating the ERB values.

    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/railties/lib/rails/application/finisher_rb.html b/src/files/railties/lib/rails/application/finisher_rb.html index 4282a8d0f8..c942b24881 100644 --- a/src/files/railties/lib/rails/application/finisher_rb.html +++ b/src/files/railties/lib/rails/application/finisher_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/application/finisher.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/application/routes_reloader_rb.html b/src/files/railties/lib/rails/application/routes_reloader_rb.html index 3378abf52b..a7b8f6ad48 100644 --- a/src/files/railties/lib/rails/application/routes_reloader_rb.html +++ b/src/files/railties/lib/rails/application/routes_reloader_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/application/routes_reloader.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/application_controller_rb.html b/src/files/railties/lib/rails/application_controller_rb.html index 9587fea81f..6d3313b490 100644 --- a/src/files/railties/lib/rails/application_controller_rb.html +++ b/src/files/railties/lib/rails/application_controller_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/application_controller.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/application_rb.html b/src/files/railties/lib/rails/application_rb.html index f9efb67f69..57ce3570e3 100644 --- a/src/files/railties/lib/rails/application_rb.html +++ b/src/files/railties/lib/rails/application_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/application.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/autoloaders/inflector_rb.html b/src/files/railties/lib/rails/autoloaders/inflector_rb.html index 7674497149..1a1107b4b3 100644 --- a/src/files/railties/lib/rails/autoloaders/inflector_rb.html +++ b/src/files/railties/lib/rails/autoloaders/inflector_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/autoloaders/inflector.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/autoloaders_rb.html b/src/files/railties/lib/rails/autoloaders_rb.html index 24c1898c69..1efb548213 100644 --- a/src/files/railties/lib/rails/autoloaders_rb.html +++ b/src/files/railties/lib/rails/autoloaders_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/autoloaders.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/backtrace_cleaner_rb.html b/src/files/railties/lib/rails/backtrace_cleaner_rb.html index 735c343853..7ab5d63c01 100644 --- a/src/files/railties/lib/rails/backtrace_cleaner_rb.html +++ b/src/files/railties/lib/rails/backtrace_cleaner_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/backtrace_cleaner.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/cli_rb.html b/src/files/railties/lib/rails/cli_rb.html index d344d9d503..31e3ad31f0 100644 --- a/src/files/railties/lib/rails/cli_rb.html +++ b/src/files/railties/lib/rails/cli_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/cli.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/code_statistics_calculator_rb.html b/src/files/railties/lib/rails/code_statistics_calculator_rb.html index c678bd6390..75566029bd 100644 --- a/src/files/railties/lib/rails/code_statistics_calculator_rb.html +++ b/src/files/railties/lib/rails/code_statistics_calculator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/code_statistics_calculator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/code_statistics_rb.html b/src/files/railties/lib/rails/code_statistics_rb.html index 0c575e8f2b..a237af26a4 100644 --- a/src/files/railties/lib/rails/code_statistics_rb.html +++ b/src/files/railties/lib/rails/code_statistics_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/code_statistics.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/command/actions_rb.html b/src/files/railties/lib/rails/command/actions_rb.html index 374b87bd34..18a8342678 100644 --- a/src/files/railties/lib/rails/command/actions_rb.html +++ b/src/files/railties/lib/rails/command/actions_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/command/actions.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/command/base_rb.html b/src/files/railties/lib/rails/command/base_rb.html index 4dabdc8879..6b8b7395e8 100644 --- a/src/files/railties/lib/rails/command/base_rb.html +++ b/src/files/railties/lib/rails/command/base_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/command/base.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/command/behavior_rb.html b/src/files/railties/lib/rails/command/behavior_rb.html index 3805a444b2..07bd71391b 100644 --- a/src/files/railties/lib/rails/command/behavior_rb.html +++ b/src/files/railties/lib/rails/command/behavior_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/command/behavior.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/command/environment_argument_rb.html b/src/files/railties/lib/rails/command/environment_argument_rb.html index 2a0c19bf99..8917552a6d 100644 --- a/src/files/railties/lib/rails/command/environment_argument_rb.html +++ b/src/files/railties/lib/rails/command/environment_argument_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/command/environment_argument.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/command/helpers/editor_rb.html b/src/files/railties/lib/rails/command/helpers/editor_rb.html index 7b9b80817d..fd095d0972 100644 --- a/src/files/railties/lib/rails/command/helpers/editor_rb.html +++ b/src/files/railties/lib/rails/command/helpers/editor_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/command/helpers/editor.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/command/spellchecker_rb.html b/src/files/railties/lib/rails/command/spellchecker_rb.html deleted file mode 100644 index c522969c37..0000000000 --- a/src/files/railties/lib/rails/command/spellchecker_rb.html +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: spellchecker.rb -layout: default ---- -
    - - -
    -
    - - - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/railties/lib/rails/command_rb.html b/src/files/railties/lib/rails/command_rb.html index 0d1ffa38bb..5b71417a64 100644 --- a/src/files/railties/lib/rails/command_rb.html +++ b/src/files/railties/lib/rails/command_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/command.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/commands/about/about_command_rb.html b/src/files/railties/lib/rails/commands/about/about_command_rb.html index ef64d52ddf..4b0bd287ea 100644 --- a/src/files/railties/lib/rails/commands/about/about_command_rb.html +++ b/src/files/railties/lib/rails/commands/about/about_command_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/commands/about/about_command.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/commands/application/application_command_rb.html b/src/files/railties/lib/rails/commands/application/application_command_rb.html index f76c082458..60197dac14 100644 --- a/src/files/railties/lib/rails/commands/application/application_command_rb.html +++ b/src/files/railties/lib/rails/commands/application/application_command_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/commands/application/application_command.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/commands/console/console_command_rb.html b/src/files/railties/lib/rails/commands/console/console_command_rb.html index 88f381f02a..e25aad2146 100644 --- a/src/files/railties/lib/rails/commands/console/console_command_rb.html +++ b/src/files/railties/lib/rails/commands/console/console_command_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/commands/console/console_command.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/commands/credentials/credentials_command/diffing_rb.html b/src/files/railties/lib/rails/commands/credentials/credentials_command/diffing_rb.html index cc9b0fae14..72b80b4ccf 100644 --- a/src/files/railties/lib/rails/commands/credentials/credentials_command/diffing_rb.html +++ b/src/files/railties/lib/rails/commands/credentials/credentials_command/diffing_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/commands/credentials/credentials_command/diffing.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/commands/credentials/credentials_command_rb.html b/src/files/railties/lib/rails/commands/credentials/credentials_command_rb.html index 218cb96d0a..e50f2b72fe 100644 --- a/src/files/railties/lib/rails/commands/credentials/credentials_command_rb.html +++ b/src/files/railties/lib/rails/commands/credentials/credentials_command_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/commands/credentials/credentials_command.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/commands/db/system/change/change_command_rb.html b/src/files/railties/lib/rails/commands/db/system/change/change_command_rb.html index 80d7a213e1..ac89313aeb 100644 --- a/src/files/railties/lib/rails/commands/db/system/change/change_command_rb.html +++ b/src/files/railties/lib/rails/commands/db/system/change/change_command_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/commands/db/system/change/change_command.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/commands/dbconsole/dbconsole_command_rb.html b/src/files/railties/lib/rails/commands/dbconsole/dbconsole_command_rb.html index 1ac227ee30..4ae4a25cf6 100644 --- a/src/files/railties/lib/rails/commands/dbconsole/dbconsole_command_rb.html +++ b/src/files/railties/lib/rails/commands/dbconsole/dbconsole_command_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/commands/dbconsole/dbconsole_command.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/commands/destroy/destroy_command_rb.html b/src/files/railties/lib/rails/commands/destroy/destroy_command_rb.html index 4caccf3948..168eb47252 100644 --- a/src/files/railties/lib/rails/commands/destroy/destroy_command_rb.html +++ b/src/files/railties/lib/rails/commands/destroy/destroy_command_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/commands/destroy/destroy_command.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/commands/dev/dev_command_rb.html b/src/files/railties/lib/rails/commands/dev/dev_command_rb.html index 055e674a21..c0b9fb9c4c 100644 --- a/src/files/railties/lib/rails/commands/dev/dev_command_rb.html +++ b/src/files/railties/lib/rails/commands/dev/dev_command_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/commands/dev/dev_command.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/commands/encrypted/encrypted_command_rb.html b/src/files/railties/lib/rails/commands/encrypted/encrypted_command_rb.html index de0ed05ed1..6bc318eafd 100644 --- a/src/files/railties/lib/rails/commands/encrypted/encrypted_command_rb.html +++ b/src/files/railties/lib/rails/commands/encrypted/encrypted_command_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/commands/encrypted/encrypted_command.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/commands/gem_help/gem_help_command_rb.html b/src/files/railties/lib/rails/commands/gem_help/gem_help_command_rb.html index 694de36b23..f1a54b3732 100644 --- a/src/files/railties/lib/rails/commands/gem_help/gem_help_command_rb.html +++ b/src/files/railties/lib/rails/commands/gem_help/gem_help_command_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/commands/gem_help/gem_help_command.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/commands/generate/generate_command_rb.html b/src/files/railties/lib/rails/commands/generate/generate_command_rb.html index 62c83788f7..9ec66b756a 100644 --- a/src/files/railties/lib/rails/commands/generate/generate_command_rb.html +++ b/src/files/railties/lib/rails/commands/generate/generate_command_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/commands/generate/generate_command.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/commands/help/help_command_rb.html b/src/files/railties/lib/rails/commands/help/help_command_rb.html index 4d35cb2212..94a29a9aa0 100644 --- a/src/files/railties/lib/rails/commands/help/help_command_rb.html +++ b/src/files/railties/lib/rails/commands/help/help_command_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/commands/help/help_command.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/commands/initializers/initializers_command_rb.html b/src/files/railties/lib/rails/commands/initializers/initializers_command_rb.html index 5eb2cbab29..281bff7c5b 100644 --- a/src/files/railties/lib/rails/commands/initializers/initializers_command_rb.html +++ b/src/files/railties/lib/rails/commands/initializers/initializers_command_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/commands/initializers/initializers_command.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/commands/middleware/middleware_command_rb.html b/src/files/railties/lib/rails/commands/middleware/middleware_command_rb.html index 8c40f80779..69f19708ad 100644 --- a/src/files/railties/lib/rails/commands/middleware/middleware_command_rb.html +++ b/src/files/railties/lib/rails/commands/middleware/middleware_command_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/commands/middleware/middleware_command.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/commands/new/new_command_rb.html b/src/files/railties/lib/rails/commands/new/new_command_rb.html index c4aa7d5378..9bd7aaeb22 100644 --- a/src/files/railties/lib/rails/commands/new/new_command_rb.html +++ b/src/files/railties/lib/rails/commands/new/new_command_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/commands/new/new_command.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/commands/notes/notes_command_rb.html b/src/files/railties/lib/rails/commands/notes/notes_command_rb.html index 54081b9c64..ec4a124304 100644 --- a/src/files/railties/lib/rails/commands/notes/notes_command_rb.html +++ b/src/files/railties/lib/rails/commands/notes/notes_command_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/commands/notes/notes_command.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/commands/plugin/plugin_command_rb.html b/src/files/railties/lib/rails/commands/plugin/plugin_command_rb.html index 6d8875b0bb..deaab441e7 100644 --- a/src/files/railties/lib/rails/commands/plugin/plugin_command_rb.html +++ b/src/files/railties/lib/rails/commands/plugin/plugin_command_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/commands/plugin/plugin_command.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/commands/rake/rake_command_rb.html b/src/files/railties/lib/rails/commands/rake/rake_command_rb.html index ace94f9907..22cc081a15 100644 --- a/src/files/railties/lib/rails/commands/rake/rake_command_rb.html +++ b/src/files/railties/lib/rails/commands/rake/rake_command_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/commands/rake/rake_command.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/commands/restart/restart_command_rb.html b/src/files/railties/lib/rails/commands/restart/restart_command_rb.html index 843e23f81a..1f3012fac4 100644 --- a/src/files/railties/lib/rails/commands/restart/restart_command_rb.html +++ b/src/files/railties/lib/rails/commands/restart/restart_command_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/commands/restart/restart_command.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/commands/routes/routes_command_rb.html b/src/files/railties/lib/rails/commands/routes/routes_command_rb.html index e1b4dc5613..4b1f4feb82 100644 --- a/src/files/railties/lib/rails/commands/routes/routes_command_rb.html +++ b/src/files/railties/lib/rails/commands/routes/routes_command_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/commands/routes/routes_command.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/commands/runner/runner_command_rb.html b/src/files/railties/lib/rails/commands/runner/runner_command_rb.html index 89ff8d0a36..f9fd2f3663 100644 --- a/src/files/railties/lib/rails/commands/runner/runner_command_rb.html +++ b/src/files/railties/lib/rails/commands/runner/runner_command_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/commands/runner/runner_command.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/commands/secret/secret_command_rb.html b/src/files/railties/lib/rails/commands/secret/secret_command_rb.html index 79e396e7c6..2807fe3ad8 100644 --- a/src/files/railties/lib/rails/commands/secret/secret_command_rb.html +++ b/src/files/railties/lib/rails/commands/secret/secret_command_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/commands/secret/secret_command.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/commands/secrets/secrets_command_rb.html b/src/files/railties/lib/rails/commands/secrets/secrets_command_rb.html index 0fd86bf55e..a639453bd8 100644 --- a/src/files/railties/lib/rails/commands/secrets/secrets_command_rb.html +++ b/src/files/railties/lib/rails/commands/secrets/secrets_command_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/commands/secrets/secrets_command.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/commands/server/server_command_rb.html b/src/files/railties/lib/rails/commands/server/server_command_rb.html index 03923cebae..f475286754 100644 --- a/src/files/railties/lib/rails/commands/server/server_command_rb.html +++ b/src/files/railties/lib/rails/commands/server/server_command_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/commands/server/server_command.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/commands/test/test_command_rb.html b/src/files/railties/lib/rails/commands/test/test_command_rb.html index 023cb61d1c..8ada886566 100644 --- a/src/files/railties/lib/rails/commands/test/test_command_rb.html +++ b/src/files/railties/lib/rails/commands/test/test_command_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/commands/test/test_command.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/commands/unused_routes/unused_routes_command_rb.html b/src/files/railties/lib/rails/commands/unused_routes/unused_routes_command_rb.html index 9b841132de..e2ed628d00 100644 --- a/src/files/railties/lib/rails/commands/unused_routes/unused_routes_command_rb.html +++ b/src/files/railties/lib/rails/commands/unused_routes/unused_routes_command_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/commands/unused_routes/unused_routes_command.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/commands/version/version_command_rb.html b/src/files/railties/lib/rails/commands/version/version_command_rb.html index 0824897aa4..3ef0df500e 100644 --- a/src/files/railties/lib/rails/commands/version/version_command_rb.html +++ b/src/files/railties/lib/rails/commands/version/version_command_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/commands/version/version_command.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/commands_rb.html b/src/files/railties/lib/rails/commands_rb.html index 7417bddbd6..a70444416e 100644 --- a/src/files/railties/lib/rails/commands_rb.html +++ b/src/files/railties/lib/rails/commands_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/commands.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/configuration_rb.html b/src/files/railties/lib/rails/configuration_rb.html index 909a73a936..d7653dafd2 100644 --- a/src/files/railties/lib/rails/configuration_rb.html +++ b/src/files/railties/lib/rails/configuration_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/configuration.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/console/app_rb.html b/src/files/railties/lib/rails/console/app_rb.html index 0b1e9c014a..19fafcbf9d 100644 --- a/src/files/railties/lib/rails/console/app_rb.html +++ b/src/files/railties/lib/rails/console/app_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/console/app.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/console/helpers_rb.html b/src/files/railties/lib/rails/console/helpers_rb.html index 0629ca3999..49943b2c21 100644 --- a/src/files/railties/lib/rails/console/helpers_rb.html +++ b/src/files/railties/lib/rails/console/helpers_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/console/helpers.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/deprecator_rb.html b/src/files/railties/lib/rails/deprecator_rb.html index 575f9223c9..1c103350fb 100644 --- a/src/files/railties/lib/rails/deprecator_rb.html +++ b/src/files/railties/lib/rails/deprecator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/deprecator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/dev_caching_rb.html b/src/files/railties/lib/rails/dev_caching_rb.html index b81a41e766..74b8da8c0d 100644 --- a/src/files/railties/lib/rails/dev_caching_rb.html +++ b/src/files/railties/lib/rails/dev_caching_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/dev_caching.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/engine/commands_rb.html b/src/files/railties/lib/rails/engine/commands_rb.html index 0c3e9f8387..9cfc58a14b 100644 --- a/src/files/railties/lib/rails/engine/commands_rb.html +++ b/src/files/railties/lib/rails/engine/commands_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/engine/commands.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/engine/configuration_rb.html b/src/files/railties/lib/rails/engine/configuration_rb.html index 723bca0fd5..beb318aa2e 100644 --- a/src/files/railties/lib/rails/engine/configuration_rb.html +++ b/src/files/railties/lib/rails/engine/configuration_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/engine/configuration.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/engine/railties_rb.html b/src/files/railties/lib/rails/engine/railties_rb.html index 3301216bc9..28ddd77332 100644 --- a/src/files/railties/lib/rails/engine/railties_rb.html +++ b/src/files/railties/lib/rails/engine/railties_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/engine/railties.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/engine/updater_rb.html b/src/files/railties/lib/rails/engine/updater_rb.html index 1ce62bc7e0..2bdd818552 100644 --- a/src/files/railties/lib/rails/engine/updater_rb.html +++ b/src/files/railties/lib/rails/engine/updater_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/engine/updater.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/engine_rb.html b/src/files/railties/lib/rails/engine_rb.html index 4cf9169319..6c48be552e 100644 --- a/src/files/railties/lib/rails/engine_rb.html +++ b/src/files/railties/lib/rails/engine_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/engine.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/gem_version_rb.html b/src/files/railties/lib/rails/gem_version_rb.html index ba8292dd07..6185763be2 100644 --- a/src/files/railties/lib/rails/gem_version_rb.html +++ b/src/files/railties/lib/rails/gem_version_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/gem_version.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/actions/create_migration_rb.html b/src/files/railties/lib/rails/generators/actions/create_migration_rb.html index 57adef72df..19bc7d1425 100644 --- a/src/files/railties/lib/rails/generators/actions/create_migration_rb.html +++ b/src/files/railties/lib/rails/generators/actions/create_migration_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/actions/create_migration.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/actions_rb.html b/src/files/railties/lib/rails/generators/actions_rb.html index 0da04718d0..74ca795cae 100644 --- a/src/files/railties/lib/rails/generators/actions_rb.html +++ b/src/files/railties/lib/rails/generators/actions_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/actions.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/active_model_rb.html b/src/files/railties/lib/rails/generators/active_model_rb.html index 404f7337e0..08f566ee7c 100644 --- a/src/files/railties/lib/rails/generators/active_model_rb.html +++ b/src/files/railties/lib/rails/generators/active_model_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/active_model.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/app_base_rb.html b/src/files/railties/lib/rails/generators/app_base_rb.html index 2899a3cbda..b291c6c91b 100644 --- a/src/files/railties/lib/rails/generators/app_base_rb.html +++ b/src/files/railties/lib/rails/generators/app_base_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/app_base.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/app_name_rb.html b/src/files/railties/lib/rails/generators/app_name_rb.html index d96fc87eff..c9c2033f12 100644 --- a/src/files/railties/lib/rails/generators/app_name_rb.html +++ b/src/files/railties/lib/rails/generators/app_name_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/app_name.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/base_rb.html b/src/files/railties/lib/rails/generators/base_rb.html index e992d9f7e1..26c9325bd7 100644 --- a/src/files/railties/lib/rails/generators/base_rb.html +++ b/src/files/railties/lib/rails/generators/base_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/base.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/css/assets/assets_generator_rb.html b/src/files/railties/lib/rails/generators/css/assets/assets_generator_rb.html deleted file mode 100644 index 8eee3d9087..0000000000 --- a/src/files/railties/lib/rails/generators/css/assets/assets_generator_rb.html +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: assets_generator.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • rails/generators/named_base
    • - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/railties/lib/rails/generators/css/scaffold/scaffold_generator_rb.html b/src/files/railties/lib/rails/generators/css/scaffold/scaffold_generator_rb.html deleted file mode 100644 index 66df0c1b8e..0000000000 --- a/src/files/railties/lib/rails/generators/css/scaffold/scaffold_generator_rb.html +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: scaffold_generator.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • rails/generators/named_base
    • - -
    - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/railties/lib/rails/generators/database_rb.html b/src/files/railties/lib/rails/generators/database_rb.html index 546790ef04..21cc43905f 100644 --- a/src/files/railties/lib/rails/generators/database_rb.html +++ b/src/files/railties/lib/rails/generators/database_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/database.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/erb/controller/controller_generator_rb.html b/src/files/railties/lib/rails/generators/erb/controller/controller_generator_rb.html index 9643b3ce17..d65e1a632b 100644 --- a/src/files/railties/lib/rails/generators/erb/controller/controller_generator_rb.html +++ b/src/files/railties/lib/rails/generators/erb/controller/controller_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/erb/controller/controller_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/erb/mailer/mailer_generator_rb.html b/src/files/railties/lib/rails/generators/erb/mailer/mailer_generator_rb.html index 723f98fcd4..3577df1241 100644 --- a/src/files/railties/lib/rails/generators/erb/mailer/mailer_generator_rb.html +++ b/src/files/railties/lib/rails/generators/erb/mailer/mailer_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/erb/mailer/mailer_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/erb/scaffold/scaffold_generator_rb.html b/src/files/railties/lib/rails/generators/erb/scaffold/scaffold_generator_rb.html index f47b73763a..5a44e00a8f 100644 --- a/src/files/railties/lib/rails/generators/erb/scaffold/scaffold_generator_rb.html +++ b/src/files/railties/lib/rails/generators/erb/scaffold/scaffold_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/erb/scaffold/scaffold_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/erb_rb.html b/src/files/railties/lib/rails/generators/erb_rb.html index 4b51457847..11b44c2c5a 100644 --- a/src/files/railties/lib/rails/generators/erb_rb.html +++ b/src/files/railties/lib/rails/generators/erb_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/erb.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/generated_attribute_rb.html b/src/files/railties/lib/rails/generators/generated_attribute_rb.html index c90aabf543..f5ef6305bb 100644 --- a/src/files/railties/lib/rails/generators/generated_attribute_rb.html +++ b/src/files/railties/lib/rails/generators/generated_attribute_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/generated_attribute.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/js/assets/assets_generator_rb.html b/src/files/railties/lib/rails/generators/js/assets/assets_generator_rb.html deleted file mode 100644 index f46c98a6c7..0000000000 --- a/src/files/railties/lib/rails/generators/js/assets/assets_generator_rb.html +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: assets_generator.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • rails/generators/named_base
    • - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/railties/lib/rails/generators/migration_rb.html b/src/files/railties/lib/rails/generators/migration_rb.html index 057cd4ed07..b18331d0dc 100644 --- a/src/files/railties/lib/rails/generators/migration_rb.html +++ b/src/files/railties/lib/rails/generators/migration_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/migration.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/model_helpers_rb.html b/src/files/railties/lib/rails/generators/model_helpers_rb.html index 2f1b45a0d1..c666f72d23 100644 --- a/src/files/railties/lib/rails/generators/model_helpers_rb.html +++ b/src/files/railties/lib/rails/generators/model_helpers_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/model_helpers.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/named_base_rb.html b/src/files/railties/lib/rails/generators/named_base_rb.html index a1bd33dae5..4fc4675dde 100644 --- a/src/files/railties/lib/rails/generators/named_base_rb.html +++ b/src/files/railties/lib/rails/generators/named_base_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/named_base.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/rails/app/app_generator_rb.html b/src/files/railties/lib/rails/generators/rails/app/app_generator_rb.html index 4a9ca6ca20..a8ce7ec8c8 100644 --- a/src/files/railties/lib/rails/generators/rails/app/app_generator_rb.html +++ b/src/files/railties/lib/rails/generators/rails/app/app_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/rails/app/app_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/rails/application_record/application_record_generator_rb.html b/src/files/railties/lib/rails/generators/rails/application_record/application_record_generator_rb.html index 9313f71cb9..301996eda9 100644 --- a/src/files/railties/lib/rails/generators/rails/application_record/application_record_generator_rb.html +++ b/src/files/railties/lib/rails/generators/rails/application_record/application_record_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/rails/application_record/application_record_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/rails/assets/assets_generator_rb.html b/src/files/railties/lib/rails/generators/rails/assets/assets_generator_rb.html deleted file mode 100644 index d78b13801b..0000000000 --- a/src/files/railties/lib/rails/generators/rails/assets/assets_generator_rb.html +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: assets_generator.rb -layout: default ---- -
    - - -
    -
    - - - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/railties/lib/rails/generators/rails/benchmark/benchmark_generator_rb.html b/src/files/railties/lib/rails/generators/rails/benchmark/benchmark_generator_rb.html index 7f4dc5b88d..255a58df38 100644 --- a/src/files/railties/lib/rails/generators/rails/benchmark/benchmark_generator_rb.html +++ b/src/files/railties/lib/rails/generators/rails/benchmark/benchmark_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/rails/benchmark/benchmark_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/rails/controller/controller_generator_rb.html b/src/files/railties/lib/rails/generators/rails/controller/controller_generator_rb.html index 341ea25e4d..691cbbd468 100644 --- a/src/files/railties/lib/rails/generators/rails/controller/controller_generator_rb.html +++ b/src/files/railties/lib/rails/generators/rails/controller/controller_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/rails/controller/controller_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/rails/credentials/credentials_generator_rb.html b/src/files/railties/lib/rails/generators/rails/credentials/credentials_generator_rb.html index 74f4982473..5a5e988330 100644 --- a/src/files/railties/lib/rails/generators/rails/credentials/credentials_generator_rb.html +++ b/src/files/railties/lib/rails/generators/rails/credentials/credentials_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/rails/credentials/credentials_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/rails/db/system/change/change_generator_rb.html b/src/files/railties/lib/rails/generators/rails/db/system/change/change_generator_rb.html index e71072cb14..f412837a44 100644 --- a/src/files/railties/lib/rails/generators/rails/db/system/change/change_generator_rb.html +++ b/src/files/railties/lib/rails/generators/rails/db/system/change/change_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/rails/db/system/change/change_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/rails/encrypted_file/encrypted_file_generator_rb.html b/src/files/railties/lib/rails/generators/rails/encrypted_file/encrypted_file_generator_rb.html index 1c28640a5e..24a83b394d 100644 --- a/src/files/railties/lib/rails/generators/rails/encrypted_file/encrypted_file_generator_rb.html +++ b/src/files/railties/lib/rails/generators/rails/encrypted_file/encrypted_file_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/rails/encrypted_file/encrypted_file_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/rails/encryption_key_file/encryption_key_file_generator_rb.html b/src/files/railties/lib/rails/generators/rails/encryption_key_file/encryption_key_file_generator_rb.html index bbe89387b5..82ac2efd6c 100644 --- a/src/files/railties/lib/rails/generators/rails/encryption_key_file/encryption_key_file_generator_rb.html +++ b/src/files/railties/lib/rails/generators/rails/encryption_key_file/encryption_key_file_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/rails/encryption_key_file/encryption_key_file_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/rails/generator/generator_generator_rb.html b/src/files/railties/lib/rails/generators/rails/generator/generator_generator_rb.html index df61927283..ea7e85b086 100644 --- a/src/files/railties/lib/rails/generators/rails/generator/generator_generator_rb.html +++ b/src/files/railties/lib/rails/generators/rails/generator/generator_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/rails/generator/generator_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/rails/helper/helper_generator_rb.html b/src/files/railties/lib/rails/generators/rails/helper/helper_generator_rb.html index ddead1dcca..725b502df5 100644 --- a/src/files/railties/lib/rails/generators/rails/helper/helper_generator_rb.html +++ b/src/files/railties/lib/rails/generators/rails/helper/helper_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/rails/helper/helper_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/rails/integration_test/integration_test_generator_rb.html b/src/files/railties/lib/rails/generators/rails/integration_test/integration_test_generator_rb.html index 1fcdd85e65..2fe9b116ef 100644 --- a/src/files/railties/lib/rails/generators/rails/integration_test/integration_test_generator_rb.html +++ b/src/files/railties/lib/rails/generators/rails/integration_test/integration_test_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/rails/integration_test/integration_test_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/rails/master_key/master_key_generator_rb.html b/src/files/railties/lib/rails/generators/rails/master_key/master_key_generator_rb.html index 04ab964c36..482d1c61b1 100644 --- a/src/files/railties/lib/rails/generators/rails/master_key/master_key_generator_rb.html +++ b/src/files/railties/lib/rails/generators/rails/master_key/master_key_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/rails/master_key/master_key_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/rails/migration/migration_generator_rb.html b/src/files/railties/lib/rails/generators/rails/migration/migration_generator_rb.html index 74ad3c4b71..6ffbe09b66 100644 --- a/src/files/railties/lib/rails/generators/rails/migration/migration_generator_rb.html +++ b/src/files/railties/lib/rails/generators/rails/migration/migration_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/rails/migration/migration_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/rails/model/model_generator_rb.html b/src/files/railties/lib/rails/generators/rails/model/model_generator_rb.html index 532aacfa8f..face50bb9f 100644 --- a/src/files/railties/lib/rails/generators/rails/model/model_generator_rb.html +++ b/src/files/railties/lib/rails/generators/rails/model/model_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/rails/model/model_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/rails/plugin/plugin_generator_rb.html b/src/files/railties/lib/rails/generators/rails/plugin/plugin_generator_rb.html index 5cb91b8dc5..e7ee98da52 100644 --- a/src/files/railties/lib/rails/generators/rails/plugin/plugin_generator_rb.html +++ b/src/files/railties/lib/rails/generators/rails/plugin/plugin_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/rails/plugin/plugin_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/rails/resource/resource_generator_rb.html b/src/files/railties/lib/rails/generators/rails/resource/resource_generator_rb.html index 6979f6f7c4..293f423f66 100644 --- a/src/files/railties/lib/rails/generators/rails/resource/resource_generator_rb.html +++ b/src/files/railties/lib/rails/generators/rails/resource/resource_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/rails/resource/resource_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/rails/resource_route/resource_route_generator_rb.html b/src/files/railties/lib/rails/generators/rails/resource_route/resource_route_generator_rb.html index fef26e498c..2170198a63 100644 --- a/src/files/railties/lib/rails/generators/rails/resource_route/resource_route_generator_rb.html +++ b/src/files/railties/lib/rails/generators/rails/resource_route/resource_route_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/rails/resource_route/resource_route_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/rails/scaffold/scaffold_generator_rb.html b/src/files/railties/lib/rails/generators/rails/scaffold/scaffold_generator_rb.html index 276c95ea28..97bace32e7 100644 --- a/src/files/railties/lib/rails/generators/rails/scaffold/scaffold_generator_rb.html +++ b/src/files/railties/lib/rails/generators/rails/scaffold/scaffold_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/rails/scaffold/scaffold_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator_rb.html b/src/files/railties/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator_rb.html index 0c2871f31f..6b8285baf4 100644 --- a/src/files/railties/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator_rb.html +++ b/src/files/railties/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/rails/system_test/system_test_generator_rb.html b/src/files/railties/lib/rails/generators/rails/system_test/system_test_generator_rb.html index c496813502..5fd74792d0 100644 --- a/src/files/railties/lib/rails/generators/rails/system_test/system_test_generator_rb.html +++ b/src/files/railties/lib/rails/generators/rails/system_test/system_test_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/rails/system_test/system_test_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/rails/task/task_generator_rb.html b/src/files/railties/lib/rails/generators/rails/task/task_generator_rb.html index 2cad2d4c9c..e3c21778d6 100644 --- a/src/files/railties/lib/rails/generators/rails/task/task_generator_rb.html +++ b/src/files/railties/lib/rails/generators/rails/task/task_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/rails/task/task_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/resource_helpers_rb.html b/src/files/railties/lib/rails/generators/resource_helpers_rb.html index 1d03553cde..8d7c6db9a0 100644 --- a/src/files/railties/lib/rails/generators/resource_helpers_rb.html +++ b/src/files/railties/lib/rails/generators/resource_helpers_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/resource_helpers.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/test_case_rb.html b/src/files/railties/lib/rails/generators/test_case_rb.html index 2d8d16749a..d5b032cddb 100644 --- a/src/files/railties/lib/rails/generators/test_case_rb.html +++ b/src/files/railties/lib/rails/generators/test_case_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/test_case.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/test_unit/controller/controller_generator_rb.html b/src/files/railties/lib/rails/generators/test_unit/controller/controller_generator_rb.html index 178aee4b3c..20e707c5d2 100644 --- a/src/files/railties/lib/rails/generators/test_unit/controller/controller_generator_rb.html +++ b/src/files/railties/lib/rails/generators/test_unit/controller/controller_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/test_unit/controller/controller_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/test_unit/generator/generator_generator_rb.html b/src/files/railties/lib/rails/generators/test_unit/generator/generator_generator_rb.html index 970adcd195..9107d516f1 100644 --- a/src/files/railties/lib/rails/generators/test_unit/generator/generator_generator_rb.html +++ b/src/files/railties/lib/rails/generators/test_unit/generator/generator_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/test_unit/generator/generator_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/test_unit/helper/helper_generator_rb.html b/src/files/railties/lib/rails/generators/test_unit/helper/helper_generator_rb.html index 9a880ded5c..4bf0bc84cd 100644 --- a/src/files/railties/lib/rails/generators/test_unit/helper/helper_generator_rb.html +++ b/src/files/railties/lib/rails/generators/test_unit/helper/helper_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/test_unit/helper/helper_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/test_unit/integration/integration_generator_rb.html b/src/files/railties/lib/rails/generators/test_unit/integration/integration_generator_rb.html index 73ab602952..69d2490d2d 100644 --- a/src/files/railties/lib/rails/generators/test_unit/integration/integration_generator_rb.html +++ b/src/files/railties/lib/rails/generators/test_unit/integration/integration_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/test_unit/integration/integration_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/test_unit/job/job_generator_rb.html b/src/files/railties/lib/rails/generators/test_unit/job/job_generator_rb.html index 88cd22928e..ad2544ad7a 100644 --- a/src/files/railties/lib/rails/generators/test_unit/job/job_generator_rb.html +++ b/src/files/railties/lib/rails/generators/test_unit/job/job_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/test_unit/job/job_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/test_unit/mailer/mailer_generator_rb.html b/src/files/railties/lib/rails/generators/test_unit/mailer/mailer_generator_rb.html index cefbc7d01c..a9e9982356 100644 --- a/src/files/railties/lib/rails/generators/test_unit/mailer/mailer_generator_rb.html +++ b/src/files/railties/lib/rails/generators/test_unit/mailer/mailer_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/test_unit/mailer/mailer_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/test_unit/model/model_generator_rb.html b/src/files/railties/lib/rails/generators/test_unit/model/model_generator_rb.html index c90e21b2ef..480ff49553 100644 --- a/src/files/railties/lib/rails/generators/test_unit/model/model_generator_rb.html +++ b/src/files/railties/lib/rails/generators/test_unit/model/model_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/test_unit/model/model_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/test_unit/plugin/plugin_generator_rb.html b/src/files/railties/lib/rails/generators/test_unit/plugin/plugin_generator_rb.html index 77a4cdf07f..3c5951d8c7 100644 --- a/src/files/railties/lib/rails/generators/test_unit/plugin/plugin_generator_rb.html +++ b/src/files/railties/lib/rails/generators/test_unit/plugin/plugin_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/test_unit/plugin/plugin_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/test_unit/scaffold/scaffold_generator_rb.html b/src/files/railties/lib/rails/generators/test_unit/scaffold/scaffold_generator_rb.html index 524ece632d..a4e92bd4a7 100644 --- a/src/files/railties/lib/rails/generators/test_unit/scaffold/scaffold_generator_rb.html +++ b/src/files/railties/lib/rails/generators/test_unit/scaffold/scaffold_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/test_unit/system/system_generator_rb.html b/src/files/railties/lib/rails/generators/test_unit/system/system_generator_rb.html index b325bdadbd..c4d2ea0175 100644 --- a/src/files/railties/lib/rails/generators/test_unit/system/system_generator_rb.html +++ b/src/files/railties/lib/rails/generators/test_unit/system/system_generator_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/test_unit/system/system_generator.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/test_unit_rb.html b/src/files/railties/lib/rails/generators/test_unit_rb.html index 2dfb503339..dbdf2f1e58 100644 --- a/src/files/railties/lib/rails/generators/test_unit_rb.html +++ b/src/files/railties/lib/rails/generators/test_unit_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/test_unit.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/testing/assertions_rb.html b/src/files/railties/lib/rails/generators/testing/assertions_rb.html index 3c2ffb56e7..664e302b7c 100644 --- a/src/files/railties/lib/rails/generators/testing/assertions_rb.html +++ b/src/files/railties/lib/rails/generators/testing/assertions_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/testing/assertions.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/testing/behavior_rb.html b/src/files/railties/lib/rails/generators/testing/behavior_rb.html index d86a13376f..1c2c9fb1d5 100644 --- a/src/files/railties/lib/rails/generators/testing/behavior_rb.html +++ b/src/files/railties/lib/rails/generators/testing/behavior_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/testing/behavior.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators/testing/behaviour_rb.html b/src/files/railties/lib/rails/generators/testing/behaviour_rb.html deleted file mode 100644 index 73deb29e62..0000000000 --- a/src/files/railties/lib/rails/generators/testing/behaviour_rb.html +++ /dev/null @@ -1,98 +0,0 @@ ---- -title: behaviour.rb -layout: default ---- -
    - - -
    -
    - - - - -

    Required Files

    -
      - -
    • active_support/core_ext/class/attribute
    • - -
    • active_support/core_ext/module/delegation
    • - -
    • active_support/core_ext/hash/reverse_merge
    • - -
    • active_support/core_ext/kernel/reporting
    • - -
    • active_support/testing/stream
    • - -
    • active_support/concern
    • - -
    • rails/generators
    • - -
    - - - - - - - -

    Namespace

    - - -

    Module

    - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    diff --git a/src/files/railties/lib/rails/generators/testing/setup_and_teardown_rb.html b/src/files/railties/lib/rails/generators/testing/setup_and_teardown_rb.html index cf292dc612..86a94272de 100644 --- a/src/files/railties/lib/rails/generators/testing/setup_and_teardown_rb.html +++ b/src/files/railties/lib/rails/generators/testing/setup_and_teardown_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators/testing/setup_and_teardown.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/generators_rb.html b/src/files/railties/lib/rails/generators_rb.html index 901f721880..3d01816e53 100644 --- a/src/files/railties/lib/rails/generators_rb.html +++ b/src/files/railties/lib/rails/generators_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/generators.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/health_controller_rb.html b/src/files/railties/lib/rails/health_controller_rb.html index 29adc62f44..2e99429682 100644 --- a/src/files/railties/lib/rails/health_controller_rb.html +++ b/src/files/railties/lib/rails/health_controller_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/health_controller.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/info_controller_rb.html b/src/files/railties/lib/rails/info_controller_rb.html index 0892043a0a..573a48f71d 100644 --- a/src/files/railties/lib/rails/info_controller_rb.html +++ b/src/files/railties/lib/rails/info_controller_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/info_controller.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/info_rb.html b/src/files/railties/lib/rails/info_rb.html index 24e56a1af3..93f121d1a4 100644 --- a/src/files/railties/lib/rails/info_rb.html +++ b/src/files/railties/lib/rails/info_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/info.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/initializable_rb.html b/src/files/railties/lib/rails/initializable_rb.html index 5c4c18fd12..ee460d3934 100644 --- a/src/files/railties/lib/rails/initializable_rb.html +++ b/src/files/railties/lib/rails/initializable_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/initializable.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/mailers_controller_rb.html b/src/files/railties/lib/rails/mailers_controller_rb.html index 63bad70726..310ece5e05 100644 --- a/src/files/railties/lib/rails/mailers_controller_rb.html +++ b/src/files/railties/lib/rails/mailers_controller_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/mailers_controller.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/paths_rb.html b/src/files/railties/lib/rails/paths_rb.html index b00ad7bace..bca879efaa 100644 --- a/src/files/railties/lib/rails/paths_rb.html +++ b/src/files/railties/lib/rails/paths_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/paths.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/plugin/test_rb.html b/src/files/railties/lib/rails/plugin/test_rb.html index 7d7d0fdeb4..13de83ac04 100644 --- a/src/files/railties/lib/rails/plugin/test_rb.html +++ b/src/files/railties/lib/rails/plugin/test_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/plugin/test.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/rack/logger_rb.html b/src/files/railties/lib/rails/rack/logger_rb.html index 7cd85a36cc..12a95a1709 100644 --- a/src/files/railties/lib/rails/rack/logger_rb.html +++ b/src/files/railties/lib/rails/rack/logger_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/rack/logger.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/rack_rb.html b/src/files/railties/lib/rails/rack_rb.html index 660fadb003..d9da06f48b 100644 --- a/src/files/railties/lib/rails/rack_rb.html +++ b/src/files/railties/lib/rails/rack_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/rack.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/rackup/server_rb.html b/src/files/railties/lib/rails/rackup/server_rb.html index 4259289daa..682d983641 100644 --- a/src/files/railties/lib/rails/rackup/server_rb.html +++ b/src/files/railties/lib/rails/rackup/server_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/rackup/server.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/railtie/configurable_rb.html b/src/files/railties/lib/rails/railtie/configurable_rb.html index 91d9fc9a2c..14f4fc5b9a 100644 --- a/src/files/railties/lib/rails/railtie/configurable_rb.html +++ b/src/files/railties/lib/rails/railtie/configurable_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/railtie/configurable.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/railtie/configuration_rb.html b/src/files/railties/lib/rails/railtie/configuration_rb.html index 23e9304fa2..9b0d657867 100644 --- a/src/files/railties/lib/rails/railtie/configuration_rb.html +++ b/src/files/railties/lib/rails/railtie/configuration_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/railtie/configuration.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/railtie_rb.html b/src/files/railties/lib/rails/railtie_rb.html index d0ea6e1421..9b50837061 100644 --- a/src/files/railties/lib/rails/railtie_rb.html +++ b/src/files/railties/lib/rails/railtie_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/railtie.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/ruby_version_check_rb.html b/src/files/railties/lib/rails/ruby_version_check_rb.html index 20f866b617..cf966994be 100644 --- a/src/files/railties/lib/rails/ruby_version_check_rb.html +++ b/src/files/railties/lib/rails/ruby_version_check_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/ruby_version_check.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/secrets_rb.html b/src/files/railties/lib/rails/secrets_rb.html index 2620c39767..0d96af9870 100644 --- a/src/files/railties/lib/rails/secrets_rb.html +++ b/src/files/railties/lib/rails/secrets_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/secrets.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/source_annotation_extractor_rb.html b/src/files/railties/lib/rails/source_annotation_extractor_rb.html index 443ac06df7..1ea0501305 100644 --- a/src/files/railties/lib/rails/source_annotation_extractor_rb.html +++ b/src/files/railties/lib/rails/source_annotation_extractor_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/source_annotation_extractor.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/tasks_rb.html b/src/files/railties/lib/rails/tasks_rb.html index 66c30bceb2..73a01af194 100644 --- a/src/files/railties/lib/rails/tasks_rb.html +++ b/src/files/railties/lib/rails/tasks_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/tasks.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/test_help_rb.html b/src/files/railties/lib/rails/test_help_rb.html index f2d7511022..b8c661db16 100644 --- a/src/files/railties/lib/rails/test_help_rb.html +++ b/src/files/railties/lib/rails/test_help_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/test_help.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/testing/maintain_test_schema_rb.html b/src/files/railties/lib/rails/testing/maintain_test_schema_rb.html index 5fa26413cd..dfbc99bc54 100644 --- a/src/files/railties/lib/rails/testing/maintain_test_schema_rb.html +++ b/src/files/railties/lib/rails/testing/maintain_test_schema_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/testing/maintain_test_schema.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/version_rb.html b/src/files/railties/lib/rails/version_rb.html index 6566f9b558..b4cdc851c2 100644 --- a/src/files/railties/lib/rails/version_rb.html +++ b/src/files/railties/lib/rails/version_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/version.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails/welcome_controller_rb.html b/src/files/railties/lib/rails/welcome_controller_rb.html index 626c9ca334..03ef62e7a4 100644 --- a/src/files/railties/lib/rails/welcome_controller_rb.html +++ b/src/files/railties/lib/rails/welcome_controller_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails/welcome_controller.rb + on GitHub +
  • diff --git a/src/files/railties/lib/rails_rb.html b/src/files/railties/lib/rails_rb.html index 36d88a60b1..0e113ee50f 100644 --- a/src/files/railties/lib/rails_rb.html +++ b/src/files/railties/lib/rails_rb.html @@ -15,6 +15,8 @@

  • railties/lib/rails.rb + on GitHub +
  • diff --git a/src/index.html b/src/index.html index 323c75d6cc..67477502ea 100644 --- a/src/index.html +++ b/src/index.html @@ -15,6 +15,8 @@

  • railties/RDOC_MAIN.md + on GitHub +