Guest User

Untitled

a guest
Feb 19th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.01 KB | None | 0 0
  1. ## awesomeness
  2. [:get, :post, :put, :delete, :render, :request].each do |action|
  3. eval %Q{
  4. def before_#{action}
  5. yield
  6. do_#{action}
  7. end
  8. alias during_#{action} before_#{action}
  9. def after_#{action}
  10. do_#{action}
  11. yield
  12. end
  13. }
  14. end
Add Comment
Please, Sign In to add comment