Module: Ez::Settings::RequestDispatcher

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

Instance Method Summary collapse

Instance Method Details

#groupObject



13
14
15
16
# File 'lib/ez/settings/request_dispatcher.rb', line 13

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

#interfaceObject

should implement :params



6
7
8
9
10
11
# File 'lib/ez/settings/request_dispatcher.rb', line 6

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