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 4004844
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:19:21+00:00 2026-05-20T08:19:21+00:00

How do I configure ActiveRecord to use partial_updates in a Padrino application? Customer <

  • 0

How do I configure ActiveRecord to use partial_updates in a Padrino application?

Customer < ActiveRecord::Base
  after_update :check_name_change

  private
  def check_name_change
    if name_changed?
      # send mail notification for change of name.
    end
  end
end

Consider the User has attributes ‘name’ and ‘country’ among others in the database.
When user updates name, it sends an email notification as expected. However, even when the user changes the country (or any other) attribute, it sends the notification for name change which is unacceptable.

Upon checking the logs, I found that the update query for country is making a full update, setting all the attributes of the user record. As such the name_changed? method returns true and notification email for name change is sent.

If I put the following line in app.rb

ActiveRecord::Base.partial_updates = true

I see no difference. Any update_attribute calls still do a full update of the record.
Is there any other solution or workaround?

  • 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-05-20T08:19:22+00:00Added an answer on May 20, 2026 at 8:19 am

    This is not related to padrino but only to active record.

    Try it on before_save.

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

Sidebar

Related Questions

Anyone know how to configure an ActiveRecord/nhibernate application to use Memcache as the 2nd
My application has two associated models: Magazine and Article: class Magazine < ActiveRecord::Base has_one
My configuration: app.configure(function(){ app.set('views', __dirname + '/views'); app.set('view engine', 'jade'); app.use(express.bodyParser()); app.use(express.cookieParser()); app.use(express.session({ secret:
I'm trying to configure a PHP installation (5.4.3) with MYSQL (5.0.91) for use with
I want to configure my app to use a different schema than the default
I have an existing web application using Castle Activerecord to interact with a single
Is it possible to configure the default settings on Castle Activerecord attributes? For example,
I have a gem which is essentially just a bunch of ActiveRecord::Base classes in
I want to use Resque in a Ruby on Rails application. I have no
config/initializers/devise.rb=> # Use this hook to configure devise mailer, warden hooks and so forth.

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.