angularjs_scaffold 0.0.17 → 0.0.18
Sign up to get free protection for your applications and to get access to all the features.
@@ -37,9 +37,9 @@ module Angularjs
|
|
37
37
|
def generate
|
38
38
|
remove_file "app/assets/stylesheets/scaffolds.css.scss"
|
39
39
|
append_to_file "app/assets/javascripts/application.js",
|
40
|
-
"//= require #{@plural_model_name}_controller"
|
40
|
+
"//= require #{@plural_model_name}_controller \n"
|
41
41
|
append_to_file "app/assets/javascripts/application.js",
|
42
|
-
"//= require #{@plural_model_name}"
|
42
|
+
"//= require #{@plural_model_name} \n"
|
43
43
|
insert_into_file "app/assets/javascripts/routes.js.erb",
|
44
44
|
", '#{@plural_model_name}'", :after => "'ngCookies'"
|
45
45
|
insert_into_file "app/assets/javascripts/routes.js.erb",
|
@@ -5,8 +5,8 @@ function <%= @controller%>IndexCtrl($scope, <%= @model_name%>) {
|
|
5
5
|
dconfirm = confirm('Are you sure?');
|
6
6
|
if(dconfirm){
|
7
7
|
var original = this.<%= @resource_name%>
|
8
|
-
this
|
9
|
-
$scope
|
8
|
+
this.<%= @model_name%>.destroy(function() {
|
9
|
+
$scope.<%= @plural_model_name %> = _.without($scope.<%= @plural_model_name%>, original);
|
10
10
|
});
|
11
11
|
}
|
12
12
|
};
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: angularjs_scaffold
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.18
|
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: 2012-10-
|
12
|
+
date: 2012-10-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|