Class: Effective::Resource
- Inherits:
-
Object
- Object
- Effective::Resource
- Includes:
- Effective::Resources::Actions, Effective::Resources::Associations, Effective::Resources::Attributes, Effective::Resources::Controller, Effective::Resources::Forms, Effective::Resources::Generator, Effective::Resources::I18n, Effective::Resources::Init, Effective::Resources::Instance, Effective::Resources::Klass, Effective::Resources::Model, Effective::Resources::Naming, Effective::Resources::Paths, Effective::Resources::Relation, Effective::Resources::Sql, Effective::Resources::Tenants
- Defined in:
- app/models/effective/resource.rb
Constant Summary
Constants included from Effective::Resources::Relation
Effective::Resources::Relation::DO_NOT_SEARCH_END_WITH, Effective::Resources::Relation::DO_NOT_SEARCH_EQUALS, Effective::Resources::Relation::DO_NOT_SEARCH_INCLUDE, Effective::Resources::Relation::TARGET_KEYS_LIMIT, Effective::Resources::Relation::TARGET_LIST_LIMIT
Constants included from Effective::Resources::Naming
Effective::Resources::Naming::SPLIT
Constants included from Effective::Resources::Instance
Effective::Resources::Instance::BLACKLIST
Constants included from Effective::Resources::Associations
Effective::Resources::Associations::INVALID_SCOPE_NAMES
Constants included from Effective::Resources::Actions
Effective::Resources::Actions::CRUD_ACTIONS, Effective::Resources::Actions::EMPTY_HASH, Effective::Resources::Actions::POST_VERBS
Instance Attribute Summary
Attributes included from Effective::Resources::Model
Attributes included from Effective::Resources::Instance
Instance Method Summary collapse
-
#initialize(input, namespace: nil, relation: nil, &block) ⇒ Resource
constructor
post, Post, Admin::Post, admin::Post, admin/posts, admin/post, admin/effective::post.
- #to_s ⇒ Object
Methods included from Effective::Resources::Tenants
Methods included from Effective::Resources::Sql
#column, #column_names, #columns, #ilike, #is_null, #mysql?, #postgres?, #search_columns, #search_columns=, #sort_column, #sort_column=, #sql_column, #sql_direction, #sql_operation, #sql_type, #table
Methods included from Effective::Resources::Relation
#order, #relation, #search, #search_any, #search_associated, #search_attribute
Methods included from Effective::Resources::Paths
#abilities_file, #admin_effective_controller_file, #admin_effective_datatable_file, #admin_effective_view_file, #admin_menu_file, #controller_file, #datatable_file, #effective_datatable_file, #menu_file, #model_file, #routes_file, #tenant_path, #view_file, #view_file_path, #view_paths, #wizard_file_path
Methods included from Effective::Resources::Naming
#class_name, #class_path, #initialized_name, #name, #namespace, #namespaces, #plural_name, #resource_name, #route_name, #route_name_fallbacks
Methods included from Effective::Resources::Model
Methods included from Effective::Resources::Klass
#active_model?, #active_record?, #controller_klass, #datatable_klass, #klass
Methods included from Effective::Resources::I18n
#human_action_confirm, #human_action_name, #human_name, #human_plural_name
Methods included from Effective::Resources::Generator
#module_name, #module_namespace, #module_namespaced, #namespaced_class_name, #namespaced_module_name, #tenant_class_name, #tenant_controller_path, #tenant_namespaced_class_name, #tenant_namespaced_module_name
Methods included from Effective::Resources::Forms
#search_form_field, #search_form_field_collection
Methods included from Effective::Resources::Instance
#instance_action_texts_previous_changes, #instance_attributes, #instance_changes
Methods included from Effective::Resources::Controller
#buttons, #fallback_resource_actions, #ons, #resource_actions, #resource_klass_actions, #submits
Methods included from Effective::Resources::Attributes
#active_storage_attributes, #active_text_attributes, #attributes, #belong_tos_attributes, #belong_tos_names_attributes, #effective_addresses_attributes, #effective_assets_attributes, #has_manys_attributes, #has_ones_attributes, #klass_attributes, #model_attributes, #permitted_attributes, #primary_key_attribute, #resource_attributes, #table_attributes
Methods included from Effective::Resources::Associations
#accepts_nested_attributes, #action_texts, #action_texts_has_ones_ids, #active_storage, #active_storage_has_manys, #active_storage_has_manys_ids, #active_storage_has_ones, #active_storage_has_ones_ids, #active_storages, #associated, #belong_tos, #belong_tos_ids, #belongs_to, #belongs_to_polymorphic, #effective_addresses, #has_and_belongs_to_many, #has_and_belongs_to_manys, #has_anys, #has_many, #has_manys, #has_manys_ids, #has_one, #has_ones, #has_ones_ids, #macros, #nested_resource, #nested_resources, #scope?
Methods included from Effective::Resources::Actions
#action_path, #action_path_helper, #actions, #collection_actions, #collection_get_actions, #collection_post_actions, #controller_path, #crud_actions, #member_actions, #member_delete_actions, #member_get_actions, #member_post_actions, #route_engines, #routes, #routes_app, #url_helpers
Constructor Details
#initialize(input, namespace: nil, relation: nil, &block) ⇒ Resource
post, Post, Admin::Post, admin::Post, admin/posts, admin/post, admin/effective::post
25 26 27 28 29 30 31 32 |
# File 'app/models/effective/resource.rb', line 25 def initialize(input, namespace: nil, relation: nil, &block) _initialize_input(input, namespace: namespace, relation: relation) # This is an effective_resource do ... end block _initialize_model(&block) if block_given? self end |
Instance Method Details
#to_s ⇒ Object
34 35 36 |
# File 'app/models/effective/resource.rb', line 34 def to_s human_name end |