That is an excellent point.
I've got it working now, and my adapters.rb file looks like this:
def load(id)
options_for_find
@clazz.first(
:conditions => { @clazz.primary_key => id.to_i}
)
end
def load_all(ids)
options_for_find
@clazz.all(
:conditions => { @clazz.primary_key => ids.map { |id|
id.to_i }}
)
end
private
def options_for_find
options[:include] = @include unless @include.blank?
options[:select] = @select unless @select.blank?
end
Thanks again for your help!
On Jul 29, 3:21 pm, Mat Brown <
m...@patch.com> wrote:
> You could just not use either -- #returning and #tap are both
> basically semantic sugar for those who prefer indentation over
> assigning local variables...
>
>
>
> On Thu, Jul 29, 2010 at 15:17, Tim <
thus...@gmail.com> wrote:
> > It looks like the 'returning' method, which is used on line 75 of
> > adapters.rb, has been removed in Rails 3.0.0.rc:
>
> >
http://github.com/rails/rails/commit/b0b9bf320409b66c6c6b680371aca590...