my_admin 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OGJjMDhlNTQxM2NkYWY4ZDQxODYwZTUzOGMxNThiNjA1MDBlZjEyZA==
4
+ NTQzYzBiY2MyZWVjZjEyZWVmODcyMDFmOGY1MTliMGY0ZTgxZDIzOA==
5
5
  data.tar.gz: !binary |-
6
- YTQ0ZWVhYTE0Y2RmOGYyYTExMDdhOWI4OWNlNjY5NDg5MjEwZTI3MA==
6
+ MGE2OTkzZDYzODRjNjlmY2MwZTIwNjVkOGU5ZjdiZDU1YjhkNmQ5Nw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NzZhYTUxZDk1M2I2ZjZiMWEwMGU3ZDA2Y2ZjZDVkMzYxNDg2OWZjYTQwMDQ4
10
- Y2ZlNGEzOTBhYWQ4MDVmNWZiOTUxMzYxNmU2N2ExNzEzMGM4NWZjNjg4M2Ey
11
- ZWU1MzJiYThmY2NkODAwOTUwNGI2MTVkMWVhMGFjMzhjZTk4YWM=
9
+ YTMzNjdkYzY0Yjk4NDlkMTE4ZmMzNDUzYzJmNDNjZTNiNzg4Y2NjZTllZmFk
10
+ NmZlOTJiMDQyYjZiYzI0ZDJjOGJlYTc1ODM3NzcyM2RmYjY2NWMzYTNhZmQ3
11
+ ZGFkN2I1MTA1ZGRkZDhkNmQ2YmQyNDU1NjYzY2M3ODRmNDBkZDA=
12
12
  data.tar.gz: !binary |-
13
- M2UxY2Y1MTA3YjAwZDE2MDE3ZTYwMjIyMjA3Njg0ZTRjODA2NWQzNzAzNTNi
14
- NWIwMmE5MGQxZDdhM2U4Yjc5ZDJhYWZiMTQyNDQzZGJmMDkxZDAxZDMwMjIw
15
- N2I5M2E3NDhhNDM1NGRjMTg3MjdkZWY2ZTA3YWFlMWMwMzM3ZjU=
13
+ ZjQyZjkwMjYxNjM4MTE3ZjU4ZmEzMjAzNGZlZDAxMjdjZWFiNWUxNGM3ZjUy
14
+ ZDMyMjMwMTBkYmQ4NDJiNTBiMzQxMGMwOGI4NDJiMzZiMTdlOTNlY2I5OGVi
15
+ MzMxYmRmZTFlZTJlMTFlM2U4MzY0NmYwYWFiODNlZGI3MWU2MzY=
@@ -160,7 +160,7 @@ class MyAdmin::ModelsController < MyAdmin::MyAdminController
160
160
  end
161
161
  end
162
162
 
163
- @collection ||= @model.reflections[params[:field].to_sym].klass.where(params[:fk_id].to_sym => params[:value]).map { |i| [i.to_s, i.id] }
163
+ @collection ||= @model.reflections[params[:field].to_s].klass.where(params[:fk_id].to_sym => params[:value]).map { |i| [i.to_s, i.id] }
164
164
  render_model_template(:remote)
165
165
  end
166
166
 
@@ -20,7 +20,7 @@ module MyAdminFieldHelper
20
20
  unless block.blank?
21
21
  collection = instance_exec object, &(block)
22
22
  else
23
- collection ||= model.reflections[field.to_sym].klass.all.map { |i| [i.to_s, i.id] } unless model.reflections[field.to_sym].blank?
23
+ collection ||= model.reflections[field.to_s].klass.all.map { |i| [i.to_s, i.id] } unless model.reflections[field.to_s].blank?
24
24
  end
25
25
  collection ||= []
26
26
  collection
@@ -44,7 +44,7 @@ module MyAdminFieldHelper
44
44
 
45
45
  object_type = object.send(field).class.name.underscore unless object.blank?
