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

#controller_file, #datatable_file, #flat_view_file, #model_file, #view_file

Methods included from Effective::Resources::Naming

#class_name, #class_path, #human_name, #human_plural_name, #initialized_name, #name, #namespace, #namespaced_class_name, #namespaced_module_name, #namespaces, #plural_name, #resource_name

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

#search_form_field, #search_form_field_collection

Methods included from Effective::Resources::Instance

#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, #active_storage, #active_storage_has_manys, #active_storage_has_manys_ids, #active_storage_has_ones, #active_storage_has_ones_ids, #active_storages, #active_texts, #active_texts_has_ones_ids, #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

Constructor Details

#initialize(input, namespace: nil, &block) ⇒ Resource

post, Post, Admin::Post, admin::Post, admin/posts, admin/post, admin/effective::post



18
19
20
21
22
# File 'app/models/effective/resource.rb', line 18

def initialize(input, namespace: nil, &block)
  _initialize_input(input, namespace: namespace)
  _initialize_model(&block) if block_given?
  self
end

Instance Method Details

#to_sObject



24
25
26
# File 'app/models/effective/resource.rb', line 24

def to_s
  name
end