What are filters? and how many types of filters are there
in ruby

Answer Posted / sanjib

basically filters are used to run some code or skip some
code before executing particular action.It is used in
controller.say we want to check authenticity before we
executing some action or skip checking authenticity before
some action which automatically is configured to check the
authenticity.We can do it by before_filter :somemethod or
skip_before_filter :someaction inside my controller.

Is This Answer Correct ?    28 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the defined operator?

619


what is the purpose of RJs in Rails?

561


How is dynamic scaffolding different from static scaffolding?

455


what is rails caching?

535


What is the purpose of require_relative in ruby?

507






What is the difference between render and redirect?

497


What is the difference between concern and application_controller.rb in ruby on rails?

465


Mention the differences between the observers and callbacks in ruby on rails.

472


what are the positive aspects of Rails?

466


Explain how Rails implements Ajax?

471


What is the function of orm in ruby on rails?

555


Choosing between belongs_to and has_one?

490


How to serialize data with yaml?

519


Mention the role of rails controller.

491


Tell me what is ruby on rails?

435