def banner
puts <<-eos
# =========================================================
# = Take the following steps to complete the installation =
# =========================================================
Edit 'app/models/contact.rb' to customize 'Contact' model and then run:
rails g migration:from contact && rake db:migrate
You may also wish to customize front-end views editing:
- app/views/contacts_mailer/confirmation.html.erb
- app/views/contacts_mailer/notify.html.erb
- app/views/fullstack/contacts/_form.html.erb
- app/views/fullstack/contacts/_success.html.erb
Enable contacts back-end in config/initializers/fullstack.rb:
admin.group :contacts do |g|
g.icon= "user"
g.resource :contacts
end
Install a widget in your admin/dashboard:
<%= contacts_dashboard_widget %>
Add actions to your controller:
include Fullstack::Contacts::Actions
page :contacts, "/contacts", :parent => :home do
@contact = Contact.new
end
action :contact, "/contact", :via => :post do
create_contact!(:success => polymorphic_path([:site, :contacts], :success => true))
end
Render a contact_form inside your views:
<% if params[:success] %>
<%= contact_success %>
<% else %>
<%= contact_form %>
<% end %>
eos
end