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 Shawn Anderson other posts by this author
Jun 20 2007 9:00AM messages near this date
[Rails] Re: Is "target" a reserved word? | [Rails] Re: How to specify condition for eagerly joined model using
target is not a reserved word.  It is however used in ActiveRecord for their
associations.  That might be where you are running into problems.

/Shawn

On 6/19/07, Brendan Baldwin <rails-mailing-list@[...].net>  wrote:
> 
> 
>  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