Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Expose function in ruby on rails

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.

like image 838
austinbv Avatar asked May 30 '11 20:05

austinbv


1 Answers

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

like image 99
neezer Avatar answered Oct 16 '22 07:10

neezer