diff options
| author | Xinhui | 2017-10-25 12:23:14 +0200 | 
|---|---|---|
| committer | Xinhui | 2017-10-25 12:23:14 +0200 | 
| commit | 118d1ae0c7ed66f408c5e260126ee553feda57a4 (patch) | |
| tree | 2a638dadab61a96b60b1f5702014457efcf0ada4 | |
| parent | a83fbdaab1c9a6c73badf3e25dcfab8701d555b5 (diff) | |
| download | chouette-core-118d1ae0c7ed66f408c5e260126ee553feda57a4.tar.bz2 | |
Remove method build_breadcrumb
| -rw-r--r-- | app/controllers/access_links_controller.rb | 16 | ||||
| -rw-r--r-- | app/controllers/access_points_controller.rb | 6 | ||||
| -rw-r--r-- | app/controllers/connection_links_controller.rb | 6 | ||||
| -rw-r--r-- | app/controllers/exports_controller.rb | 16 | ||||
| -rw-r--r-- | app/controllers/import_resources_controller.rb | 2 | ||||
| -rw-r--r-- | app/controllers/journey_patterns_controller.rb | 4 | ||||
| -rw-r--r-- | app/controllers/line_footnotes_controller.rb | 6 | ||||
| -rw-r--r-- | app/controllers/rule_parameter_sets_controller.rb | 6 | 
8 files changed, 15 insertions, 47 deletions
| diff --git a/app/controllers/access_links_controller.rb b/app/controllers/access_links_controller.rb index 6f1ad8bfd..936b8ea5e 100644 --- a/app/controllers/access_links_controller.rb +++ b/app/controllers/access_links_controller.rb @@ -21,9 +21,7 @@ class AccessLinksController < ChouetteController      @access_point = Chouette::AccessPoint.find(params[:access_point_id])      #@access_link = Chouette::AccessLink.find(params[:id])      @stop_area = @access_link.stop_area -    show! do |format| -      format.html {build_breadcrumb :show} -    end +    show!    end    def new @@ -41,9 +39,7 @@ class AccessLinksController < ChouetteController        data[:name] = name      end      @access_link = Chouette::AccessLink.new(data.permit!) -    new! do -      build_breadcrumb :new -    end +    new!    end    def create @@ -59,9 +55,7 @@ class AccessLinksController < ChouetteController      @access_link = Chouette::AccessLink.find(params[:id])      @stop_area = @access_link.stop_area      @orientation = @access_link.link_orientation_type -    edit! do -      build_breadcrumb :edit -    end +    edit!    end    def update @@ -69,9 +63,7 @@ class AccessLinksController < ChouetteController      @access_link = Chouette::AccessLink.find(params[:id])      @stop_area = @access_link.stop_area      @orientation = @access_link.link_orientation_type -    update! do |success, failure| -      build_breadcrumb :edit -    end +    update!    end    protected diff --git a/app/controllers/access_points_controller.rb b/app/controllers/access_points_controller.rb index d43880c0b..477875cc9 100644 --- a/app/controllers/access_points_controller.rb +++ b/app/controllers/access_points_controller.rb @@ -6,7 +6,6 @@ class AccessPointsController < ChouetteController    end    respond_to :html, :kml, :xml, :json -    include PolicyChecker    def index @@ -32,7 +31,6 @@ class AccessPointsController < ChouetteController          }        end -      format.html {build_breadcrumb :show}      end    end @@ -40,9 +38,7 @@ class AccessPointsController < ChouetteController    def edit      access_point.position ||= access_point.default_position      map.editable = true -    edit! do -      build_breadcrumb :edit -    end +    edit!    end diff --git a/app/controllers/connection_links_controller.rb b/app/controllers/connection_links_controller.rb index 403f0ed9e..b56450291 100644 --- a/app/controllers/connection_links_controller.rb +++ b/app/controllers/connection_links_controller.rb @@ -18,23 +18,19 @@ class ConnectionLinksController < ChouetteController          if collection.out_of_bounds?            redirect_to params.merge(:page => 1)          end -        build_breadcrumb :index        }      end    end    def show      @map = ConnectionLinkMap.new(resource).with_helpers(self) -    show! do -        build_breadcrumb :show -    end +    show!    end    def select_areas      @connection_link = connection_link      @departure = connection_link.departure      @arrival = connection_link.arrival -    build_breadcrumb :show    end    protected diff --git a/app/controllers/exports_controller.rb b/app/controllers/exports_controller.rb index 2cfa0b6fa..ad88c6dae 100644 --- a/app/controllers/exports_controller.rb +++ b/app/controllers/exports_controller.rb @@ -3,16 +3,14 @@ require 'open-uri'  class ExportsController < ChouetteController    defaults :resource_class => Export -   +    respond_to :html, :only => [:show, :index, :destroy, :exported_file]    respond_to :js, :only => [:index]    belongs_to :referential    def index      begin -      index! do  -        build_breadcrumb :index -      end +      index!      rescue Ievkit::Error, Faraday::Error => error        logger.error("Iev failure : #{error.message}")        flash[:error] = t(error.locale_for_error) @@ -22,9 +20,7 @@ class ExportsController < ChouetteController    def show      begin -      show! do  -        build_breadcrumb :show -      end +      show!      rescue Ievkit::Error, Faraday::Error => error        logger.error("Iev failure : #{error.message}")        flash[:error] = t(error.locale_for_error) @@ -32,7 +28,7 @@ class ExportsController < ChouetteController      end    end -  def destroy     +  def destroy      begin        destroy!      rescue Ievkit::Error, Faraday::Error => error @@ -57,11 +53,11 @@ class ExportsController < ChouetteController    end    protected -   +    def export_service      ExportService.new(@referential)    end -   +    def resource      @export ||= export_service.find( params[:id] )      @line_items = @export.report.line_items diff --git a/app/controllers/import_resources_controller.rb b/app/controllers/import_resources_controller.rb index ac3dd042e..aee14d450 100644 --- a/app/controllers/import_resources_controller.rb +++ b/app/controllers/import_resources_controller.rb @@ -8,8 +8,6 @@ class ImportResourcesController < BreadcrumbController        format.html {          @import_resources = decorate_import_resources(@import_resources)        } - -      build_breadcrumb :index      end    end diff --git a/app/controllers/journey_patterns_controller.rb b/app/controllers/journey_patterns_controller.rb index f4ae55b4e..a72e7da7f 100644 --- a/app/controllers/journey_patterns_controller.rb +++ b/app/controllers/journey_patterns_controller.rb @@ -30,9 +30,7 @@ class JourneyPatternsController < ChouetteController    def show      @map = JourneyPatternMap.new(journey_pattern).with_helpers(self)      @stop_points = journey_pattern.stop_points.paginate(:page => params[:page]) -    show! do -      build_breadcrumb :show -    end +    show!    end    def new_vehicle_journey diff --git a/app/controllers/line_footnotes_controller.rb b/app/controllers/line_footnotes_controller.rb index 581c921e8..2d4d10064 100644 --- a/app/controllers/line_footnotes_controller.rb +++ b/app/controllers/line_footnotes_controller.rb @@ -5,12 +5,6 @@ class LineFootnotesController < ChouetteController    before_action :authorize_resource, only: [:destroy_footnote, :edit_footnote, :show_footnote, :update_footnote]    before_action :authorize_resource_class, only: [:create_footnote, :index_footnote, :new_footnote] -  def edit -    edit! do -      build_breadcrumb :edit -    end -  end -    def update      update! do |success, failure|        success.html { redirect_to referential_line_footnotes_path(@referential, @line) , notice: t('notice.footnotes.updated') } diff --git a/app/controllers/rule_parameter_sets_controller.rb b/app/controllers/rule_parameter_sets_controller.rb index 6a23407d0..7ab3cca23 100644 --- a/app/controllers/rule_parameter_sets_controller.rb +++ b/app/controllers/rule_parameter_sets_controller.rb @@ -5,11 +5,9 @@ class RuleParameterSetsController < BreadcrumbController    def new      @rule_parameter_set = RuleParameterSet.default( current_organisation) -    new! do -      build_breadcrumb :new -    end +    new!    end -   +    def destroy      if current_organisation.rule_parameter_sets.count == 1        flash[:alert] = t('rule_parameter_sets.destroy.last_rps_protected') | 
