gem install jammit
To include a new javascript in the application:
- If only used in single page
- Decide a module name eg. maps
- Copy js file to
app/javascripts/maps/
- Add the module & files in
config/assets.yml
underjavascripts > maps
- Include in template:
- content_for :head do = javascript_include_tag 'maps'
- If used in every page
- Copy js file to
app/javascripts/library/
- Add the file in
config/assets.yml
underjavascripts > library
- Copy js file to
Js is ready to use after running jammit
in application root
rake jobs:work
To load default database data as defined in db/fixtures/*.rb, run:
rake db:seed_fu
Importing New Category Data
rake db:seed_fu FILTER=categories
to update categories data
Importing Postal Code data
To load postal code data to database:
(data are saved to db for every 1000 records)
rake import:codes
will fetch data from iTourSmart Amazon S3 CDN
rake import:codes source=file offset=345
will import data from `RAILS_ROOT/.
Importing Organization data (must run rake db:seed_fu
first to create categories)
To load organization data to database:
rake import:org_seeds
To Export the Page data -
rake page_seeds:build
Then copy what is output to the terminal into "db/fixtures/pages.rb"
all double quotes " need to be escaped " to avoid errors
To Import Account_Type data
rake db:seed_fu FILTER=account_type
To Export current account_type data to new seed file
rake account_type_seeds:build