sugar 0.0.25 → 0.0.26

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -49,4 +49,4 @@ rescue LoadError
49
49
  end
50
50
 
51
51
  desc "Bump patch version and release to github and gemcutter"
52
- task :bump => %w(version:bump:patch release gemcutter:release)
52
+ task :bump => %w(version:bump:patch release gemcutter:release install)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.25
1
+ 0.0.26
@@ -15,9 +15,9 @@ module Sugar
15
15
  when 'index'
16
16
  controller_name.camelize
17
17
  when 'new', 'create'
18
- t("#{t('new', :default => 'New')} #{controller_name.classify.constantize.human_name}")
18
+ "#{t('new', :default => 'New')} #{controller_name.classify.constantize.human_name}"
19
19
  when 'edit', 'update'
20
- t("#{t('editing', :default => 'Editing')} #{controller_name.classify.constantize.human_name}")
20
+ "#{t('edit', :default => 'Editing')} #{controller_name.classify.constantize.human_name}"
21
21
  else
22
22
  t("#{controller_name}.#{view_name}.title")
23
23
  end
@@ -41,7 +41,7 @@ module Sugar
41
41
  # Put submit with proper text
42
42
  def submit(form, title = nil)
43
43
  title ||= t("#{controller.controller_name}.#{view_name}.submit",
44
- :default => form.object.new_record? ? "#{t('add', :default => 'Add')} #{form.object.class.human_name}" : "#{t('save', :default => 'Save')} #{form.object.class.human_name}")
44
+ :default => form.object.new_record? ? "#{t('create', :default => 'Add')} #{form.object.class.human_name}" : "#{t('update', :default => 'Save')} #{form.object.class.human_name}")
45
45
  form.submit(title)
46
46
  end
47
47
 
@@ -110,7 +110,7 @@ module Sugar
110
110
 
111
111
  def image_button_to_delete(something)
112
112
  image_to('icons/delete.png',
113
- t('.delete'),
113
+ t('.delete', :default => 'Delete'),
114
114
  polymorphic_path(something),
115
115
  :class => 'delete action',
116
116
  :method => :delete,
@@ -119,8 +119,8 @@ module Sugar
119
119
 
120
120
  def link_to_delete(something)
121
121
  link_to(image_tag('icons/delete.png',
122
- :alt => t('.delete'),
123
- :title => t('.delete')),
122
+ :alt => t('.delete', :default => 'Delete'),
123
+ :title => t('.delete', :default => 'Delete')),
124
124
  polymorphic_path(something),
125
125
  :class => 'ajax action delete')
126
126
  end
@@ -128,8 +128,8 @@ module Sugar
128
128
  def default_new_link_options
129
129
  @default_new_link_options ||= {
130
130
  :image => 'icons/add.png',
131
- :alt => t('.add'),
132
- :title => t('.add')
131
+ :alt => t('.add', :default => 'Add'),
132
+ :title => t('.add', :default => 'Add')
133
133
  }
134
134
  end
135
135
 
data/sugar.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sugar}
8
- s.version = "0.0.25"
8
+ s.version = "0.0.26"
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"]
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.25
4
+ version: 0.0.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Semyonov