Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A administrate
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 96
    • Issues 96
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 32
    • Merge requests 32
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • thoughtbot, inc.
  • administrate
  • Merge requests
  • !16

Render attributes through standard template files

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge adapter-templates into master May 01, 2015
  • Overview 17
  • Commits 4
  • Pipelines 0
  • Changes 24

Created by: gracewashere

Adapter templates live in lib/adapters/views

Pass request into adapters to access URL helpers

Specifically, the polymorphic_path helper used by the BelongsToAdapter needs to access request.host in order to look up the appropriate path. There will likely be other cases where views will need to access the controller's request object.

Automatically look up templates for adapters

If you don't need any complicated logic to display an attribute, you can get away with just defining template files and a skeleton Adapter class

https://trello.com/c/GqbjI1Xq

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: adapter-templates