fat_free_crm 0.11.1 → 0.11.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of fat_free_crm might be problematic. Click here for more details.

Files changed (179) hide show
  1. data/Gemfile +30 -12
  2. data/Gemfile.lock +131 -119
  3. data/Procfile +1 -1
  4. data/README.md +1 -1
  5. data/app/assets/images/notifications.png +0 -0
  6. data/app/assets/javascripts/application.js.erb +3 -0
  7. data/app/assets/javascripts/crm_textarea_autocomplete.js +44 -0
  8. data/app/assets/stylesheets/application.css.erb +2 -0
  9. data/app/assets/stylesheets/common.scss +7 -11
  10. data/app/assets/stylesheets/textarea_autocomplete.scss +42 -0
  11. data/app/controllers/admin/application_controller.rb +5 -5
  12. data/app/controllers/admin/field_groups_controller.rb +11 -51
  13. data/app/controllers/admin/fields_controller.rb +13 -59
  14. data/app/controllers/admin/plugins_controller.rb +1 -4
  15. data/app/controllers/admin/settings_controller.rb +0 -4
  16. data/app/controllers/admin/tags_controller.rb +11 -66
  17. data/app/controllers/admin/users_controller.rb +20 -83
  18. data/app/controllers/application_controller.rb +83 -69
  19. data/app/controllers/comments_controller.rb +12 -29
  20. data/app/controllers/emails_controller.rb +1 -5
  21. data/app/controllers/entities/accounts_controller.rb +13 -32
  22. data/app/controllers/entities/campaigns_controller.rb +17 -32
  23. data/app/controllers/entities/contacts_controller.rb +20 -38
  24. data/app/controllers/entities/leads_controller.rb +33 -55
  25. data/app/controllers/entities/opportunities_controller.rb +26 -42
  26. data/app/controllers/entities_controller.rb +92 -83
  27. data/app/controllers/home_controller.rb +1 -10
  28. data/app/controllers/lists_controller.rb +1 -4
  29. data/app/controllers/{entities/tasks_controller.rb → tasks_controller.rb} +21 -32
  30. data/app/controllers/users_controller.rb +6 -5
  31. data/app/helpers/accounts_helper.rb +32 -9
  32. data/app/helpers/application_helper.rb +15 -1
  33. data/app/helpers/campaigns_helper.rb +1 -1
  34. data/app/helpers/comments_helper.rb +11 -1
  35. data/app/helpers/leads_helper.rb +1 -1
  36. data/app/helpers/opportunities_helper.rb +1 -1
  37. data/app/{models/mailers/notifier.rb → mailers/dropbox_mailer.rb} +5 -16
  38. data/app/mailers/subscription_mailer.rb +37 -0
  39. data/{lib/tasks/dropbox.rake → app/mailers/user_mailer.rb} +11 -13
  40. data/app/models/entities/account.rb +3 -1
  41. data/app/models/entities/campaign.rb +3 -1
  42. data/app/models/entities/contact.rb +3 -1
  43. data/app/models/entities/lead.rb +6 -5
  44. data/app/models/entities/opportunity.rb +3 -1
  45. data/app/models/fields/field.rb +1 -1
  46. data/app/models/polymorphic/comment.rb +34 -0
  47. data/app/models/{entities → polymorphic}/task.rb +16 -3
  48. data/app/models/setting.rb +15 -15
  49. data/app/models/users/ability.rb +12 -5
  50. data/app/models/users/user.rb +7 -2
  51. data/app/views/accounts/index.html.haml +1 -1
  52. data/app/views/accounts/index.js.rjs +1 -1
  53. data/app/views/admin/plugins/index.html.haml +1 -7
  54. data/app/views/{shared/auto_complete.html.haml → application/_auto_complete.html.haml} +0 -0
  55. data/app/views/{shared → application}/index.atom.builder +1 -1
  56. data/app/views/{shared → application}/index.rss.builder +1 -1
  57. data/app/views/campaigns/index.html.haml +1 -1
  58. data/app/views/campaigns/index.js.rjs +1 -1
  59. data/app/views/comments/_new.html.haml +6 -0
  60. data/app/views/comments/_subscription_links.html.haml +13 -0
  61. data/app/views/comments/new.js.rjs +2 -0
  62. data/app/views/contacts/_top_section.html.haml +3 -13
  63. data/app/views/contacts/index.html.haml +1 -1
  64. data/app/views/contacts/index.js.rjs +1 -1
  65. data/app/views/{notifier/dropbox_ack_notification.html.haml → dropbox_mailer/dropbox_notification.html.haml} +2 -2
  66. data/app/views/{shared → entities}/attach.js.rjs +1 -1
  67. data/app/views/entities/contacts.js.rjs +1 -1
  68. data/app/views/{shared/discard.rjs → entities/discard.js.rjs} +0 -0
  69. data/app/views/entities/leads.js.rjs +1 -1
  70. data/app/views/entities/opportunities.js.rjs +1 -1
  71. data/app/views/entities/subscription_update.js.rjs +4 -0
  72. data/app/views/entities/versions.js.rjs +1 -1
  73. data/app/views/layouts/_footer.html.haml +1 -1
  74. data/app/views/layouts/application.html.haml +3 -0
  75. data/app/views/leads/_contact.html.haml +1 -0
  76. data/app/views/leads/index.html.haml +1 -1
  77. data/app/views/leads/index.js.rjs +1 -1
  78. data/app/views/opportunities/_top_section.html.haml +4 -14
  79. data/app/views/opportunities/index.html.haml +1 -1
  80. data/app/views/opportunities/index.js.rjs +1 -1
  81. data/app/views/subscription_mailer/comment_notification.text.erb +7 -0
  82. data/app/views/{notifier → user_mailer}/password_reset_instructions.html.haml +0 -0
  83. data/config/application.rb +3 -1
  84. data/config/environments/development.rb +1 -1
  85. data/config/environments/test.rb +3 -0
  86. data/config/initializers/action_mailer.rb +8 -5
  87. data/config/initializers/cancan.rb +151 -0
  88. data/config/initializers/constants.rb +1 -0
  89. data/config/initializers/locale.rb +20 -0
  90. data/config/initializers/paper_trail.rb +4 -5
  91. data/config/initializers/relative_url_root.rb +0 -1
  92. data/config/initializers/squeel.rb +5 -0
  93. data/config/locales/cz_fat_free_crm.yml +3 -3
  94. data/config/locales/de.yml +2 -2
  95. data/config/locales/de_fat_free_crm.yml +651 -596
  96. data/config/locales/en-GB_fat_free_crm.yml +3 -3
  97. data/config/locales/en-US_fat_free_crm.yml +13 -3
  98. data/config/locales/es_fat_free_crm.yml +3 -3
  99. data/config/locales/fr-CA_fat_free_crm.yml +3 -3
  100. data/config/locales/fr_fat_free_crm.yml +3 -3
  101. data/config/locales/it_fat_free_crm.yml +3 -3
  102. data/config/locales/pl_fat_free_crm.yml +3 -3
  103. data/config/locales/pt-BR_fat_free_crm.yml +3 -3
  104. data/config/locales/ru_fat_free_crm.yml +3 -3
  105. data/config/locales/sv-SE_fat_free_crm.yml +3 -3
  106. data/config/locales/th_fat_free_crm.yml +3 -3
  107. data/config/routes.rb +10 -0
  108. data/config/settings.default.yml +29 -10
  109. data/config/unicorn.rb +4 -0
  110. data/db/migrate/20111201030535_add_field_groups_klass_name.rb +3 -1
  111. data/db/migrate/20120314080441_add_subscribed_users_to_entities.rb +23 -0
  112. data/db/migrate/20120405080727_change_subscribed_users_to_set.rb +24 -0
  113. data/db/migrate/20120405080742_change_further_subscribed_users_to_set.rb +27 -0
  114. data/db/migrate/20120413034923_add_index_on_versions_item_type.rb +5 -0
  115. data/db/schema.rb +109 -126
  116. data/fat_free_crm.gemspec +12 -18
  117. data/lib/fat_free_crm.rb +0 -1
  118. data/lib/fat_free_crm/core_ext/array.rb +1 -0
  119. data/lib/fat_free_crm/gem_dependencies.rb +1 -0
  120. data/lib/fat_free_crm/mail_processor/base.rb +226 -0
  121. data/lib/fat_free_crm/mail_processor/comment_replies.rb +86 -0
  122. data/lib/fat_free_crm/mail_processor/dropbox.rb +288 -0
  123. data/lib/fat_free_crm/permissions.rb +6 -19
  124. data/lib/fat_free_crm/renderers.rb +0 -8
  125. data/lib/fat_free_crm/tabs.rb +1 -1
  126. data/lib/fat_free_crm/version.rb +1 -1
  127. data/lib/plugins/country_select/lib/country_select.rb +2 -2
  128. data/lib/tasks/mail_processing.rake +60 -0
  129. data/spec/controllers/admin/users_controller_spec.rb +0 -2
  130. data/spec/controllers/{accounts_controller_spec.rb → entities/accounts_controller_spec.rb} +7 -9
  131. data/spec/controllers/{campaigns_controller_spec.rb → entities/campaigns_controller_spec.rb} +7 -7
  132. data/spec/controllers/{contacts_controller_spec.rb → entities/contacts_controller_spec.rb} +5 -9
  133. data/spec/controllers/{leads_controller_spec.rb → entities/leads_controller_spec.rb} +7 -9
  134. data/spec/controllers/{opportunities_controller_spec.rb → entities/opportunities_controller_spec.rb} +8 -15
  135. data/spec/controllers/tasks_controller_spec.rb +1 -5
  136. data/spec/controllers/users_controller_spec.rb +5 -9
  137. data/spec/factories/subscription_factories.rb +6 -0
  138. data/spec/lib/mail_processor/base_spec.rb +164 -0
  139. data/spec/lib/mail_processor/comment_replies_spec.rb +63 -0
  140. data/spec/lib/{dropbox_spec.rb → mail_processor/dropbox_spec.rb} +73 -181
  141. data/spec/lib/mail_processor/sample_emails/dropbox.rb +167 -0
  142. data/spec/mailers/subscription_mailer_spec.rb +17 -0
  143. data/spec/models/{base → entities}/account_contact_spec.rb +0 -0
  144. data/spec/models/{base → entities}/account_opportunity_spec.rb +0 -0
  145. data/spec/models/{base → entities}/account_spec.rb +4 -0
  146. data/spec/models/{base → entities}/campaign_spec.rb +4 -0
  147. data/spec/models/{base → entities}/contact_opportunity_spec.rb +0 -0
  148. data/spec/models/{base → entities}/contact_spec.rb +4 -0
  149. data/spec/models/{base → entities}/lead_spec.rb +4 -0
  150. data/spec/models/{base → entities}/opportunity_spec.rb +4 -0
  151. data/spec/models/polymorphic/comment_spec.rb +15 -0
  152. data/spec/models/{base → polymorphic}/task_spec.rb +124 -30
  153. data/spec/models/polymorphic/version_spec.rb +1 -1
  154. data/spec/shared/controllers.rb +5 -7
  155. data/spec/shared/models.rb +46 -0
  156. data/spec/spec_helper.rb +3 -4
  157. data/spec/support/mail_processor_mocks.rb +30 -0
  158. data/spec/support/uploaded_file.rb +3 -0
  159. data/spec/views/{common → application}/auto_complete.haml_spec.rb +1 -1
  160. data/vendor/assets/images/jquery-ui/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  161. data/vendor/assets/images/jquery-ui/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  162. data/vendor/assets/images/jquery-ui/ui-bg_flat_10_000000_40x100.png +0 -0
  163. data/vendor/assets/images/jquery-ui/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  164. data/vendor/assets/images/jquery-ui/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  165. data/vendor/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
  166. data/vendor/assets/images/jquery-ui/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  167. data/vendor/assets/images/jquery-ui/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  168. data/vendor/assets/images/jquery-ui/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  169. data/vendor/assets/images/jquery-ui/ui-icons_222222_256x240.png +0 -0
  170. data/vendor/assets/images/jquery-ui/ui-icons_228ef1_256x240.png +0 -0
  171. data/vendor/assets/images/jquery-ui/ui-icons_ef8c08_256x240.png +0 -0
  172. data/vendor/assets/images/jquery-ui/ui-icons_ffd27a_256x240.png +0 -0
  173. data/vendor/assets/images/jquery-ui/ui-icons_ffffff_256x240.png +0 -0
  174. data/vendor/assets/javascripts/textarea_autocomplete.js +605 -0
  175. data/vendor/assets/stylesheets/jquery-ui.custom.css.erb +565 -0
  176. metadata +234 -154
  177. data/config/locales/simple_form.en.yml +0 -24
  178. data/lib/fat_free_crm/dropbox.rb +0 -439
  179. data/spec/lib/dropbox/email_samples.rb +0 -77
