-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it works only with ActiveRecord? #2
Comments
I believe its possible to create a sequel adapter following the pattern at |
sure, if we look at the ActiveRecord adapter i can even try to do it but hope for any approvements from contributors before i dedicate some time for this |
As @rennanoliveira mentioned, creating an adapter will be the correct way to do this. I'd definitely love to have a Sequel adapter included in Trestle core, although I'm not myself particularly familiar with it, so if you'd love to have a go then that'd be great. If you find any of the adapter abstractions insufficient for Sequel, please let me know and we can try to make the necessary changes. |
Today i have successfully seen my sequel model's data under /admin route so i can confirm it has a potential to be a frontend for sequel. during this quick test i had some errors too... mostly,
So, i think, this methods need to be extracted to adapter too (or, will it be better to extend sequel class definition?) In a few days i will try to test more deeply (for example, for now i've defined going to test search and auth plugins... UPD (search-plugin): search is very basic one (not parametric) so there is no any problems at all (but, honestly, i need much more functional search like ransack-based for ActiveAdmin or https://github.com/djellemah/philtre for sequel) as a quick workaround for now for me (just because there is only one text field that can be used for search) i've done this:
and now i can simply input into the search field something like this: auth will try to look tomorrow... |
It sounds like you're making some good progress @okliv. If it's alright, I'd love to see what your
The trestle-search plugin at this stage has a "bring your own search method" approach, so I don't foresee any issues there. For trestle-auth, I see one instance (https://github.com/TrestleAdmin/trestle-auth/blob/master/lib/trestle/auth/controller_methods.rb#L17) where I need to add an extra configuration block. Otherwise the configuration blocks should provide enough flexibility to bring your own |
i think it is little early to make a PR because i didn't test it enough, so here is just a snippet with sequel adapter code full list of changes to get it work is here: https://gist.github.com/okliv/52465d38a116688edf0033985e273d27 and UPD 2 (about auth plugin). i get it work too. all changes i made for now (on auth plugin side) to get it expectably work are listed here https://gist.github.com/okliv/dbdcbb52076beaa9523ea972ca301203 |
I've just pushed a heap of commits that should pave the way for completing Sequel adapter support. I still need to finish testing in my Sequel demo app, but it's looking good so far. |
Given the latest changes I have made to Trestle, here is my |
I've pushed a It can be used by adding the following line to your config.default_adapter = Trestle::Adapters.compose(Trestle::Adapters::SequelAdapter) |
Is it possible to use it with sequel gem, for example?
The text was updated successfully, but these errors were encountered: