Re: [Rails-core] [Feature] Move the "to_param" logic out of ActiveRecord

2019-05-10 Thread Rob Biedenharn
> On 2019-May-10, at 10:51 , DHH wrote: > > I'd use direct routes: > https://guides.rubyonrails.org/routing.html#direct-routes > > > And form_for has been deprecated for a while. Use form_with url: > my_admin_article_path(@article)

Re: [Rails-core] [Feature request][ActionPack::ActionDispatch::Routing] Add parameter for resources to alias "only: []" in routes.rb

2018-01-18 Thread Rob Biedenharn
If you don't want the `resources` anyway, why not just use `namespace`: ==> config/routes.rb <== Rails.application.routes.draw do namespace 'users' do get 'unsubscribe' get ':id/foo', action: :foo, as: :foo post ':id/bar', action: :bar, as: :bar end end Prefix Verb URI

Re: [Rails-core] New feature suggestion: Get username and password separately from ActionController::HttpAuthentication::Basic::user_name_and_password

2017-08-07 Thread Rob Biedenharn
> On 2017-Aug-7, at 03:06 , Fatos Morina wrote: > > Hi fellow coders, > > I have recently been implementing an API and used Basic Auth as the > authentication method. Besides doing the authentication part, I need to > extract the email from the request header for other usages. > > Currently,

[Rails-core] Seemingly buggy behavior of AR's #to_param

2016-02-11 Thread Rob Biedenharn
non-alphanumeric characters before replacing them with '-' and squeezing them. Therefore, calling .parameterize.truncate(20, separator: /-/, omission: '') results in the most information from the indicated attribute. -Rob Rob Biedenharn rob.biedenh...@gmail.com GitHub: https://git

Re: [Rails-core] rails issue #13854

2014-02-14 Thread Rob Biedenharn
s mechanism, > because I hope to contribute much more to the rails project. > > [], > Nardele Salomon (from Brazil) > > -- Last year, this was posted: Maintenance policy for Ruby on Rails clarified http://weblog.rubyonrails.org/2013/2/24/maintenance-policy-for-ruby-on-rails

Re: [Rails-core] Cannot Run the command rake gems:install

2010-09-29 Thread Rob Biedenharn
On Sep 29, 2010, at 3:46 AM, Apuesto wrote: Hi people, Please help. Am running OS – Windows 7 Ultimate Rails V. 2.3.5 Ruby V. 1.8.6 Am getting the following error when trying to run the command rake gems:install C:\Fedena>rake gems:install --trace (in C:/Fedena) ** Invoke gems:install (first_

Re: [Rails-core] Prepared SQL statements

2010-07-08 Thread Rob Biedenharn
On Jul 8, 2010, at 11:25 AM, Norman Clarke wrote: On Thu, Jul 8, 2010 at 12:24, Konstantin Haase wrote: On Jul 8, 2010, at 17:15 , Norman Clarke wrote: On Thu, Jul 8, 2010 at 11:14, Norman Clarke wrote: It would be interesting to see the overall performance impact if, for example, t

Re: [Rails-core] Adding scopes breaks migrations (Rails 3 beta 4)

2010-07-02 Thread Rob Biedenharn
On Jul 2, 2010, at 8:40 AM, Paul Campbell wrote: On Fri, Jul 2, 2010 at 12:58 PM, Pratik wrote: I swear I had fixed this. Will have another look. It may be fixed in edge, I'm working off beta4. Will switch to edge and double check. —P If you are using 1.9.2, you may also want to check wh

Re: [Rails-core] Re: proposing Object#nonblank? (analogous to Ruby's Numeric#nonzero?)

2009-12-27 Thread Rob Biedenharn
I've also been adding a nonblank? method as soon as I find it useful on a project. As for predicate methods returning true or false, the Numeric#nonzero? to which the OP compares nonblank? is a perfect counter example. The way that it was explained to me (by Jim Weirich, iirc) was that a

[Rails-core] Re: Doubts about contributions

2009-09-13 Thread Rob Biedenharn
On Sep 13, 2009, at 2:38 PM, Rodrigo Rosenfeld Rosas wrote: > Em 13-09-2009 16:19, Rob Biedenharn escreveu: >> On Sep 13, 2009, at 11:06 AM, Rodrigo Rosenfeld Rosas wrote: >> >>> Hi, I have some doubts considering contributions to Rails. >>> >>> For i

[Rails-core] Re: Doubts about contributions

2009-09-13 Thread Rob Biedenharn
On Sep 13, 2009, at 11:06 AM, Rodrigo Rosenfeld Rosas wrote: > Hi, I have some doubts considering contributions to Rails. > > For instance, in attachments follows a patch to change from: > > default.config = config if config > default.config ||= Configuration.new > > To: > > de

[Rails-core] Re: Long CruiseControl notifications are irritating ...

2009-09-04 Thread Rob Biedenharn
On Sep 4, 2009, at 8:57 AM, Nicolás Sanguinetti wrote: > > On Fri, Sep 4, 2009 at 9:47 AM, Eloy Duran > wrote: >> >> I tend to print them out, beat them with a stick before I set them on >> fire, unfortunately gmail was unable to automate this process for me. >> >> Seriously though, I think yo

[Rails-core] Re: On-By-Default XSS escaping

2009-07-30 Thread Rob Biedenharn
On Jul 30, 2009, at 4:19 AM, troels knak-nielsen wrote: > > Hi list. > > On Thu, Jul 30, 2009 at 12:20 AM, Michael > Koziarski wrote: >> >> # safe_helper :some_helper after declaring the helper >> # <%= raw(some_helper) %> >> > > Is it necessary to have both a `safe_helper` declaration and an >

[Rails-core] Re: ActiveRecord::Base#saved_record?

2009-03-18 Thread Rob Biedenharn
On Mar 18, 2009, at 1:58 PM, David Dollar wrote: > Why not just useunless object.new_record? > > It seems like any of the saved/existing/etc_record? have potentially > non-obvious meanings. Because object=Model.find_or_create...() will result in object.new_record? never being true. In my co

[Rails-core] Re: Addition of 'or' method to String and NilClass in core_ext

2009-01-27 Thread Rob Biedenharn
Since ActiveSupport already has #blank?, you can easily give yourself a #nonblank? The symmetry with the Numeric#nonzero? is nice. -Rob class String # Allowing a chain like: string_value.nonblank? || 'default value' def nonblank? self unless blank? end end class NilClass #

[Rails-core] Re: The thing with Rails 2.0.991 version number

2008-05-12 Thread Rob Biedenharn
On May 12, 2008, at 5:44 PM, Frederick Cheung wrote: > On 12 May 2008, at 22:30, Chad Woolley wrote: >> 1% of Rails users is still more than a few users, and to have Rails >> actively doing things that go against RubyGems standards and breaks >> stuff is not a good thing. Especially if there is a