class Object

Public Instance Methods

array() click to toggle source
# File lib/motor/active_record_utils/active_record_connection_column_patch.rb, line 10
def array
  false
end
build_arel(aliases = nil) click to toggle source
Calls superclass method
# File lib/motor/active_record_utils/active_record_filter_patch.rb, line 11
def build_arel(aliases = nil)
  arel = super
  my_alias_tracker = ActiveRecord::Associations::AliasTracker.create(connection, table.name, [])
  build_filters(arel, my_alias_tracker)
  arel
end
build_filters(manager, alias_tracker) click to toggle source
# File lib/motor/active_record_utils/active_record_filter_patch.rb, line 18
def build_filters(manager, alias_tracker)
  where_clause = nil

  @filters.each do |filters|
    where_clause = filter_clause_factory.build(filters, alias_tracker)

    manager.where(where_clause.ast)
  end

  @values[:where] = where_clause if where_clause
end
filters() click to toggle source
# File lib/motor/active_record_utils/active_record_filter_patch.rb, line 4
def filters
  @filters ||= HashWithIndifferentAccess.new
end
has_rich_text(*args) click to toggle source

rubocop:disable Naming/PredicateName

Calls superclass method
# File lib/motor/active_record_utils/action_text_attribute_patch.rb, line 6
def has_rich_text(*args)
  super

  name = args.first

  alias_method :"#{name}_body=", :"#{name}="

  define_method(:"#{name}_body") do
    send(name).body&.to_trix_html
  end
end