activewarehouse / rails_sql_views

Rails SQL Views project extracted from ActiveWarehouse
http://activewarehouse.rubyforge.org/rails_sql_views
MIT License
140 stars 127 forks source link

Fix for issue #5 (in rails 3, 'rake db:schema:dump' does not dump the view) #6

Closed rgabo closed 12 years ago

rgabo commented 14 years ago

Correctly makes MysqlAdapter.supports_views? public if it is defined by the original AR module (as in Rails 3.0.0)

jsuchal commented 14 years ago

Works like charm, thanks.

flavorjones commented 13 years ago

+1 this resolves the issue for me. Please apply!

laripk commented 13 years ago

This doesn't work with Rails 3.0.7 & mysql2 (I tried copying the changes over). I found that supports_views? is public while inside included(), but when the crucial call comes about in SchemaDumper#dump_with_views, supports_views? is private.

I kluged a work-around by adding @connection.class.send(:public, :supports_views?) right before the if @connection.supports_views? in schema_dumper.rb, but I know it's not a real fix.

rgabo commented 12 years ago

Most likely not compatible with recent Rails 3.x releases, closing.