my_forum 0.0.1.beta53 → 0.0.1.beta54

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 49732d0bf16774a11b6c656cb128eec535d14222
4
- data.tar.gz: aeb2e91a44eb1e90084ba022fb20f013681f3c81
3
+ metadata.gz: 05f5add2d9ed60e6426fbe2fd3397d433a97240a
4
+ data.tar.gz: 817168a8cf5afe3a4c79dc01088ad4d9df1ef894
5
5
  SHA512:
6
- metadata.gz: f0ae67c6760ddb7094ac096a51331a71f586b7e1f532e82f1f4b408f71cff52b0fe0de53e2ff6372f8c978d6771e33949aacbb9f42a679dccbea7f1bbc77b2c8
7
- data.tar.gz: 1e49c1ecf7ee7da936e2e79c800c939acaba833de8224d33557e9966e33a75a4322ffe71d64ff6a8af1d206a58f1f0e53fd8be12404c2a471aad54cc54620007
6
+ metadata.gz: adb0e2d983a36c3dfe32409b980892cae0e0d0bd33a615455c8c7f1561c8fe8a41b7af462e01d0e500b7d5351f79a27a04cd2c51f64f6747e4c6509e57983b34
7
+ data.tar.gz: 5b2be6aa9eee71f98ac0f9aac8b922afa3a542378e839b4517f60564c7d488ec9456b5eb575d67fce5e31ec5187630b2e3399705a1d94aaf72c8c42a66cf0609
@@ -10,7 +10,7 @@ module MyForum
10
10
  end
11
11
 
12
12
  def current_user
13
- return session[:user_id].blank? ? nil : User.where(id: session[:user_id]).includes(:user_groups).first
13
+ return session[:user_id].blank? ? nil : User.where(id: session[:user_id]).first
14
14
  end
15
15
  helper_method :current_user
16
16
 
@@ -79,7 +79,7 @@ module MyForum
79
79
  end
80
80
 
81
81
  def emoticons_list
82
- Emoticon.all.inject({}) {|hash, smile| hash.merge!(smile.code => File.join(Emoticon::URL, smile.file_name) ) }
82
+ @emoticson ||= Emoticon.all.inject({}) {|hash, smile| hash.merge!(smile.code => File.join(Emoticon::URL, smile.file_name) ) }
83
83
  end
84
84
  end
85
85
  end
@@ -15,7 +15,7 @@ module MyForum
15
15
 
16
16
  user_last_page = get_last_readed_user_page
17
17
 
18
- @topic_posts = @topic.posts.paginate(per_page: Post::PER_PAGE, page: (params[:page] || user_last_page))
18
+ @topic_posts = @topic.posts.includes(:user, :topic).paginate(per_page: Post::PER_PAGE, page: (params[:page] || user_last_page))
19
19
  @new_post = Post.new #TODO if quick_answer_enabled
20
20
 
21
21
  @topic.mark_as_read(current_user, @topic_posts.last)
@@ -1,3 +1,3 @@
1
1
  module MyForum
2
- VERSION = "0.0.1.beta53"
2
+ VERSION = "0.0.1.beta54"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: my_forum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.beta53
4
+ version: 0.0.1.beta54
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vitaly Omelchenko