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

Method missing Exception in motion model for 'create_at=' and 'updated_at=' #82

Open
midhunkrishna opened this issue Sep 4, 2013 · 4 comments

Comments

@midhunkrishna
Copy link

While looping through server response and populating the model, at times motion model raises either of the following exception

model.rb:802:in `method_missing:': undefined method `created_at='

or

 model.rb:802:in `method_missing:': undefined method `updated_at='

This is not happening consistently but when it happens we have no clue why it is happening.

@tacticiankerala
Copy link

Sorry, forgot to mention one thing, We don't have 'created_at' and 'updated_at' fields in our model. Could that be the reason? But it works 8/10 tries!

@sxross
Copy link
Owner

sxross commented Sep 4, 2013

Not at my computer but can you make sure you're pointing to master on github and not using the gem?

Sent from my iPhone

On Sep 3, 2013, at 11:30 PM, Sreenath Nannat [email protected] wrote:

Sorry, forgot to mention one thing, We don't have 'created_at' and 'updated_at' fields in our model. Could that be the reason? But it works 8/10 tries!


Reply to this email directly or view it on GitHub.

@techogate
Copy link

I encountered this issue recently [motion_model (0.5.3)], in the same inconsistent manner and for the same use case. Adding explicit :created_at and :updated_at columns to the Model classes eliminated the problem.

@sxross
Copy link
Owner

sxross commented May 10, 2014

Is there any way to create a reproducible spec for this? I need some code that fails sometimes. Also, for the model that's failing, are you using default values for any of the columns, and what is the position of the columns in the declaration relative to the auto-timestamp columns.

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