I have gem with generators(one for rails3 one for rails2). And i need to add middleware layer. Rails 3 generators add it great. How can i do it in rails2 generator?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Rails since 2.3 is a Rack based and allows you to add custom middleware in a stack.
you need to know the middleware class_name before, then add it to config/environment.rb, like this:
then check the stack: