diff options
Diffstat (limited to 'app/controllers/referentials_controller.rb')
| -rw-r--r-- | app/controllers/referentials_controller.rb | 10 | 
1 files changed, 5 insertions, 5 deletions
| diff --git a/app/controllers/referentials_controller.rb b/app/controllers/referentials_controller.rb index b03aec7e1..34ba37380 100644 --- a/app/controllers/referentials_controller.rb +++ b/app/controllers/referentials_controller.rb @@ -11,7 +11,7 @@ class ReferentialsController < BreadcrumbController        @referential.data_format = current_organisation.data_format      end    end -   +    def show       resource.switch       show! do |format| @@ -34,18 +34,18 @@ class ReferentialsController < BreadcrumbController    def resource      @referential ||= current_organisation.referentials.find_by_id(params[:id])    end -   +    def collection      @referentials ||= current_organisation.referentials.order(:name)    end -   +    def build_resource      super.tap do |referential|        referential.user_id = current_user.id        referential.user_name = current_user.name      end    end -   +    def create_resource(referential)      referential.organisation = current_organisation      super @@ -54,6 +54,6 @@ class ReferentialsController < BreadcrumbController    private    def referential_params      params.require(:referential).permit( :id, :name, :slug, :prefix, :time_zone, :upper_corner, :lower_corner, :organisation_id, :projection_type, :data_format ) -  end   +  end  end | 
