Module: OpenInApp::ControllerHelper::ClassMethods

Defined in:
lib/open_in_app/controller_helper.rb

Instance Method Summary collapse

Instance Method Details

#open_in_app(options = {}) ⇒ Object



51
52
53
54
55
56
57
58
59
# File 'lib/open_in_app/controller_helper.rb', line 51

def open_in_app(options={})
  open_in_app_options.merge!(options.reject { |key,| not [:if, :unless].include?(key.to_sym) })
  filter_options = options.reject { |key,| [:if, :unless, :prepend].include?(key.to_sym) }
  if prepend_filter = options.delete(:prepend)
    prepend_before_filter prepend_filter, :open_in_app, filter_options
  else
    before_filter :open_in_app, filter_options
  end
end

#open_in_app_optionsObject



61
62
63
# File 'lib/open_in_app/controller_helper.rb', line 61

def open_in_app_options
  @open_in_app_options ||= {}
end