Re: [Rails-core] proposal: deprecate save() in favor of save!()

2015-06-22 Thread Michael Pavling
On 22 Jun 2015 15:24, "pseidemann" wrote: > > hello, > > currently in rails you have two methods to save a record: `save` and `save!`. > I think `save` is often used wrong because the return value is not always checked. > even the documentation is not very clear about the subtle different about th

Re: [Rails-core] Remove :js responder

2013-12-02 Thread Michael Pavling
On 2 December 2013 09:09, Alex wrote: > This attack is not possible with non js content loaded by XHR or iframes, > as the browser enforces cross-domain restrictions for both, and evil site > will not be able to get at good site's content. > If the operators of EvilSite have gone to such lengths

Re: [Rails-core] Date.weekend?

2013-06-28 Thread Michael Pavling
On 28 June 2013 15:04, T.J. Schuck wrote: > This introduces a localization issue -- not everyone has a Saturday/Sunday > weekend! Particularly Islamic countries: > http://en.wikipedia.org/wiki/Workweek_and_weekend#Islamic_countries but > also Israel, Nepal, India, and others. > > > Seeing as "be

Re: [Rails-core] Only-Except, not_nil?

2012-08-16 Thread Michael Pavling
On 15 August 2012 20:23, Jason Fleetwood-Boldt wrote: > "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 thin

Re: [Rails-core] UUID primary keys for ActiveRecord

2012-08-08 Thread Michael Pavling
On 8 August 2012 14:33, Ken Collins wrote: > >> But when using UUIDs, there is no reason to ask the database for a >> newly-inserted record's ID. > > There is if ActiveRecord uses it for a primary key. But ActiveRecord will have generated it, and given it to the DB to insert - the DB won't have

Re: [Rails-core] Re: Support the ability to write properties within models

2012-05-09 Thread Michael Pavling
On 9 May 2012 11:29, mcasimir wrote: > About 'this is duplicated code': what about STI? > > eg > class Content < AR::Base > class Article < Content > class Video < Content > > Here Video instances will respond to :text, and Article will respond_to :url > without batting an eye. moreover even in th

Re: [Rails-core] Generating new project creates a few files with bad syntax Rails 3.2.1

2012-03-02 Thread Michael Pavling
On 2 March 2012 21:18, Mark Peterson wrote: > Again, not sure where you got the "rage" from. > I tend to get it from top-posting with no trimming ;-) -- 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 r

Re: [Rails-core] case insensitive finders

2011-06-27 Thread Michael Pavling
On 28 June 2011 01:14, Ryan Bigg wrote: > where("LOWER(email) = ?", email) isn't good enough? No. It's a particular problem when using the dynamic "find_or_create_by_email(value)" and the ilk. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" g

Re: [Rails-core] Why does Rails not reset the association when the id is changed?

2011-02-04 Thread Michael Pavling
On 4 February 2011 20:36, Michael Pavling wrote: > That's my preference anyhoo... oops! This is rails-core list... take it over to "talk" apologies... -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To po

Re: [Rails-core] Why does Rails not reset the association when the id is changed?

2011-02-04 Thread Michael Pavling
On 4 February 2011 20:30, Paul wrote: > I've always thought that validating the :parent (and not the foreign > key) is the *more* correct thing to do ... but I don't understand why > Rails does not reset the parent association when the parent_id is > changed as demonstrated here, > > Any thoughts?

Re: [Rails-core] PRoblem using railroad

2010-10-21 Thread Michael Pavling
On 21 October 2010 20:26, blackbug wrote: >  (Are you running railroad on the aplication's root directory?) Are you? -- 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-c...@googlegroups.com.