Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #8470 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

[PATCH] Streamline generated method calls

Reported by: seth Assigned to: bitsweat
Priority: normal Milestone: 1.x
Component: ActiveRecord Version: edge
Severity: normal Keywords: method_missing
Cc:

Description

AR currently defines all accessor methods on an initial attribute access (with method_missing) before accessing the attribute directly. Rather, it should generate methods and then call them (which then can access attributes). This doesn't affect normal AR use, but makes it simpler to extend define_read_attribute to manipulate attributes before being returned (as there will only be 1 method to override).

Attachments

streamline_generated_method_calls.patch (1.6 kB) - added by seth on 05/25/07 20:23:25.

Change History

05/25/07 20:23:25 changed by seth

  • attachment streamline_generated_method_calls.patch added.

05/25/07 20:32:21 changed by bitsweat

  • keywords set to method_missing.
  • owner changed from core to bitsweat.

Looks good, thanks for the cleanup.

05/25/07 20:55:08 changed by bitsweat

  • status changed from new to closed.
  • resolution set to fixed.

(In [6837]) Call the newly generated read method after generating it. Closes #8470.