From 64f2f360ec9c27aa9c7545d8ab4678c0af3eaa6c Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Thu, 19 Jan 2017 11:37:48 +0000 Subject: Add encoding line to Ruby files Fixes https://github.com/mysociety/alavetelitheme/issues/69. --- lib/alavetelitheme.rb | 1 + lib/config/custom-routes.rb | 1 + lib/controller_patches.rb | 1 + lib/customstates.rb | 1 + lib/model_patches.rb | 1 + lib/patch_mailer_paths.rb | 1 + lib/tasks/alavetelitheme_tasks.rake | 1 + 7 files changed, 7 insertions(+) (limited to 'lib') diff --git a/lib/alavetelitheme.rb b/lib/alavetelitheme.rb index c245617..668d92a 100644 --- a/lib/alavetelitheme.rb +++ b/lib/alavetelitheme.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- theme_name = File.split(File.expand_path("../..", __FILE__))[1] theme_name.gsub!('-', '_') THEME_NAME = theme_name diff --git a/lib/config/custom-routes.rb b/lib/config/custom-routes.rb index 6d4cda4..98fccf7 100644 --- a/lib/config/custom-routes.rb +++ b/lib/config/custom-routes.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- # Here you can override or add to the pages in the core website Rails.application.routes.draw do diff --git a/lib/controller_patches.rb b/lib/controller_patches.rb index 5c48e70..6d796b0 100644 --- a/lib/controller_patches.rb +++ b/lib/controller_patches.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- # Add a callback - to be executed before each request in development, # and at startup in production - to patch existing app classes. # Doing so in init/environment.rb wouldn't work in development, since diff --git a/lib/customstates.rb b/lib/customstates.rb index d801c92..323a105 100644 --- a/lib/customstates.rb +++ b/lib/customstates.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- # See `http://alaveteli.org/docs/customising/themes/#customising-the-request-states` # for more explanation of this file diff --git a/lib/model_patches.rb b/lib/model_patches.rb index b0c906f..d223e36 100644 --- a/lib/model_patches.rb +++ b/lib/model_patches.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- # Add a callback - to be executed before each request in development, # and at startup in production - to patch existing app classes. # Doing so in init/environment.rb wouldn't work in development, since diff --git a/lib/patch_mailer_paths.rb b/lib/patch_mailer_paths.rb index 99da10a..4533be0 100644 --- a/lib/patch_mailer_paths.rb +++ b/lib/patch_mailer_paths.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- # Add a callback - to be executed before each request in development, # and at startup in production - to patch existing app classes. # See http://stackoverflow.com/questions/7072758/plugin-not-reloading-in-development-mode diff --git a/lib/tasks/alavetelitheme_tasks.rake b/lib/tasks/alavetelitheme_tasks.rake index 1f1925b..3744d04 100644 --- a/lib/tasks/alavetelitheme_tasks.rake +++ b/lib/tasks/alavetelitheme_tasks.rake @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- # desc "Explaining what the task does" # task :alavetelitheme do # # Task goes here -- cgit v1.2.3 From ed5bc5dd15ad7722d97b1c3164a670298d2501e0 Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Wed, 22 Mar 2017 13:32:37 +0000 Subject: Move assets to app/assets Latest version of assets:precompile task requires path to match app/assets: https://github.com/rails/sprockets-rails/blob/v2.3.3/lib/sprockets/railtie.rb#L60-L62 --- lib/alavetelitheme.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/alavetelitheme.rb b/lib/alavetelitheme.rb index 668d92a..0658142 100644 --- a/lib/alavetelitheme.rb +++ b/lib/alavetelitheme.rb @@ -39,6 +39,7 @@ $alaveteli_route_extensions << 'custom-routes.rb' ['stylesheets', 'images', 'javascripts'].each do |asset_type| theme_asset_path = File.join(File.dirname(__FILE__), '..', + 'app', 'assets', asset_type) Rails.application.config.assets.paths.unshift theme_asset_path -- cgit v1.2.3 From 0dee8c3bd06dd8779500667018185fab6dcee04e Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Wed, 22 Mar 2017 13:33:57 +0000 Subject: Remove deprecated disable_with button option Now a subkey of the :data option --- lib/views/help/contact.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/views/help/contact.html.erb b/lib/views/help/contact.html.erb index 5f467fe..2072d0c 100644 --- a/lib/views/help/contact.html.erb +++ b/lib/views/help/contact.html.erb @@ -93,8 +93,8 @@
<%= hidden_field_tag(:submitted_contact_form, 1) %> - <%= submit_tag "Send message to the charity", :disable_with => "Sending..." %> + <%= submit_tag "Send message to the charity", :data => { :disable_with => "Sending..." } %> <-- we run this site, not the Government!
-<% end %> \ No newline at end of file +<% end %> -- cgit v1.2.3