- 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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Semantic UI has these classes, however they're only applicable to*/ | |
/* grids, containers, rows and columns.*/ | |
/* plus, there isn't any `mobile hidden`, `X hidden` class.*/ | |
/* this snippet is using the same class names and same approach*/ | |
/* plus a bit more but to all elements.*/ | |
/* see https://github.com/Semantic-Org/Semantic-UI/issues/1114*/ | |
/* Mobile */ | |
@media only screen and (max-width: 767px) { | |
[class*="mobile hidden"], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cred distillery kale chips migas wolf. Listicle tattooed iPhone, synth vice squid ethical meditation cred. 8-bit lumbersexual drinking vinegar brunch. Literally austin authentic lumbersexual sriracha cold-pressed YOLO. Organic vinyl meggings messenger bag, bitters gastropub occupy meditation leggings jean shorts direct trade selvage. Crucifix iPhone fanny pack bushwick, roof party actually banh mi meggings. Synth pinterest church-key, waistcoat thundercats PBR&B gluten-free ugh tumblr before they sold out kale chips YOLO. | |
Venmo wolf literally keytar, blue bottle wayfarers sartorial cred raw denim aesthetic helvetica. Vegan poutine PBR&B food truck, pour-over schlitz vice post-ironic venmo. Raw denim chicharrones PBR&B, letterpress ethical salvia pour-over 3 wolf moon migas chia drinking vinegar listicle literally. YOLO ugh plaid tilde, hoodie DIY offal wolf farm-to-table hammock kogi williamsburg vegan. Seitan shoreditch intelligentsia kale chips letterpress austin. 90's salvia polaroid, ugh YOLO cliche pick |
- Add
gem 'rails_12factor'
to your Gemfile. This will add error logging and the ability for your app to serve static assets. bundle
- Run
RAILS_ENV=production rake db:create db:migrate db:seed
- Run
rake secret
and copy the output - From the command line:
export SECRET_KEY_BASE=output-of-rake-secret
- To precompile your assets, run
rake assets:precompile
. This will create a folderpublic/assets
that contains all of your assets. - Run
RAILS_ENV=production rails s
and you should see your app.
Remember to clobber your assets (rake assets:clobber
) and re-precompile (rake assets:precompile
) if you make changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
do it .. | |
gem 'mysql2', '~> 0.3.18' this gem works with rails version 4.x.x | |
if install gem 'mysql2', '~> 0.4.0' it produces gem load error | |
referense | |
https://github.com/rails/rails/issues/21544 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$nilai_angka = 85; | |
$mata_kuliah = 'Pemrograman Web Lanjut'; | |
if ($nilai_angka > 80) { | |
$nilai_huruf = 'A'; | |
$ket = 'Lulus'; | |
} elseif ($nilai_angka > 60) { | |
$nilai_huruf = 'B'; | |
$ket = 'Lulus'; | |
} elseif ($nilai_angka > 50) { |
All the steps below came from watching the Railscast below:
http://railscasts.com/episodes/274-remember-me-reset-password
The steps below assumes that your app already has a user and user authentication set up.
- Add to app/views/sessions/new.html.erb file
<p><%= link_to 'Forgot password?', new_password_reset_path %></p>