Module: Exposure::Configuration::Options

Defined in:
lib/exposure/options.rb

Instance Method Summary collapse

Instance Method Details

#allow_actions!Object



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/exposure/options.rb', line 4

def allow_actions!
  if @_exposed_resource_options[:only]
    @_exposed_resource_options[:except] = Patterns::Resources::DefaultActions - @_exposed_resource_options[:only]
  end
  
  if @_exposed_resource_options[:except]
    @_exposed_resource_options[:except].each do |action|
      undef_method(action)
    end
  end
end

#allow_formats!Object



16
17
18
# File 'lib/exposure/options.rb', line 16

def allow_formats!
  formats = @_exposed_resource_options[:formats] || [:html, :xml] 
end

#name!Object



20
21
22
23
# File 'lib/exposure/options.rb', line 20

def name!
  self.resource_name  = @_exposed_resource_name.to_s.singularize
  self.resources_name = @_exposed_resource_name.to_s
end