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
# current time
Time.now # 2009-06-24 12:39:54 +0900
# Return Time string with certain format - dd-Mon-yyyy HH:MM am/pm
"%d-%b-%Y %-l:%M%P" # 27-Jan-2016 7:19am
"%d/%m/%Y %-l:%M%P" # 27/01/2016 7:19am
content_tag :li, class: css_class do
link_to(text, path, name: name) +
link_to('', "javascipt:void(0)", class: "CLASSNAME")
end
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
Add these to your application Gemfile within Test group:
In spec/rails_helper.rb Comment out line 54 Capybara.javascript_driver = :webkit
Add below code in spec/rails_helper.rb line 53:
Capybara.register_driver :selenium_chrome do |app|
Capybara::Selenium::Driver.new(app, :browser => :chrome)
end
Capybara.javascript_driver = :selenium_chrome
Run your individual feature spec and see them running in a new Chrome browser.
Adding Route
resources :tools do
collection do
get :run_now
end
end
<%= link_to t(".add_new_metadata_source"), run_now_study_tools_path(**@**study), remote: true, class: "”=%>