wercker status Dependency Status Code Climate


Here are the tables of the conceptual DES-IF version 2.3 from ABRASF

It contains the following models:

  • Service Item - List of services from Complementary law 116/2003
  • Tax Codes - List of tax codes from DES-IF
  • Cities - List of Cities from IBGE
  • City Tax Codes - Tax codes from City (without seed)

Getting started

gem 'abrasf-desif'

Run the bundle command to install it.

After you install add it to your Gemfile, you need to run the migration:

rake db:migrate

After the migration, you need to run the following task to load the seeds:

rake abrasf-desif:db:seed

There is a task to seed an default Tax Code for the city, to call it is necessary to inform the IBGE city code.

rake abrasf-desif:city_tax_code[3550308]

You can also use this feature calling the following code:

Abrasf::Desif::TaxCodeToCity.create city_id:


  • validate uniqueness (tax_code) in city tax code scoped by city and date interval (since-expiry = date interval)

  • validate period valid in city tax code expiry date should be greater than since date