Sha256: 59f492b885a7b7efc1b7d5c403b41d487bb44d065333ad2decaa80475e8e7469

Contents?: true

Size: 250 Bytes

Versions: 13

Compression:

Stored size: 250 Bytes

Contents

module Curate
  module ActiveModelAdaptor
    def to_key
      persisted? ? [Sufia.config.id_namespace, noid] : nil
    end

    def to_param
      persisted? ? noid : nil
    end

    def noid
      Sufia::Noid.noidify(pid) if pid
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
curate-0.6.6 lib/curate/active_model_adaptor.rb
curate-0.6.5 lib/curate/active_model_adaptor.rb
curate-0.6.4 lib/curate/active_model_adaptor.rb
curate-0.6.3 lib/curate/active_model_adaptor.rb
curate-0.6.1 lib/curate/active_model_adaptor.rb
curate-0.6.0 lib/curate/active_model_adaptor.rb
curate-0.5.6 lib/curate/active_model_adaptor.rb
curate-0.5.5 lib/curate/active_model_adaptor.rb
curate-0.5.4 lib/curate/active_model_adaptor.rb
curate-0.5.2 lib/curate/active_model_adaptor.rb
curate-0.5.1 lib/curate/active_model_adaptor.rb
curate-0.5.0 lib/curate/active_model_adaptor.rb
curate-0.4.2 lib/curate/active_model_adaptor.rb