Permalink
Browse files

Remove resource css generation

  • Loading branch information...
1 parent c71c278 commit 06e9b72f6ba3ca97f40d41da6609b8406bd6c60a @dizzy42 committed Jan 5, 2012
@@ -14,10 +14,6 @@ def create_master_stylesheet
template "slouch.css.scss", "app/assets/stylesheets/slouch.css.scss"
end
- def create_resource_stylesheet
- template "resource.css.scss", "app/assets/stylesheets/#{rails_collection_name}.css.scss"
- end
-
end
end
end
@@ -1,6 +1,6 @@
class <%= %>.IndexView extends Backbone.View
initialize: function() {
- _.bindAll(this, "render", "removeLoadMoreButton");
+ _.bindAll(this, "render");
this.options.<%= backbone_collection_name %>.bind("reset");
},
@@ -1 +1,16 @@
-file
+class <%= %>.IndexView extends Backbone.View
+ initialize: function() {
+ _.bindAll(this, "render");
+
+ this.options.<%= backbone_collection_name %>.bind("reset");
+ },
+
+ render: function() {
+ $(this.el).html(this.template(<%= backbone_collection_name %>: this.options.<%= backbone_collection_name %>.toJSON() ));
+
+ return this;
+ }
+
+ return public_;
+
+})
@@ -96,7 +96,6 @@ class ScaffoldGeneratorTest < ::Rails::Generators::TestCase
test "should create the slouch stylesheets" do
run_generator
assert_file "app/assets/stylesheets/slouch.css.scss"
- assert_file "app/assets/stylesheets/#{MODEL_NAME.underscore.pluralize}.css.scss"
end
private
@@ -16,8 +16,4 @@ class StylesheetGeneratorTest < ::Rails::Generators::TestCase
assert_file "app/assets/stylesheets/slouch.css.scss"
end
- test "it should create the resource stylesheet" do
- run_generator
- assert_file "app/assets/stylesheets/#{MODEL_NAME.underscore.pluralize}.css.scss"
- end
end
@@ -27,6 +27,8 @@ class ViewsGeneratorTest < ::Rails::Generators::TestCase
test "should create backbone show view" do
run_generator
assert_file "app/assets/javascripts/views/#{MODEL_NAME}s/show.js"
+ assert_file "app/assets/javascripts/views/#{MODEL_NAME}s/show.js",
+ /render: /
end
test "should create backbone edit view" do

0 comments on commit 06e9b72

Please sign in to comment.