@@ -618,9 +618,9 @@ en-GB:
618
618
 
619
619
  # Dropbox.
620
620
  #----------------------------------------------------------------------------
621
- dropbox_ack_subject: dropbox - Added email - %{subject}
622
- dropbox_ack_intro: Succesfully added the email you sent to dropbox
623
- dropbox_ack_to: Added to
621
+ dropbox_notification_subject: dropbox - Added email - %{subject}
622
+ dropbox_notification_intro: Succesfully added the email you sent to dropbox
623
+ dropbox_notification_to: Added to
624
624
  subject: Subject
625
625
  body: Body
626
626
 
@@ -607,6 +607,10 @@ en-US:
607
607
  edit_comment: Editing comment
608
608
  show: Show
609
609
  update: Update
610
+ following_users_will_be_notified: The following users will be notified by email
611
+ notifications_tooltip: Subscribers will receive new comments via email
612
+ subscribe_via_email: Subscribe via email
613
+ disable_email_subscriptions: Disable email subscription
610
614
 
611
615
  # Views -> Emails.
612
616
  #----------------------------------------------------------------------------
@@ -668,12 +672,18 @@ en-US:
668
672
 
669
673
  # Dropbox.
670
674
  #----------------------------------------------------------------------------
671
- dropbox_ack_subject: dropbox - Added email - %{subject}
672
- dropbox_ack_intro: Succesfully added the email you sent to dropbox
673
- dropbox_ack_to: Added to
675
+ dropbox_notification_subject: dropbox - Added email - %{subject}
676
+ dropbox_notification_intro: Succesfully added the email you sent to dropbox
677
+ dropbox_notification_to: Added to
674
678
  subject: Subject
