yard-activerecord icon indicating copy to clipboard operation
yard-activerecord copied to clipboard

Add support for PostgreSQL data types: hstore, array, json, etc

Open gangster opened this issue 10 years ago • 5 comments

Support for the PostgreSQL data types would be a nice addition to this library, IMHO. See: http://edgeguides.rubyonrails.org/active_record_postgresql.html

gangster avatar Jun 13 '15 20:06 gangster

Thank you:) Would you like to give it a try? It should be fairly easy to extend the field handler to handle those types.

See https://github.com/theodorton/yard-activerecord/blob/develop/lib/yard-activerecord/fields/field_handler.rb

theodorton avatar Jun 13 '15 20:06 theodorton

Yeah, I just got it working. I'll be submitting a PR a little later =)

gangster avatar Jun 13 '15 22:06 gangster

Is there a way to get this working when the app doesn't have a schema.rb file? I use structure.sql dumps instead because not everything in schema.rb is supported by my usage of Postgres.

xtagon avatar Sep 25 '16 04:09 xtagon

@xtagon: I've been putting of rewriting this with a 2.0 version that will use runtime introspection to generate the documentation. When/if that goes live this will remove the dependency on schema.rb.

If you want to help contribute, let me know and we can discuss next steps.

theodorton avatar Sep 26 '16 19:09 theodorton

@theodorton I'd be happy to help out. I can't commit to anything crazy right now but I'd definitely do testing and stuff like that. Feel free to e-mail me directly if you want to go over things.

xtagon avatar Sep 27 '16 05:09 xtagon