Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using userstamps in existing schema #2

Open
brecke opened this issue Nov 16, 2009 · 4 comments
Open

using userstamps in existing schema #2

brecke opened this issue Nov 16, 2009 · 4 comments

Comments

@brecke
Copy link

brecke commented Nov 16, 2009

Hi,

Is it possible to use t.userstamps with change_table instead of create_table in migrations? I'd like to use this with an existing database and I can't get it to work that way, i keep getting this error:

undefined method `userstamps' for #ActiveRecord::ConnectionAdapters::Table:0x102e99f78

What am i doing wrong? How can i fix this?

thanks in advance,
_ miguel

@sjain
Copy link

sjain commented Jan 7, 2010

+1
t.userstamps doesn't seem to work with change_table - just create_table

@sixtyfive
Copy link

Just change vendor/plugins/userstamp/lib/migration_helper.rb to at the bottom read:

ActiveRecord::ConnectionAdapters::TableDefinition.send(:include, Ddb::Userstamp::MigrationHelper)
ActiveRecord::ConnectionAdapters::Table.send(:include, Ddb::Userstamp::MigrationHelper)

(i.e., add the last line)

@sjain
Copy link

sjain commented Feb 17, 2010

cool, thanks.

@peret
Copy link

peret commented Oct 7, 2016

There's still an issue with this, now apparently when creating the table, because the ActiveRecord::ConnectionAdapters::TableDefinition line is missing. Would it be possible for you to just merge one of the two working pull requests #19 or #21?

richwallett pushed a commit to richwallett/userstamp that referenced this issue Jan 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants