Sha256: 51b8db69d1d476a24b1ed9fa34d08a687083b16d7cdb88b8657a4edf8953597a
Contents?: true
Size: 667 Bytes
Versions: 9
Compression:
Stored size: 667 Bytes
Contents
module Netzke module Basepack # This module is included into such data-driven components as Grid, Form, PagingForm, etc. module DataAccessor # Model class as specified in configuration. May be handy to override. # Returns ORM model class. def model @model ||= config[:model].is_a?(String) ? config[:model].constantize : config[:model] end # Data adapter responsible for all DB-related operations. # Note that if model is nil, AbstractAdapter will used. def model_adapter @model_adapter ||= Netzke::Basepack::DataAdapters::AbstractAdapter.adapter_class(model).new(model) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems