Pinned Loading
-
active admin, polymorphic drop down
active admin, polymorphic drop down 1# this is a helper method to provide setters for polymorphic relationships in active admin forms
2# attribute_name: name that record knows polymorphic relationship as
3# actions: the active record actions that should use this setter, defaults to setter being implemented before create and update
4def polymorphic_attribute_set(attribute_name, actions: [:before_create, :before_update])
5klass = config.resource_class
-
Arel Cheatsheet
Arel Cheatsheet 1content copied from [Advanced Arel: When ActiveRecord Just Isn't Enough](https://www.youtube.com/watch?v=ShPAxNcLm3o)
23further information:
4- [arel_cheatsheet_on_steroids](https://gist.github.com/ProGM/c6df08da14708dcc28b5ca325df37ceb)
5- [Rails test examples](https://github.com/rails/rails/blob/main/activerecord/test/cases/arel/select_manager_test.rb)
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.