gravityblast / web-app-theme

A simple theme for web apps
Other
2.45k stars 389 forks source link

Does it work with DataMapper? #5

Open azazeal opened 14 years ago

azazeal commented 14 years ago

Can anyone use this with DataMapper? Changing from ActiveRecord seems to break the plugin :(

gravityblast commented 14 years ago

I use some ActiveRecord methods, it doesn't work because of that. I think it's easy to fix it, what error do you have?

rurounijones commented 14 years ago

I tried using it with MongoMapper and it also failed due to ActiveRecord specific methods. I haven't investigated but the first error was: undefined method `columns' for Post:Class

Getting MongoMapper support would be fantastic! (Or even better an ORM agnostic solution but that would be a lot of work I think)

rurounijones commented 14 years ago

I saw that hjleochen's branch added support for MongoMapper (If the model responds_to keys it is MongoMapper, may come back to bite in the arse if other ORMs respond to keys but works for the moment).

Would be good if those changes could get pulled back into the main pilu repo

mrrooijen commented 13 years ago

I was actually also checking to see if this would work with Mongoid, bu same as above I get the undefined_method 'columns' for Post:Class. Checking to see if Mongoid has any equivalent method to find out what attributes a MongoDB collection has. Would be really awesome to have Mongoid support for this as well (as well as DataMapper and other ORMs).

mrrooijen commented 13 years ago

Well it would seem that Mongoid was already supported, but the #columns method is broken. I just forked and patched it. Going to send a pull request now.

gravityblast commented 13 years ago

cool, thank you! let me know!