diff options
| author | Zog | 2018-05-29 10:18:16 +0200 | 
|---|---|---|
| committer | Johan Van Ryseghem | 2018-05-30 16:29:33 +0200 | 
| commit | 3e8d95ac8168205ac9526fb8663459d691d09c30 (patch) | |
| tree | fd2bc220473f4defe30a35668d6b9eead76f00fa /app/controllers/connection_links_controller.rb | |
| parent | 971b267958c3bf78abea332e0af4c46a23679b61 (diff) | |
| download | chouette-core-3e8d95ac8168205ac9526fb8663459d691d09c30.tar.bz2 | |
Refs #6433; Fix specs
Diffstat (limited to 'app/controllers/connection_links_controller.rb')
| -rw-r--r-- | app/controllers/connection_links_controller.rb | 59 | 
1 files changed, 0 insertions, 59 deletions
| diff --git a/app/controllers/connection_links_controller.rb b/app/controllers/connection_links_controller.rb deleted file mode 100644 index a7f9758e8..000000000 --- a/app/controllers/connection_links_controller.rb +++ /dev/null @@ -1,59 +0,0 @@ -class ConnectionLinksController < ChouetteController -  include ReferentialSupport -  defaults :resource_class => Chouette::ConnectionLink - -  belongs_to :referential do -    belongs_to :departure, :parent_class => Chouette::StopArea, :optional => true -    belongs_to :arrival, :parent_class => Chouette::StopArea, :optional => true -  end - -  respond_to :html, :xml, :json -  respond_to :kml, :only => :show -  respond_to :js, :only => :index - -  include PolicyChecker - -  def index -    index! do |format| -      format.html { -        if collection.out_of_bounds? -          redirect_to params.merge(:page => 1) -        end -      } -    end -  end - -  def show -    show! -  end - -  def select_areas -    @connection_link = connection_link -    @departure = connection_link.departure -    @arrival = connection_link.arrival -  end - -  protected - -  alias_method :connection_link, :resource - -  def collection -    @q = referential.connection_links.search(params[:q]) -    @connection_links ||= @q.result(:distinct => true).order(:name).paginate(:page => params[:page]) -  end - -  def resource_url(connection_link = nil) -    referential_connection_link_path(referential, connection_link || resource) -  end - -  def collection_url -    referential_connection_links_path(referential) -  end - -  private - -  def connection_link_params -    params.require(:connection_link).permit( :connection_link_type,:departure_id, :arrival_id, :objectid, :object_version, :name, :comment, :link_distance, :link_type, :default_duration, :frequent_traveller_duration, :occasional_traveller_duration, :mobility_restricted_traveller_duration, :mobility_restricted_suitability, :stairs_availability, :lift_availability, :int_user_needs ) -  end - -end | 