675
679
  body: Body
676
680
 
681
+ # Comment Inbox
682
+ #----------------------------------------------------------------------------
683
+ comment_notification:
684
+ intro: "%{user_full_name} commented on %{entity_type}: %{entity_name}"
685
+ reply_instructions: "Reply to this email directly to add a new comment, or view the %{entity} online"
686
+
677
687
  # Lists
678
688
  #----------------------------------------------------------------------------
679
689
  lists: Lists
@@ -595,9 +595,9 @@
595
595
 
596
596
  # Dropbox.
597
597
  #----------------------------------------------------------------------------
598
- dropbox_ack_subject: dropbox - Añadido email - %{subject}
599
- dropbox_ack_intro: Se ha añadido el email que envió al dropbox
600
- dropbox_ack_to: Añadido a
598
+ dropbox_notification_subject: dropbox - Añadido email - %{subject}
599
+ dropbox_notification_intro: Se ha añadido el email que envió al dropbox
600
+ dropbox_notification_to: Añadido a
601
601
  subject: Asunto
602
602
  body: Cuerpo
603
603
 
@@ -588,9 +588,9 @@ fr-CA:
588
588
 
589
589
  # Dropbox.
590
590
  #----------------------------------------------------------------------------
591
- dropbox_ack_subject: dropbox - Ajouté email - %{subject}
592
- dropbox_ack_intro: D'ajouter l'email que vous avez envoyé à la sélection
593
- dropbox_ack_to: Ajoutés aux
591
+ dropbox_notification_subject: dropbox - Ajouté email - %{subject}
592
+ dropbox_notification_intro: D'ajouter l'email que vous avez envoyé à la sélection
593
+ dropbox_notification_to: Ajoutés aux
594
594
  subject: Sujet
595
595
  body: Corps
596
596
 
@@ -669,9 +669,9 @@ fr:
669
669
 
670
670
  # Dropbox.
671
671
  #----------------------------------------------------------------------------
672
- dropbox_ack_subject: dropbox - Email ajouté - %{subject}
673
- dropbox_ack_intro: "a ajouté l'email que vous avez envoyé à la dropbox"
674
- dropbox_ack_to: ajoutés aux
672
+ dropbox_notification_subject: dropbox - Email ajouté - %{subject}
673
+ dropbox_notification_intro: "a ajouté l'email que vous avez envoyé à la dropbox"
674
+ dropbox_notification_to: ajoutés aux
675
675
  subject: Sujet
676
676
  body: Corps
677
677
 
@@ -612,9 +612,9 @@ it:
612
612
 
613
613
  # Dropbox.
614
614
  #----------------------------------------------------------------------------
615
- dropbox_ack_subject: dropbox - Aggiunta email - %{subject}
616
- dropbox_ack_intro: Email inviata a dropbox aggiunta con successo
617
- dropbox_ack_to: Aggiunto a
615
+ dropbox_notification_subject: dropbox - Aggiunta email - %{subject}
616
+ dropbox_notification_intro: Email inviata a dropbox aggiunta con successo
617
+ dropbox_notification_to: Aggiunto a
618
618
  subject: Oggetto
619
619
  body: Corpo
620
620
 
@@ -595,9 +595,9 @@ pl:
595
595
 
596
596
  # Dropbox.
597
597
  #----------------------------------------------------------------------------
598
- dropbox_ack_subject: dropbox - E-mail Dodano - %{subject}
599
- dropbox_ack_intro: Pomyślnie dodane e-mail wysłanych do DropBox
600
- dropbox_ack_to: Dodano do
598
+ dropbox_notification_subject: dropbox - E-mail Dodano - %{subject}
599
+ dropbox_notification_intro: Pomyślnie dodane e-mail wysłanych do DropBox
600
+ dropbox_notification_to: Dodano do
601
601
  subject: Temat
602
602
  body: Ciało
603
603
 
@@ -592,9 +592,9 @@ pt-BR:
592
592
 
593
593
  # Dropbox.
594
594
  #----------------------------------------------------------------------------
595
- dropbox_ack_subject: dropbox - E-mail Added - %{subject}
596
- dropbox_ack_intro: Adicionado com sucesso o e-mail que você enviou para dropbox
597
- dropbox_ack_to: Adicionado a
595
+ dropbox_notification_subject: dropbox - E-mail Added - %{subject}
596
+ dropbox_notification_intro: Adicionado com sucesso o e-mail que você enviou para dropbox
597
+ dropbox_notification_to: Adicionado a
598
598
  subject: Assunto
599
599
  body: Corpo
600
600
 
@@ -597,9 +597,9 @@ ru:
597
597
 
598
598
  # Dropbox.
599
599
  #----------------------------------------------------------------------------
