Module: ActiveScaffold::Bridges::Cancan::Actions::Core
- Defined in:
- lib/active_scaffold/bridges/cancan/cancan_bridge.rb
Instance Method Summary collapse
-
#beginning_of_chain ⇒ Object
:TODO can this be expanded more ?.
-
#new_model ⇒ Object
fix when ability allow access base on id can [:manage], Client, id: Client.of_employee(user).pluck(:id).
Instance Method Details
#beginning_of_chain ⇒ Object
:TODO can this be expanded more ?
47 48 49 |
# File 'lib/active_scaffold/bridges/cancan/cancan_bridge.rb', line 47 def beginning_of_chain super.accessible_by(current_ability) end |
#new_model ⇒ Object
fix when ability allow access base on id can [:manage], Client, id: Client.of_employee(user).pluck(:id)
53 54 55 |
# File 'lib/active_scaffold/bridges/cancan/cancan_bridge.rb', line 53 def new_model super.tap { |record| record.id = nil } end |