Sha256: 4359ec141b27a7ee6e9bdd14fb4332d6f9fc7061e8e7769b52339f1ececfcf54

Contents?: true

Size: 321 Bytes

Versions: 22

Compression:

Stored size: 321 Bytes

Contents

# frozen_string_literal: true

module Motor
  module ActiveRecordUtils
    module ActiveStorageLinksExtension
      def path
        Rails.application.routes.url_helpers.rails_blob_path(self, only_path: true)
      end

      def url
        Rails.application.routes.url_helpers.url_for(self)
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
motor-admin-0.1.68 lib/motor/active_record_utils/active_storage_links_extension.rb
motor-admin-0.1.67 lib/motor/active_record_utils/active_storage_links_extension.rb
motor-admin-0.1.66 lib/motor/active_record_utils/active_storage_links_extension.rb
motor-admin-0.1.65 lib/motor/active_record_utils/active_storage_links_extension.rb
motor-admin-0.1.64 lib/motor/active_record_utils/active_storage_links_extension.rb
motor-admin-0.1.63 lib/motor/active_record_utils/active_storage_links_extension.rb
motor-admin-0.1.62 lib/motor/active_record_utils/active_storage_links_extension.rb
motor-admin-0.1.61 lib/motor/active_record_utils/active_storage_links_extension.rb
motor-admin-0.1.60 lib/motor/active_record_utils/active_storage_links_extension.rb
motor-admin-0.1.58 lib/motor/active_record_utils/active_storage_links_extension.rb
motor-admin-0.1.57 lib/motor/active_record_utils/active_storage_links_extension.rb
motor-admin-0.1.56 lib/motor/active_record_utils/active_storage_links_extension.rb
motor-admin-0.1.55 lib/motor/active_record_utils/active_storage_links_extension.rb
motor-admin-0.1.54 lib/motor/active_record_utils/active_storage_links_extension.rb
motor-admin-0.1.53 lib/motor/active_record_utils/active_storage_links_extension.rb
motor-admin-0.1.52 lib/motor/active_record_utils/active_storage_links_extension.rb
motor-admin-0.1.51 lib/motor/active_record_utils/active_storage_links_extension.rb
motor-admin-0.1.50 lib/motor/active_record_utils/active_storage_links_extension.rb
motor-admin-0.1.49 lib/motor/active_record_utils/active_storage_links_extension.rb
motor-admin-0.1.48 lib/motor/active_record_utils/active_storage_links_extension.rb