avo-setup 0.0.23 → 0.0.25

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "0.0.23"
2
+ VERSION = "0.0.25"
3
3
  end
@@ -21,9 +21,11 @@ module Avo
21
21
  gem("cancan")
22
22
  copy_file "ability.rb", "models/ability.rb"
23
23
  @single=model_name
24
+ inject_into_class "app/models/"+@single.underscore+".rb", "has_and_belongs_to_many :roles\n"
24
25
  @plural=model_name.pluralize
25
- @migname=@plural+"_roles" if (@plural.casecmp "roles")>=0
26
- @migname="roles_"+@plural if (@plural.casecmp "roles")<0
26
+ template "role.rb", "app/models/role.rb"
27
+ @migname=@plural+"_roles" if (@plural.casecmp "roles")<0
28
+ @migname="roles_"+@plural if (@plural.casecmp "roles")>=0
27
29
 
28
30
  migration_template 'create_roles_migration.rb', "db/migrate/create_roles.rb"
29
31
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 23
9
- version: 0.0.23
8
+ - 25
9
+ version: 0.0.25
10
10
  platform: ruby
11
11
  authors:
12
12
  - Avocado