bootstrap_admin 0.0.14 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
@@ -134,6 +134,10 @@ module BootstrapAdminHelper
134
134
  defaults = {:controller => params[:controller]}.merge options
135
135
 
136
136
  ctrl_namespace = defaults[:controller].split("/").first
137
+ # Fix for engines with shared namespace for some reason main_app.url_for doesn't find the route without this "/"
138
+ # It consider the route inside of engine instead of main app.
139
+ defaults[:controller] = "/#{defaults[:controller]}"
140
+
137
141
  if instance_eval "defined? #{ctrl_namespace}"
138
142
  instance_eval("#{ctrl_namespace}.method :url_for").call defaults
139
143
  else
@@ -265,7 +269,8 @@ module BootstrapAdminHelper
265
269
  # @return [String] The attribute name translated
266
270
  def real_attribute_name attribute
267
271
  if attribute.match /(.+)_(?:id)(s)?$/
268
- "#{$1}#{$2}".to_sym
272
+ ($2 ? $1.pluralize : $1).to_sym
273
+ # "#{$1}#{$2}".to_sym
269
274
  else
270
275
  attribute.to_sym
271
276
  end
@@ -1,3 +1,3 @@
1
1
  module BootstrapAdmin
2
- VERSION = "0.0.14"
2
+ VERSION = "0.0.15"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-05-22 00:00:00.000000000 Z
13
+ date: 2013-05-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails