It's excellent but something else... I say about an idea to have code of
different component in different files... For instance we have an option to
load locales from dir and subdirs. Why don't we want to have a simillar
option for routes?
среда, 15 августа 2012 г., 18:40:03 UTC+4 пользователь
Hi,
I found a little confusing how this works, let me know if there's a
reasoning for this:
In theory all routes paths follow this structure resource_action_path and
this works great except for the following action:
resources :photos do
get 'view'
end
which results in photo_view_path havin
> Thanks for clearing that up. Need to spend more time referring to RFC docs.
> Glad you pointed me in that direction.
Any time. :)
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" group.
To post to this group, send email to rubyonrails-core@goo
"How many ruby developers does it does to ask if something is not false?"
Although non-standard, I would argue that the most logical way to write that is:
unless object.nil?
I know it's a double-negative, but in fact if you think about it it makes
perfect sense -- you're saying you want to do
On Wednesday, August 15, 2012 at 12:01 PM, kuraga wrote:
> Sure I can write my own one-line `not_nil?` method :) But is it logical to:
> have `nil?`
> have `present?` in opposite to `blank?`
> don't have `not_nil?`
>
> Or can't I say about logical here?
The standard Ruby idiom for the inverse of
Sure I can write my own one-line `not_nil?` method :) But is it logical to:
1. have `nil?`
2. have `present?` in opposite to `blank?`
3. don't have `not_nil?`
Or can't I say about logical here?
среда, 15 августа 2012 г., 22:52:08 UTC+4 пользователь Andrew Kaspick
написал:
>
> Use a 3rd
Use a 3rd party lib like http://extensions.rubyforge.org/rdoc/index.html.
It has non_nil?, not_nil?
blank? and present? probably satisfy most rails devs needs.
On Wed, Aug 15, 2012 at 1:35 PM, kuraga wrote:
> 1. Something like:
>
> class Array
> def filter_by_only_except options
> self &
Hey Steve,
Thanks for clearing that up. Need to spend more time referring to RFC docs.
Glad you pointed me in that direction.
- Harshal
On Thu, Aug 9, 2012 at 10:14 AM, Steve Klabnik wrote:
> From a REST perspective, the URL is 100% irrelevant.
>
> I havent tested it with analytics or anything,
1. Something like:
class Array
def filter_by_only_except options
self & Array.wrap(options[:only] || self) - Array.wrap(options[:except] ||
[])
end
end
2. No, `present?` is `(not blank?)` but not `(not nil?)`...
Good example! `blank?` has an opposite method but not `nil?`. Yes?
среда,
среда, 15 августа 2012 г., 17:13:05 UTC+4 пользователь kuraga написал:
>
> Good day!
>
> I can't find two tiny features in Rails that are necessary in my mind. I'm
> sorry if I'm not right. Thanks for attention!
>
> 1. Only-Except filter method. Such as in `before_filter`. This feature is
> use
Not sure what you are talking about on number 1. For number 2 use
Object#blank?
And
Object#present?
--
Richard Schneeman
http://heroku.com
@schneems
Sent from the road
On Wednesday, August 15, 2012 at 9:13 AM, kuraga wrote:
> Good day!
>
> I can't find two tiny features in Rails that
It was reverted in favor of
https://github.com/rails/rails/compare/fa736e69a197...2d9dbf416b14
Rafael Mendonça França
http://twitter.com/rafaelfranca
https://github.com/rafaelfranca
On Wed, Aug 15, 2012 at 9:44 AM, kuraga wrote:
> Good day!
>
> Commit
> https://github.com/rails/rails/commit/6
Good day!
I can't find two tiny features in Rails that are necessary in my mind. I'm
sorry if I'm not right. Thanks for attention!
1. Only-Except filter method. Such as in `before_filter`. This feature is used
really often. But I found no method for this in ActiveSupport...
2. Is `Object#not_n
Good day!
Commit
https://github.com/rails/rails/commit/6acebb38bc0637bc05c19d87f8767f16ce79189b
were reverted. But I find loading external route files from the router a useful
feature. It helps to split Rails-app by components.
I didn't find any discussion or comments about this feature. I'll
Steve, I'd be interested in this "Rails JSON media type" as well, but we
can talk this weekend in Berlin. There is definitely a common behaviour
that a lot of Rails projects would appreciate for a CRUD-style PATCH where
the media type defines what will get overwritten, deleted, updated, also,
w
15 matches
Mail list logo