lib/arpa/entities/action.rb in arpa-0.0.7 vs lib/arpa/entities/action.rb in arpa-0.0.8
- old
+ new
@@ -14,10 +14,11 @@
@created_at = attrs[:created_at]
@updated_at = attrs[:updated_at]
end
def resource_name
- resource.name
+ return resource.name if resource
+ ''
end
def description
I18n.t(name.to_sym, scope: "entities.resources.#{resource_name}.actions.description")
end