old_sql 1.62.0 → 1.63.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -133,16 +133,16 @@ module OldSql
|
|
133
133
|
end
|
134
134
|
|
135
135
|
def create_model_class
|
136
|
-
model_path = "#{app_path}/app/models/#{model_name.
|
136
|
+
model_path = "#{app_path}/app/models/#{model_name.singularize}.rb"
|
137
137
|
copy_file "devise_model.rb.template", model_path
|
138
|
-
gsub_file model_path, /DeviseModel/, "#{model_name.
|
138
|
+
gsub_file model_path, /DeviseModel/, "#{model_name.singularize.capitalize}"
|
139
139
|
end
|
140
140
|
|
141
141
|
def add_devise_to_routes
|
142
142
|
routes_path = "#{app_path}/config/routes.rb"
|
143
143
|
if open(routes_path).grep(/devise_for :#{model_name}/).count<=0
|
144
|
-
puts "Adding devise_for :#{model_name.
|
145
|
-
insert_into_file routes_path, " devise_for :#{model_name.
|
144
|
+
puts "Adding devise_for :#{model_name.pluralize} to #{routes_path}"
|
145
|
+
insert_into_file routes_path, " devise_for :#{model_name.pluralize}\n\n", :after => "Application.routes.draw do\n"
|
146
146
|
end
|
147
147
|
end
|
148
148
|
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: old_sql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.
|
5
|
+
version: 1.63.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Eddie Gonzales
|
@@ -198,7 +198,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
198
198
|
requirements:
|
199
199
|
- - ">="
|
200
200
|
- !ruby/object:Gem::Version
|
201
|
-
hash: -
|
201
|
+
hash: -496733640915243084
|
202
202
|
segments:
|
203
203
|
- 0
|
204
204
|
version: "0"
|