merb-admin 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -11,7 +11,7 @@ http://github.com/sferik/merb-admin/raw/master/screenshots/edit.png
11
11
  == Installation
12
12
  $ gem install merb-admin -s http://gemcutter.org
13
13
  In your app, add the following dependency to <tt>config/dependencies.rb</tt>:
14
- dependency "merb-admin", "0.7.1"
14
+ dependency "merb-admin", "0.7.2"
15
15
  Add the following route to <tt>config/router.rb</tt>:
16
16
  add_slice(:merb_admin, :path_prefix => "admin")
17
17
  Then, run the following rake task:
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.1
1
+ 0.7.2
@@ -14,13 +14,11 @@ module MerbAdmin
14
14
  end
15
15
 
16
16
  def first(options = {})
17
- merge_order!(options)
18
- model.first(options).extend(InstanceMethods)
17
+ model.first(merge_order(options)).extend(InstanceMethods)
19
18
  end
20
19
 
21
20
  def all(options = {})
22
- merge_order!(options)
23
- model.all(options)
21
+ model.all(merge_order(options))
24
22
  end
25
23
 
26
24
  def paginated(options = {})
@@ -98,10 +96,10 @@ module MerbAdmin
98
96
 
99
97
  private
100
98
 
101
- def merge_order!(options)
99
+ def merge_order(options)
102
100
  @sort ||= options.delete(:sort) || "id"
103
101
  @sort_order ||= options.delete(:sort_reverse) ? "desc" : "asc"
104
- options.merge!(:order => ["#{@sort} #{@sort_order}"])
102
+ options.merge(:order => ["#{@sort} #{@sort_order}"])
105
103
  end
106
104
 
107
105
  def association_parent_model_lookup(association)
@@ -14,13 +14,11 @@ module MerbAdmin
14
14
  end
15
15
 
16
16
  def first(options = {})
17
- merge_order!(options)
18
- model.first(options).extend(InstanceMethods)
17
+ model.first(merge_order(options)).extend(InstanceMethods)
19
18
  end
20
19
 
21
20
  def all(options = {})
22
- merge_order!(options)
23
- model.all(options)
21
+ model.all(merge_order(options))
24
22
  end
25
23
 
26
24
  def paginated(options = {})
@@ -96,10 +94,10 @@ module MerbAdmin
96
94
 
97
95
  private
98
96
 
99
- def merge_order!(options)
97
+ def merge_order(options)
100
98
  @sort ||= options.delete(:sort) || :id
101
99
  @sort_order ||= options.delete(:sort_reverse) ? :desc : :asc
102
- options.merge!(:order => [@sort.to_sym.send(@sort_order)])
100
+ options.merge(:order => [@sort.to_sym.send(@sort_order)])
103
101
  end
104
102
 
105
103
  def association_type_lookup(association)
data/lib/merb-admin.rb CHANGED
@@ -24,7 +24,7 @@ if defined?(Merb::Plugins)
24
24
 
25
25
  # Slice metadata
26
26
  self.description = "MerbAdmin is a Merb plugin that provides an easy-to-use interface for managing your data."
27
- self.version = "0.7.1"
27
+ self.version = "0.7.2"
28
28
  self.author = "Erik Michaels-Ober"
29
29
 
30
30
  # Stub classes loaded hook - runs before LoadClasses BootLoader
data/merb-admin.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{merb-admin}
8
- s.version = "0.7.1"
8
+ s.version = "0.7.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Erik Michaels-Ober"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: merb-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Michaels-Ober