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

  • Home
  • SEARCH
  • 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 8136953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T10:55:40+00:00 2026-06-06T10:55:40+00:00

I require different behavior from ActiveRecord::AttributeAssignment.assign_attributes(new_attributes, options). For my entire web application, I want

  • 0

I require different behavior from ActiveRecord::AttributeAssignment.assign_attributes(new_attributes, options).

For my entire web application, I want to evaluate [and frequently overwrite] new_attributes. (I want to do this to support third party UI widgets which do not follow rails form naming conventions). Although this might be a bit stinky, I can write the patch to only activate if the call did come from the third party form.

I have written a patch and can override the normal behavior; however, I’m wondering if it is possible to call the original method from within my patch?

Of course I can just cut and paste the original assign_attributes into my patch. Is there a better way?

  • 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-06T10:55:42+00:00Added an answer on June 6, 2026 at 10:55 am

    alias_method_chain exists for this exact situation.

    It’s not always the right choice, but works well when you have a fitting use case, which this one looks to be.

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

Sidebar

Related Questions

I am currently developing an application which will require multiple different development languages. I
I am developing a Java web application that bases it behavior through large XML
I am currently working on an application which requires different behaviour based on whether
How can you use jQuery to include/require a different php file if window height
I have a index.php file which loads (require) 2 different files based on a
I have three different configurations on my project, all three do not require all
We have 2 different compilation machine: red hat as4 and as5. Our architects require
I have recently been tasked with upgrading an application from .net 1.1 to 3.5
I have a .net 4.0 web application hosted on IIS7 server. After reading this:
I want to define some common post-construction behavior for a group of classes. When

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.