moveable 0.0.13 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -29,5 +29,19 @@ module Moveable
29
29
  # object.class.to_s.pluralize.downcase
30
30
  object.class.table_name
31
31
  end
32
+
33
+ def movable_css_classes(object)
34
+ classes = []
35
+ classes << 'movable-first' if object.first?
36
+ classes << 'movable-last' if object.last?
37
+ classes.join(' ')
38
+ end
39
+
40
+ def nested_movable_css_classes(object)
41
+ classes = []
42
+ classes << 'movable-first' if object.left_sibling.nil?
43
+ classes << 'movable-last' if object.right_sibling.nil?
44
+ classes.join(' ')
45
+ end
32
46
  end
33
47
  end
@@ -1,3 +1,3 @@
1
1
  module Moveable
2
- VERSION = "0.0.13"
2
+ VERSION = "0.0.14"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moveable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-23 00:00:00.000000000 Z
12
+ date: 2013-07-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
86
  version: '0'
87
87
  requirements: []
88
88
  rubyforge_project:
89
- rubygems_version: 1.8.23
89
+ rubygems_version: 1.8.19
90
90
  signing_key:
91
91
  specification_version: 3
92
92
  summary: Move object up and down with Rails and nested set tree