Module: SnFoil::Rails::InjectId
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/snfoil/rails/concerns/inject_id.rb
Instance Method Summary collapse
Instance Method Details
#inject_id(**options) ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/snfoil/rails/concerns/inject_id.rb', line 24 def inject_id(**) return if [:id] [:id] = id if defined? id [:id] ||= [:params][:id] end |