600
- dropbox_ack_subject: dropbox - Добавлено электронной почты - %{subject}
601
- dropbox_ack_intro: Успешно добавлена электронной почты, который направлен Dropbox
602
- dropbox_ack_to: В дополнение к
600
+ dropbox_notification_subject: dropbox - Добавлено электронной почты - %{subject}
601
+ dropbox_notification_intro: Успешно добавлена электронной почты, который направлен Dropbox
602
+ dropbox_notification_to: В дополнение к
603
603
  subject: Тема
604
604
  body: Тело
605
605
 
@@ -588,9 +588,9 @@ sv-SE:
588
588
 
589
589
  # Dropbox.
590
590
  #----------------------------------------------------------------------------
591
- dropbox_ack_subject: Dropbox - e-postadress tillagd - %{subject}
592
- dropbox_ack_intro: E-postmeddelandet har lagts till i Dropbox
593
- dropbox_ack_to: Lagts till
591
+ dropbox_notification_subject: Dropbox - e-postadress tillagd - %{subject}
592
+ dropbox_notification_intro: E-postmeddelandet har lagts till i Dropbox
593
+ dropbox_notification_to: Lagts till
594
594
  subject: Ämne
595
595
  body: Text
596
596
 
@@ -596,9 +596,9 @@ th:
596
596
 
597
597
  # Dropbox.
598
598
  #----------------------------------------------------------------------------
599
- dropbox_ack_subject: dropbox - อีเมล์ เพิ่ม - %{subject}
600
- dropbox_ack_intro: สำเร็จ เพิ่ม อีเมล ที่ คุณ ส่ง ไป dropbox
601
- dropbox_ack_to: เพิ่ม ลง ใน
599
+ dropbox_notification_subject: dropbox - อีเมล์ เพิ่ม - %{subject}
600
+ dropbox_notification_intro: สำเร็จ เพิ่ม อีเมล ที่ คุณ ส่ง ไป dropbox
601
+ dropbox_notification_to: เพิ่ม ลง ใน
602
602
  subject: สาขา วิชา
603
603
  body: ร่างกาย
604
604
 
data/config/routes.rb CHANGED
@@ -34,6 +34,8 @@ Rails.application.routes.draw do
34
34
  member do
35
35
  put :attach
36
36
  post :discard
37
+ post :subscribe
38
+ post :unsubscribe
37
39
  get :contacts
38
40
  get :opportunities
39
41
  end
@@ -52,6 +54,8 @@ Rails.application.routes.draw do
52
54
  member do
53
55
  put :attach
54
56
  post :discard
57
+ post :subscribe
58
+ post :unsubscribe
55
59
  get :leads
56
60
  get :opportunities
57
61
  end
@@ -70,6 +74,8 @@ Rails.application.routes.draw do
70
74
  member do
71
75
  put :attach
72
76
  post :discard
77
+ post :subscribe
78
+ post :unsubscribe
73
79
  get :opportunities
74
80
  end
75
81
  end
@@ -87,6 +93,8 @@ Rails.application.routes.draw do
87
93
  member do
88
94
  get :convert
89
95
  post :discard
96
+ post :subscribe
97
+ post :unsubscribe
90
98
  put :attach
91
99
  put :promote
92
100
  put :reject
@@ -106,6 +114,8 @@ Rails.application.routes.draw do
106
114
  member do
107
115
  put :attach
108
116
  post :discard
117
+ post :subscribe
118
+ post :unsubscribe
109
119
  get :contacts
110
120
  end
111
121
  end
@@ -16,28 +16,29 @@
16
16
  #------------------------------------------------------------------------------
17
17
 
18
18
  # Fat Free CRM settings are stored in three places, and are loaded in the following order:
19
- #
19
+ #
20
20
  # 1) config/settings.default.yml
21
21
  # 2) config/settings.yml (if exists)
22
22
  # 3) 'settings' table in database (if exists)
23
23
  #
24
24
  # Any settings in `config/settings.yml` will override those in
25
25
  # `config/settings.default.yml`, and settings in the database table have the highest priority.
26
- #
26
+ #
27
27
  # This settings arrangement offers a lot of flexibility:
28
28
  #
29
29
  # * Developers can add new settings to the application with default values,
30
30
  # without requiring the user to manually update setting files or run tasks.
31
31
  # * No manual configuration is required to start the application after installation
32
32
  # * IT administrators can change the default configuration by adding 'settings.yml'
33
- # to their git repo, or by running SQL that updates the 'settings' table in the database.
33
+ # to their git repo, or by running SQL that updates the 'settings' table in the database.
34
34
  # * Admin users can change settings via the admin interface, without needing to edit YAML files.
35
35
  #
36
- # PLEASE DO NOT EDIT THE SETTINGS IN THIS FILE.
36
+ # PLEASE DO NOT EDIT THE SETTINGS IN THIS FILE.
37
37
  # COPY THE SETTINGS THAT YOU WANT TO OVERRIDE INTO `config/settings.yml`
38
38
  #
39
39
  #------------------------------------------------------------------------------
40
40
 
41
+
41
42
  # Host
42
43
  #------------------------------------------------------------------------------
43
44
  # Host for URLs when action mailer generates emails.
@@ -96,16 +97,34 @@
96
97
  :user : "" # User to login to the IMAP server.
97
98
  :password : "" # Password to login to the IMAP server.
98
99
  :scan_folder : "" # Folder to scan for dropbox messages.
99
- :attach_to_account : "" # Attach emails to contact's account, if any. The same rule applies to opportunities.
100
+ :attach_to_account : "" # Attach emails to contact's account, if any.
101
+ # (The rule above also applies to opportunities.)
102
+ # :address_aliases: # Optional: List any aliases that you also want to
103
+ # - example_alias@example.com # ignore when scanning recipients
104
+ # :move_to_folder : "" # Optional: folder to move processed messages to.
105
+ # :move_invalid_to_folder : "" # Optional: folder to move invalid messages to.
106
+
107
+
108
+
109
+ # Settings for 'Reply via email' inbox (IMAP)
110
+ #------------------------------------------------------------------------------
111
+ :email_comment_replies:
112
+ :server : "" # IMAP server name.
113
+ :port : "" # IMAP server port number.
114
+ :ssl : "" # True for secure IMAP connection, false othewise.
115
+ :address : "" # Comment reply email address.
116
+ :user : "" # User to login to the IMAP server.
117
+ :password : "" # Password to login to the IMAP server.
118
+ :scan_folder : "" # Folder to scan for comment replies.
100
119
  # :move_to_folder : "" # Optional: folder to move processed messages to.
101
120
  # :move_invalid_to_folder : "" # Optional: folder to move invalid messages to.
