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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05f5add2d9ed60e6426fbe2fd3397d433a97240a
|
4
|
+
data.tar.gz: 817168a8cf5afe3a4c79dc01088ad4d9df1ef894
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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]).
|
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)
|
data/lib/my_forum/version.rb
CHANGED