module StoreSchema::Module::ClassMethods
Public Instance Methods
store_schema(column) { |config| ... }
click to toggle source
@example
# Gemfile gem "store_schema" # app/models/website.rb class Website < ActiveRecord::Base store_schema :config do |s| s.string :name s.integer :visitors s.float :apdex s.boolean :ssl s.datetime :published_at end end
@param column [Symbol] name of the table column @param block [Proc] the configuration block
# File lib/store_schema/module.rb, line 31 def store_schema(column, &block) StoreSchema::Configuration.new(column).tap do |config| yield(config) config.send(:configure, self) end end