-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathREADME
35 lines (21 loc) · 1.16 KB
/
README
1
2
3
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
33
34
35
= ActsAsPoll
==========
This plugin is a poll system for Ruby on Rails sites based.
== Example
=======
script/generate poll poll
use the poller method for creates a poll in your ERb template
for example use
poller(@poll)
@poll must be a valid Poll object.
== Models
The Acts As Poll plugin is divided into two models Poll and PollOption
You can customize this names using the
script/generate poll model_name
using this ModelName and ModelNameOption is your own models.
For use you need do create a Poll object
you can see the mtype column this column is for multi valored polls case mtype is C (CheckBox), if is only one answer for the Poll you can use R (RadioButton) for mtype column (default), you need to create the PollOption object for the Poll, each PollOption object is for each option to the user vote.
== Warning
If you like to use the progressbar you need to add to you application.html.rb or in the view what you use de poller method, the progressbar stylesheet, this stylesheet is added to your public/stylesheet directory, use like it:
<%= stylesheet_link_tag "progressbar" %>
Copyright (c) 2009 Rafael Felix da Silva, released under the MIT license