lib/linked_rails.rb in linked_rails-0.0.4.pre.g72bb595fe vs lib/linked_rails.rb in linked_rails-0.0.4.pre.g76dedd8ba
- old
+ new
@@ -52,12 +52,14 @@
def scheme
@@scheme ||= Rails.application.routes.default_url_options[:protocol] || :http # rubocop:disable Style/ClassVars
end
- def iri(**opts)
- RDF::URI.new(**{scheme: LinkedRails.scheme, host: LinkedRails.host}.merge(opts))
+ def iri(**args)
+ opts = {scheme: LinkedRails.scheme, host: LinkedRails.host}.merge(args)
+ opts[:path] = opts[:path].presence || '/'
+ RDF::URI.new(**opts)
end
end
configurable_class(:actions, :item)
configurable_class(:collection, :filter)
@@ -104,6 +106,7 @@
require 'linked_rails/rdf_error'
require 'linked_rails/routes'
require 'linked_rails/serializer'
require 'linked_rails/translate'
require 'linked_rails/railtie'
+require 'linked_rails/url'
require 'linked_rails/storage'