Fixed encoding issues with ruby > 1.9.2..

This commit is contained in:
benni 2012-04-16 08:48:01 +02:00
parent ad508b207b
commit 4a8e286d98
18 changed files with 29 additions and 40 deletions

View File

@ -3,7 +3,7 @@ source "http://rubygems.org"
gem "rails", '3.0.12' gem "rails", '3.0.12'
gem 'mysql' gem 'mysql2'
gem "fastercsv" gem "fastercsv"
gem "prawn", '<=0.6.3' gem "prawn", '<=0.6.3'
gem 'haml' gem 'haml'

View File

@ -45,7 +45,7 @@ GEM
exception_notification (2.4.0) exception_notification (2.4.0)
expression_parser (0.9.0) expression_parser (0.9.0)
fastercsv (1.5.4) fastercsv (1.5.4)
haml (3.1.1) haml (3.1.4)
has_scope (0.5.0) has_scope (0.5.0)
hirb (0.3.4) hirb (0.3.4)
i18n (0.5.0) i18n (0.5.0)
@ -71,7 +71,7 @@ GEM
activesupport (~> 3.0.0) activesupport (~> 3.0.0)
arel (~> 2.0.7) arel (~> 2.0.7)
mime-types (1.18) mime-types (1.18)
mysql (2.8.1) mysql2 (0.2.6)
polyglot (0.3.3) polyglot (0.3.3)
prawn (0.6.3) prawn (0.6.3)
prawn-core (>= 0.6.3, < 0.7) prawn-core (>= 0.6.3, < 0.7)
@ -136,7 +136,7 @@ DEPENDENCIES
localize_input! localize_input!
meta_search meta_search
meta_where meta_where
mysql mysql2
prawn (<= 0.6.3) prawn (<= 0.6.3)
rails (= 3.0.12) rails (= 3.0.12)
rails3_acts_as_paranoid (= 0.0.9) rails3_acts_as_paranoid (= 0.0.9)

View File

@ -1,3 +1,4 @@
# encoding: utf-8
class Admin::WorkgroupsController < Admin::BaseController class Admin::WorkgroupsController < Admin::BaseController
inherit_resources inherit_resources

View File

@ -1,3 +1,4 @@
# encoding: utf-8
class ArticlesController < ApplicationController class ArticlesController < ApplicationController
before_filter :authenticate_article_meta, :find_supplier before_filter :authenticate_article_meta, :find_supplier

View File

@ -1,3 +1,4 @@
# encoding: utf-8
class DeliveriesController < ApplicationController class DeliveriesController < ApplicationController
before_filter :find_supplier, :exclude => :fill_new_stock_article_form before_filter :find_supplier, :exclude => :fill_new_stock_article_form

View File

@ -1,3 +1,4 @@
# encoding: utf-8
class Finance::BalancingController < ApplicationController class Finance::BalancingController < ApplicationController
before_filter :authenticate_finance before_filter :authenticate_finance
verify :method => :post, :only => [:close, :close_direct] verify :method => :post, :only => [:close, :close_direct]

View File

@ -1,3 +1,5 @@
# encoding: utf-8
#
# Controller for managing orders, i.e. all actions that require the "orders" role. # Controller for managing orders, i.e. all actions that require the "orders" role.
# Normal ordering actions of members of order groups is handled by the OrderingController. # Normal ordering actions of members of order groups is handled by the OrderingController.
class OrdersController < ApplicationController class OrdersController < ApplicationController

View File

@ -1,3 +1,4 @@
# encoding: utf-8
class PagesController < ApplicationController class PagesController < ApplicationController
def index def index

View File

@ -1,3 +1,4 @@
# encoding: utf-8
class SuppliersController < ApplicationController class SuppliersController < ApplicationController
before_filter :authenticate_suppliers, :except => [:index, :list] before_filter :authenticate_suppliers, :except => [:index, :list]
helper :deliveries helper :deliveries

View File

@ -1,3 +1,4 @@
# encoding: utf-8
class TasksController < ApplicationController class TasksController < ApplicationController
#auto_complete_for :user, :nick #auto_complete_for :user, :nick

View File

