$ rails g model User
belongs_to
has_one
<!-- Contact batch email --> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type' /> | |
</head> | |
<body> | |
<div>Name: <%= @name %></div> | |
<br> | |
<div>Subject: <%= @subject %></div> |
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # | |
# Needs to Manage Dependencies | |
class Gear | |
attr_reader :chainring, :cog, :rim, :tire | |
def initialize(chainring, cog, rim, tire) | |
@chainring = chainring | |
@cog = cog | |
@rim = rim |
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
# define class Dog | |
class Dog | |
attr_accessor :breed, :name | |
def initialize(breed, name) | |
# Instance variables | |
@breed = breed | |
@name = name | |
end |
When using Rails 3.0 and later we already get jquery-rails for free. Look in the gemfile and you'll see:
gem "jquery-rails"
You can view the full documentation here: source: https://github.com/indirect/jquery-rails
If you take a look in APP_DIR/app/assets/javascripts/application.js, you'll notice the following lines of code:
#Simple Authentication with Bcrypt
This tutorial is for adding authentication to a vanilla Ruby on Rails app using Bcrypt and has_secure_password.
The steps below are based on Ryan Bates's approach from Railscast #250 Authentication from Scratch (revised).
You can see the final source code here: repo. I began with a stock rails app using rails new gif_vault
##Steps
Follow the steps below to setup a local development environment:
Recommended to download latest XQuartz