Class: Tasks::Serials::SimilarController

Inherits:
ApplicationController
  • Object
show all
Includes:
TaskControllerConfiguration
Defined in:
app/controllers/tasks/serials/similar_controller.rb

Instance Method Summary (collapse)

Methods included from TaskControllerConfiguration

#set_is_task_controller

Instance Method Details

- (Object) like

GET tasks/serials/like/:id



5
6
7
8
9
10
11
# File 'app/controllers/tasks/serials/similar_controller.rb', line 5

def like

  @serial = Serial.find(params[:id])

  @similar_serials = @serial.nearest_by_levenshtein(@serial.name[0..254])
  @related_routes = UserTasks.related_routes('similar_serials_task')
end