diff --git a/Gemfile b/Gemfile index 62b93e9..bf1fbb0 100644 --- a/Gemfile +++ b/Gemfile @@ -1,13 +1,14 @@ source 'https://rubygems.org' -gem 'rails', '~> 3.0.20' +gem 'rails', '~> 3.2.22.5' gem 'rake', '10.1.0' +gem 'dynamic_form' gem 'prawn', '~> 0.8.4' gem 'prawn-layout', '0.8.4' +gem 'prawnto' gem 'will_paginate', '~> 3.1.0' gem 'mysql2', '~> 0.3.16' -gem 'activerecord-mysql2-adapter', '0.0.3' #group :production do # gem 'fcgi' diff --git a/Gemfile.lock b/Gemfile.lock index 5044a73..5e3f369 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,49 +1,48 @@ GEM remote: https://rubygems.org/ specs: - abstract (1.0.0) - actionmailer (3.0.20) - actionpack (= 3.0.20) - mail (~> 2.2.19) - actionpack (3.0.20) - activemodel (= 3.0.20) - activesupport (= 3.0.20) - builder (~> 2.1.2) - erubis (~> 2.6.6) - i18n (~> 0.5.0) - rack (~> 1.2.5) - rack-mount (~> 0.6.14) - rack-test (~> 0.5.7) - tzinfo (~> 0.3.23) - activemodel (3.0.20) - activesupport (= 3.0.20) - builder (~> 2.1.2) - i18n (~> 0.5.0) - activerecord (3.0.20) - activemodel (= 3.0.20) - activesupport (= 3.0.20) - arel (~> 2.0.10) - tzinfo (~> 0.3.23) - activerecord-mysql2-adapter (0.0.3) - mysql2 - activeresource (3.0.20) - activemodel (= 3.0.20) - activesupport (= 3.0.20) - activesupport (3.0.20) - arel (2.0.10) - builder (2.1.2) - erubis (2.6.6) - abstract (>= 1.0.0) - i18n (0.5.4) - json (1.8.1) - mail (2.2.20) - activesupport (>= 2.3.6) - i18n (>= 0.4.0) + actionmailer (3.2.22.5) + actionpack (= 3.2.22.5) + mail (~> 2.5.4) + actionpack (3.2.22.5) + activemodel (= 3.2.22.5) + activesupport (= 3.2.22.5) + builder (~> 3.0.0) + erubis (~> 2.7.0) + journey (~> 1.0.4) + rack (~> 1.4.5) + rack-cache (~> 1.2) + rack-test (~> 0.6.1) + sprockets (~> 2.2.1) + activemodel (3.2.22.5) + activesupport (= 3.2.22.5) + builder (~> 3.0.0) + activerecord (3.2.22.5) + activemodel (= 3.2.22.5) + activesupport (= 3.2.22.5) + arel (~> 3.0.2) + tzinfo (~> 0.3.29) + activeresource (3.2.22.5) + activemodel (= 3.2.22.5) + activesupport (= 3.2.22.5) + activesupport (3.2.22.5) + i18n (~> 0.6, >= 0.6.4) + multi_json (~> 1.0) + arel (3.0.3) + builder (3.0.4) + dynamic_form (1.1.4) + erubis (2.7.0) + hike (1.2.3) + i18n (0.7.0) + journey (1.0.4) + json (1.8.6) + mail (2.5.4) mime-types (~> 1.16) treetop (~> 1.4.8) mime-types (1.25.1) + multi_json (1.12.1) mysql2 (0.3.16) - polyglot (0.3.4) + polyglot (0.3.5) prawn (0.8.4) prawn-core (>= 0.8.4, < 0.9) prawn-layout (>= 0.8.4, < 0.9) @@ -51,43 +50,59 @@ GEM prawn-core (0.8.4) prawn-layout (0.8.4) prawn-security (0.8.4) - rack (1.2.8) - rack-mount (0.6.14) - rack (>= 1.0.0) - rack-test (0.5.7) + prawnto (0.1.1) + prawn + rails (>= 2.1) + rack (1.4.7) + rack-cache (1.7.0) + rack (>= 0.4) + rack-ssl (1.3.4) + rack + rack-test (0.6.3) rack (>= 1.0) - rails (3.0.20) - actionmailer (= 3.0.20) - actionpack (= 3.0.20) - activerecord (= 3.0.20) - activeresource (= 3.0.20) - activesupport (= 3.0.20) + rails (3.2.22.5) + actionmailer (= 3.2.22.5) + actionpack (= 3.2.22.5) + activerecord (= 3.2.22.5) + activeresource (= 3.2.22.5) + activesupport (= 3.2.22.5) bundler (~> 1.0) - railties (= 3.0.20) - railties (3.0.20) - actionpack (= 3.0.20) - activesupport (= 3.0.20) + railties (= 3.2.22.5) + railties (3.2.22.5) + actionpack (= 3.2.22.5) + activesupport (= 3.2.22.5) + rack-ssl (~> 1.3.2) rake (>= 0.8.7) rdoc (~> 3.4) - thor (~> 0.14.4) + thor (>= 0.14.6, < 2.0) rake (10.1.0) rdoc (3.12.2) json (~> 1.4) - thor (0.14.6) + sprockets (2.2.3) + hike (~> 1.2) + multi_json (~> 1.0) + rack (~> 1.0) + tilt (~> 1.1, != 1.3.0) + thor (0.19.4) + tilt (1.4.1) treetop (1.4.15) polyglot polyglot (>= 0.3.1) - tzinfo (0.3.39) + tzinfo (0.3.52) will_paginate (3.1.0) PLATFORMS ruby DEPENDENCIES - activerecord-mysql2-adapter (= 0.0.3) + dynamic_form mysql2 (~> 0.3.16) prawn (~> 0.8.4) prawn-layout (= 0.8.4) - rails (~> 3.0.20) + prawnto + rails (~> 3.2.22.5) rake (= 10.1.0) will_paginate (~> 3.1.0) + +BUNDLED WITH + 1.14.3 diff --git a/app/models/person.rb b/app/models/person.rb index 581257f..f8ad470 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -21,16 +21,16 @@ def medical_validity_valid_or_blank # Human names for attributes # .label of form_helper does not use this, but error_messages does - attr_human_name 'last_name' => 'Nachname' - attr_human_name :first_name => 'Vorname' - attr_human_name :club => 'Verein' - attr_human_name :medical_validity => 'Medical gültig bis' - attr_human_name :medical_validity_text => 'Medical gültig bis' - attr_human_name :check_medical_validity => 'Medical prüfen' - attr_human_name :check_medical_validity_text => 'Medical prüfen' - attr_human_name :club_id => 'Vereins-ID' - attr_human_name :nickname => 'Verein' - attr_human_name 'comments' => 'Bemerkungen' + human_attribute_name 'last_name' => 'Nachname' + human_attribute_name :first_name => 'Vorname' + human_attribute_name :club => 'Verein' + human_attribute_name :medical_validity => 'Medical gültig bis' + human_attribute_name :medical_validity_text => 'Medical gültig bis' + human_attribute_name :check_medical_validity => 'Medical prüfen' + human_attribute_name :check_medical_validity_text => 'Medical prüfen' + human_attribute_name :club_id => 'Vereins-ID' + human_attribute_name :nickname => 'Verein' + human_attribute_name 'comments' => 'Bemerkungen' # Callbacks # Prevent destruction of people that are in use. diff --git a/app/models/user.rb b/app/models/user.rb index 4070485..99ab8a2 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1,7 +1,7 @@ # encoding: utf-8 class User < ActiveRecord::Base - set_primary_key "username" + self.primary_key = "username" # Associations belongs_to :person @@ -28,9 +28,9 @@ class User < ActiveRecord::Base validates_confirmation_of :password, :message => "stimmt nicht mit Bestätigung überein" # Human names for attributes - attr_human_name :username => 'Benutzername' - attr_human_name :current_password => 'Altes Passwort' - attr_human_name :password => 'Passwort' + human_attribute_name :username => 'Benutzername' + human_attribute_name :current_password => 'Altes Passwort' + human_attribute_name :password => 'Passwort' # Callbacks # If a password confirmation is given, a password is also given and must be diff --git a/app/views/debug/dump_environment.html.erb b/app/views/debug/dump_environment.html.erb index f30fdd3..c873bac 100644 --- a/app/views/debug/dump_environment.html.erb +++ b/app/views/debug/dump_environment.html.erb @@ -7,7 +7,7 @@ <% end %> -<% page_title "Environment dumper" do %> +<%= page_title "Environment dumper" do %> <% heading "Location" do %>
<%= h s.username||"?" %>@<%= h s.hostname||"?" %>:<%= h Dir.pwd %>
<% end %> diff --git a/app/views/debug/redirect.html.erb b/app/views/debug/redirect.html.erb index fb477d5..17cf970 100644 --- a/app/views/debug/redirect.html.erb +++ b/app/views/debug/redirect.html.erb @@ -1,4 +1,4 @@ -<% page_title "Weiterleitung" do %> +<%= page_title "Weiterleitung" do %>Weiterleitung zu <%= link_to @target_url, @target_url %> mit Status <%= @status.inspect %> diff --git a/app/views/people/edit.html.erb b/app/views/people/edit.html.erb index be7d33b..40d789b 100644 --- a/app/views/people/edit.html.erb +++ b/app/views/people/edit.html.erb @@ -1,4 +1,4 @@ -<% page_title "Person #{h @person.full_name} editieren" do %> +<%= page_title "Person #{h @person.full_name} editieren" do %> <%= form_for(@person) do |f| %> <%# TODO code duplication %> diff --git a/app/views/people/export_select.html.erb b/app/views/people/export_select.html.erb index 4637a8d..d6cf625 100644 --- a/app/views/people/export_select.html.erb +++ b/app/views/people/export_select.html.erb @@ -1,4 +1,4 @@ -<% page_title "Personen exportieren" do %> +<%= page_title "Personen exportieren" do %> <%= form_tag 'export' do %>