New own bridge

14 views
Skip to first unread message

Gloufy

unread,
Oct 27, 2019, 7:03:12 PM10/27/19
to ActiveScaffold : Ruby on Rails Gem
Hi !!

Where I can put the files for a custom bridge in my application ? 
I'm trying to create the active storage bridge
Thank you for your help
Gloufy

Sergio Cambra

unread,
Nov 7, 2019, 8:14:07 AM11/7/19
to actives...@googlegroups.com, Gloufy

Sorry, I forgot to answer. You can put in your lib directory, and you will have to add it to ActiveScaffold::Bridges, or manually call run method of your bridge in an initializer.

 

ActiveScaffold use ActiveScaffold::Bridges.register with path, but it expects active_scaffold/bridges/<bridge_name>.rb path, so you should put file in lib/active_scaffold/bridges/<bridge_name>.rb, then add ActiveScaffold::Bridges.register 'active_scaffold/bridges/<bridge_name>.rb' to an initializer.

 

Also, you could add it manually to ActiveScaffold::Bridges.bridges[:bridge_name] = BridgeClass

 

Regards,

Sergio

--
You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails Gem" group.
To unsubscribe from this group and stop receiving emails from it, send an email to activescaffol...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/activescaffold/7bcd2dbd-3f2f-4977-bcb0-167b152dac71%40googlegroups.com.



Reply all
Reply to author
Forward
0 new messages