Class: LesliGuard::Dashboard

Inherits:
Lesli::Shared::Dashboard
  • Object
show all
Defined in:
app/models/lesli_guard/dashboard.rb

Defined Under Namespace

Classes: Component, ComponentsController

Class Method Summary collapse

Class Method Details

.initialize_account(account) ⇒ Object



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'app/models/lesli_guard/dashboard.rb', line 41

def self.()
    self.create_with(
        default: true,
        main: false,
        components_attributes: [{
            name: "Users",
            component_id: "guard-users",
            layout: 3,
            query_configuration: {},
            custom_configuration: {}
        }]
    ).find_or_create_by!(
        account: ,
        name: "Default Dashboard"
    )
end