[Rails-core] has_association? method on ActiveRecord

2014-11-06 Thread Danny Sperry
About a month ago I ran into a case where I needed to know if an AR object's association exists dynamically. I was building a CMS Engine. I thought maybe this was a one off, but last week I found out my co-worker also had a need for this in the CMS he was building. So I've come to the

Re: [Rails-core] t(.key) convenience pollutes global i18n namespace

2014-11-06 Thread Joshua Cody
Nicolas, for a PR, do you feel like we should: 1) accept a backwards-incompatible change and begin nesting under “views:” 2) create a sort of lookup hierarchy like in ActiveRecord model translations that first looks in “views:” then the current path 3) keep the same default but introduce

Re: [Rails-core] t(.key) convenience pollutes global i18n namespace

2014-11-06 Thread Carlos Antonio da Silva
I think it's fine adding a default namespace for such lookups, it should be preferred over the non-namespaced version (eg in docs and everywhere), but I don't think we need to actually break existing functionality. We could just add this and leave the existing one in place as a fallback, or

Re: [Rails-core] has_association? method on ActiveRecord

2014-11-06 Thread Matt Jones
On Nov 6, 2014, at 12:33 AM, Danny Sperry danny.spe...@gmail.com wrote: About a month ago I ran into a case where I needed to know if an AR object's association exists dynamically. I was building a CMS Engine. I thought maybe this was a one off, but last week I found out my co-worker

[Rails-core] [feature-bug request] Correct diacritics for Romanian

2014-11-06 Thread Nicolae Popa
This is a combined feature-bug request, and, ironically, it's due to Microsoft's error. *Problem*: Windows 95, 98, 2000, 2003 server and XP are unable to display the correct diacritics for Romanian language. Instead, these versions were projected to use some Turkish diacritics. The correct

[Rails-core] Adding dirty checking by default to uniqueness validations

2014-11-06 Thread Ryan Moser
I find it a bit odd that validates_uniqueness_of always hits the database even when the attribute we are concerned with has not changed. It's easy enough to add a dirty checking condition to a uniqueness validation, but it seems like this should be the default behavior and always running the

Re: [Rails-core] [feature-bug request] Correct diacritics for Romanian

2014-11-06 Thread Prem Sichanugrist
Can this be done by using a middleware? If so, I'd say you could start a gem that injects this into middleware stack. While I see that this error is legit, I don't think the fix will be in Rails Core because the core team (that I don't think anybody knows Romanian) would be suitable to

Re: [Rails-core] [feature-bug request] Correct diacritics for Romanian

2014-11-06 Thread Nicolae Popa
I don't know if I'm the proper person, because I've never created a gem before. I'm an intermediate Rails programmer (more beginner than intermediate). Also, I don't know much about middleware in Rails. Please advise. Regards, Nicolae vineri, 7 noiembrie 2014, 09:26:26 UTC+2, Prem