ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> rubyonrails-talk
rubyonrails-talk
[Rails] Re: Is "target" a reserved word?
by Brendan Baldwin other posts by this author
Jun 19 2007 4:20PM messages near this date
[Rails] Re: binary upload and parsing with Rails | [Rails] Re: Is "target" a reserved word?
I feel your pain.  I just posted about this after hitting the same issue 
at work today.  I must have spent a few hours trying to figure out what 
was wrong with our model, because in our case 'target' was an 
association itself, which meant that the consequences of using it were 
much stealthier and weirder:

http://www.rubyfu.com/2007/06/transparent-proxies-part-2.html

--Brendan

Josh on Rails wrote:
>  I'm working on a cost estimation tool, that allows each estimate created 
>  to
>  override base assumptions of price, cost, etc.
>  
>  Everything was fine, until we said, "Let's add a 'target net revenue'
>  property."
>  
>  So, the resource model got a "target" column. The override model got a
>  "new_target" column.
>  
>  But, whenever I set resource.target, I don't get a resource at the end; 
>  I
>  get target. In other words:
>  
>  old_resource = resource.clone
>  resource.target = new_target
>  resource == old_resource # false
>  resource == new_target # true


-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Ta
lk" group.
To post to this group, send email to rubyonrails-talk@[...].com
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@[...].com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Thread:
Brendan Baldwin
Shawn Anderson

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved