Slide 36
Slide 36 text
8. FileMaker Konferenz | Salzburg | 12.-14. Oktober 2017
Open Source - eine FileMaker Alternative? | Stefan Husch
ActiveAdmin-Ressourcen anpassen
# app/admin/person.rb
ActiveAdmin.register Person do
permit_params :group_id, :title, :first_name, :last_name, :company,
:job_title, :notes,
contacts_attributes: [:id, :contact_type_id, :contact],
addresses_attributes: [:id, :person_id, :mode, :street,
:street_addition, :city, :zip]
show do
attributes_table_for person do
Person.column_names.each do |c|
row c.to_sym
end
end
table_for person.contacts do
column "Type", :contact_type
column "Contact", :contact
end
table_for person.addresses do
column "Mode", :mode
column "Street", :street
column "Addition", :street_addition
column "City", :city
column "Zip", :zip
end
end