rich_table_component 0.0.16 → 0.0.17

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.
@@ -1,3 +1,3 @@
1
1
  module RichTableComponent
2
- VERSION = "0.0.16"
2
+ VERSION = "0.0.17"
3
3
  end
@@ -512,13 +512,13 @@ module RichTableComponent
512
512
  respond_to do |format|
513
513
  case act
514
514
  when :create
515
- flash[:notice] ||= "#{obj.class.name.tableize} was successfully created."
515
+ flash[:notice] ||= "#{t(obj.class.name.tableize.singularize)} #{t('was_successfully_created')}."
516
516
  format.html { redirect_to controller: obj.class.name.tableize, action: :edit, id: obj.id }
517
517
  when :update
518
- flash[:notice] ||= "#{obj.class.name.tableize} was successfully updated."
518
+ flash[:notice] ||= "#{t(obj.class.name.tableize.singularize)} #{t('was_successfully_updated')}."
519
519
  format.html { redirect_to controller: obj.class.name.tableize, action: :edit, id: obj.id }
520
520
  when :destroy
521
- flash[:notice] ||= "#{obj.class.name.tableize} was successfully deleted."
521
+ flash[:notice] ||= "#{t(obj.class.name.tableize.singularize)} #{t('was_successfully_deleted')}."
522
522
  format.html { redirect_to controller: obj.class.name.tableize, action: :index }
523
523
  else
524
524
  format.html # index.html.erb
@@ -556,10 +556,10 @@ module RichTableComponent
556
556
  def format_remote(format, act = action_name, obj = instance_variable_get("@#{controller_name}"), html_redirect = nil)
557
557
  case act
558
558
  when :create
559
- flash[:notice] ||= "#{obj.class.name.tableize} was successfully created."
559
+ flash[:notice] ||= "#{t(obj.class.name.tableize.singularize)} #{t('was_successfully_created')}."
560
560
  format.html { redirect_to controller: obj.class.name.tableize, action: html_redirect.presence || :edit, id: obj.id }
561
561
  when :update
562
- flash[:notice] ||= "#{obj.class.name.tableize} was successfully updated."
562
+ flash[:notice] ||= "#{t(obj.class.name.tableize.singularize)} #{t('was_successfully_updated')}."
563
563
  format.html { redirect_to controller: obj.class.name.tableize, action: html_redirect.presence || :edit, id: obj.id }
564
564
  else
565
565
  format.html { render action: act }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rich_table_component
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-07 00:00:00.000000000 Z
12
+ date: 2013-03-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sass-rails