Ruby

The command which -a ruby will show you where Ruby is installed.

which -a ruby

Save user and modify

u = User.find_by(email: "<EMAIL>")

# Then run commands like below
# u.access_locked = false
# u.access_locked?

DB Dump Steps

# Create DB via PgAdmin App
pg_restore --port 5432 --username logeshpaul --dbname mdr_staging --no-password --verbose /Users/logeshpaul/Downloads/
.env file DATABASE_NAME_DEVELOPMENT=mdr_staging
./bin/dev

# Alternate Method shared by Lordson
psql DB_NAME < sce_dump.sql

Time

More about Time API - Link

Changing the format of Date & Time

In case you want a custom format use Strftime

Populate projects and studies in sce

Enable / Disable Form, Codelist, etc

Enable / Disabled Editor

Clear local DB (Like prime for SCE)

Create fixtures in MDR

Run Specs

Run server in production environment

Assets

Jobs

Rake DB Drop & Prime

PKPD

Help

Rails Console

Content tag contact

Selenium Driver

Selenium Driver Config steps to test the feature/CSS styles layouts/JS features in action in Chrome browser: (This are just to see whats going in your spec)

Note: Please do not commit these configs

  1. Add these to your application Gemfile within Test group:

  1. Run bundle install in terminal.

  2. In spec/rails_helper.rb Comment out line 54 Capybara.javascript_driver = :webkit

  3. Add below code in spec/rails_helper.rb line 53:

  1. Run your individual feature spec and see them running in a new Chrome browser.

Adding Route

Checking available routes

Misc

Last updated