afimb/chouette2

View on GitHub
app/controllers/api/v1/access_points_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
class Api::V1::AccessPointsController < Api::V1::ChouetteController

  defaults :resource_class => Chouette::AccessPoint, :finder => :find_by_objectid!

protected

  def collection
    @access_points ||=  ( @referential ? @referential.access_points.search(params[:q]).result(:distinct => true) : [])

  end 

end