@ -1,29 +1,4 @@
# == Schema Information # encoding: utf-8
#
# Table name: articles
#
# id :integer not null, primary key
# name :string(255) default(""), not null
# supplier_id :integer default(0), not null
# article_category_id :integer default(0), not null
# unit :string(255) default(""), not null
# note :string(255)
# availability :boolean default(TRUE), not null
# manufacturer :string(255)
# origin :string(255)
# shared_updated_on :datetime
# price :decimal(, )
# tax :float
# deposit :decimal(, ) default(0.0)
# unit_quantity :integer default(1), not null
# order_number :string(255)
# created_at :datetime
# updated_at :datetime
# quantity :integer default(0)
# deleted_at :datetime
# type :string(255)
#
class Article < ActiveRecord::Base class Article < ActiveRecord::Base
acts_as_paranoid # Avoid deleting the article for consistency of order-results acts_as_paranoid # Avoid deleting the article for consistency of order-results
extend ActiveSupport::Memoizable # Ability to cache method results. Use memoize :expensive_method extend ActiveSupport::Memoizable # Ability to cache method results. Use memoize :expensive_method

View File

@ -1,3 +1,5 @@
# encoding: utf-8
#
class Order < ActiveRecord::Base class Order < ActiveRecord::Base
extend ActiveSupport::Memoizable # Ability to cache method results. Use memoize :expensive_method extend ActiveSupport::Memoizable # Ability to cache method results. Use memoize :expensive_method
acts_as_ordered :order => "ends" # easyier find of next or previous model acts_as_ordered :order => "ends" # easyier find of next or previous model

View File

@ -1,3 +1,5 @@
# encoding: utf-8
#
# Ordergroups can order, they are "children" of the class Group # Ordergroups can order, they are "children" of the class Group
# #
# Ordergroup have the following attributes, in addition to Group # Ordergroup have the following attributes, in addition to Group

View File

@ -1,3 +1,4 @@
# encoding: utf-8
class StockArticle < Article class StockArticle < Article
acts_as_paranoid acts_as_paranoid

View File

@ -15,14 +15,14 @@
%thead %thead
%tr %tr
%th %th
%th[sort_td_class_helper "name"] %th[sort_td_class_helper("name")]
= sort_link_helper "Name", "name" = sort_link_helper "Name", "name"
%th %th
%th[sort_td_class_helper "category"] %th[sort_td_class_helper("category")]
= sort_link_helper "Kategorie", "category" = sort_link_helper "Kategorie", "category"
%th[sort_td_class_helper "unit"] %th[sort_td_class_helper("unit")]
= sort_link_helper "Einheit", "unit" = sort_link_helper "Einheit", "unit"
%th[sort_td_class_helper "note"] %th[sort_td_class_helper("note")]
= sort_link_helper "Notiz", "note" = sort_link_helper "Notiz", "note"
%th{:style => "width: 4em;"} Gebgr. %th{:style => "width: 4em;"} Gebgr.
%th{:style => "width: 5em;"} Preis %th{:style => "width: 5em;"} Preis

View File

@ -6,7 +6,7 @@
%table{:class => "ordered_articles", :style => "clear:both"} %table{:class => "ordered_articles", :style => "clear:both"}
%thead %thead
%tr %tr
%th[sort_td_class_helper "name"]{:colspan => "1"} %th[sort_td_class_helper("name")]{:colspan => "1"}
= sort_link_helper "Artikel", "name", :action => "new", :remote => false = sort_link_helper "Artikel", "name", :action => "new", :remote => false
%th[sort_td_class_helper "order_number"] %th[sort_td_class_helper "order_number"]
= sort_link_helper "Nr.", "order_number", :action => "new", :remote => false = sort_link_helper "Nr.", "order_number", :action => "new", :remote => false

View File

@ -10,12 +10,12 @@
%table %table
%thead %thead
%tr %tr
<td #{sort_td_class_helper "date"}> <td #{sort_td_class_helper("date")}>
\#{sort_link_helper "Datum", "date"} \#{sort_link_helper "Datum", "date"}
%td Wer %td Wer
<td #{sort_td_class_helper "note"}> <td #{sort_td_class_helper("note")}>
\#{sort_link_helper "Notiz", "note"} \#{sort_link_helper "Notiz", "note"}
<td #{sort_td_class_helper "amount"}> <td #{sort_td_class_helper("amount")}>
\#{sort_link_helper "Betrag", "amount"} \#{sort_link_helper "Betrag", "amount"}
%tbody %tbody
- @financial_transactions.each do |t| - @financial_transactions.each do |t|

View File

@ -2,10 +2,10 @@
%table.list{:style => "width: 100%"} %table.list{:style => "width: 100%"}
%thead %thead
%tr %tr
%th[sort_td_class_helper "supplier"] %th[sort_td_class_helper("supplier")]
= sort_link_helper "Lieferantin", "supplier" = sort_link_helper "Lieferantin", "supplier"
%th Start %th Start
%th[sort_td_class_helper "ends"] %th[sort_td_class_helper("ends")]
= sort_link_helper "Ende", "ends" = sort_link_helper "Ende", "ends"
%th Status %th Status
%th{:colspan => "2"} %th{:colspan => "2"}