Module: Faalis::Generators::Concerns::Model

Included in:
DashboardScaffold
Defined in:
lib/faalis/generators/concerns/model.rb

Overview

This concern adds support for model key inside jsonfile which allow you to override the name of resource default model name. Resource model name is used in some processes like permission system.

Instance Method Summary (collapse)

Instance Method Details

- (Object) model (private)

Name of alternative model



17
18
19
20
21
22
23
# File 'lib/faalis/generators/concerns/model.rb', line 17

def model
  if model_specified?
    resource_data['model']
  else
    ''
  end
end

- (Boolean) model_specified? (private)

Does an alternative model is specified ?

Returns:

  • (Boolean)


12
13
14
# File 'lib/faalis/generators/concerns/model.rb', line 12

def model_specified?
  resource_data.include? 'model'
end