stager 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Stager is a Rails 3.1 gem to create scaffolds, controllers and models. The files created are specific to 45north's needs. This is a webdevelopment agency in Amsterdam, The Netherlands.
4
4
 
5
- version 0.2.1
5
+ version 0.2.2
6
6
  Robin Brouwer
7
7
  45north
8
8
 
@@ -1,6 +1,6 @@
1
1
  class Create<%= class_name.pluralize.delete('::') %> < ActiveRecord::Migration
2
2
  def self.up
3
- create_table :<%= table_name || plural_name.split('/').last %> do |t|
3
+ create_table :<%= table_name %> do |t|
4
4
  <%- model_attributes.each do |attribute| -%>
5
5
  t.<%= attribute.type %> :<%= attribute.name %>
6
6
  <%- end -%>
@@ -11,6 +11,6 @@ class Create<%= class_name.pluralize.delete('::') %> < ActiveRecord::Migration
11
11
  end
12
12
 
13
13
  def self.down
14
- drop_table :<%= table_name || plural_name.split('/').last %>
14
+ drop_table :<%= table_name %>
15
15
  end
16
16
  end
@@ -1,3 +1,3 @@
1
1
  class <%= class_name %> < ActiveRecord::Base
2
- <%= " set_table_name :#{table_name}\n" if table_name -%>
2
+ <%= " set_table_name :#{table_name}\n" if class_name.include?("::") -%>
3
3
  end
@@ -1,3 +1,3 @@
1
1
  module Stager
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stager
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 1
10
- version: 0.2.1
9
+ - 2
10
+ version: 0.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Robin Brouwer