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 'mysql'
gem 'mysql2'
gem "fastercsv"
gem "prawn", '<=0.6.3'
gem 'haml'

View File

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

View File

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

View File

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

View File

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

View File

@ -1,3 +1,4 @@
# encoding: utf-8
class Finance::BalancingController < ApplicationController
before_filter :authenticate_finance
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.
# Normal ordering actions of members of order groups is handled by the OrderingController.
class OrdersController < ApplicationController

View File

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

View File

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

View File

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

View File

@ -1,29 +1,4 @@
# == Schema Information
#
# 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)
#
# encoding: utf-8
class Article < ActiveRecord::Base
acts_as_paranoid # Avoid deleting the article for consistency of order-results
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
extend ActiveSupport::Memoizable # Ability to cache method results. Use memoize :expensive_method
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
#
# Ordergroup have the following attributes, in addition to Group

View File

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

View File

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

View File

@ -6,7 +6,7 @@
%table{:class => "ordered_articles", :style => "clear:both"}
%thead
%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
%th[sort_td_class_helper "order_number"]
= sort_link_helper "Nr.", "order_number", :action => "new", :remote => false

View File

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

View File

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