Class: Tim::ResourceLinkFilter

Inherits:
Object
  • Object
show all
Defined in:
app/filters/tim/resource_link_filter.rb

Overview

NOTE This filter was taken from the aeolus conductor project: github.com/aeolusproject/conductor/

Instance Method Summary collapse

Constructor Details

#initialize(resource_links) ⇒ ResourceLinkFilter

Returns a new instance of ResourceLinkFilter.



24
25
26
# File 'app/filters/tim/resource_link_filter.rb', line 24

def initialize(resource_links)
  @resource_links = resource_links
end

Instance Method Details

#before(controller) ⇒ Object



28
29
30
31
32
# File 'app/filters/tim/resource_link_filter.rb', line 28

def before(controller)
  return unless controller.request.format == :xml

  transform_resource_links_recursively(controller.params, @resource_links)
end