whowish_word 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,7 @@
1
1
  if defined?(ActionController) and defined?(ActionController::Base)
2
2
  class ActionController::Base
3
+ include WhowishWord::Constant
4
+
3
5
  prepend_before_filter :initialize_whowish_word
4
6
  helper_method :whowish_word
5
7
  attr_accessor :whowish_word_config
@@ -12,6 +14,33 @@ if defined?(ActionController) and defined?(ActionController::Base)
12
14
  return @whowish_word_config
13
15
  end
14
16
 
17
+ # alias_method :previous_t, :t
18
+ # def t(uid, *variables)
19
+ # if @whowish_word_config.edit_mode == true
20
+ # s = PREFIX + \
21
+ # SEPARATOR + \
22
+ # scope_key_by_partial(uid.to_s) + \
23
+ # SEPARATOR + \
24
+ # previous_t(uid)
25
+ # return "<dfn>#{s}</dfn>".html_safe
26
+ # else
27
+ # return previous_t(uid, *variables)
28
+ # end
29
+ # end
30
+
31
+ # def ta(uid, *variables)
32
+ # if @whowish_word_config.edit_mode == true
33
+ # s = PREFIX + \
34
+ # SEPARATOR + \
35
+ # scope_key_by_partial(uid.to_s) + \
36
+ # SEPARATOR + \
37
+ # previous_t(uid)
38
+ # return s.html_safe
39
+ # else
40
+ # return previous_t(uid, *variables)
41
+ # end
42
+ # end
43
+
15
44
  # def word_for(namespace, id, *variables)
16
45
  # if @whowish_word_config.edit_mode == true
17
46
  # return WhowishWord.word_for_in_edit_mode(namespace, id, @whowish_word_config.locale, *variables)
@@ -52,7 +52,7 @@ if defined?(ActionView) and defined?(ActionView::Base)
52
52
  SEPARATOR + \
53
53
  scope_key_by_partial(uid.to_s) + \
54
54
  SEPARATOR + \
55
- previous_t(uid, *variables)
55
+ previous_t(uid)
56
56
  return "<dfn>#{s}</dfn>".html_safe
57
57
  else
58
58
  return previous_t(uid, *variables)
@@ -65,7 +65,7 @@ if defined?(ActionView) and defined?(ActionView::Base)
65
65
  SEPARATOR + \
66
66
  scope_key_by_partial(uid.to_s) + \
67
67
  SEPARATOR + \
68
- previous_t(uid, *variables)
68
+ previous_t(uid)
69
69
  return s.html_safe
70
70
  else
71
71
  return previous_t(uid, *variables)
@@ -1,6 +1,10 @@
1
1
  class HomeController < ApplicationController
2
2
 
3
3
  layout "main"
4
+
5
+ def index
6
+
7
+ end
4
8
 
5
9
  def edit_nested
6
10
  render :edit, :layout=>"nested"
@@ -37,7 +37,7 @@
37
37
 
38
38
  </span>
39
39
  <span>
40
- <b>Text: </b> <%=t :text%>
40
+ <b>Text: </b> <%=t :text, :name => "Tanin"%>
41
41
  </span>
42
42
  <span>
43
43
  <b>Bullet: </b> <ul>
data/whowish_word.gemspec CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "whowish_word"
6
- s.version = "0.5.3"
6
+ s.version = "0.5.4"
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["Tanin Na Nakorn"]
9
9
  s.email = ["tanin47@yahoo.com"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whowish_word
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: