Questions:
* Is there a reason it can't/shouldn't be an instance variable?
What would the api look like here? I could see something like
Seems I didn't hit paste...
ActiveResource::Base.with_site(...) do
ShopifyAPI::Shop.find(:first)
# etc.
end
--
Cheers
Koz
--
You received this
The #first and #last class methods on ActiveRecord::Base are examples
of Rails cleverness gone a little over the edge. Who hasn't run into
this problem?:
Person.blog_posts.first # = #BlogPost name='foo'
Person.blog_posts.first.name = 'bar'
Person.blog_posts.first # = #BlogPost name='foo'
The
On Dec 13, 3:25 pm, Adam amilli...@pivotallabs.com wrote:
The #first and #last class methods on ActiveRecord::Base are examples
of Rails cleverness gone a little over the edge.
The cleverness may go a little over the edge, but, to add to your list
of general confusion with these
Long-term, we want to try to get away from using global state like
this as much as possible, but fixing it can sometimes open a thorny
can of worms. Koz's solution, paired with a mutex or thread-local (for
threadsafe scenarios) is a good workaround for now.
Sent from my iPhone
On Dec 13, 2009,
On Sun, Dec 13, 2009 at 4:40 PM, Yehuda Katz wyc...@gmail.com wrote:
Long-term, we want to try to get away from using global state like
this as much as possible, but fixing it can sometimes open a thorny
can of worms. Koz's solution, paired with a mutex or thread-local (for
threadsafe
I just wanted to draw some attention to a bug I noticed when first
trying to play with Rails 3 by generating a new application.
https://rails.lighthouseapp.com/projects/8994/tickets/3556-app_generator-should-disallow-or-fix-invalid-app_const
The short version is that running rails test-project
On Sun, Dec 13, 2009 at 6:18 AM, Mislav Marohnić
mislav.maroh...@gmail.com wrote:
I'm not sure. AR::Base subclasses don't act like Arrays, so I don't think we
should be matching same-named method implementations just for the sake of
doing so, regardless of how sweet the syntactic sugar is.