-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added shop model and a basic invoice liquid template.
- Loading branch information
Showing
5 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
class Shop < ActiveRecord::Base | ||
has_many :templates, :class_name => "PrintTemplate" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<h1>{{ shop_name }}</h1> | ||
|
||
Thank you for your business. | ||
|
||
<br/> | ||
<br/> | ||
<br/> | ||
<h3>Payment Details</h3> | ||
|
||
<div> | ||
<p>Amount: {{ total_price | money }}</p> | ||
<p>Invoice: {{ name }}</p | ||
<p>Credit Card: {{ payment.card_number }}</p> | ||
|
||
{% if note_body %} | ||
<p>Description: {{ note_body }}</p> | ||
{% endif %} | ||
</div> | ||
|
||
Buyer: | ||
<div> | ||
{{ customer.name }}<br/> | ||
{{ billing_address.company }}<br/> | ||
{{ billing_address.street }}<br/> | ||
{{ billing_address.city }}<br/> | ||
{{ billing_address.zip }}<br/> | ||
{{ billing_address.country }}<br/> | ||
</div> | ||
|
||
If you have any questions, please send an email to | ||
<a href="mailto:{{shop_email}}">{{ shop_email }}</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html | ||
|
||
one: | ||
name: MyString | ||
|
||
two: | ||
name: MyString |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |