module EditInPlace

{EditInPlace} is a namespace that contains all the modules and classes of the edit_in_place Rails gemified plugin.

@author Jacob Lockard @since 0.1.0

Constants

VERSION

Public Class Methods

config() click to toggle source

Gets the {Configuration} instance that contains the global configuration for the edit_in_place plugin. The global configuration will be applied to all created {Builder} instances. @return [Configuration] the global configuration. @see Configuration

# File lib/edit_in_place.rb, line 36
def self.config
  @config
end
config=(config) click to toggle source

Sets the {Configuration} instance that represents the global configuration for the edit_in_place plugin. A convenient use for this method is to reset the global configuration by setting it to EditInPlace::Configuration.new. @param config [Configuration] the global configuration. @return [void] @see Configuration

# File lib/edit_in_place.rb, line 46
def self.config=(config)
  @config = config
end
configure() { |config| ... } click to toggle source

Configures the edit_in_place plugin by yielding the global configuration to the given block. This is a convenient way to configure the plugin. For example:

EditInPlace.configure do |c|
  c.field_options.mode = :editing
  c.defined_middlewares = [SomeMiddleware, AnotherMiddleware]
end

@yieldparam config [Configuration] the {Configuration} instance of the edit_in_place plugin. @yieldreturn [void] @return [void] @see Configuration

# File lib/edit_in_place.rb, line 61
def self.configure
  yield config if block_given?
end