Skip to content
Snippets Groups Projects
Commit 19c60256 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

cleaner

parent 87b1054d
No related branches found
No related tags found
No related merge requests found
......@@ -59,7 +59,7 @@ class Communication::Website::Permalink < ApplicationRecord
def self.for_object(object, website)
permalink_class = MAPPING[object.class.to_s]
raise ArgumentError.new("Permalinks do not handle an object of type #{object.class.to_s}") if permalink_class.nil?
permalink = permalink_class.new(website: website, about: object)
permalink_class.new(website: website, about: object)
end
# Can be overwritten
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment