You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to DataMapper
I believe that for #errors to pass muster in active_record_helper,
there needs to be three methods in
Datamapper::Validate::ValidationErrors: 'on', 'full_messages' and
'count'. Of these three methods, the only one that is missing is
'count'.
I'm not sure if there was a particular reason why 'count' was omitted
from the DM implementation - Is it safe for me to add my own 'count'
method along the lines of the 'size' method in AR or would this break
something in DM?
Ted Han
unread,
Jun 20, 2009, 5:38:25 PM6/20/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to datam...@googlegroups.com
It shouldn't break anything in DM.
Hola
unread,
Jun 20, 2009, 5:46:46 PM6/20/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to DataMapper
Any idea why it doesn't mirror the AR interface? Is it likely to in
the future?
On Jun 20, 5:38 pm, Ted Han <nothe...@gmail.com> wrote:
> It shouldn't break anything in DM.
>
> On Sat, Jun 20, 2009 at 5:34 PM, Hola <holacost...@gmail.com> wrote:
>
> > I believe that for #errors to pass muster in active_record_helper,
> > there needs to be three methods in
> > Datamapper::Validate::ValidationErrors: 'on', 'full_messages' and
> > 'count'. Of these three methods, the only one that is missing is
> > 'count'.
>
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to datam...@googlegroups.com
Just FYI, in Rails3 #on was replaced with #[]. The final 0.10 should probably support both.
-- Yehuda
Lawrence Pit
unread,
Jun 21, 2009, 1:30:53 AM6/21/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to datam...@googlegroups.com
#on still exists in Rails 3, it is aliased with #[]
There's also effort underway to have the #on method return an Error
object instead of a String (where Error might inherit from String). In
views you can then query each Error object for it's attribute symbol or
for it's (lazily) translated error string.