On Dec 1, 3:37 pm, cootcraig <[email protected]> wrote:
> Trying to learn Sequel, best practice and such.
>
> Given a model subclass.
> class DictRow < Sequel::Model
>
> I guess the important thing here is the PK is a string and therefore
> inserted, not an auto-increment integer set by the database.
> Why the difference between the hash version and the block version?

For a hash literal, there is no difference. But the hash version is
mass assignment, and lends itself to much greater abuse than the block
method.  It's very common in web applications to use
DictRow.new(params), where the params come from the user and are not
to be trusted.

Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to