rostra 0.1.8 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  module Rostra
2
2
  class Question < ActiveRecord::Base
3
3
  belongs_to :user
4
- has_many :answers
5
- has_many :question_followings
4
+ has_many :answers, :dependent => :destroy
5
+ has_many :question_followings, :dependent => :destroy
6
6
  has_many :followers, through: :question_followings, source: :user
7
7
  has_many :notified_followers, through: :question_followings, source: :user,
8
8
  conditions: { 'rostra_question_followings.send_email_notifications' => true }
@@ -1,4 +1,4 @@
1
- <h3>Hi <%= @user.rostra_user_name %></h3>
1
+ <h3>Hi <%= @user.rostra_user_name %>,</h3>
2
2
 
3
3
  <p>Just letting you know there's been recent activity on <%= link_to @question.title, question_url(@question) %></p>
4
4
 
@@ -42,6 +42,7 @@
42
42
  <div class="timestamp"><%= time_ago_in_words(question.updated_at) %> ago</div>
43
43
  <%= tag_list(question) %>
44
44
  </div>
45
+ <div class="clear"></div>
45
46
  <% end %>
46
47
 
47
48
  <%= paginate @questions %>
@@ -1,7 +1,7 @@
1
1
  # Use this setup block to configure all options available in Rostra.
2
2
  Rostra::Config.setup do |config|
3
3
 
4
- # Helper method used to access current user in the view
4
+ # Specify the email layout you'd like to use when sending notifications
5
5
  # config.email_layout = nil
6
6
 
7
7
  # Helper method used to access current user in the view
data/lib/rostra/config.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Rostra
2
2
  module Config
3
3
 
4
- # Helper method used to access current user in the view
4
+ # The email layout used when sending notifications
5
5
  #
6
6
  mattr_accessor :email_layout
7
7
  @@email_layout = nil
@@ -1,3 +1,3 @@
1
1
  module Rostra
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.9"
3
3
  end
data/lib/rostra.rb CHANGED
@@ -21,7 +21,7 @@ module Rostra
21
21
  has_many :questions, class_name: 'Rostra::Question'
22
22
  has_many :answers, class_name: 'Rostra::Answer'
23
23
  has_many :comments
24
- has_many :question_followings, class_name: 'Rostra::QuestionFollowing'
24
+ has_many :question_followings, class_name: 'Rostra::QuestionFollowing', :dependent => :destroy
25
25
  has_many :followed_questions, through: :question_followings, class_name: 'Rostra::Question', source: :question
26
26
 
27
27
  acts_as_voter
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rostra
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.8
5
+ version: 0.1.9
6
6
  platform: ruby
7
7
  authors:
8
8
  - Cory Schires
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-10-26 00:00:00 -05:00
13
+ date: 2011-10-27 00:00:00 -05:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency