It looks like a recent documentation commit finally removed references
to this method...
http://github.com/rails/rails/commit/c6372d604952a8eef16ce73a06814aa143b94779
In lieu of having #proxy_options available, is there another method
which replaces that functionality (access to a hash of all the
> I agree that I don't much like the way it just dangles there like
> that, but I don't see any other way to accomplish what's desired. In
> working with it, I find that it helps to imagine yourself back in the
> 90s for a moment.
>
> "User name equals Bill or user name equals Ted... NOT!"
>
> OK,
On Fri, Apr 9, 2010 at 4:31 PM, Joao Carlos wrote:
> I'll admit mine was a bad example. However, the most common (only?)
> use case I could see for it is in fact with #send.
>
> Your idea for filtering is great, by the way.
Instead of send you can use instance_eval. Where you'd do something like
I'll admit mine was a bad example. However, the most common (only?)
use case I could see for it is in fact with #send.
Your idea for filtering is great, by the way.
On Apr 9, 9:19 pm, Mislav Marohnić wrote:
> On Fri, Apr 9, 2010 at 13:26, Joao Carlos wrote:
>
> > filter = %w(with_votes without_
On Fri, Apr 9, 2010 at 13:26, Joao Carlos wrote:
>
> filter = %w(with_votes without_votes).include?(params[:filter]) ?
> params[:filter].to_sym : :self
> Idea.published.send(filter).all
I wouldn't call this use case where it would be "extremely handy". Here is
better code for it:
filters =
This is a small, straightforward patch that I'd love to see merged:
https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/4358-patch-add-root-option-to-activemodel-json-serialization
It's all pretty self-explanatory, it basically just ports a useful
option from to_xml to to_json, ma
On Fri, Apr 9, 2010 at 6:05 AM, Norman Clarke wrote:
> Hi all,
>
> I was wondering if I could get some feedback on a patch I created for
> ActiveSupport's `tidy_bytes` method.
>
> Right now `tidy_bytes` doesn't work with 1.9.x, since it relies on a
> Unicode regexp that always fails for strings wi
I'm working my way through the transition from Rails 2 to Rails 3 and
I came across the DEPRECATION warnings that we all will start seeing
real soon. These are currently implemented as shortcuts to constants,
but to bring your code up to date and eliminate deprecation concerns,
they should all be c
Hello world…
We just released the beta version of a new platform for cooperation
between coders, programmers and developers – based on an open source
model. We would be pleased if as many of you take some time, test the
initial functions and provide us feedback!
You can find the website at: http://
Hi all,
I was wondering if I could get some feedback on a patch I created for
ActiveSupport's `tidy_bytes` method.
Right now `tidy_bytes` doesn't work with 1.9.x, since it relies on a
Unicode regexp that always fails for strings with invalid UTF-8
characters. You can see the essence of the proble
On Fri, Apr 9, 2010 at 10:10 AM, Anuj Dutta wrote:
>
>
> On 9 April 2010 16:56, Joao Carlos wrote:
>>
>> I just came across a situation where it would be extremely handy to
>> have a method that returns the receiver.
>>
>> Imagine the following example:
>>
>> filter = %w(with_votes without_votes)
Object#tap needs a block.
Joao
On Apr 9, 4:10 pm, Anuj Dutta wrote:
> On 9 April 2010 16:56, Joao Carlos wrote:
>
>
>
>
>
> > I just came across a situation where it would be extremely handy to
> > have a method that returns the receiver.
>
> > Imagine the following example:
>
> > filter = %w(w
Very similar.
tap will yield the block passed to it then return self:
def tap
yield self
self
end
On 9 April 2010 23:10, Anuj Dutta wrote:
>
>
> On 9 April 2010 16:56, Joao Carlos wrote:
>
>> I just came across a situation where it would be extremely handy to
>> have a method that returns
On 9 April 2010 16:56, Joao Carlos wrote:
> I just came across a situation where it would be extremely handy to
> have a method that returns the receiver.
>
> Imagine the following example:
>
> filter = %w(with_votes without_votes).include?(params[:filter]) ?
> params[:filter].to_sym : :self
> Id
I just came across a situation where it would be extremely handy to
have a method that returns the receiver.
Imagine the following example:
filter = %w(with_votes without_votes).include?(params[:filter]) ?
params[:filter].to_sym : :self
Idea.published.send(filter).all
The implementation would be
On Apr 8, 9:47 pm, "Joe Smith" wrote:
>
> That breaks left to right readability pretty badly. I really would like a
> better solution for negating predicates and predicate chains, but I'm not
> sure what.
I agree that I don't much like the way it just dangles there like
that, but I don't see an
16 matches
Mail list logo