Class: Effective::Resource

Constant Summary

Constants included from Effective::Resources::Relation

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::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

#model

Attributes included from Effective::Resources::Instance

#instance

Instance Method Summary collapse

Methods included from Effective::Resources::Sql

#column, #column_names, #columns, #ilike, #is_null, #max_id, #mysql?, #postgres?, #search_columns, #search_columns=, #sort_column, #sort_column=, #sql_column, #sql_direction, #sql_type, #table

Methods included from Effective::Resources::Relation

#order, #relation, #search, #search_any

Methods included from Effective::Resources::Paths

#abilities_file, #admin_menu_file, #controller_file, #datatable_file, #flat_view_file, #menu_file, #model_file, #routes_file, #tenant_path, #view_file, #view_file_path, #view_paths

Methods included from Effective::Resources::Naming

#class_name, #class_path, #human_name, #human_plural_name, #initialized_name, #name, #namespace, #namespaces, #plural_name, #resource_name, #route_name, #route_name_fallbacks, #tenant

Methods included from Effective::Resources::Model

#_initialize_model

Methods included from Effective::Resources::Klass

#active_model?, #active_record?, #controller_klass, #datatable_klass, #klass

Methods included from Effective::Resources::Generator

#module_name, #module_namespace, #module_namespaced, #namespaced_class_name, #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, #effective_addresses_attributes, #effective_assets_attributes, #has_manys_attributes, #has_ones_attributes, #klass_attributes, #model_attributes, #permitted_attributes, #primary_key_attribute, #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, #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



24
25
26
27
28
29
30
31
# File 'app/models/effective/resource.rb', line 24

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_sObject



33
34
35
# File 'app/models/effective/resource.rb', line 33

def to_s
  name
end