diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index ccf812e34..7551f3f1a 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -5,6 +5,7 @@ class ApplicationController < ActionController::Base respond_to :html before_action :set_locale + layout :set_layout # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. @@ -22,8 +23,17 @@ class ApplicationController < ActionController::Base I18n.locale = session[:locale] end + def set_layout + if devise_controller? + "devise" + else + "application" + end + end + def verify_captcha?(resource) return true unless recaptcha_keys? verify_recaptcha(model: resource) end + end diff --git a/app/views/layouts/devise.html.erb b/app/views/layouts/devise.html.erb new file mode 100644 index 000000000..e65fde2e7 --- /dev/null +++ b/app/views/layouts/devise.html.erb @@ -0,0 +1,28 @@ + + + + + + + <%= content_for?(:title) ? yield(:title) : "Participación" %> + <%= stylesheet_link_tag "application" %> + <%= javascript_include_tag "vendor/modernizr" %> + <%= javascript_include_tag "application", 'data-turbolinks-track' => true %> + <%= csrf_meta_tags %> + + + + + + <% if notice %> +

<%= notice %>

+ <% end %> + + <% if alert %> +

<%= alert %>

+ <% end %> + + <%= yield %> + + + \ No newline at end of file