Skip to content
Browse files

Move to using app/views/application over app/views/shared for new rai…

…ls 3.1 convention fixes #86
  • Loading branch information...
1 parent d552472 commit 8f459734ea8c011aa73f73a9b846a14522e037b6 @drapergeek drapergeek committed
View
8 lib/suspenders/app_builder.rb
@@ -27,16 +27,16 @@ def setup_staging_environment
run "cp config/environments/production.rb config/environments/staging.rb"
end
- def create_views_shared
- empty_directory "app/views/shared"
+ def create_partials_directory
+ empty_directory "app/views/application"
end
def create_shared_flashes
- copy_file "_flashes.html.erb", "app/views/shared/_flashes.html.erb"
+ copy_file "_flashes.html.erb", "app/views/application/_flashes.html.erb"
end
def create_shared_javascripts
- copy_file "_javascript.html.erb", "app/views/shared/_javascript.html.erb"
+ copy_file "_javascript.html.erb", "app/views/application/_javascript.html.erb"
end
def create_application_layout
View
2 lib/suspenders/generators/app_generator.rb
@@ -58,7 +58,7 @@ def setup_staging_environment
def create_suspenders_views
say "Creating suspenders views"
- build(:create_views_shared)
+ build(:create_partials_directory)
build(:create_shared_flashes)
build(:create_shared_javascripts)
build(:create_application_layout)
View
4 templates/suspenders_layout.html.erb.erb
@@ -15,8 +15,8 @@
<%%= link_to "Sign in", sign_in_path %>
<%% end -%>
</header>
- <%%= render 'shared/flashes' -%>
+ <%%= render 'flashes' -%>
<%%= yield %>
- <%%= render 'shared/javascript' %>
+ <%%= render 'javascript' %>
</body>
</html>

0 comments on commit 8f45973

Please sign in to comment.
Something went wrong with that request. Please try again.