102
121
 
103
122
 
104
123
  # Individual locales per user
105
124
  #------------------------------------------------------------------------------
106
- # To enable language selection in User/Profile set the following option to true.
125
+ # To enable language selection in User/Profile set the following option to true.
107
126
  # By default, individual users can't pick their own locale and are presented
108
- # with the default locale.
127
+ # with the default locale.
109
128
  #
110
129
  :per_user_locale: false
111
130
 
@@ -144,7 +163,7 @@
144
163
  # The following setting controls whether to show time in dropdown calendar
145
164
  # when scheduling a task for specific date.
146
165
  # true -- allow selecting date and time. (default)
147
- # false -- allow selecting date only.
166
+ # false -- allow selecting date only.
148
167
  #
149
168
  :task_calendar_with_time: true
150
169
 
@@ -170,7 +189,7 @@
170
189
 
171
190
  # Background information
172
191
  #------------------------------------------------------------------------------
173
- # Specify model names that should have background information displayed.
192
+ # Specify model names that should have background information displayed.
174
193
  # This field can be used when importing records from legacy databases,
175
194
  # to display the 'background' of where they came from.
176
195
  #
@@ -204,7 +223,7 @@
204
223
  :admin_tabs: [
205
224
  { :active : true, :text : :admin_tab_users, :url : { :controller : "admin/users" } },
206
225
  { :active : false, :text : :admin_tab_fields, :url : { :controller : "admin/fields" } },
207
- { :active : false, :text : :admin_tab_tags, :url : { :controller : "admin/tags" } },
226
+ { :active : false, :text : :admin_tab_tags, :url : { :controller : "admin/tags" } },
208
227
  { :active : false, :text : :admin_tab_settings, :url : { :controller : "admin/settings" } },
209
228
  { :active : false, :text : :admin_tab_plugins, :url : { :controller : "admin/plugins" } }
210
229
  ]
data/config/unicorn.rb ADDED
@@ -0,0 +1,4 @@
1
+ # http://michaelvanrooijen.com/articles/2011/06/01-more-concurrency-on-a-single-heroku-dyno-with-the-new-celadon-cedar-stack/
2
+
3
+ worker_processes 2 # amount of unicorn workers to spin up
4
+ timeout 30 # restarts workers that hang for 30 seconds
@@ -4,7 +4,9 @@ class AddFieldGroupsKlassName < ActiveRecord::Migration
4
4
 
5
5
  # Add a default field group for each model
6
6
  Field::KLASSES.each do |klass|
7
- field_group = FieldGroup.create!(:label => 'Custom Fields', :klass_name => klass.name)
7
+ field_group = FieldGroup.new
8
+ field_group.label, field_group.klass_name = 'Custom Fields', klass.name
9
+ field_group.save!
8
10
  Field.update_all({:field_group_id => field_group.id}, {:field_group_id => nil, :klass_name => klass.name})
9
11
  end
10
12
  FieldGroup.update_all('klass_name = (SELECT MAX(klass_name) FROM fields WHERE field_group_id = field_groups.id)', {:klass_name => nil})
@@ -0,0 +1,23 @@
1
+ class AddSubscribedUsersToEntities < ActiveRecord::Migration
2
+ def change
3
+ %w(accounts campaigns contacts leads opportunities tasks).each do |table|
4
+ add_column table.to_sym, :subscribed_users, :text
5
+ # Reset the column information of each model
6
+ table.singularize.capitalize.constantize.reset_column_information
7
+ end
8
+
9
+ entity_subscribers = Hash.new(Set.new)
10
+
11
+ # Add comment's user to the entity's Set
12
+ Comment.all.each do |comment|
13
+ entity_subscribers[[comment.commentable_type, comment.commentable_id]] += [comment.user_id]
14
+ end
15
+
16
+ # Run as one atomic action.
17
+ ActiveRecord::Base.transaction do
18
+ entity_subscribers.each do |entity, user_ids|
19
+ connection.execute "UPDATE #{entity[0].tableize} SET subscribed_users = '#{user_ids.to_a.to_yaml}' WHERE id = #{entity[1]}"
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,24 @@
1
+ class ChangeSubscribedUsersToSet < ActiveRecord::Migration
2
+ def up
3
+ contacts = connection.select_all %Q{
4
+ SELECT id, subscribed_users
5
+ FROM contacts
6
+ WHERE subscribed_users IS NOT NULL
7
+ }
8
+
9
+ puts "Converting #{contacts.size} subscribed_users arrays into sets..." unless contacts.empty?
10
+
11
+ # Run as one atomic action.
12
+ ActiveRecord::Base.transaction do
13
+ contacts.each do |contact|
14
+ subscribed_users_set = Set.new(YAML.load(contact["subscribed_users"]))
15
+
16
+ connection.execute %Q{
17
+ UPDATE contacts
18
+ SET subscribed_users = '#{subscribed_users_set.to_yaml}'
19
+ WHERE id = #{contact["id"]}
20
+ }
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,27 @@
1
+ class ChangeFurtherSubscribedUsersToSet < ActiveRecord::Migration
2
+ def up
3
+ # Change the other tables that were missing from the previous migration
4
+ %w(campaigns opportunities leads tasks accounts).each do |table|
5
+ entities = connection.select_all %Q{
6
+ SELECT id, subscribed_users
7
+ FROM #{table}
8
+ WHERE subscribed_users IS NOT NULL
9
+ }
10
+
11
+ puts "#{table}: Converting #{entities.size} subscribed_users arrays into sets..." unless entities.empty?
12
+
13
+ # Run as one atomic action.
14
+ ActiveRecord::Base.transaction do
15
+ entities.each do |entity|
16
+ subscribed_users_set = Set.new(YAML.load(entity["subscribed_users"]))
17
+
18
+ connection.execute %Q{
19
+ UPDATE #{table}
20
+ SET subscribed_users = '#{subscribed_users_set.to_yaml}'
21
+ WHERE id = #{entity["id"]}
22
+ }
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,5 @@
1
+ class AddIndexOnVersionsItemType < ActiveRecord::Migration
2
+ def change
3
+ add_index :versions, :whodunnit
4
+ end
5
+ end
data/db/schema.rb CHANGED
@@ -11,47 +11,41 @@
11
11
  #
12
12
  # It's strongly recommended to check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(:version => 20120316045804) do
15
-
16
- create_table "account_aliases", :force => true do |t|
17
- t.integer "account_id"
18
- t.integer "destroyed_account_id"
19
- t.datetime "created_at"
20
- t.datetime "updated_at"
21
- end
14
+ ActiveRecord::Schema.define(:version => 20120413034923) do
22
15
 
