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.
@@ -7,7 +7,7 @@ module Ixtlan
7
7
 
8
8
  def call(env)
9
9
  ['REQUEST_PATH','PATH_INFO','REQUEST_URI','SCRIPT_NAME'].each do |key|
10
- if(env[key] =~ /[.]xml$/)
10
+ if(env[key] =~ /[.]xml([?].*)?$/)
11
11
  env[key].gsub!(/^\/#{@rootpath}/, "")
12
12
  end
13
13
  end
@@ -88,7 +88,7 @@ module Ixtlan
88
88
 
89
89
  def update
90
90
  new_text = params[:phrase][:text]
91
- word = Ixtlan::Models::Text.not_approved(:locale => Locale.default, :code => params[:id]).first
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 = Ixtlan::Models::Text.latest_approved(:locale => Locale.default, :code => params[:id]).first
99
+ word = TEXT.latest_approved(:locale => Locale.default, :code => params[:id]).first
100
100
  phrase = word_to_phrase(word, :current_text)
101
- word = Ixtlan::Models::Text.new(:code => params[:id], :locale => Locale.default)
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 = Ixtlan::Models::Text.not_approved(:locale => Locale.default, :code => params[:id]).first
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
@@ -1,3 +1,3 @@
1
1
  class Ixtlan
2
- VERSION = '0.2.3'.freeze
2
+ VERSION = '0.2.4'.freeze
3
3
  end
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.3
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-03 00:00:00 +05:30
12
+ date: 2010-02-23 00:00:00 +05:30
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency