Sha256: ae5c6c582d96625a994d2ac4cd9089dad3d6a908b9ee2aeaa4cce736cfe2c21b

Contents?: true

Size: 644 Bytes

Versions: 10

Compression:

Stored size: 644 Bytes

Contents

module Forms
  module Models
    module Extension
      def self.included(base)
        base.class_eval do 
          def initialize(form, page, config)
            @form   = form
            @page   = page
            
            @data   = Forms::Config.deep_symbolize_keys(@page.data)
            
            # Sets the config to be the current environment config: checkout:
            @config = config
          end
          
          def current_user
            return @current_user if @current_user.present? 
            @current_user = UserActionObserver.current_user
          end
          
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
radiant-forms-extension-3.2.8 lib/forms/models/extension.rb
radiant-forms-extension-3.3.2 lib/forms/models/extension.rb
radiant-forms-extension-3.3.1 lib/forms/models/extension.rb
radiant-forms-extension-3.3.0 lib/forms/models/extension.rb
radiant-forms-extension-3.2.7 lib/forms/models/extension.rb
radiant-forms-extension-3.2.6 lib/forms/models/extension.rb
radiant-forms-extension-3.2.5 lib/forms/models/extension.rb
radiant-forms-extension-3.2.4 lib/forms/models/extension.rb
radiant-forms-extension-3.2.2 lib/forms/models/extension.rb
radiant-forms-extension-3.2.1 lib/forms/models/extension.rb