sugar 0.0.28 → 0.0.29

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -6,8 +6,8 @@ begin
6
6
  Jeweler::Tasks.new do |gem|
7
7
  gem.name = "sugar"
8
8
  gem.summary = %Q{Some sugar for rails apps}
9
- gem.email = "rotuka@rotuka.com"
10
- gem.homepage = "http://github.com/rotuka/sugar"
9
+ gem.email = "rotuka@tokak.ru"
10
+ gem.homepage = "http://github.com/krasivotokak/sugar"
11
11
  gem.authors = ["Alexander Semyonov"]
12
12
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
13
13
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.28
1
+ 0.0.29
@@ -29,7 +29,7 @@ module Sugar
29
29
  @page_title = if title
30
30
  title
31
31
  else
32
- @page_title || t("#{controller_name}.#{view_name}.title", :default => default_page_title)
32
+ @page_title || t("#{controller_name}.#{view_name}.title", :default => Rails.env.production? ? default_page_title : nil)
33
33
  end
34
34
  end
35
35
 
@@ -40,8 +40,13 @@ module Sugar
40
40
 
41
41
  # Put submit with proper text
42
42
  def submit(form, title = nil)
43
- title ||= t("#{controller.controller_name}.#{view_name}.submit",
44
- :default => form.object.new_record? ? "#{t('krasivotokak.sugar.create', :default => 'Add')} #{form.object.class.human_name}" : "#{t('krasivotokak.sugar.update', :default => 'Save')} #{form.object.class.human_name}")
43
+ title ||= t("#{form.object.class.name.tableize}.#{form.object.new_record? ? :new : :edit}.submit",
44
+ :default => Rails.env.production? ?
45
+ (form.object.new_record? ?
46
+ "#{t('krasivotokak.sugar.create', :default => 'Add')} #{form.object.class.human_name}" :
47
+ "#{t('krasivotokak.sugar.update', :default => 'Save')} #{form.object.class.human_name}") :
48
+ nil
49
+ )
45
50
  form.submit(title)
46
51
  end
47
52
 
data/sugar.gemspec CHANGED
@@ -5,12 +5,12 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sugar}
8
- s.version = "0.0.28"
8
+ s.version = "0.0.29"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Alexander Semyonov"]
12
12
  s.date = %q{2009-09-01}
13
- s.email = %q{rotuka@rotuka.com}
13
+ s.email = %q{rotuka@tokak.ru}
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE",
16
16
  "README.rdoc"
@@ -33,7 +33,7 @@ Gem::Specification.new do |s|
33
33
  "test/sugar_test.rb",
34
34
  "test/test_helper.rb"
35
35
  ]
36
- s.homepage = %q{http://github.com/rotuka/sugar}
36
+ s.homepage = %q{http://github.com/krasivotokak/sugar}
37
37
  s.rdoc_options = ["--charset=UTF-8"]
38
38
  s.require_paths = ["lib"]
39
39
  s.rubygems_version = %q{1.3.5}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sugar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.28
4
+ version: 0.0.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Semyonov
@@ -14,7 +14,7 @@ default_executable:
14
14
  dependencies: []
15
15
 
16
16
  description:
17
- email: rotuka@rotuka.com
17
+ email: rotuka@tokak.ru
18
18
  executables: []
19
19
 
20
20
  extensions: []
@@ -40,7 +40,7 @@ files:
40
40
  - test/sugar_test.rb
41
41
  - test/test_helper.rb
42
42
  has_rdoc: true
43
- homepage: http://github.com/rotuka/sugar
43
+ homepage: http://github.com/krasivotokak/sugar
44
44
  licenses: []
45
45
 
46
46
  post_install_message: