Class: MemberDashboard

Inherits:
Object
  • Object
show all
Defined in:
app/dashboards/member_dashboard.rb

Instance Method Summary collapse

Instance Method Details

#create_scope ⇒ Object



23
24
25
# File 'app/dashboards/member_dashboard.rb', line 23

def create_scope
  Member.all
end

#destroy_scope ⇒ Object



70
71
72
# File 'app/dashboards/member_dashboard.rb', line 70

def destroy_scope
  Member.all
end

#edit_columns ⇒ Object



43
44
45
46
47
48
49
# File 'app/dashboards/member_dashboard.rb', line 43

def edit_columns
  [
    :name,
    :rank,
    :position,
  ]
end

#edit_scope ⇒ Object



39
40
41
# File 'app/dashboards/member_dashboard.rb', line 39

def edit_scope
  Member.all
end

#index_columns ⇒ Object



14
15
16
17
18
19
20
21
# File 'app/dashboards/member_dashboard.rb', line 14

def index_columns
  [
    :name,
    :rank,
    :position,
    :created_at,
  ]
end

#index_scope ⇒ Object



10
11
12
# File 'app/dashboards/member_dashboard.rb', line 10

def index_scope
  Member.all
end

#model ⇒ Object



6
7
8
# File 'app/dashboards/member_dashboard.rb', line 6

def model
  Member
end

#new_columns ⇒ Object



31
32
33
34
35
36
37
# File 'app/dashboards/member_dashboard.rb', line 31

def new_columns
  [
    :name,
    :rank,
    :position,
  ]
end

#new_scope ⇒ Object



27
28
29
# File 'app/dashboards/member_dashboard.rb', line 27

def new_scope
  Member.all
end

#permitted_create_params(params) ⇒ Object



74
75
76
# File 'app/dashboards/member_dashboard.rb', line 74

def permitted_create_params(params)
  params.require(:member).permit(:name, :rank, :position)
end

#permitted_update_params(params) ⇒ Object



78
79
80
# File 'app/dashboards/member_dashboard.rb', line 78

def permitted_update_params(params)
  params.require(:member).permit(:name, :rank, :position)
end

#show_columns ⇒ Object



55
56
57
58
59
60
61
62
63
64
# File 'app/dashboards/member_dashboard.rb', line 55

def show_columns
  [
    :id,
    :name,
    :rank,
    :position,
    :created_at,
    :updated_at,
  ]
end

#show_scope ⇒ Object



51
52
53
# File 'app/dashboards/member_dashboard.rb', line 51

def show_scope
  Member.all
end

#title ⇒ Object



2
3
4
# File 'app/dashboards/member_dashboard.rb', line 2

def title
  Member.name.pluralize
end

#update_scope ⇒ Object



66
67
68
# File 'app/dashboards/member_dashboard.rb', line 66

def update_scope
  Member.all
end