I am looking at a rails app and at the top of every controller there is a block of code that looks something like this
expose(:var) {Model.find params[:var_id]}
I understand what is inside the block just fine but...
I cannot find any documentation on what the expose function does where it comes from or anything I have tried searching the project and using the searchable rails docs.
I would love to know what it does, can someone please tell me or point me to the docs.
This is probably referencing the decent_exposure
gem. You can learn more about it here: http://railscasts.com/episodes/259-decent-exposure
Source: https://github.com/voxdolo/decent_exposure
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With