Feedbacks¶ ↑
Gem adds the contact us dialog window to your Rails application. Gem uses jquery-ui/dialog to work.
Engine tested on rails 3.2.
How to use it:
-
Add to Gemfile:
gem 'feedbacks'
-
Setup ActionMailer::Base.smtp_settings
-
Run and change in generated initializers/feedbacks.rb :from and :to emails:
rails generate feedbacks:initializer
-
Run:
rake feedbacks:install:migrations && rake db:migrate
-
Add to config/routes.rb:
mount Feedbacks::Engine => "/feedbacks"
-
Add to view where you need feedback form:
<div id='feedback-form' title='Feedback form title' > <%= link_to "Contact us", feedbacks.new_feedback_sender_path, :remote => true, :class => 'feedback' %> </div>
-
Add to application.js and application.css:
require feedbacks/application
-
Thats all. Feedback saves in feedbacks_feedbacks table in database and then sends to your :to email.
Tests are placed in test/dummy.
To try this engine goto test/dummy and enjoy it in the localhost by running rails server.
Using at www.rbcitynews.ru/
This project rocks and uses MIT-LICENSE.