Class: ActiveRecord::FixtureSet::RenderContext

Inherits:
Object
  • Object
show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/active_record/fixture_set/render_context.rb

Overview

NOTE: This class has to be defined in compact style in order for rendering context subclassing to work correctly.

Class Method Summary collapse

Class Method Details

.create_subclassObject

:nodoc:



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/active_record/fixture_set/render_context.rb', line 6

def self.create_subclass
  Class.new(ActiveRecord::FixtureSet.context_class) do
    def get_binding
      binding()
    end

    def binary(path)
      %(!!binary "#{Base64.strict_encode64(File.binread(path))}")
    end
  end
end