- Where Developers Learn, Share, & Build Careers
Let's say I have an AP / Assets / Image / Primetime / Maritrified Maze 1 I have an image on JPG if I directly image via Url http: // localhost: 5555 / assets / personal / myrestrictedimage1.jpg I I am able to see the image. I have a way to inspect any http request to determine whether the user has permission to access it or not. I know that I can use before_filter in controllers to perform some rehearsal. Before continuing on any of the controller functions, but I do not think it will help me because I am trying to take a controlling action for this. I have heard that I may be able to do this with a rake work, but after a lot of searching I did not get anything that I am trying to do. Maybe I have to make a ruby gem to do this but I have no clue how to do this. Can anyone tell me in the right direction? Thank you. I used rack middleware The middleware class looks like this: / P> class MyChecker def initialize (app) @app = App and def call (env) if (...