Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Create rails migration & docs for acts_as_noteworthy #12

Closed
opengovernment opened this Issue · 3 comments

2 participants

OpenGovernment Nathaniel Barnes
OpenGovernment

Maybe this should be a separate gem -- but right now it's part of govkit, and is separate from the SearchEngines classes.

It's an ActiveRecord mixin for adding "mentions" to newsworthy objects, like legislators or bills.

I think it needs better documentation and a Rails database migration.

It'd be nice if we could make it ORM-agnostic, also -- but that's perhaps a stretch.

Nathaniel Barnes NateBarnes was assigned
Nathaniel Barnes
Collaborator

Alright opened up a pull request to address this one. I added a model and migration to the generator and some documentation to the involved classes.

While I was in there I also commented out the technorati references and removed the initialization of an OpenCongress key (though as always someone could add one, it just gives a deprecation warning).

I did not make it ORM-agnostic though, as the only method for doing so that I can think would be to maintain multiple models and migrations for just about every ORM's individual format. Personally, when I make an application that doesn't use the rails defaults I generally assume that I'm going to have to make some changes to the generated classes by other libraries. And at least they'll have the ActiveRecord defaults to look at when they're adapting it.

Of course if someone else has another idea, or thoughts on the matter, then feel free to let me know.

OpenGovernment

Thanks, Nate! This is a good cleanup. Yeah, it makes sense that it's not ORM agnostic right now.

Looking through the ActsAsNoteworthy stuff, does it seem like it should just be its own gem at some point?

Nathaniel Barnes
Collaborator

I'm inclined to think that the SearchEngines and ActsAsNoteworthy sections should both be decoupled and incorporated into their own gem. Lots of things might need to be searched on or might need mentions of the in the media stored. Products, People, Locations, Companies, etc

Then we could just implement this theoretical media mentions gem for our own uses here in GovKit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.