Module: RemoteFactoryGirlHomeRails

Defined in:
lib/remote_factory_girl_home_rails.rb,
lib/remote_factory_girl_home_rails/engine.rb,
lib/remote_factory_girl_home_rails/serializer.rb,
app/helpers/remote_factory_girl_home_rails/application_helper.rb,
app/controllers/remote_factory_girl_home_rails/home_controller.rb

Defined Under Namespace

Modules: ApplicationHelper Classes: Engine, HomeController, Serializer

Constant Summary collapse

OFF =
false
ON =
true

Class Method Summary collapse

Class Method Details

.config(config = RemoteFactoryGirlHomeRails::Engine.config.remote_factory_girl_home_rails) ⇒ Object



13
14
15
# File 'lib/remote_factory_girl_home_rails.rb', line 13

def self.config(config = RemoteFactoryGirlHomeRails::Engine.config.remote_factory_girl_home_rails)
  config
end

.configure {|config| ... } ⇒ Object

Yields:



17
18
19
# File 'lib/remote_factory_girl_home_rails.rb', line 17

def self.configure
  yield config
end

.disable!Object



25
26
27
# File 'lib/remote_factory_girl_home_rails.rb', line 25

def self.disable!
  config.enable = OFF 
end

.enable!Object



21
22
23
# File 'lib/remote_factory_girl_home_rails.rb', line 21

def self.enable!
  config.enable = ON 
end

.enabled?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/remote_factory_girl_home_rails.rb', line 29

def self.enabled?
  config.enable == ON
end

.resetObject



33
34
35
36
# File 'lib/remote_factory_girl_home_rails.rb', line 33

def self.reset
  config.enable = OFF
  config.skip_before_filter = nil
end

.skip_before_filterObject



8
9
10
11
# File 'lib/remote_factory_girl_home_rails.rb', line 8

def self.skip_before_filter
  filters = config.skip_before_filter
  filters.present? ? [filters].flatten.map(&:to_sym) : nil
end