Merge 4ef78e2b9d into d4b9ea48f9
This commit is contained in:
commit
6fac651188
7 changed files with 30 additions and 12 deletions
2
0
Normal file
2
0
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
invoke active_record
|
||||||
|
create db/migrate/20170316042351_add_comment_count_to_events.rb
|
||||||
|
|
@ -13,12 +13,12 @@ You can find the latest OSEM releases on our [release page](https://github.com/o
|
||||||
|
|
||||||
## Deploy
|
## Deploy
|
||||||
OSEM is a *Ruby on Rails* application. We recommend to run OSEM in production with [mod_passenger](https://www.phusionpassenger.com/download/#open_source)
|
OSEM is a *Ruby on Rails* application. We recommend to run OSEM in production with [mod_passenger](https://www.phusionpassenger.com/download/#open_source)
|
||||||
and the [apache web-server](https://www.apache.org/). There are tons of guides on how to deploy rails apps on various
|
and the [apache web-server](https://www.apache.org/). There are tons of guides on how to deploy Rails apps on various
|
||||||
base operating systems. [Check Google](https://encrypted.google.com/search?hl=en&q=ruby%20on%20rails%20apache%20passenger) ;-)
|
base operating systems. [Check Google](https://encrypted.google.com/search?hl=en&q=ruby%20on%20rails%20apache%20passenger) ;-)
|
||||||
|
|
||||||
For more information about rails and what it can do, see the [rails guides.](http://guides.rubyonrails.org/getting_started.html)
|
For more information about Rails and what it can do, see the [Rails Guides.](http://guides.rubyonrails.org/getting_started.html)
|
||||||
|
|
||||||
If you have an heroku account you can also
|
If you have a Heroku account you can also
|
||||||
|
|
||||||
<a href="https://heroku.com/deploy?template=https://github.com/openSUSE/osem/tree/v1.0">
|
<a href="https://heroku.com/deploy?template=https://github.com/openSUSE/osem/tree/v1.0">
|
||||||
<img src="https://www.herokucdn.com/deploy/button.svg" alt="Deploy">
|
<img src="https://www.herokucdn.com/deploy/button.svg" alt="Deploy">
|
||||||
|
|
@ -74,7 +74,7 @@ In order to use [openID](http://openid.net/) logins for your OSEM installation y
|
||||||
|
|
||||||
## Recurring Jobs
|
## Recurring Jobs
|
||||||
=======
|
=======
|
||||||
Open a separate terminal and go into the directory where the rails app is present, and type the following to start the delayed_jobs worker for sending email notifications.
|
Open a separate terminal and go into the directory where the Rails app is present, and type the following to start the delayed_jobs worker for sending email notifications.
|
||||||
```
|
```
|
||||||
bundle exec rake jobs:work
|
bundle exec rake jobs:work
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -34,9 +34,9 @@ As we are using Stripe Checkout for accepting payments, Stripe will help you for
|
||||||
You can read the full security documentation [here](https://stripe.com/docs/security).
|
You can read the full security documentation [here](https://stripe.com/docs/security).
|
||||||
|
|
||||||
## Configure Stripe to send emails for successful transactions
|
## Configure Stripe to send emails for successful transactions
|
||||||
Stripe can send email reciepts for every successful payment done through its gateway.
|
Stripe can send email receipts for every successful payment done through its gateway.
|
||||||
Please refer [here](https://dashboard.stripe.com/account/emails) to enable invoice emails for your users.
|
Please refer [here](https://dashboard.stripe.com/account/emails) to enable invoice emails for your users.
|
||||||
|
|
||||||
## Customize Stripe invoice emails for your application
|
## Customize Stripe invoice emails for your application
|
||||||
You can customise your payment reciepts by adding your personalisation like organisation name, logo etc.
|
You can customise your payment receipts by adding your personalisation like organisation name, logo etc.
|
||||||
Please see the options for invoice personalisation [here](https://dashboard.stripe.com/account/public).
|
Please see the options for invoice personalisation [here](https://dashboard.stripe.com/account/public).
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ class Comment < ActiveRecord::Base
|
||||||
# want user to vote on the quality of comments.
|
# want user to vote on the quality of comments.
|
||||||
#acts_as_votable
|
#acts_as_votable
|
||||||
|
|
||||||
belongs_to :commentable, polymorphic: true
|
belongs_to :commentable, polymorphic: true, counter_cache: true
|
||||||
|
|
||||||
# NOTE: Comments belong to a user
|
# NOTE: Comments belong to a user
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
|
|
|
||||||
|
|
@ -183,4 +183,4 @@
|
||||||
%ul.dropdown-menu{role: 'menu'}
|
%ul.dropdown-menu{role: 'menu'}
|
||||||
= render 'change_state_dropdown', event: event
|
= render 'change_state_dropdown', event: event
|
||||||
%td.text-center
|
%td.text-center
|
||||||
= link_to "#{event.comment_threads.count}", admin_conference_program_event_path(@conference.short_title, event), anchor: 'comments-div'
|
= link_to "#{event.comments_count}", admin_conference_program_event_path(@conference.short_title, event), anchor: 'comments-div'
|
||||||
|
|
|
||||||
15
db/migrate/20170316042351_add_comment_count_to_events.rb
Normal file
15
db/migrate/20170316042351_add_comment_count_to_events.rb
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
class AddCommentCountToEvents < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
add_column :events, :comments_count, :integer, default: 0
|
||||||
|
|
||||||
|
Event.reset_column_information
|
||||||
|
|
||||||
|
Event.find_each do |event|
|
||||||
|
event.update_attribute :comments_count, event.comment_threads.length
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
remove_column :events, :comments_count
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20170213145807) do
|
ActiveRecord::Schema.define(version: 20170316042351) do
|
||||||
|
|
||||||
create_table "ahoy_events", force: :cascade do |t|
|
create_table "ahoy_events", force: :cascade do |t|
|
||||||
t.uuid "visit_id", limit: 16
|
t.uuid "visit_id", limit: 16
|
||||||
|
|
@ -234,6 +234,7 @@ ActiveRecord::Schema.define(version: 20170213145807) do
|
||||||
t.boolean "is_highlight", default: false
|
t.boolean "is_highlight", default: false
|
||||||
t.integer "program_id"
|
t.integer "program_id"
|
||||||
t.integer "max_attendees"
|
t.integer "max_attendees"
|
||||||
|
t.integer "comments_count", default: 0
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "events_registrations", force: :cascade do |t|
|
create_table "events_registrations", force: :cascade do |t|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue