Class: LinksController

Inherits:
ApplicationController show all
Defined in:
app/controllers/links_controller.rb

Instance Method Summary collapse

Instance Method Details

#resolveObject

Raises:

  • (ActiveRecord::RecordNotFound)

4
5
6
7
8
9
# File 'app/controllers/links_controller.rb', line 4

def resolve
  entity = DiasporaLinkService.new(query).find_or_fetch_entity
  raise ActiveRecord::RecordNotFound if entity.nil?

  redirect_to url_for(entity)
end