my_forum 0.0.1.beta52 → 0.0.1.beta53

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: 75e9f0fb2084d4be65a1ef9cf4c6dcac6e8979bd
4
- data.tar.gz: 5e3da8f117eb439ca7e356d3af2b2c9351023869
3
+ metadata.gz: 49732d0bf16774a11b6c656cb128eec535d14222
4
+ data.tar.gz: aeb2e91a44eb1e90084ba022fb20f013681f3c81
5
5
  SHA512:
6
- metadata.gz: 6fe54f30abac2710c9273a19a65e2b32ca5db5b82501366bdf5e7cefa4468ea869d695db1e6dcc42fd8ca22b2f92e0052022057341b3a7e3d89a16d9f90da42d
7
- data.tar.gz: ddd44223997ecce016b63b43575dbcc9c2f6fbeb9124f1d86243d9cac1951a0a57636e60f94645919331ee9d259c36d155b752be973d77a47c7b77475e2216f3
6
+ metadata.gz: f0ae67c6760ddb7094ac096a51331a71f586b7e1f532e82f1f4b408f71cff52b0fe0de53e2ff6372f8c978d6771e33949aacbb9f42a679dccbea7f1bbc77b2c8
7
+ data.tar.gz: 1e49c1ecf7ee7da936e2e79c800c939acaba833de8224d33557e9966e33a75a4322ffe71d64ff6a8af1d206a58f1f0e53fd8be12404c2a471aad54cc54620007
@@ -62,7 +62,8 @@ module MyForum
62
62
 
63
63
  # TODO development in progress
64
64
  def get_last_readed_user_page
65
- return nil if not current_user or params[:page].blank?
65
+ return nil if current_user.blank?
66
+ return nil unless params[:page].blank?
66
67
  user_last_page = nil
67
68
 
68
69
  latest_readed_post = LogReadMark.where(user_id: current_user.id, topic_id: @topic.id).first
@@ -57,8 +57,8 @@ module MyForum
57
57
  end
58
58
 
59
59
  # Link
60
- text.gsub!(/\[url=(.*?)\](.*?)\[\/url\]/i) { "<a href='#{$1}'>#{$2}</a>" }
61
- text.gsub!(/(http:\/\/[\S]+|www:\/\/[\S]+)/) { "<a target=\"_blank\" href=#{$1}>#{$1}</a>"}
60
+ text.gsub!(/\[url=(.*?)\](.*?)\[\/url\]/i) { link_to($2, $1, target: '_blank') }
61
+ text.gsub!(/(http:\/\/[\S]+|www:\/\/[\S]+)/i) { link_to($1, $1, target: '_blank') }
62
62
 
63
63
  text.html_safe
64
64
  end
@@ -7,7 +7,7 @@ module MyForum
7
7
 
8
8
  config.after_initialize do
9
9
  ActionView::Base.sanitized_allowed_tags = %w(strong em a img br p i pre div span iframe)
10
- ActionView::Base.sanitized_allowed_attributes = %w(href title class src width height)
10
+ ActionView::Base.sanitized_allowed_attributes = %w(href title class src width height target)
11
11
  end
12
12
 
13
13
  config.generators do |g|
@@ -1,3 +1,3 @@
1
1
  module MyForum
2
- VERSION = "0.0.1.beta52"
2
+ VERSION = "0.0.1.beta53"
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.beta52
4
+ version: 0.0.1.beta53
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vitaly Omelchenko