How to write a Devise extension (to use a custom datastore)

前端 未结 2 1882
余生分开走
余生分开走 2021-02-19 11:28

I\'d like to write an extension for Devise that allows you to use parse_resource as the datastore (as opposed to ActiveRecord). parse_resource is a Ruby wrapper for Parse.com\'s

2条回答
  •  情歌与酒
    2021-02-19 12:11

    I think the best approach would be to write an orm_adapter adapter for parse resource. It is the real "guts" of devise's integration with various orms.

    It is actually very straightforward and includes a test suite you can use. Considering parse_resource is activemodel compliant, the adapter should be as easy as cloning an existing adapter.

    Next you will need to hook in the orm_adapter to devise, which is just a clone of one of these files.

提交回复
热议问题