Module: Enjoy::Admin::ContactMessage
- Defined in:
- lib/enjoy/admin/contact_message.rb
Class Method Summary collapse
Class Method Details
.config(fields = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/enjoy/admin/contact_message.rb', line 4 def self.config(fields = {}) Proc.new { # navigation_label I18n.t('enjoy.contact_message') field :c_at do read_only true end field :name field :content, :text field :email field :phone Enjoy.config.contacts_fields.each_pair do |fn, ft| next if ft.nil? if ft.is_a?(Array) field fn, ft[1].to_sym else field fn end end Enjoy::RailsAdminGroupPatch::enjoy_cms_group(self, fields) if block_given? yield self end } end |