Module: Ez::Settings::RequestDispatcher

Included in:
BaseCell, SettingsController
Defined in:
lib/ez/settings/request_dispatcher.rb

Instance Method Summary collapse

Instance Method Details

#groupObject



17
18
19
20
21
22
# File 'lib/ez/settings/request_dispatcher.rb', line 17

def group
  return unless interface

  # TODO: add raise exception if nil
  interface.groups.find { |g| g.name == params[:group].to_sym }
end

#interfaceObject

should implement :params



8
9
10
11
12
13
14
15
# File 'lib/ez/settings/request_dispatcher.rb', line 8

def interface
  return unless params[:ez_settings_interface]

  # TODO: add raise exception in nil
  Ez::Registry.data(:settings_interfaces).find do |interface|
    interface.name == params[:ez_settings_interface].to_sym
  end
end