-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
# Docs | ||
|
||
* [mail](./mail.md) | ||
* [bepo.md](./bepo.md) | ||
* [docker.md](./docker.md) | ||
* [fail2ban.md](./fail2ban.md) | ||
* [iptables.md](./iptables.md) | ||
* [mail](./mail.md) | ||
* [irb.md](./irb.md) | ||
* [jsx-ts.md](./jsx-ts.md) | ||
* [mongodb.md](./mongodb.md) | ||
* [mysql.md](./mysql.md) | ||
* [nginx.md](./nginx.md) | ||
* [postgresql.md](./postgresql.md) | ||
* [ror.md](./ror.md) | ||
* [irb.md](./irb.md) | ||
* [shell.md](./shell.md) | ||
* [symfony.md](./symfony.md) | ||
* [vim.md](./vim.md) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# IRB | ||
|
||
## See current configuration | ||
|
||
```irb | ||
IRB.conf | ||
``` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Ruby On Rails | ||
|
||
## Controller | ||
|
||
```shell | ||
bin/rails generate controller Articles index [--skip-routes] | ||
``` | ||
|
||
## Model | ||
|
||
```shell | ||
bin/rails generate model Article title:string body:text | ||
``` | ||
> Model names are singular, because an instantiated model represents a single data record. | ||
> To help remember this convention, think of how you would call the model's constructor: | ||
> we want to write `Article.new(...)`, `not Articles.new(...)`. | ||
[source](https://guides.rubyonrails.org/getting_started.html#mvc-and-you-generating-a-model) | ||
|
||
### Add record | ||
|
||
```shell | ||
bin/rails console | ||
|
||
entity = EntityClass.new(propertyOne: "value") | ||
entity.save | ||
entity | ||
EntityClass.find(1) | ||
EntityClass.all | ||
``` | ||
|
||
## Routes | ||
|
||
```shell | ||
bin/rails routes | ||
``` |