23
16
  create_table "account_contacts", :force => true do |t|
24
17
  t.integer "account_id"
25
18
  t.integer "contact_id"
26
19
  t.datetime "deleted_at"
27
- t.datetime "created_at"
28
- t.datetime "updated_at"
20
+ t.datetime "created_at", :null => false
21
+ t.datetime "updated_at", :null => false
29
22
  end
30
23
 
31
24
  create_table "account_opportunities", :force => true do |t|
32
25
  t.integer "account_id"
33
26
  t.integer "opportunity_id"
34
27
  t.datetime "deleted_at"
35
- t.datetime "created_at"
36
- t.datetime "updated_at"
28
+ t.datetime "created_at", :null => false
29
+ t.datetime "updated_at", :null => false
37
30
  end
38
31
 
39
32
  create_table "accounts", :force => true do |t|
40
33
  t.integer "user_id"
41
34
  t.integer "assigned_to"
42
- t.string "name", :limit => 128, :default => "", :null => false
43
- t.string "access", :limit => 8, :default => "Public"
44
- t.string "website", :limit => 64
45
- t.string "toll_free_phone", :limit => 32
46
- t.string "phone", :limit => 32
47
- t.string "fax", :limit => 32
35
+ t.string "name", :limit => 64, :default => "", :null => false
36
+ t.string "access", :limit => 8, :default => "Public"
37
+ t.string "website", :limit => 64
38
+ t.string "toll_free_phone", :limit => 32
39
+ t.string "phone", :limit => 32
40
+ t.string "fax", :limit => 32
48
41
  t.datetime "deleted_at"
49
- t.datetime "created_at"
50
- t.datetime "updated_at"
51
- t.string "email", :limit => 64
42
+ t.datetime "created_at", :null => false
43
+ t.datetime "updated_at", :null => false
44
+ t.string "email", :limit => 64
52
45
  t.string "background_info"
53
46
  t.integer "rating", :default => 0, :null => false
54
- t.string "category", :limit => 32
47
+ t.string "category", :limit => 32
48
+ t.text "subscribed_users"
55
49
  end
56
50
 
57
51
  add_index "accounts", ["assigned_to"], :name => "index_accounts_on_assigned_to"
@@ -64,8 +58,8 @@ ActiveRecord::Schema.define(:version => 20120316045804) do
64
58
  t.string "action", :limit => 32, :default => "created"
65
59
  t.string "info", :default => ""
66
60
  t.boolean "private", :default => false
67
- t.datetime "created_at"
68
- t.datetime "updated_at"
61
+ t.datetime "created_at", :null => false
62
+ t.datetime "updated_at", :null => false
69
63
  end
70
64
 
71
65
  add_index "activities", ["created_at"], :name => "index_activities_on_created_at"
@@ -82,20 +76,13 @@ ActiveRecord::Schema.define(:version => 20120316045804) do
82
76
  t.string "address_type", :limit => 16
83
77
  t.integer "addressable_id"
84
78
  t.string "addressable_type"
85
- t.datetime "created_at"
86
- t.datetime "updated_at"
79
+ t.datetime "created_at", :null => false
80
+ t.datetime "updated_at", :null => false
87
81
  t.datetime "deleted_at"
88
82
  end
89
83
 
90
84
  add_index "addresses", ["addressable_id", "addressable_type"], :name => "index_addresses_on_addressable_id_and_addressable_type"
91
85
 
92
- create_table "application_accounts", :force => true do |t|
93
- t.string "name"
94
- t.string "single_access_token", :null => false
95
- t.datetime "created_at"
96
- t.datetime "updated_at"
97
- end
98
-
99
86
  create_table "avatars", :force => true do |t|
100
87
  t.integer "user_id"
101
88
  t.integer "entity_id"
@@ -103,8 +90,8 @@ ActiveRecord::Schema.define(:version => 20120316045804) do
103
90
  t.integer "image_file_size"
104
91
  t.string "image_file_name"
105
92
  t.string "image_content_type"
106
- t.datetime "created_at"
107
- t.datetime "updated_at"
93
+ t.datetime "created_at", :null => false
94
+ t.datetime "updated_at", :null => false
108
95
  end
109
96
 
110
97
  create_table "campaigns", :force => true do |t|
@@ -124,9 +111,10 @@ ActiveRecord::Schema.define(:version => 20120316045804) do
124
111
  t.date "ends_on"
125
112
  t.text "objectives"
126
113
  t.datetime "deleted_at"
127
- t.datetime "created_at"
128
- t.datetime "updated_at"
114
+ t.datetime "created_at", :null => false
115
+ t.datetime "updated_at", :null => false
129
116
  t.string "background_info"
117
+ t.text "subscribed_users"
130
118
  end
131
119
 
132
120
  add_index "campaigns", ["assigned_to"], :name => "index_campaigns_on_assigned_to"
@@ -139,25 +127,18 @@ ActiveRecord::Schema.define(:version => 20120316045804) do
139
127
  t.boolean "private"
140
128
  t.string "title", :default => ""
141
129
  t.text "comment"
142
- t.datetime "created_at"
143
- t.datetime "updated_at"
130
+ t.datetime "created_at", :null => false
131
+ t.datetime "updated_at", :null => false
144
132
  t.string "state", :limit => 16, :default => "Expanded", :null => false
145
133
  end
146
134
 
147
- create_table "contact_aliases", :force => true do |t|
148
- t.integer "contact_id"
149
- t.integer "destroyed_contact_id"
150
- t.datetime "created_at"
151
- t.datetime "updated_at"
152
- end
153
-
154
135
  create_table "contact_opportunities", :force => true do |t|
155
136
  t.integer "contact_id"
156
137
  t.integer "opportunity_id"
157
138
  t.string "role", :limit => 32
158
139
  t.datetime "deleted_at"
159
- t.datetime "created_at"
160
- t.datetime "updated_at"
140
+ t.datetime "created_at", :null => false
141
+ t.datetime "updated_at", :null => false
161
142
  end
162
143
 
163
144
  create_table "contacts", :force => true do |t|
@@ -165,32 +146,33 @@ ActiveRecord::Schema.define(:version => 20120316045804) do
165
146
  t.integer "lead_id"
166
147
  t.integer "assigned_to"
167
148
  t.integer "reports_to"
