ixtlan 0.2.3 → 0.2.4
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.
data/lib/ixtlan/child_path.rb
CHANGED
@@ -88,7 +88,7 @@ module Ixtlan
|
|
88
88
|
|
89
89
|
def update
|
90
90
|
new_text = params[:phrase][:text]
|
91
|
-
word =
|
91
|
+
word = TEXT.not_approved(:locale => Locale.default, :code => params[:id]).first
|
92
92
|
if word
|
93
93
|
phrase = word_to_phrase(word, :text)
|
94
94
|
word_approved = Ixtlan::Models::Word.latest_approved(:locale => Locale.default, :code => params[:id]).first
|
@@ -96,9 +96,9 @@ module Ixtlan
|
|
96
96
|
else
|
97
97
|
# take the latest approved text for the given code and create a new
|
98
98
|
# text without version (!= not_approved text) for the given code
|
99
|
-
word =
|
99
|
+
word = TEXT.latest_approved(:locale => Locale.default, :code => params[:id]).first
|
100
100
|
phrase = word_to_phrase(word, :current_text)
|
101
|
-
word =
|
101
|
+
word = TEXT.new(:code => params[:id], :locale => Locale.default)
|
102
102
|
end
|
103
103
|
|
104
104
|
phrase.text = new_text
|
@@ -114,7 +114,7 @@ module Ixtlan
|
|
114
114
|
end
|
115
115
|
|
116
116
|
def approve
|
117
|
-
word =
|
117
|
+
word = TEXT.not_approved(:locale => Locale.default, :code => params[:id]).first
|
118
118
|
if word
|
119
119
|
word.current_user = current_user
|
120
120
|
if word.approve
|
data/lib/ixtlan/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ixtlan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mkristian
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-02-
|
12
|
+
date: 2010-02-23 00:00:00 +05:30
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|