README.md in x-editable-rails-1.5.1 vs README.md in x-editable-rails-1.5.2

- old
+ new

@@ -133,21 +133,19 @@ ### Authorization Add a helper method to your controllers to indicate if `x-editable` should be enabled. ```ruby -def xeditable? +def xeditable? object = nil true # Or something like current_user.xeditable? end ``` -This gem requires [CanCan](https://github.com/ryanb/cancan) and checks the `:edit` permission for the model being edited. +You can use [CanCan](https://github.com/ryanb/cancan) and checks the `:edit` permission for the model being edited. ```ruby -if xeditable? && can?(:edit, model) - ... output x-editable HTML ... -else - ... output uneditable value ... +def xeditable? object = nil + can?(:edit, object) ? true : false end ``` * **e** - Specify a custom (error) message to display if the value isn't editable