Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • C chouette-core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 36
    • Merge requests 36
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Administrator
  • chouette-core
  • Merge requests
  • !311

Merged
Created Feb 14, 2018 by Administrator@rootMaintainer

ImportResourcesDecorator: Fix `Draper::UninferrableDecoratorError`

  • Overview 0
  • Commits 1
  • Changes 1

Created by: teddywing

We were getting this error:

Draper::UninferrableDecoratorError in ImportResources#index

Showing .../stif-boiv/app/views/import_resources/index.html.slim where line #14 raised:

Could not infer a decorator for ActiveRecord::Base.

Extracted source (around line #14):

            span.status_icon = import_status(@import.status)
            span = t('.table_state', lines_imported: @import_resources.lines_imported , lines_in_zipfile: @import_resources.lines_in_zipfile )
        - if @import_resources.present?
          .col-lg-12
            h2 = t('.table_title')
          .col-lg-12

Rails.root: .../stif-boiv
Application Trace | Framework Trace | Full Trace

app/views/import_resources/index.html.slim:14:in `_app_views_import_resources_index_html_slim___3139942318249059519_70240694466080'

when visiting this page: http://stif-boiv.dev:3000/workbenches/1/imports/18/import_resources

Fix the error by inheriting from AF83::Decorator and having it take care of things. We don't have any other model decorators that don't inherit from AF83::Decorator, so this shouldn't be a problem any more.

Refs #5926

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: 5926-import_resources-index--fix-uninferrable-decorator-erro