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

Write the command to update rvm in rails.

464


What is rails migration? What can it do?

446


Explain me what is the purpose of rjs in rails?

484


what is the purpose of RJs in Rails?

555


Choosing between belongs_to and has_one?

484






Explain some features of nested scaffolding.

490


What is cross-site request forgery (csrf)? How is rails protected against it?

539


Which command is used to create a migration?

501


If you want to set up a one-to-one relationship between two models, you'll need to add belongs_to to one, and has_one to the other. How do you know which is which?

447


what is different between activerecord::relation's count, length and size methods?

507


Are there any disadvantages of ruby on rails? If yes, mention them.

474


What is a proc ?

547


What can Rails Migration do?

482


Is ruby on rails dying?

474


difference between member routes and collection routes ?

531