Class: Infold::App
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Infold::App
- Defined in:
- app/models/infold/app.rb
Instance Method Summary collapse
Instance Method Details
#app_views ⇒ Object
29 30 31 |
# File 'app/models/infold/app.rb', line 29 def app_views [app_view_index, app_view_show, app_view_form, app_view_modal] end |
#build_views ⇒ Object
22 23 24 25 26 27 |
# File 'app/models/infold/app.rb', line 22 def build_views build_app_view_index(checked: !persisted?) unless app_view_index build_app_view_show(checked: !persisted?) unless app_view_show build_app_view_form(checked: !persisted?) unless app_view_form build_app_view_modal unless app_view_modal end |
#disabled_action?(kind) ⇒ Boolean
33 34 35 36 37 38 |
# File 'app/models/infold/app.rb', line 33 def disabled_action?(kind) kind = kind.to_sym app_view_show.nil? && kind == :show || app_view_form.nil? && i(create update destroy).include?(kind) || !i(index show create update destroy).include?(kind) end |