diff --git a/README.md b/README.md index 8410d3d..19f1d63 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,13 @@ class AddUserDefinedFieldsToMyModel < ActiveRecord::Migration[7.0] end ``` +### Routes +The user defined field routes can be added by mounting the engine in `routes.rb`: + +```ruby +mount UserDefinedFields::Engine, at: '/user_defined_fields' +``` + ### Controllers Each individual field can be configured to be searchable or non-searchable. A searchable field will be included in the query when a user provides the "search" parameter on the API request. diff --git a/lib/user_defined_fields.rb b/lib/user_defined_fields.rb index 17419c1..2c23d42 100644 --- a/lib/user_defined_fields.rb +++ b/lib/user_defined_fields.rb @@ -1,3 +1,4 @@ +require "user_defined_fields/configuration" require "user_defined_fields/version" require "user_defined_fields/engine"