Closed computeus closed 12 years ago
Hi,
I want to use redactor in my project. I use cancan for authorization.
So I made some changes for redactor_rails gem to be cancan gem friendlier.
If abitiy.rb has
can :access, :redactor_rails
then user can upload photo.
But I think it will be a good idea if cancan integration tied to configuration file, like in rails_admin.
By the way, I need the latest redactor.js so I updated it too.
This method might be useful for cases where you have code that runs for every request (for example, in your application_controller) but you want to do something different based on whether the request is being handled by redactor_rails pictures_controller or your app. You can define a redactor_rails_controller? method in your application_controller that returns false, and it will be overridden to return true for redactor_rails pictures_controller.