Skip to content

Add better support for STI #218

Open
@ajb

Description

@ajb

Found this in my codebase:

# Add STI support to Sync. This should be moved upstream.
module Sync
  class Resource
    def name
      model.class.try(:sync_model_name) ||
      model.class.model_name.to_s.underscore
    end
  end
end

It allows for telling STI models to use their base class's sync views.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions