Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade rails version and fix bug #673

Open
wants to merge 6 commits into
base: rails4
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/models/forem/concerns/viewable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def view_for(user)
# Track when users last viewed topics
def register_view_by(user)
return unless user
view = views.find_or_create_by(user_id: user.id)
view = View.find_or_create_by(user: user, viewable: self)
view.increment!('count')
increment!(:views_count)

Expand Down
2 changes: 1 addition & 1 deletion app/models/forem/subscription.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def send_notification(post_id)
# If a user cannot be found, then no-op
# This will happen if the user record has been deleted.
if subscriber.present?
SubscriptionMailer.topic_reply(post_id, subscriber.id).deliver
SubscriptionMailer.topic_reply(post_id, subscriber.id).deliver_now
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And what if people want to use deliver_later instead?

end
end
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20110221092741_create_forem_topics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def change
t.integer :user_id
t.string :subject

t.timestamps
t.timestamps :null => false
end
end
end
2 changes: 1 addition & 1 deletion db/migrate/20110221094502_create_forem_posts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def change
t.text :text
t.integer :user_id

t.timestamps
t.timestamps :null => false
end
end
end
2 changes: 1 addition & 1 deletion db/migrate/20111103210835_create_forem_categories.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class CreateForemCategories < ActiveRecord::Migration
def change
create_table :forem_categories do |t|
t.string :name, :null => false
t.timestamps
t.timestamps :null => false
end
end
end
2 changes: 1 addition & 1 deletion forem.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'sass-rails', '~> 4.0'
s.add_development_dependency 'coffee-rails', '~> 4.0'

s.add_dependency 'rails', '~> 4.0', '<= 4.2'
s.add_dependency 'rails', '~> 4.0', '<= 4.2.3'
s.add_dependency 'simple_form', '~> 3.0'
s.add_dependency 'sanitize', '2.0.6'
s.add_dependency 'workflow', '1.0.0'
Expand Down