Sha256: a37e0a5a99f498a04479f09c3e2231e529bf03de73434c5a361cb07c91df6db3

Contents?: true

Size: 1.15 KB

Versions: 1

Compression:

Stored size: 1.15 KB

Contents

require 'mobility/backends/active_record/pg_hash'

module Mobility
  module Backends
=begin

Implements the {Mobility::Backends::Json} backend for ActiveRecord models.

@see Mobility::Backends::ActiveRecord::HashValued

=end
    module ActiveRecord
      class Json < PgHash
        require 'mobility/backends/active_record/json/query_methods'

        # @!group Backend Accessors
        #
        # @note Translation may be string, integer or boolean-valued since
        #   value is stored on a JSON hash.
        # @param [Symbol] locale Locale to read
        # @param [Hash] options
        # @return [String,Integer,Boolean] Value of translation
        # @!method read(locale, **options)

        # @!group Backend Accessors
        # @note Translation may be string, integer or boolean-valued since
        #   value is stored on a JSON hash.
        # @param [Symbol] locale Locale to write
        # @param [String,Integer,Boolean] value Value to write
        # @param [Hash] options
        # @return [String,Integer,Boolean] Updated value
        # @!method write(locale, value, **options)

        setup_query_methods(QueryMethods)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mobility-0.6.0 lib/mobility/backends/active_record/json.rb