- Understand forms and the ways we write them
- Understand the difference between
form_tag
andform_for
- Understand
link_to
and how we can use it to dynamically link our application together
~/ruby via 💎 v2.5.3
➜ gem list --no-versions
then put in array gems.rb
# Ref: https://ruby-doc.org/stdlib-2.5.3/libdoc/net/ftp/rdoc/Net/FTP.html | |
require 'net/ftp' | |
Net::FTP.open('ftp.gnu.org') do |ftp| | |
ftp.login | |
ftp.chdir('gnu/wget') | |
nlst = ftp.nlst('*.tar.gz') | |
nlst.map {|file_name| ftp.gettextfile(file_name) } | |
end |
some problem if you have new system, try to deploy on github with old ssh, when you add ssh on terminal (command line) Ubuntu.
wicky@code: eval $(ssh-agent)
Agent pid 7xxx
wicky@code: ssh-add ~/.ssh/id_rsa #note id_rsa only name not name.pub but only name
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/home/wicky/.ssh/id_rsa' are too open.
It is required that your private key files are NOT accessible by others.
<header class="masthead text-center text-white d-flex" style="background-image: url(<%= asset_path 'header.jpg' %>) !important;"> | |
<div class="container my-auto"> | |
<div class="row"> | |
<div class="col-lg-10 mx-auto"> | |
<h1 class="text-uppercase"> | |
<strong>Your Favorite Source of Free Bootstrap Themes</strong> | |
</h1> | |
<hr> |
## Sublime Text 3 Serial key build is 3176 | |
> * Added these lines into /etc/hosts | |
127.0.0.1 www.sublimetext.com | |
127.0.0.1 license.sublimehq.com | |
> * Used the license key | |
----- BEGIN LICENSE ----- |
If your master.key has been compromised, you might want to regenerate it.
No key regeneration feature at the moment. We have to do it manually.
- Copy content of original credentials
rails credentials:show
somewhere temporarily. - Remove
config/master.key
andconfig/credentials.yml.enc
- Run
EDITOR=vim rails credentials:edit
in the terminal: This command will create a newmaster.key
andcredentials.yml.enc
if they do not exist. - Paste the original credentials you copied (step 1) in the new credentials file (and save + quit vim)
- Add and Commit the file
config/credentials.yml.enc
``` | |
<style media="screen"> | |
body { background-image: url('<%= image_tag @sets.collect(&:background_website).detect(&:attached?) %>') !important; | |
font-family: "Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif; | |
-webkit-background-size: cover; | |
-moz-background-size: cover; | |
background-size: cover; | |
-o-background-size: cover; | |
} | |
</style> |
Use what you know about Ruby, Rails, MVC, sessions, etc. to create the following pieces of functionality:
-
A user who already exists in the database can log in using a username/password combination that they enter in a form. They should know that they are logged in because something like "Welcome, Rachel!" should appear at the top of every page they visit.
-
A user who already exists in the database and is already logged in should be able to log out. They should know that they are logged out because their welcome message will no longer appear at the top of every page they visit.
-
Users should have many jobs, and a job should belong to a user. Therefore, when a user visits any jobs listing, they should only see jobs associated with them. They should not be able to see, edit, or delete any jobs that are not associated with their account.
-
A user who does not exist in the database should be able to create an account through a form that gathers any necessary user information. Once they create an a