Sha256: 6b37687907dcb16ab51c56393252d15a7807618ef47620633cdf72255b6a15da
Contents?: true
Size: 786 Bytes
Versions: 1
Compression:
Stored size: 786 Bytes
Contents
# Sequel plugin: AuraEditable # For things that you can edit in the admin panel. # # ## Description # Use this plugin in you want your model editable. # # #### How to use # Use `plugin :aura_editable`. # # class Book < Sequel::Model # plugin :aura_editable # end # module Sequel module Plugins module AuraEditable module InstanceMethods def editable? true end end module ClassMethods def editable? true end def form(type=:edit, &block) @forms ||= Hash.new return @forms[type] unless block_given? @forms[type] = ::Terra::Form.new @forms[type].root_name 'editor' @forms[type].configure &block end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
aura-0.0.1.pre10 | lib/sequel/plugins/aura_editable.rb |