From 21bd551e948fe70794b27cc368e8d4a7eb53b024 Mon Sep 17 00:00:00 2001 From: Ramon Tayag Date: Thu, 3 Mar 2016 10:10:38 +0800 Subject: [PATCH 01/17] Fix issue with plutus requiring the jquery-ui files jquery-ui change: https://github.com/joliss/jquery-ui-rails/commit/774f8b3e2e5ae8b80515128dd0cdb5cde48dfc01 Fixes #58 --- CHANGELOG.md | 3 +++ app/assets/javascripts/plutus/application.js | 2 +- app/assets/stylesheets/plutus/application.css | 2 +- plutus.gemspec | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..7e6e6a57 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,3 @@ +# Not Released + +- Fix loading of jquery-ui files (Fixes https://github.com/mbulat/plutus/issues/58) diff --git a/app/assets/javascripts/plutus/application.js b/app/assets/javascripts/plutus/application.js index 9da3dcbd..58a0fdab 100644 --- a/app/assets/javascripts/plutus/application.js +++ b/app/assets/javascripts/plutus/application.js @@ -12,5 +12,5 @@ // //= require jquery //= require jquery_ujs -//= require jquery.ui.datepicker +//= require jquery-ui/datepicker //= require_tree . diff --git a/app/assets/stylesheets/plutus/application.css b/app/assets/stylesheets/plutus/application.css index ac26e950..0f67b72f 100644 --- a/app/assets/stylesheets/plutus/application.css +++ b/app/assets/stylesheets/plutus/application.css @@ -13,7 +13,7 @@ *= require_tree . *= require bootstrap.min *= require bootstrap-theme.min - *= require jquery.ui.datepicker + *= require jquery-ui/datepicker *= require_self */ body { padding-top: 60px; } diff --git a/plutus.gemspec b/plutus.gemspec index da03319b..a4b1c90e 100644 --- a/plutus.gemspec +++ b/plutus.gemspec @@ -21,7 +21,7 @@ Gem::Specification.new do |s| ] s.add_dependency("rails", "~> 4.0") s.add_dependency("jquery-rails", ">= 3.0") - s.add_dependency("jquery-ui-rails", ">= 4.0") + s.add_dependency("jquery-ui-rails", ">= 4.2.2") s.add_development_dependency("yard") s.files = Dir["{app,config,db,lib}/**/*"] + ["LICENSE", "Rakefile", "README.markdown"] s.homepage = %q{http://github.com/mbulat/plutus} From 7f1f27ef143c94cb7d0636b1df79eca222d9cbc9 Mon Sep 17 00:00:00 2001 From: Michael Bulat Date: Thu, 12 May 2016 15:41:39 -0400 Subject: [PATCH 02/17] note about account lookup when using multitenancy --- README.markdown | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.markdown b/README.markdown index 72370ac5..e2ceea0d 100644 --- a/README.markdown +++ b/README.markdown @@ -291,6 +291,19 @@ Plutus.config do |config| config.tenant_class = 'Tenant' end ``` +*NOTE: When building entries, be sure to specify the account directly, rather than use the 'account_name' feature. Otherwise if you'll probably end up with the wrong account.* + +```ruby +debit_account = Plutus::Acount.where(:name => "Cash", :tenant => my_tenant).last +credit_account = Plutus::Acount.where(:name => "Unearned Revenue", :tenant => my_tenant).last +entry = Plutus::Entry.new( + :description => "Order placed for widgets", + :date => Date.yesterday, + :debits => [ + {:account => debit_account, :amount => 100.00}], + :credits => [ + {:account => credit_account, :amount => 100.00}]) +``` Reporting Views =============== From 5785543b338b8ef7350126cb7b99316bd5f3e393 Mon Sep 17 00:00:00 2001 From: Michael Bulat Date: Thu, 12 May 2016 15:42:26 -0400 Subject: [PATCH 03/17] fix types on note about account lookup when using multitenancy --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index e2ceea0d..dd7f6658 100644 --- a/README.markdown +++ b/README.markdown @@ -291,7 +291,7 @@ Plutus.config do |config| config.tenant_class = 'Tenant' end ``` -*NOTE: When building entries, be sure to specify the account directly, rather than use the 'account_name' feature. Otherwise if you'll probably end up with the wrong account.* +*NOTE: When building entries, be sure to specify the account directly, rather than use the `account_name` feature. Otherwise you'll probably end up with the wrong account.* ```ruby debit_account = Plutus::Acount.where(:name => "Cash", :tenant => my_tenant).last From e8b0c706f8828a905f15f2f2499a0c1747694b72 Mon Sep 17 00:00:00 2001 From: Michael Bulat Date: Thu, 12 May 2016 16:01:28 -0400 Subject: [PATCH 04/17] Travis CI: Use containerized builds --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 97ea318a..7ed04ed8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,8 @@ language: ruby + +sudo: false +cache: bundler + rvm: - 1.9.3 - 2.0.0 From 8c39a874255261c0868ca756b47f6bd17c1c2b2c Mon Sep 17 00:00:00 2001 From: Michael Bulat Date: Thu, 12 May 2016 16:08:49 -0400 Subject: [PATCH 05/17] remove 1.9 travis test --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7ed04ed8..0255215e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,6 @@ sudo: false cache: bundler rvm: - - 1.9.3 - 2.0.0 - 2.1.0 - 2.2.0 From 0499b6687fb80fd48aa14c0a5693fef49d79919c Mon Sep 17 00:00:00 2001 From: Michael Bulat Date: Thu, 12 May 2016 16:09:05 -0400 Subject: [PATCH 06/17] bundle exec rake for travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0255215e..b33c105e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,4 +18,4 @@ matrix: - rvm: jruby-head - rvm: rbx-2.3 -script: rake +script: bundle exec rake From 7941fa11b14e44d40cb835ea59811096d7078d79 Mon Sep 17 00:00:00 2001 From: Michael Bulat Date: Thu, 12 May 2016 16:23:38 -0400 Subject: [PATCH 07/17] update travis build versions --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index b33c105e..55d9e6a6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,15 +7,15 @@ rvm: - 2.0.0 - 2.1.0 - 2.2.0 + - 2.2.3 - ruby-head - - jruby - - jruby-head - - rbx-2.2 + - jruby-9.0.0.0 + - rbx-2 matrix: allow_failures: - rvm: ruby-head - - rvm: jruby-head - - rvm: rbx-2.3 + - rvm: jruby-9.0.0.0 + - rvm: rbx-2 script: bundle exec rake From 0696f8eef88c0ceb468cc4d187c18570853a134f Mon Sep 17 00:00:00 2001 From: Michael Bulat Date: Thu, 12 May 2016 16:49:01 -0400 Subject: [PATCH 08/17] Add Account#amounts and Account#entries --- app/models/plutus/account.rb | 2 ++ spec/models/account_spec.rb | 57 ++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) diff --git a/app/models/plutus/account.rb b/app/models/plutus/account.rb index bec75539..c26ee54e 100644 --- a/app/models/plutus/account.rb +++ b/app/models/plutus/account.rb @@ -32,8 +32,10 @@ module Plutus class Account < ActiveRecord::Base class_attribute :normal_credit_balance + has_many :amounts has_many :credit_amounts, :extend => AmountsExtension, :class_name => 'Plutus::CreditAmount' has_many :debit_amounts, :extend => AmountsExtension, :class_name => 'Plutus::DebitAmount' + has_many :entries, through: :amounts, source: :entry has_many :credit_entries, :through => :credit_amounts, :source => :entry, :class_name => 'Plutus::Entry' has_many :debit_entries, :through => :debit_amounts, :source => :entry, :class_name => 'Plutus::Entry' diff --git a/spec/models/account_spec.rb b/spec/models/account_spec.rb index 6562bf75..6baee1b6 100644 --- a/spec/models/account_spec.rb +++ b/spec/models/account_spec.rb @@ -72,5 +72,62 @@ module Plutus it { should == 0 } end end + + describe "#amounts" do + it "returns all credit and debit amounts" do + equity = FactoryGirl.create(:equity) + asset = FactoryGirl.create(:asset) + expense = FactoryGirl.create(:expense) + + investment = Entry.new( + description: "Initial investment", + date: Date.today, + debits: [{ account_name: equity.name, amount: 1000 }], + credits: [{ account_name: asset.name, amount: 1000 }], + ) + investment.save + + purchase = Entry.new( + description: "First computer", + date: Date.today, + debits: [{ account_name: asset.name, amount: 900 }], + credits: [{ account_name: expense.name, amount: 900 }], + ) + purchase.save + + expect(equity.amounts.size).to eq 1 + expect(asset.amounts.size).to eq 2 + expect(expense.amounts.size).to eq 1 + end + end + + describe "#entries" do + it "returns all credit and debit entries" do + equity = FactoryGirl.create(:equity) + asset = FactoryGirl.create(:asset) + expense = FactoryGirl.create(:expense) + + investment = Entry.new( + description: "Initial investment", + date: Date.today, + debits: [{ account_name: equity.name, amount: 1000 }], + credits: [{ account_name: asset.name, amount: 1000 }], + ) + investment.save + + purchase = Entry.new( + description: "First computer", + date: Date.today, + debits: [{ account_name: asset.name, amount: 900 }], + credits: [{ account_name: expense.name, amount: 900 }], + ) + purchase.save + + expect(equity.entries.size).to eq 1 + expect(asset.entries.size).to eq 2 + expect(expense.entries.size).to eq 1 + end + end + end end From 86a6fe4a46d6930d7b706c54318d550529a5f61b Mon Sep 17 00:00:00 2001 From: Michael Bulat Date: Thu, 12 May 2016 16:49:23 -0400 Subject: [PATCH 09/17] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e6e6a57..aa3a99a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ # Not Released - Fix loading of jquery-ui files (Fixes https://github.com/mbulat/plutus/issues/58) +- Add `Account#amounts` and `Account#entries` to get all amounts and entries, respectively From 1fd9fb0e152ab6bf7f65a80f10def0cdc425ca28 Mon Sep 17 00:00:00 2001 From: Michael Bulat Date: Fri, 13 May 2016 14:39:39 -0400 Subject: [PATCH 10/17] update rails fixture for update jquery-ui requirement --- fixture_rails_root/Gemfile.lock | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/fixture_rails_root/Gemfile.lock b/fixture_rails_root/Gemfile.lock index 39c1f81c..061bdfd6 100644 --- a/fixture_rails_root/Gemfile.lock +++ b/fixture_rails_root/Gemfile.lock @@ -1,9 +1,9 @@ PATH remote: ../ specs: - plutus (0.12.0) - jquery-rails (~> 3.0) - jquery-ui-rails (~> 4.0) + plutus (0.12.2) + jquery-rails (>= 3.0) + jquery-ui-rails (>= 4.2.2) rails (~> 4.0) GEM @@ -65,7 +65,7 @@ GEM jquery-rails (3.1.4) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) - jquery-ui-rails (4.2.1) + jquery-ui-rails (5.0.5) railties (>= 3.2.16) json (1.8.3) loofah (2.0.3) @@ -73,10 +73,10 @@ GEM mail (2.6.3) mime-types (>= 1.16, < 3) mime-types (2.6.1) - mini_portile (0.6.2) - minitest (5.8.0) - nokogiri (1.6.6.2) - mini_portile (~> 0.6.0) + mini_portile2 (2.0.0) + minitest (5.8.4) + nokogiri (1.6.7.2) + mini_portile2 (~> 2.0.0.rc2) rack (1.6.4) rack-test (0.6.3) rack (>= 1.0) @@ -97,14 +97,14 @@ GEM activesupport (>= 4.2.0.beta, < 5.0) nokogiri (~> 1.6.0) rails-deprecated_sanitizer (>= 1.0.1) - rails-html-sanitizer (1.0.2) + rails-html-sanitizer (1.0.3) loofah (~> 2.0) railties (4.2.4) actionpack (= 4.2.4) activesupport (= 4.2.4) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rake (10.4.2) + rake (11.1.2) sass (3.4.18) sass-rails (5.0.4) railties (>= 4.0.0, < 5.0) @@ -151,4 +151,4 @@ DEPENDENCIES web-console (~> 2.0) BUNDLED WITH - 1.10.4 + 1.10.6 From f1a5b82688b22d84e8447c61375fcbe514e61a07 Mon Sep 17 00:00:00 2001 From: Daniel Puglisi Date: Wed, 8 Jun 2016 17:16:55 +0200 Subject: [PATCH 11/17] allow destruction of debit/credit amounts from entry objects --- app/models/plutus/amounts_extension.rb | 6 ++---- app/models/plutus/entry.rb | 2 +- spec/models/entry_spec.rb | 9 +++++++++ 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app/models/plutus/amounts_extension.rb b/app/models/plutus/amounts_extension.rb index 2104ee41..8b3aa11f 100644 --- a/app/models/plutus/amounts_extension.rb +++ b/app/models/plutus/amounts_extension.rb @@ -32,10 +32,8 @@ def balance(hash={}) def balance_for_new_record balance = BigDecimal.new('0') each do |amount_record| - if amount_record.amount - balance += amount_record.amount - else - balance = nil + if amount_record.amount && !amount_record.marked_for_destruction? + balance += amount_record.amount # unless amount_record.marked_for_destruction? end end return balance diff --git a/app/models/plutus/entry.rb b/app/models/plutus/entry.rb index 0281bf46..812283ba 100644 --- a/app/models/plutus/entry.rb +++ b/app/models/plutus/entry.rb @@ -35,7 +35,7 @@ class Entry < ActiveRecord::Base validate :amounts_cancel? # Support construction using 'credits' and 'debits' keys - accepts_nested_attributes_for :credit_amounts, :debit_amounts + accepts_nested_attributes_for :credit_amounts, :debit_amounts, allow_destroy: true alias_method :credits=, :credit_amounts_attributes= alias_method :debits=, :debit_amounts_attributes= # attr_accessible :credits, :debits diff --git a/spec/models/entry_spec.rb b/spec/models/entry_spec.rb index f6a4a934..2e3a436e 100644 --- a/spec/models/entry_spec.rb +++ b/spec/models/entry_spec.rb @@ -69,6 +69,15 @@ module Plutus entry.errors['base'].should == ["The credit and debit amounts are not equal"] end + it "should ignore debit and credit amounts marked for destruction to cancel" do + entry.credit_amounts << FactoryGirl.build(:credit_amount, :amount => 100, :entry => entry) + debit_amount = FactoryGirl.build(:debit_amount, :amount => 100, :entry => entry) + debit_amount.mark_for_destruction + entry.debit_amounts << debit_amount + entry.should_not be_valid + entry.errors['base'].should == ["The credit and debit amounts are not equal"] + end + it "should have a polymorphic commercial document associations" do mock_document = FactoryGirl.create(:asset) # one would never do this, but it allows us to not require a migration for the test entry = FactoryGirl.build(:entry_with_credit_and_debit, commercial_document: mock_document) From fe9808f607557fad1078d7589317aef0b7bd7af4 Mon Sep 17 00:00:00 2001 From: Ramon Tayag Date: Fri, 22 Apr 2016 08:12:50 +0800 Subject: [PATCH 12/17] Remove double require --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 152ec3fb..9f032060 100644 --- a/Gemfile +++ b/Gemfile @@ -6,7 +6,7 @@ gemspec group :development, :test do gem "sqlite3", :platform => [:ruby, :mswin, :mingw] gem "jdbc-sqlite3", :platform => :jruby - gem 'activerecord-jdbcsqlite3-adapter', :require => 'jdbc-sqlite3', :require =>'arjdbc', :platform => :jruby + gem 'activerecord-jdbcsqlite3-adapter', :require =>'arjdbc', :platform => :jruby gem 'factory_girl_rails', "~> 1.1" gem 'rspec', "~> 2.6" gem 'rspec-rails', "~> 2.6" From 99bc15798a9434835b76e069f9c69980015e2812 Mon Sep 17 00:00:00 2001 From: Ramon Tayag Date: Fri, 22 Apr 2016 09:02:10 +0800 Subject: [PATCH 13/17] And binstub for rails So that we can generate migration files the way Rails guides suggests --- .envrc | 1 + bin/rails | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 .envrc create mode 100755 bin/rails diff --git a/.envrc b/.envrc new file mode 100644 index 00000000..57d59c52 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +export PATH=./bin:$PATH diff --git a/bin/rails b/bin/rails new file mode 100755 index 00000000..80910fc4 --- /dev/null +++ b/bin/rails @@ -0,0 +1,12 @@ +#!/usr/bin/env ruby +# This command will automatically be run when you run "rails" with Rails 4 gems installed from the root of your application. + +ENGINE_ROOT = File.expand_path('../..', __FILE__) +ENGINE_PATH = File.expand_path('../../lib/plutus/engine', __FILE__) + +# Set up gems listed in the Gemfile. +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) +require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) + +require 'rails/all' +require 'rails/engine/commands' From 1d0dbe3baafdff73d784a680e71b9802d396338a Mon Sep 17 00:00:00 2001 From: Ramon Tayag Date: Fri, 22 Apr 2016 09:02:36 +0800 Subject: [PATCH 14/17] Move engine into its own file This is the typical configuration of an Rails engine --- lib/plutus.rb | 7 ++----- lib/plutus/engine.rb | 5 +++++ 2 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 lib/plutus/engine.rb diff --git a/lib/plutus.rb b/lib/plutus.rb index ec12afd9..476d84d6 100644 --- a/lib/plutus.rb +++ b/lib/plutus.rb @@ -2,11 +2,6 @@ require "rails" module Plutus - class Engine < Rails::Engine - isolate_namespace Plutus - end - - # ------------------------------ tenancy ------------------------------ # configuration to enable or disable tenancy mattr_accessor :enable_tenancy @@ -21,3 +16,5 @@ def self.config yield(self) end end + +require "plutus/engine" diff --git a/lib/plutus/engine.rb b/lib/plutus/engine.rb new file mode 100644 index 00000000..2ff36c2b --- /dev/null +++ b/lib/plutus/engine.rb @@ -0,0 +1,5 @@ +module Plutus + class Engine < Rails::Engine + isolate_namespace Plutus + end +end From 6617e56f8d552f6b2f8727e8df2703bd0f4a5e1f Mon Sep 17 00:00:00 2001 From: Ramon Tayag Date: Fri, 22 Apr 2016 09:10:15 +0800 Subject: [PATCH 15/17] Use standard way of generating migrations in engines --- README.markdown | 2 +- .../20160422010135_create_plutus_tables.rb | 8 +------- .../20150722204256_create_plutus_tables.rb | 8 +------- .../plutus/templates/add_date_migration.rb | 6 ------ .../plutus/templates/update_migration.rb | 17 ----------------- 5 files changed, 3 insertions(+), 38 deletions(-) rename lib/generators/plutus/templates/migration.rb => db/migrate/20160422010135_create_plutus_tables.rb (87%) delete mode 100644 lib/generators/plutus/templates/add_date_migration.rb delete mode 100644 lib/generators/plutus/templates/update_migration.rb diff --git a/README.markdown b/README.markdown index ace0b229..caf5cdde 100644 --- a/README.markdown +++ b/README.markdown @@ -17,7 +17,7 @@ Installation - Add the gem to your Gemfile `gem "plutus"` -- generate migration files `rails g plutus` +- generate migration files `rails g plutus:install:migrations` - run migrations `rake db:migrate` diff --git a/lib/generators/plutus/templates/migration.rb b/db/migrate/20160422010135_create_plutus_tables.rb similarity index 87% rename from lib/generators/plutus/templates/migration.rb rename to db/migrate/20160422010135_create_plutus_tables.rb index 3f8f4ed4..51fb16a9 100644 --- a/lib/generators/plutus/templates/migration.rb +++ b/db/migrate/20160422010135_create_plutus_tables.rb @@ -1,5 +1,5 @@ class CreatePlutusTables < ActiveRecord::Migration - def self.up + def change create_table :plutus_accounts do |t| t.string :name t.string :type @@ -30,10 +30,4 @@ def self.up add_index :plutus_amounts, [:account_id, :entry_id] add_index :plutus_amounts, [:entry_id, :account_id] end - - def self.down - drop_table :plutus_accounts - drop_table :plutus_entries - drop_table :plutus_amounts - end end diff --git a/fixture_rails_root/db/migrate/20150722204256_create_plutus_tables.rb b/fixture_rails_root/db/migrate/20150722204256_create_plutus_tables.rb index 3f8f4ed4..51fb16a9 100644 --- a/fixture_rails_root/db/migrate/20150722204256_create_plutus_tables.rb +++ b/fixture_rails_root/db/migrate/20150722204256_create_plutus_tables.rb @@ -1,5 +1,5 @@ class CreatePlutusTables < ActiveRecord::Migration - def self.up + def change create_table :plutus_accounts do |t| t.string :name t.string :type @@ -30,10 +30,4 @@ def self.up add_index :plutus_amounts, [:account_id, :entry_id] add_index :plutus_amounts, [:entry_id, :account_id] end - - def self.down - drop_table :plutus_accounts - drop_table :plutus_entries - drop_table :plutus_amounts - end end diff --git a/lib/generators/plutus/templates/add_date_migration.rb b/lib/generators/plutus/templates/add_date_migration.rb deleted file mode 100644 index c00bd267..00000000 --- a/lib/generators/plutus/templates/add_date_migration.rb +++ /dev/null @@ -1,6 +0,0 @@ -class AddDateToPlutusEntries < ActiveRecord::Migration - def change - add_column :plutus_entries, :date, :date - add_index :plutus_entries, :date - end -end diff --git a/lib/generators/plutus/templates/update_migration.rb b/lib/generators/plutus/templates/update_migration.rb deleted file mode 100644 index 20ac22bb..00000000 --- a/lib/generators/plutus/templates/update_migration.rb +++ /dev/null @@ -1,17 +0,0 @@ -class UpdatePlutusTables < ActiveRecord::Migration - def change - # we have to remove these indexes because the temporary - # table index name is too long - remove_index :plutus_amounts, [:account_id, :transaction_id] - remove_index :plutus_amounts, [:transaction_id, :account_id] - remove_index :plutus_transactions, column: [:commercial_document_id, :commercial_document_type], :name => "index_transactions_on_commercial_doc" - - rename_table :plutus_transactions, :plutus_entries - rename_column :plutus_amounts, :transaction_id, :entry_id - - # adding the indexes back - add_index :plutus_amounts, [:account_id, :entry_id] - add_index :plutus_amounts, [:entry_id, :account_id] - add_index :plutus_entries, [:commercial_document_id, :commercial_document_type], :name => "index_entries_on_commercial_doc" - end -end From 6efaee48b34ff5bb706627c9172035369f57b14c Mon Sep 17 00:00:00 2001 From: Ramon Tayag Date: Tue, 12 Jul 2016 11:28:51 +0800 Subject: [PATCH 16/17] Fix wrong command --- README.markdown | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.markdown b/README.markdown index caf5cdde..aa908b19 100644 --- a/README.markdown +++ b/README.markdown @@ -16,9 +16,7 @@ Installation ============ - Add the gem to your Gemfile `gem "plutus"` - -- generate migration files `rails g plutus:install:migrations` - +- generate migration files `rake plutus:install:migrations` - run migrations `rake db:migrate` Overview From c1f28c0de820af4f9920b1cf4aa535d77e9f7ace Mon Sep 17 00:00:00 2001 From: Ramon Tayag Date: Tue, 12 Jul 2016 11:34:37 +0800 Subject: [PATCH 17/17] Add note about possible breaking changes --- CHANGELOG.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa3a99a1..4ea96cec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,10 @@ # Not Released - +## Fixed - Fix loading of jquery-ui files (Fixes https://github.com/mbulat/plutus/issues/58) + +## Added - Add `Account#amounts` and `Account#entries` to get all amounts and entries, respectively + +## Changed +- Required jquery-ui version +- How migrations are done, which may be a breaking change from older versions of Plutus