Module: Anubis::Sso::Client::Data::Load
- Includes:
- Core::Data::Load
- Included in:
- Anubis::Sso::Client::DataController
- Defined in:
- app/controllers/anoubis/sso/client/data/load.rb
Overview
Module loads data from external sources for Anubis::Sso::Client::DataController
Instance Method Summary collapse
Methods included from Core::Data::Load
#load_autocomplete_data, #load_data_by_id, #load_data_by_title, #load_new_data, #load_parent_data, #load_table_data, #load_table_data_count
Instance Method Details
#load_menu_data ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/controllers/anoubis/sso/client/data/load.rb', line 6 def = self.redis.get(self.redis_prefix + 'menu:' + params[:controller]) unless = Anubis::Sso::Client::Menu.where(mode: params[:controller], status: 'enabled').first self.redis.set(self.redis_prefix + 'menu:'+ params[:controller], .to_json) if else = Anubis::Sso::Client::Menu.new(JSON.parse(, { :symbolize_names => true })) end if self.etc. = Anubis::Etc::Menu.new if self.writer self.etc..access = 'write' else self.etc..access = 'read' end end end |