168
- t.string "first_name", :default => ""
169
- t.string "last_name", :default => ""
170
- t.string "access", :limit => 8, :default => "Public"
171
- t.string "title", :limit => 64
172
- t.string "department", :limit => 64
173
- t.string "source", :limit => 32
174
- t.string "email", :limit => 64
175
- t.string "alt_email", :limit => 64
176
- t.string "phone", :limit => 32
177
- t.string "mobile", :limit => 32
178
- t.string "fax", :limit => 32
179
- t.string "blog", :limit => 128
180
- t.string "linkedin", :limit => 128
181
- t.string "facebook", :limit => 128
182
- t.string "twitter", :limit => 128
149
+ t.string "first_name", :limit => 64, :default => "", :null => false
150
+ t.string "last_name", :limit => 64, :default => "", :null => false
151
+ t.string "access", :limit => 8, :default => "Public"
152
+ t.string "title", :limit => 64
153
+ t.string "department", :limit => 64
154
+ t.string "source", :limit => 32
155
+ t.string "email", :limit => 64
156
+ t.string "alt_email", :limit => 64
157
+ t.string "phone", :limit => 32
158
+ t.string "mobile", :limit => 32
159
+ t.string "fax", :limit => 32
160
+ t.string "blog", :limit => 128
161
+ t.string "linkedin", :limit => 128
162
+ t.string "facebook", :limit => 128
163
+ t.string "twitter", :limit => 128
183
164
  t.date "born_on"
184
- t.boolean "do_not_call", :default => false, :null => false
165
+ t.boolean "do_not_call", :default => false, :null => false
185
166
  t.datetime "deleted_at"
186
- t.datetime "created_at"
187
- t.datetime "updated_at"
167
+ t.datetime "created_at", :null => false
168
+ t.datetime "updated_at", :null => false
188
169
  t.string "background_info"
189
- t.string "skype", :limit => 128
170
+ t.string "skype", :limit => 128
171
+ t.text "subscribed_users"
190
172
  end
191
173
 
192
174
  add_index "contacts", ["assigned_to"], :name => "index_contacts_on_assigned_to"
193
- add_index "contacts", ["user_id", "last_name", "deleted_at"], :name => "index_contacts_on_user_id_and_last_name_and_deleted_at", :unique => true
175
+ add_index "contacts", ["user_id", "last_name", "deleted_at"], :name => "id_last_name_deleted", :unique => true
194
176
 
195
177
  create_table "emails", :force => true do |t|
196
178
  t.string "imap_message_id", :null => false
@@ -207,8 +189,8 @@ ActiveRecord::Schema.define(:version => 20120316045804) do
207
189
  t.datetime "sent_at"
208
190
  t.datetime "received_at"
209
191
  t.datetime "deleted_at"
210
- t.datetime "created_at"
211
- t.datetime "updated_at"
192
+ t.datetime "created_at", :null => false
193
+ t.datetime "updated_at", :null => false
212
194
  t.string "state", :limit => 16, :default => "Expanded", :null => false
213
195
  end
214
196
 
@@ -219,8 +201,8 @@ ActiveRecord::Schema.define(:version => 20120316045804) do
219
201
  t.string "label", :limit => 128
220
202
  t.integer "position"
221
203
  t.string "hint"
222
- t.datetime "created_at"
223
- t.datetime "updated_at"
204
+ t.datetime "created_at", :null => false
205
+ t.datetime "updated_at", :null => false
224
206
  t.integer "tag_id"
225
207
  t.string "klass_name", :limit => 32
226
208
  end
@@ -238,8 +220,8 @@ ActiveRecord::Schema.define(:version => 20120316045804) do
238
220
  t.boolean "disabled"
239
221
  t.boolean "required"
240
222
  t.integer "maxlength"
241
- t.datetime "created_at"
242
- t.datetime "updated_at"
223
+ t.datetime "created_at", :null => false
224
+ t.datetime "updated_at", :null => false
243
225
  end
244
226
 
245
227
  add_index "fields", ["field_group_id"], :name => "index_fields_on_field_group_id"
@@ -249,29 +231,30 @@ ActiveRecord::Schema.define(:version => 20120316045804) do
249
231
  t.integer "user_id"
250
232
  t.integer "campaign_id"
251
233
  t.integer "assigned_to"
252
- t.string "first_name", :limit => 64, :default => "", :null => false
253
- t.string "last_name", :limit => 64, :default => "", :null => false
254
- t.string "access", :limit => 8, :default => "Public"
255
- t.string "title", :limit => 64
256
- t.string "company", :limit => 64
257
- t.string "source", :limit => 32
258
- t.string "status", :limit => 32
259
- t.string "referred_by", :limit => 64
260
- t.string "email", :limit => 64
261
- t.string "alt_email", :limit => 64
262
- t.string "phone", :limit => 32
263
- t.string "mobile", :limit => 32
264
- t.string "blog", :limit => 128
265
- t.string "linkedin", :limit => 128
266
- t.string "facebook", :limit => 128
267
- t.string "twitter", :limit => 128
268
- t.integer "rating", :default => 0, :null => false
269
- t.boolean "do_not_call", :default => false, :null => false
234
+ t.string "first_name", :limit => 64, :default => "", :null => false
235
+ t.string "last_name", :limit => 64, :default => "", :null => false
236
+ t.string "access", :limit => 8, :default => "Public"
237
+ t.string "title", :limit => 64
238
+ t.string "company", :limit => 64
239
+ t.string "source", :limit => 32
240
+ t.string "status", :limit => 32
241
+ t.string "referred_by", :limit => 64
242
+ t.string "email", :limit => 64
243
+ t.string "alt_email", :limit => 64
244
+ t.string "phone", :limit => 32
245
+ t.string "mobile", :limit => 32
246
+ t.string "blog", :limit => 128
247
+ t.string "linkedin", :limit => 128
248
+ t.string "facebook", :limit => 128
249
+ t.string "twitter", :limit => 128
250
+ t.integer "rating", :default => 0, :null => false
251
+ t.boolean "do_not_call", :default => false, :null => false
270
252
  t.datetime "deleted_at"
271
- t.datetime "created_at"
272
- t.datetime "updated_at"
253
+ t.datetime "created_at", :null => false
254
+ t.datetime "updated_at", :null => false
273
255
  t.string "background_info"
274
- t.string "skype", :limit => 128
256
+ t.string "skype", :limit => 128
257
+ t.text "subscribed_users"
275
258
  end
276
259
 
277
260
  add_index "leads", ["assigned_to"], :name => "index_leads_on_assigned_to"
