Module: ForestLiana

Defined in:
lib/forest_liana.rb,
lib/forest_liana/engine.rb,
lib/forest_liana/version.rb,
lib/forest_liana/bootstraper.rb,
lib/forest_liana/base64_string_io.rb,
app/services/forest_liana/stat_getter.rb,
app/services/forest_liana/schema_utils.rb,
app/helpers/forest_liana/adapter_helper.rb,
app/services/forest_liana/schema_adapter.rb,
app/services/forest_liana/has_many_getter.rb,
app/services/forest_liana/pie_stat_getter.rb,
app/services/forest_liana/resource_getter.rb,
app/services/forest_liana/line_stat_getter.rb,
app/services/forest_liana/resource_creator.rb,
app/services/forest_liana/resource_updater.rb,
app/services/forest_liana/resources_getter.rb,
app/helpers/forest_liana/application_helper.rb,
app/services/forest_liana/value_stat_getter.rb,
app/serializers/forest_liana/stat_serializer.rb,
app/services/forest_liana/belongs_to_updater.rb,
app/services/forest_liana/controller_factory.rb,
app/controllers/forest_liana/stats_controller.rb,
app/services/forest_liana/has_many_associator.rb,
app/services/forest_liana/stripe_cards_getter.rb,
lib/generators/forest_liana/install_generator.rb,
app/controllers/forest_liana/devise_controller.rb,
app/controllers/forest_liana/stripe_controller.rb,
app/services/forest_liana/allowed_users_getter.rb,
app/services/forest_liana/has_many_dissociator.rb,
app/services/forest_liana/search_query_builder.rb,
app/controllers/forest_liana/apimaps_controller.rb,
app/serializers/forest_liana/serializer_factory.rb,
app/serializers/forest_liana/session_serializer.rb,
app/services/forest_liana/operator_value_parser.rb,
app/controllers/forest_liana/intercom_controller.rb,
app/controllers/forest_liana/sessions_controller.rb,
app/services/forest_liana/stripe_invoices_getter.rb,
app/services/forest_liana/stripe_payments_getter.rb,
app/controllers/forest_liana/resources_controller.rb,
app/services/forest_liana/stripe_payment_refunder.rb,
app/controllers/forest_liana/application_controller.rb,
app/serializers/forest_liana/stripe_card_serializer.rb,
app/controllers/forest_liana/associations_controller.rb,
app/deserializers/forest_liana/resource_deserializer.rb,
app/services/forest_liana/intercom_attributes_getter.rb,
app/services/forest_liana/stripe_bank_accounts_getter.rb,
app/services/forest_liana/stripe_subscriptions_getter.rb,
app/serializers/forest_liana/stripe_invoice_serializer.rb,
app/serializers/forest_liana/stripe_payment_serializer.rb,
app/services/forest_liana/intercom_conversations_getter.rb,
app/services/forest_liana/operator_date_interval_parser.rb,
app/serializers/forest_liana/intercom_attribute_serializer.rb,
app/serializers/forest_liana/stripe_bank_account_serializer.rb,
app/serializers/forest_liana/stripe_subscription_serializer.rb,
app/serializers/forest_liana/intercom_conversation_serializer.rb

Defined Under Namespace

Modules: AdapterHelper, ApplicationHelper, Collection, UserSpace Classes: ActionSerializer, AllowedUsersGetter, ApimapsController, ApplicationController, AssociationsController, Base64StringIO, BelongsToUpdater, Bootstraper, CollectionSerializer, ControllerFactory, DeviseController, Engine, HasManyAssociator, HasManyDissociator, HasManyGetter, InstallGenerator, IntercomAttributeSerializer, IntercomAttributesGetter, IntercomController, IntercomConversationSerializer, IntercomConversationsGetter, LineStatGetter, OperatorDateIntervalParser, OperatorValueParser, PieStatGetter, ResourceCreator, ResourceDeserializer, ResourceGetter, ResourceUpdater, ResourcesController, ResourcesGetter, Router, SchemaAdapter, SchemaUtils, SearchQueryBuilder, SegmentSerializer, SerializerFactory, SessionSerializer, SessionsController, StatGetter, StatSerializer, StatsController, StripeBankAccountSerializer, StripeBankAccountsGetter, StripeCardSerializer, StripeCardsGetter, StripeController, StripeInvoiceSerializer, StripeInvoicesGetter, StripePaymentRefunder, StripePaymentSerializer, StripePaymentsGetter, StripeSubscriptionSerializer, StripeSubscriptionsGetter, ValueStatGetter

Constant Summary collapse

VERSION =
"1.6.17"

Class Method Summary collapse

Class Method Details

.name_for(model) ⇒ Object



40
41
42
# File 'lib/forest_liana.rb', line 40

def self.name_for(model)
  self.names_overriden[model] || model.try(:table_name)
end

.schema_for_resource(resource) ⇒ Object



33
34
35
36
37
38
# File 'lib/forest_liana.rb', line 33

def self.schema_for_resource resource
  self.apimap.find do |collection|
    SchemaUtils.find_model_from_collection_name(collection.name)
      .try(:table_name) == resource.table_name
  end
end