diff --git a/lib/generators/draft/account/account_generator.rb b/lib/generators/draft/account/account_generator.rb index 45fda60..539515f 100644 --- a/lib/generators/draft/account/account_generator.rb +++ b/lib/generators/draft/account/account_generator.rb @@ -91,7 +91,8 @@ def authentication_helpers before_action(:load_current_#{singular_table_name.underscore}) - # Uncomment this if you want to force #{plural_table_name} to sign in before any other actions + # Uncomment the "before_action" if you want to force #{plural_table_name} to sign in before any other actions + # Remember to also uncomment the "skip_before_action" in the corresponding authentication controller # before_action(:force_#{singular_table_name.underscore}_sign_in) def load_current_#{singular_table_name.underscore} diff --git a/lib/generators/draft/account/templates/controllers/authentication_controller.rb b/lib/generators/draft/account/templates/controllers/authentication_controller.rb index b91141e..f888a77 100644 --- a/lib/generators/draft/account/templates/controllers/authentication_controller.rb +++ b/lib/generators/draft/account/templates/controllers/authentication_controller.rb @@ -1,7 +1,8 @@ class <%= class_name.singularize %>AuthenticationController < ApplicationController # Uncomment this if you want to force <%= plural_table_name %> to sign in before any other actions # skip_before_action(:force_<%= singular_table_name.underscore %>_sign_in, { :only => [:sign_up_form, :create, :sign_in_form, :create_cookie] }) - + # Remember to also uncomment the "before_action" in the ApplicationController + def sign_in_form render({ :template => "<%= singular_table_name.underscore %>_authentication/sign_in.html.erb" }) end diff --git a/lib/generators/draft/resource/templates/views/index.html.erb b/lib/generators/draft/resource/templates/views/index.html.erb index b153d82..7688ebc 100644 --- a/lib/generators/draft/resource/templates/views/index.html.erb +++ b/lib/generators/draft/resource/templates/views/index.html.erb @@ -1,15 +1,10 @@ -
-
-

- List of all <%= plural_table_name.humanize.downcase %> -

-
-
+

+ List of all <%= plural_table_name.humanize.downcase %> +

+
-
-

Add a new <%= singular_table_name.humanize.downcase %>

@@ -50,8 +45,7 @@ Create <%= singular_table_name.humanize.downcase %> -
-
+
<% if with_sentinels? -%> @@ -66,8 +60,7 @@
<% end -%> -
-
+ <%% end %>
@@ -142,7 +135,5 @@
-
-

diff --git a/lib/generators/draft/resource/templates/views/show.html.erb b/lib/generators/draft/resource/templates/views/show.html.erb index 1bddf31..2ba15ab 100644 --- a/lib/generators/draft/resource/templates/views/show.html.erb +++ b/lib/generators/draft/resource/templates/views/show.html.erb @@ -1,10 +1,9 @@ -
-
-

- <%= singular_table_name.humanize %> #<%%= @the_<%= singular_table_name %>.id %> details -

-
+

+ <%= singular_table_name.humanize %> #<%%= @the_<%= singular_table_name %>.id %> details +

+ +
Go back @@ -24,7 +23,6 @@ <% end -%> <% end -%> -
<% attributes.each do |attribute| -%> @@ -68,8 +66,6 @@ <% end -%>
-
-

@@ -79,11 +75,9 @@ <% end -%> -
-
-

- Edit <%= singular_table_name.humanize.downcase %> -

+

+ Edit <%= singular_table_name.humanize.downcase %> +

method="post" <% end -%>> <% attributes.each do |attribute| -%> @@ -124,7 +118,5 @@ Update <%= singular_table_name.humanize.downcase %>
-
-