$ echo 'gem "webpacker"' >> Gemfile
$ bundle install
$ rails webpacker:install
$ yarn add [email protected] jquery popper.jsdiff --git a/config/webpack/environment.js b/config/webpack/environment.js
index d16d9af..86bf1a7 100644| <%= form_with(model: team) do |form| %> | |
| <div> | |
| <%= form.label :name %> | |
| <%= form.text_field :name, class: "input" %> | |
| </div> | |
| <div> | |
| <%= f.select :user_id, {}, {placeholder: "Select user"}, {class: "w-full", data: { controller: "select", select_url_value: users_path }} %> | |
| </div> |
| require 'googleauth' | |
| require 'google/apis' | |
| require 'google/apis/calendar_v3' | |
| module GoogleMeetService | |
| def self.create_google_event(event) | |
| authorize_client | |
| google_event = create_calendar_event(event) | |
| updated_google_event = update_calendar_event(event,google_event) | |
| event.update_attribute(:conference_link,updated_google_event.hangout_link) |
| class ApplicationController < ActionController::Base | |
| def is_owner user_id | |
| unless user_id == current_user.id | |
| render json: nil, status: :forbidden | |
| return | |
| end | |
| end | |
| def is_owner_object data | |
| if data.nil? or data.user_id.nil? | |
| return render status: :not_found |
$ echo 'gem "webpacker"' >> Gemfile
$ bundle install
$ rails webpacker:install
$ yarn add [email protected] jquery popper.jsdiff --git a/config/webpack/environment.js b/config/webpack/environment.js
index d16d9af..86bf1a7 100644rebase vs merge).rebase vs merge)reset vs checkout vs revert)git rev-parse)pull vs fetch)stash vs branch)reset vs checkout vs revert)| # Dont forget to set the env variable "certdomain", and either fill in your email below or use an env variable for that too. | |
| # Also note that this config is using the LetsEncrypt staging server, remove the flag when ready! | |
| Resources: | |
| sslSecurityGroupIngress: | |
| Type: AWS::EC2::SecurityGroupIngress | |
| Properties: | |
| GroupId: {"Fn::GetAtt" : ["AWSEBSecurityGroup", "GroupId"]} | |
| IpProtocol: tcp | |
| ToPort: 443 |
| Based on these: | |
| https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu | |
| http://www.intridea.com/blog/2013/5/21/howto-install-setup-jenkins-ci-for-rails-projects | |
| Setup an EC2 instance with Ubuntu (14.04) | |
| Open port 8080 | |
| Install Jenkins | |
| wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add - |
| # Assume we are in your home directory | |
| cd ~/ | |
| # Clone the repo from GitLab using the `--mirror` option | |
| $ git clone --mirror [email protected]:mario/my-repo.git | |
| # Change into newly created repo directory | |
| $ cd ~/my-repo.git | |
| # Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks. |
| AllCops: | |
| RunRailsCops: true | |
| # Commonly used screens these days easily fit more than 80 characters. | |
| Metrics/LineLength: | |
| Max: 120 | |
| # Too short methods lead to extraction of single-use methods, which can make | |
| # the code easier to read (by naming things), but can also clutter the class | |
| Metrics/MethodLength: |
TL;DR
Create a backup:
pg_dumpall > mybackup.sqlPerform the upgrade:
sudo pg_dropcluster 9.4 main --stop