Hi

DataMapper::Property.accept_options(:my_options)

adds :my_options to the list of accepted options.

To access the option defined on a given property, you write

Model.properties[:title].options[:my_options]

Regards
Jon

On 4 August 2011 17:04, joe <[email protected]> wrote:
> Is there some simple way to get each property type to accept an
> additional option in the options hash? I'd like to add an additional
> option, e.g.,
>  property :title,  String,  :required => true, :default => 'A New
> Post', :myoptions => {...}
>
> --
> You received this message because you are subscribed to the Google Groups 
> "DataMapper" 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/datamapper?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" 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/datamapper?hl=en.

Reply via email to