46
46
  object_type = column.type unless column.blank?
47
- object_type = model.reflections[field.to_sym].macro if model.reflections.has_key? field.to_sym
47
+ object_type = model.reflections[field.to_s].macro if model.reflections.has_key? field.to_s
48
48
  object_type = field_setting(model, field, :type) unless field_setting(model, field, :type).blank?
49
49
  object_type
50
50
 
@@ -56,7 +56,7 @@ module MyAdminFieldHelper
56
56
 
57
57
  object_type = object.send(field).class.name.underscore unless object.blank?
58
58
  object_type = column.type unless column.blank?
59
- object_type = model.reflections[field.to_sym].macro if model.reflections.has_key? field.to_sym
59
+ object_type = model.reflections[field.to_s].macro if model.reflections.has_key? field.to_s
60
60
  object_type = field_setting(model, field, :type) unless field_setting(model, field, :type).blank?
61
61
  object_type = field_setting(model, field, :filter_type) unless field_setting(model, field, :filter_type).blank?
62
62
  object_type
@@ -1,5 +1,5 @@
1
1
  <%
2
- @collection = model.reflections[field.to_sym].klass.all
2
+ @collection = model.reflections[field.to_s].klass.all
3
3
  @field_name = "#{field.to_s.singularize}_ids"
4
4
  @collection_selected = object.send(field)
5
5
 
@@ -1,5 +1,5 @@
1
1
  <%
2
- @collection = model.reflections[field.to_sym].klass.all
2
+ @collection = model.reflections[field.to_s].klass.all
3
3
  @field_name = "#{field.to_s.singularize}_ids"
4
4
 
5
5
  @options = @collection.map { |i| [i.to_s, i.id] }
@@ -1,6 +1,6 @@
1
- <% has_many_model = model.reflections[field.to_sym].klass %>
1
+ <% has_many_model = model.reflections[field.to_s].klass %>
2
2
 
3
- <% limit = model.reflections[field.to_sym].options[:limit] || 0 %>
3
+ <% limit = model.reflections[field.to_s].options[:limit] || 0 %>
4
4
 
5
5
  <% can_destroy = field_setting(model, field, :can_destroy) %>
6
6
  <% can_add = field_setting(model, field, :can_add) %>
@@ -1,4 +1,4 @@
1
- <% has_many_model = model.reflections[field.to_sym].klass %>
1
+ <% has_many_model = model.reflections[field.to_s].klass %>
2
2
  <% @locales ||= MyAdmin::Locale.all %>
3
3
  <div class="tabs">
4
4
  <ul>
@@ -1,5 +1,5 @@
1
1
  <% type = "default" %>
2
- <% type = model.reflections[field.to_sym].macro if model.reflections.has_key? field.to_sym %>
2
+ <% type = model.reflections[field.to_s].macro if model.reflections.has_key? field.to_s %>
3
3
  <% klass = field_setting(model, field, :class) %>
4
4
 
5
5
  <%= form.text_field field, :disabled => true, :class => klass %>
@@ -1,3 +1,3 @@
1
1
  module MyAdmin
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
data/my_admin.gemspec CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
15
15
  s.rubyforge_project = "my_admin"
16
16
  s.required_ruby_version = ">= 1.9.3"
17
17
 
18
- s.add_dependency "rails", "~> 4"
18
+ s.add_dependency "rails", "~> 4.2.1"
19
19
  s.add_dependency "breadcrumbs" , "~> 0.1"
20
20
  s.add_dependency "dynamic_form" , "~> 1.1"
21
21
  s.add_dependency "paperclip" , "~> 4.2"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: my_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcos Vinicius von Gal dos Santos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-07 00:00:00.000000000 Z
11
+ date: 2015-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: '4'
19
+ version: 4.2.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ~>
25
25
  - !ruby/object:Gem::Version
26
- version: '4'
26
+ version: 4.2.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: breadcrumbs
29
29
  requirement: !ruby/object:Gem::Requirement