edgarj 0.01.24 → 0.01.25

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 44b8ac432896b422487264012ce5a5912c4e433e
4
- data.tar.gz: d598b3e628cb44d8f5d1eed92b0824c333ec7f80
3
+ metadata.gz: 658e0b7f72cce3b752878201a4bc05619c1169b0
4
+ data.tar.gz: 6c631f1a026eef2cf7d290a51afea654f048bd02
5
5
  SHA512:
6
- metadata.gz: 761b2e0fc1c84ebbb801161f5bcf899e916241a0e4080dbf74d80a1c5a46ceb185ab6b530a09c6f8020476b63d532ad0ad2f55a8a6b8024735fc7fdaa0c3c97d
7
- data.tar.gz: 4eaadadb89f92ad1df0fba63019efd2d785e321950d34a5b2824d2d0c58dec522d16999e9fb4790d3268330a4599f9dc5d9068af88768ab208e950d7716fa6a1
6
+ metadata.gz: 9bfef93d8ac4be2640e2d1b81461f8eee8d2ff2804f19ed14c019006650166845136f0f6d08ad873b5cb3cb2ff2ee6cb9259e4400d375cb08a8cbd59bbf640a2
7
+ data.tar.gz: 6b5cbd0a802231ce45a368ea8fa001bffcb8e9958bc2bbf07f2ea53707b6865ca3ed9a60dd5ad6f13ef2bf496d08816f66e8399e4a160481aca6f540b065f7e4
@@ -55,9 +55,9 @@ module Edgarj
55
55
  #
56
56
  def v(key)
57
57
  t(key,
58
- scope: "view.#{controller_name}",
58
+ scope: "view.#{controller_path}",
59
59
  default: I18n.t(key,
60
- scope: "edgarj.view.#{controller_name}",
60
+ scope: "edgarj.view.#{controller_path}",
61
61
  default: I18n.t(key,
62
62
  scope: 'edgarj.default',
63
63
  default: key.camelize)))
@@ -54,7 +54,14 @@ module Edgarj
54
54
  # delete button
55
55
  content_tag(:td) do
56
56
  button_to(t('edgarj.default.delete'),
57
- polymorphic_path([options[:namespace], @record]),
57
+ if @record.new_record?
58
+ url_for('/')
59
+ else
60
+ url_for({
61
+ controller: params[:controller],
62
+ action: 'destroy',
63
+ id: @record.id})
64
+ end,
58
65
  {
59
66
  method: :delete,
60
67
  remote: true,
@@ -1,3 +1,3 @@
1
1
  module Edgarj
2
- VERSION = "0.01.24"
2
+ VERSION = "0.01.25"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: edgarj
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.01.24
4
+ version: 0.01.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fuminori Ido
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-26 00:00:00.000000000 Z
11
+ date: 2015-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails