Including It
Now that Togglefy is properly installed, we need to setup the Assignable.
Including in the Assignable
Section titled “Including in the Assignable”Add the following to the model that will hold the relation with the features. It can be an User
, Account
or something else. It’s up to you:
include Togglefy::Assignable
This will add the relationship between Togglefy’s models and yours. Yours will be referred to as Assignable throughout this documentation.
If you want to check it in the source code, you can find it here: lib/togglefy/assignable.rb
inside the included
block.
With that, everything is ready to use Togglefy, welcome!