Hey,
For a while now, I am thinking about implementing a feature into Rails.
Since it's not a simple single liner, I thought I should get feedback on it
and maybe some guidelines before I continue on with coding it.
The feature I would like to implement is nil_object pattern.
Here's some code
date_select has option :order which provide array containing :day, :month
and :year.
But datetime_select doesn't allow to provide, for example that:
*:order = [:hour, :minute, :day, :month, :year**]*.
I think that adding few elements, such as :hour, :minute for :order option
in
For something like this you might want to just do it and send a PR, it sounds
pretty reasonable so I don't think you'll have much trouble getting it merged :)
On 2012-09-06, at 6:35 AM, Ex wrote:
date_select has option :order which provide array containing :day, :month and
:year.
But
This looks useful to me. If you did implement this, it would be less rigid
if you accepted a class instead of a class name, because that would allow
you to pass anything that responds to #new.
-Joe
On Thursday, September 6, 2012 8:29:40 AM UTC-4, Kensodev wrote:
Hey,
For a while now, I am
I believe you should be able to achieve the same just by overriding the
#user method in your class. I've commented on your last gist example with
an example code to make things more clear.
On Fri, Sep 7, 2012 at 2:28 PM, Joe Ferris jfer...@thoughtbot.com wrote:
This looks useful to me. If you
Typically I find the rule of thumb is:
* If you're rendering, set flash.now.
* If you're redirecting, set flash.
Is there ever a case where this is not what is wanted?
And if not, could this be automatic? i.e. sweep the flash if and only if
not redirecting.
(Happy to do the grunt work - just
It used to be the fact that if you set flash[:notice] and try to render the
page, the flash message will not be displayed. That's why they have to
implement `flash.now`. Is that still the case?
On Friday, September 7, 2012 at 2:14 PM, George Ogata wrote:
Typically I find the rule of thumb is:
On Fri, Sep 07, 2012 at 02:57:25PM -0300, Carlos Antonio da Silva wrote:
I believe you should be able to achieve the same just by overriding the
#user method in your class. I've commented on your last gist example with
an example code to make things more clear.
Agreed. We don't need any
On Fri, Sep 7, 2012 at 2:22 PM, Prem Sichanugrist sikand...@gmail.comwrote:
It used to be the fact that if you set flash[:notice] and try to render
the page, the flash message will not be displayed. That's why they have to
implement `flash.now`. Is that still the case?
Currently if you set
Please show any real use case where this will be useful, to make things
more clear. Otherwise it's just hard to figure it out examples where it's
useful or not. Thanks.
On Wed, Sep 5, 2012 at 3:53 PM, Alexander Kurakin kuraga...@mail.ru wrote:
Will not be useful functionality similar
I sometimes use flash to keep things between multiple request ex.
searched word and use FlashHash#keep in before filter to keep it when
user is still using the same controller. How can I keep something for
the next request when rendering in your proposed solution? Would I
have to set flash and
On Fri, Sep 7, 2012 at 4:02 PM, Robert Pankowecki
robert.pankowe...@gmail.com wrote:
I sometimes use flash to keep things between multiple request ex.
searched word and use FlashHash#keep in before filter to keep it when
user is still using the same controller.
Can you provide more info on
Can you provide more info on what you're doing with this searched word?
Highlighting?
I was just using it for coherent navigation. You could go like search
= show = edit = update = index and see the list filtered with the
searched keyword.
My initial reaction is it's a dubious practice,
On Fri, Sep 7, 2012 at 5:15 PM, Robert Pankowecki
robert.pankowe...@gmail.com wrote:
Can you provide more info on what you're doing with this searched word?
Highlighting?
I was just using it for coherent navigation. You could go like search
= show = edit = update = index and see the list
14 matches
Mail list logo