Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
A
annotate
  • Project
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • open-source
  • annotate
  • Repository

Switch branch/tag
  • annotate
  • spec
  • lib
History Find file
  • Source code
  • Download zip
  • Download tar.gz
  • Download tar.bz2
  • Download tar
  • inkstak's avatar
    [Fix #430] Handle columns from activerecord-postgis-adapter (#694) · c13fe49c
    inkstak authored 5 years ago
    Same problem returned by @janosrusiczki in #430
    
    Spatial columns with activerecord-postgis-adapter (5.2.2) are not displayed nice
    
    ```
    # name           :string(3)
    # active         :boolean          default(FALSE), not null
    # geom           :geometry({:srid= geometry, 4326
    ```
    
    That's come from activerecord-postgis-adapter, with redefined columns as such :
    
    ``` 
    #<ActiveRecord::ConnectionAdapters::PostGIS::SpatialColumn 
      @sql_type="geometry(Geometry,4326)",
      @geo_type="Geometry",
      @geometric_type=RGeo::Feature::Geometry,
      @srid=4326,
      @limit={:srid=>4326, :type=>"geometry"}
      [...]
    >
    ```
    
    This fix displays them like this :
    
    ```
    # name           :string(3)
    # active         :boolean          default(FALSE), not null
    # geometry       :geometry         geometry, 4326
    ```
    
    Another possibility would have been to display them as below, but it involves a lot of extra-spaces for other columns.
    
    ```
    # name           :string(3)
    # active         :boolean                   default(FALSE), not null
    # geometry       :geometry(Geometry, 4326)
    ```
    c13fe49c
Name
Last commit
Last update
..
annotate [Fix #430] Handle columns from activerecord-postgis-adapter (#694) 5 years ago
tasks Tidy spec directory (#646) 5 years ago
annotate_spec.rb Refactor and tidy lib/annotate.rb (#653) 5 years ago