@@ -280,37 +263,38 @@ ActiveRecord::Schema.define(:version => 20120316045804) do
280
263
  create_table "lists", :force => true do |t|
281
264
  t.string "name"
282
265
  t.text "url"
283
- t.datetime "created_at"
284
- t.datetime "updated_at"
266
+ t.datetime "created_at", :null => false
267
+ t.datetime "updated_at", :null => false
285
268
  end
286
269
 
287
270
  create_table "opportunities", :force => true do |t|
288
271
  t.integer "user_id"
289
272
  t.integer "campaign_id"
290
273
  t.integer "assigned_to"
291
- t.string "name", :limit => 64, :default => "", :null => false
292
- t.string "access", :limit => 8, :default => "Public"
293
- t.string "source", :limit => 32
294
- t.string "stage", :limit => 32
274
+ t.string "name", :limit => 64, :default => "", :null => false
275
+ t.string "access", :limit => 8, :default => "Public"
276
+ t.string "source", :limit => 32
277
+ t.string "stage", :limit => 32
295
278
  t.integer "probability"
296
- t.decimal "amount", :precision => 12, :scale => 2
297
- t.decimal "discount", :precision => 12, :scale => 2
279
+ t.decimal "amount", :precision => 12, :scale => 2
280
+ t.decimal "discount", :precision => 12, :scale => 2
298
281
  t.date "closes_on"
299
282
  t.datetime "deleted_at"
300
- t.datetime "created_at"
301
- t.datetime "updated_at"
283
+ t.datetime "created_at", :null => false
284
+ t.datetime "updated_at", :null => false
302
285
  t.string "background_info"
286
+ t.text "subscribed_users"
303
287
  end
304
288
 
305
289
  add_index "opportunities", ["assigned_to"], :name => "index_opportunities_on_assigned_to"
306
- add_index "opportunities", ["user_id", "name", "deleted_at"], :name => "index_opportunities_on_user_id_and_name_and_deleted_at", :unique => true
290
+ add_index "opportunities", ["user_id", "name", "deleted_at"], :name => "id_name_deleted", :unique => true
307
291
 
308
292
  create_table "permissions", :force => true do |t|
309
293
  t.integer "user_id"
310
294
  t.integer "asset_id"
311
295
  t.string "asset_type"
312
- t.datetime "created_at"
313
- t.datetime "updated_at"
296
+ t.datetime "created_at", :null => false
297
+ t.datetime "updated_at", :null => false
314
298
  end
315
299
 
316
300
  add_index "permissions", ["asset_id", "asset_type"], :name => "index_permissions_on_asset_id_and_asset_type"
@@ -320,8 +304,8 @@ ActiveRecord::Schema.define(:version => 20120316045804) do
320
304
  t.integer "user_id"
321
305
  t.string "name", :limit => 32, :default => "", :null => false
322
306
  t.text "value"
323
- t.datetime "created_at"
324
- t.datetime "updated_at"
307
+ t.datetime "created_at", :null => false
308
+ t.datetime "updated_at", :null => false
325
309
  end
326
310
 
327
311
  add_index "preferences", ["user_id", "name"], :name => "index_preferences_on_user_id_and_name"
@@ -329,8 +313,8 @@ ActiveRecord::Schema.define(:version => 20120316045804) do
329
313
  create_table "sessions", :force => true do |t|
330
314
  t.string "session_id", :null => false
331
315
  t.text "data"
332
- t.datetime "created_at"
333
- t.datetime "updated_at"
316
+ t.datetime "created_at", :null => false
317
+ t.datetime "updated_at", :null => false
334
318
  end
335
319
 
336
320
  add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id"
@@ -339,8 +323,8 @@ ActiveRecord::Schema.define(:version => 20120316045804) do
339
323
  create_table "settings", :force => true do |t|
340
324
  t.string "name", :limit => 32, :default => "", :null => false
341
325
  t.text "value"
342
- t.datetime "created_at"
343
- t.datetime "updated_at"
326
+ t.datetime "created_at", :null => false
327
+ t.datetime "updated_at", :null => false
344
328
  end
345
329
 
346
330
  add_index "settings", ["name"], :name => "index_settings_on_name"
@@ -359,28 +343,26 @@ ActiveRecord::Schema.define(:version => 20120316045804) do
359
343
  add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context"
360
344
 
361
345
  create_table "tags", :force => true do |t|
362
- t.string "name"
363
- t.datetime "created_at"
364
- t.datetime "updated_at"
365
- t.string "taggable_type"
346
+ t.string "name"
366
347
  end
367
348
 
368
349
  create_table "tasks", :force => true do |t|
369
350
  t.integer "user_id"
370
351
  t.integer "assigned_to"
371
352
  t.integer "completed_by"
372
- t.string "name", :default => "", :null => false
353
+ t.string "name", :default => "", :null => false
373
354
  t.integer "asset_id"
374
355
  t.string "asset_type"
375
- t.string "priority", :limit => 32
376
- t.string "category", :limit => 32
377
- t.string "bucket", :limit => 32
356
+ t.string "priority", :limit => 32
357
+ t.string "category", :limit => 32
358
+ t.string "bucket", :limit => 32
378
359
  t.datetime "due_at"
379
360
  t.datetime "completed_at"
380
361
  t.datetime "deleted_at"
381
- t.datetime "created_at"
382
- t.datetime "updated_at"
362
+ t.datetime "created_at", :null => false
363
+ t.datetime "updated_at", :null => false
383
364
  t.string "background_info"
365
+ t.text "subscribed_users"
384
366
  end
385
367
 
386
368
  add_index "tasks", ["assigned_to"], :name => "index_tasks_on_assigned_to"
@@ -411,8 +393,8 @@ ActiveRecord::Schema.define(:version => 20120316045804) do
411
393
  t.string "current_login_ip"
412
394
  t.integer "login_count", :default => 0, :null => false
413
395
  t.datetime "deleted_at"
414
- t.datetime "created_at"
415
- t.datetime "updated_at"
396
+ t.datetime "created_at", :null => false
397
+ t.datetime "updated_at", :null => false
416
398
  t.boolean "admin", :default => false, :null => false
417
399
  t.datetime "suspended_at"
418
400
  t.string "single_access_token"
@@ -437,5 +419,6 @@ ActiveRecord::Schema.define(:version => 20120316045804) do
437
419
  end
438
420
 
439
421
  add_index "versions", ["item_type", "item_id"], :name => "index_versions_on_item_type_and_item_id"
422
+ add_index "versions", ["whodunnit"], :name => "index_versions_on_whodunnit"
440
423
 
441
424
  end