diff --git a/app/models/shop.rb b/app/models/shop.rb new file mode 100644 index 0000000..97413b2 --- /dev/null +++ b/app/models/shop.rb @@ -0,0 +1,3 @@ +class Shop < ActiveRecord::Base + has_many :templates, :class_name => "PrintTemplate" +end diff --git a/db/migrate/20090317150827_create_shops.rb b/db/migrate/20090317150827_create_shops.rb new file mode 100644 index 0000000..4070883 --- /dev/null +++ b/db/migrate/20090317150827_create_shops.rb @@ -0,0 +1,13 @@ +class CreateShops < ActiveRecord::Migration + def self.up + create_table :shops do |t| + t.string :name + + t.timestamps + end + end + + def self.down + drop_table :shops + end +end diff --git a/db/printing/invoice.liquid b/db/printing/invoice.liquid new file mode 100644 index 0000000..5850df3 --- /dev/null +++ b/db/printing/invoice.liquid @@ -0,0 +1,31 @@ +

{{ shop_name }}

+ +Thank you for your business. + +
+
+
+

Payment Details

+ +
+

Amount: {{ total_price | money }}

+

Invoice: {{ name }}

Credit Card: {{ payment.card_number }}

+ + {% if note_body %} +

Description: {{ note_body }}

+ {% endif %} +
+ +Buyer: +
+ {{ customer.name }}
+ {{ billing_address.company }}
+ {{ billing_address.street }}
+ {{ billing_address.city }}
+ {{ billing_address.zip }}
+ {{ billing_address.country }}
+
+ +If you have any questions, please send an email to +{{ shop_email }} \ No newline at end of file diff --git a/test/fixtures/shops.yml b/test/fixtures/shops.yml new file mode 100644 index 0000000..157d747 --- /dev/null +++ b/test/fixtures/shops.yml @@ -0,0 +1,7 @@ +# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html + +one: + name: MyString + +two: + name: MyString diff --git a/test/unit/shop_test.rb b/test/unit/shop_test.rb new file mode 100644 index 0000000..1cfa423 --- /dev/null +++ b/test/unit/shop_test.rb @@ -0,0 +1,8 @@ +require 'test_helper' + +class ShopTest < ActiveSupport::TestCase + # Replace this with your real tests. + test "the truth" do + assert true + end +end