Sha256: 54ae359dfa6db4821dbe8eb71d892112bc1ca4454333a3b62a5c3676e777a8df
Contents?: true
Size: 1007 Bytes
Versions: 5
Compression:
Stored size: 1007 Bytes
Contents
require 'satis/version' require 'satis/engine' require 'satis/configuration' require 'satis/active_record_helpers' require 'view_component' require 'browser' require 'browser/aliases' Browser::Base.include(Browser::Aliases) module Satis class << self attr_reader :config def setup @config = Configuration.new yield config end def confirm_before_leave? return false if config.nil? config.confirm_before_leave end def submit_on_enter? return true if config.nil? config.submit_on_enter end def add_helper(name, component) Satis::Helpers::Container.add_helper(name, component) end def add_component_helper(component_name, name, component) klass = "Satis::#{component_name.to_s.classify}::Component".safe_constantize return if klass.blank? klass.add_helper name, component end end # Include helpers ActiveSupport.on_load(:active_record) do include Satis::ActiveRecordHelpers end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
satis-1.0.75 | lib/satis.rb |
satis-1.0.74 | lib/satis.rb |
satis-1.0.70 | lib/satis.rb |
satis-1.0.69 | lib/satis.rb |
satis-1.0.68 | lib/satis.rb |