admin_assistant 2.2.4 → 2.2.5

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -13,6 +13,6 @@ needed in admin interfaces. Current features include:
13
13
  * Live querying of models to generate forms and indexes, meaning that adding
14
14
  new columns to your admin controllers is easy
15
15
  * Simple handling of belongs_to association via drop-down selects
16
- * Built-in support for Paperclip and FileColumn
16
+ * Built-in support for Paperclip
17
17
 
18
18
  Copyright (c) 2009 Francis Hwang, released under the MIT license
data/Rakefile CHANGED
@@ -2,9 +2,8 @@ require 'grancher/task'
2
2
  require 'rake'
3
3
  require 'rake/testtask'
4
4
  require 'rake/rdoctask'
5
- require 'spec/rake/spectask'
6
5
 
7
- desc 'Default: run all specs across all supported Rails gem versions.'
6
+ desc 'Default: run all tests across all supported Rails gem versions.'
8
7
  task :default => :test
9
8
 
10
9
  # run with rake publish
@@ -24,7 +23,7 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
24
23
  rdoc.rdoc_files.include('lib/**/*.rb')
25
24
  end
26
25
 
27
- desc 'Run all specs across all supported Rails gem versions.'
26
+ desc 'Run all tests across all supported Rails gem versions.'
28
27
  task :test do
29
28
  base = Dir.pwd
30
29
  version_dirs = %w(rails_3_0 rails_3_0_mysql rails_3_1)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.2.4
1
+ 2.2.5
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{admin_assistant}
8
- s.version = "2.2.4"
8
+ s.version = "2.2.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Francis Hwang"]
12
- s.date = %q{2011-12-17}
12
+ s.date = %q{2012-02-11}
13
13
  s.description = %q{admin_assistant is a Rails plugin that automates a lot of features typically needed in admin interfaces.}
14
14
  s.email = %q{sera@fhwang.net}
15
15
  s.extra_rdoc_files = [
@@ -100,7 +100,7 @@ class AdminAssistant
100
100
  @controller, @record_params = controller, record_params
101
101
  @model_class_symbol = record.class.name.underscore.to_sym
102
102
  @record_params ||= @controller.params[@model_class_symbol]
103
- @model_methods = record.methods
103
+ @model_methods = record.methods.map(&:to_sym)
104
104
  @model_columns = record.class.columns
105
105
  @errors = Errors.new
106
106
  build_from_split_params
@@ -173,7 +173,7 @@ class AdminAssistant
173
173
 
174
174
  def model_setter?(attr)
175
175
  @model_columns.any? { |mc| mc.name.to_s == attr } or
176
- @model_methods.include?("#{attr}=")
176
+ @model_methods.include?("#{attr}=".to_sym)
177
177
  end
178
178
 
179
179
  def split_param_key?(key)
@@ -186,8 +186,10 @@ class AdminAssistant
186
186
  def supports_action?(action)
187
187
  @memoized_action_booleans ||= {}
188
188
  unless @memoized_action_booleans.has_key?(action)
189
- @memoized_action_booleans[action] =
190
- @controller_class.public_instance_methods.include?(action)
189
+ @memoized_action_booleans[action] =
190
+ @controller_class.public_instance_methods.any? { |meth|
191
+ meth.to_sym == action.to_sym
192
+ }
191
193
  end
192
194
  @memoized_action_booleans[action]
193
195
  end
@@ -10,7 +10,7 @@ GIT
10
10
  PATH
11
11
  remote: ../../admin_assistant
12
12
  specs:
13
- admin_assistant (2.2.3)
13
+ admin_assistant (2.2.4)
14
14
  dynamic_form
15
15
  will_paginate (~> 3.0)
16
16
 
@@ -87,7 +87,7 @@ GEM
87
87
  polyglot
88
88
  polyglot (>= 0.3.1)
89
89
  tzinfo (0.3.31)
90
- will_paginate (3.0.2)
90
+ will_paginate (3.0.3)
91
91
 
92
92
  PLATFORMS
93
93
  ruby
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: admin_assistant
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 2
9
- - 4
10
- version: 2.2.4
9
+ - 5
10
+ version: 2.2.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Francis Hwang
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-12-17 00:00:00 -05:00
18
+ date: 2012-02-11 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency