acts_as_arter_flow_object 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{acts_as_arter_flow_object}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["tim.teng"]
|
12
|
-
s.date = %q{2010-04-
|
12
|
+
s.date = %q{2010-04-19}
|
13
13
|
s.description = %q{simple progress indicator for game arters }
|
14
14
|
s.email = %q{tim.rubist@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -9,6 +9,7 @@ class ActsAsArterFlowObjectGenerator < Rails::Generator::Base
|
|
9
9
|
m.migration_template 'migration.rb', 'db/migrate',
|
10
10
|
:assigns => { :migration_name => "CreateArterFlowObjectsTable" },
|
11
11
|
:migration_file_name => "create_arter_flow_objects_table"
|
12
|
+
m.route_resources :arter_flow_objects
|
12
13
|
end
|
13
14
|
end
|
14
15
|
|
data/lib/afo/acts_as_afo.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
class ArterFlowObject < ActiveRecord::Base
|
2
2
|
|
3
|
+
default_scope :order => "created_at desc"
|
4
|
+
|
3
5
|
belongs_to :afoable, :polymorphic => true
|
4
6
|
|
5
7
|
STEPS = [:design, :model, :map, :rig]
|
@@ -10,4 +12,8 @@ class ArterFlowObject < ActiveRecord::Base
|
|
10
12
|
EOF
|
11
13
|
end
|
12
14
|
|
15
|
+
def self.afo_types_for_select
|
16
|
+
find(:all, :select => "DISTINCT afoable_type").inject([]){|ary,rcd| tipe = rcd.call(:afoable_type); ary << [Kernel.const_get(tipe).human_name,tipe]}
|
17
|
+
end
|
18
|
+
|
13
19
|
end
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
7
|
+
- 2
|
8
8
|
- 0
|
9
|
-
version: 0.
|
9
|
+
version: 0.2.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- tim.teng
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-04-
|
17
|
+
date: 2010-04-19 00:00:00 +08:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|