Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8317833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:44:24+00:00 2026-06-08T21:44:24+00:00

In user model I’ve got attribute location of type point. Now I’ve got a

  • 0

In user model I’ve got attribute location of type point. Now I’ve got a validation code:

validates :location, :format => { :with => /\(-?\d+(?:\.\d+)?,-?\d(?:\.\d+)?\)/,
                                    :on => :update,
                                    :if => :location_changed? }

It works fine in console, on localhost, but on heroku it returns:

Processing by UsersController#update as / 2012-07-31T18:14:37+00:00
app[web.1]: Parameters:
{“user”=>{“location”=>”(3.545452,2.4353534)”}, “id”=>”self”}
2012-07-31T18:14:37+00:00 app[web.1]: Completed 500 Internal Server
Error in 13ms 2012-07-31T18:14:37+00:00 app[web.1]:
2012-07-31T18:14:37+00:00 app[web.1]: NoMethodError (undefined method
location_changed?' for #<User:0x00000004dc29c8>):
2012-07-31T18:14:37+00:00 app[web.1]:
app/controllers/users_controller.rb:16:in
update’

Actually it works also great in heroku console, but don’t work in curl request.

Rails version 3.2.7.

attr_accessible :profile_picture, :password, :location

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T21:44:26+00:00Added an answer on June 8, 2026 at 9:44 pm

    It looks like a magic. I fixed it with recreation if table and server restart. Very strange.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Situation: I have user model. attribute meta_data in db represents text type field. In
In my user model, I have an attribute called nickname and validates as such:
My User model has an attribute called points and when I try to update
My user model has validates :password, :presence => true, :confirmation => true, :length =>
I've got a User model that has many Items. A Rating belongs to a
I've got a User model. The app has registered users and registered artists. A
I have a complex user model with a validation method before_validation_on_update :geocode_places This validation
I have a user model like this: class User < ActiveRecord::Base validates :password, :presence
Say I have a User model with the following code in User.rb: before_create :create_dependencies
I have a user model and point model. A user can have many points

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.