On Monday, February 24, 2014 4:07:00 AM UTC-8, Marcel van Pinxteren wrote:
>
> We use Kendo Grid and Kendo DataSource in our views.
> The standard way for Kendo to pass server side filtering and sorting
> parameters to the server is in oData format.
> An example of the parameters that the Rails controller gets:
> {"$inlinecount"=>"allpages", "$top"=>"20", "$orderby"=>"ResourceName
> desc", "$filter"=>"startswith(ResourceName,'T')"}
>
> Would this be a good candidate for a Sequel Model plugin? These parameters
> should all be easily translatable to "order", "where", "skip" and "limit"
> clauses.
> Any suggestions to get started?
>
You could do it with a Sequel::Model plugin, but it may be better to just
add a method to translate the values in the controller (taking that
parameter hash and a base dataset, and returning a modified dataset).
Whichever way you choose, you need to be very careful in handling the
data, validating that ResourceName is a valid column, etc..
Thanks,
Jeremy
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/groups/opt_out.