Sometimes you have a table with a bunch of regular data and one single FK
to protect. I don't think forcing users to whitelist that model is a good
idea.
I prefer Rails to provide both options (three if you count declaring
nothing) and leave the judgement of what's appropriate in every situation
I'd like to see attr_protected stick around. There are times I'm working with
models and I don't want to communicate the15 fields that can be written to but
rather the two fields that can't.
Best.
Mike
On Jul 10, 2012, at 1:45 AM, Ryan Bigg radarliste...@gmail.com wrote:
For the record: I
In this type of case, it makes sense either to declare a whitelist or to
declare a blacklist. But it doesn't make much sense to declare both of them.
Solution #3: ActiveRecord (or ActiveModel) should raise if a class declares
both a whitelist and a blacklist of mass-assignable attributes.
Jay, this solution doesn't play nice with inheritance.
Rafael Mendonça França
http://twitter.com/rafaelfranca
https://github.com/rafaelfranca
On Tue, Jul 10, 2012 at 10:59 AM, Jay Feldblum yfeldb...@gmail.com wrote:
In this type of case, it makes sense either to declare a whitelist or to
On Monday, July 9, 2012 12:10:07 PM UTC-7, Nicolás Sanguinetti wrote:
dup doesn't take arguments because in ruby dup doesn't take arguments. It
wouldn't make sense to break the semantics of ruby just for this, IMO.
I had not considered that. On the other hand:
* it's not like dup calls
On Tue, Jul 10, 2012 at 12:36 PM, Kurt Werle k...@circlew.org wrote:
On Monday, July 9, 2012 12:10:07 PM UTC-7, Nicolás Sanguinetti wrote:
dup doesn't take arguments because in ruby dup doesn't take arguments. It
wouldn't make sense to break the semantics of ruby just for this, IMO.
I had
Yeah, Jay. Your solution won't work with inheritance.
By deprecating the attr_protected, you can allow most of the attributes anyway
(but seriously seriously seriously discouraged) by do something like:
attr_accessible columns - [:created_at, :updated_at]
Having attr_accessible and
Prem,
What's the conflict with inheritance?
Cheers,
Jay
On Tue, Jul 10, 2012 at 12:29 PM, Prem Sichanugrist sikand...@gmail.comwrote:
Yeah, Jay. Your solution won't work with inheritance.
By deprecating the attr_protected, you can allow most of the attributes
anyway (but seriously
On Jul 10, 2012, at 12:29 PM, Prem Sichanugrist wrote:
Yeah, Jay. Your solution won't work with inheritance.
By deprecating the attr_protected, you can allow most of the attributes
anyway (but seriously seriously seriously discouraged) by do something like:
attr_accessible columns -
Do you think anyone currently uses #blank? on enumerables in its current
state? It doesn't make sense the way it is right now. Imagine a piece of
paper with a list of 10 blank lines. Wouldn't you call that a blank list?
On Monday, July 9, 2012 10:50:34 AM UTC-4, Xavier Noria wrote:
On Mon,
I don't think that blank? makes sense on anything other than String, no
matter how you define it. My vote would be to deprecate it on Enumerable,
for example, and add something else if desired.
James Coleman
-- Forwarded message --
From: Michael Boutros michael.bout...@gmail.com
I use it. It makes total sense to me.
If you have a piece of paper with a list of 10 blank lines, how do you know
there are exactly 10 blank lines instead of 3 or 7 or 13?
On Tue, Jul 10, 2012 at 1:55 PM, Michael Boutros
michael.bout...@gmail.comwrote:
Do you think anyone currently uses
Yes, I think everyone uses #blank? on enumerables in its current state, and
expect that behavior, because it is well documented.
Rafael Mendonça França
http://twitter.com/rafaelfranca
https://github.com/rafaelfranca
On Tue, Jul 10, 2012 at 3:55 PM, Michael Boutros
13 matches
Mail list logo