Learning output

I used to write what I learned and did in my notebook, but I can't remember it with this alone, so I will write it in Qiita as well. I will only write really simple things. I will write it for myself.

"How to create a homepage with rails"

rails generate contoller home top

Doing this will create two files. Something like a file. One is top.html.erb Second home_controller

Explanation of the first top.html.erb ・ This is made in view If you put characters and html here, it will be reflected.

When adding, create a file in home ○○ .html.erb-like feeling

Description of the second home_controller ・ This is made in the controller Def top is written on the controller You cannot access without it.

When adding def ○○○

By the way, if get "home / top" => "home # top" is not written in the routing, an error will occur. get URL => Controller name # Action name

that's all

Recommended Posts

Learning output ~ 11/3 ~
Learning output
[Test code learning / output]
Summary of 2020 programming learning output
Java learning (0)
Ruby learning 4
Ruby learning 5
Servlet learning
Ruby learning 3
2020/10/4 Morning output
2020/10/4 noon output
Ruby learning 2
Maven learning
Ruby learning 6
2020/10/3 Noon output
Ruby learning 1
2020/10/3 Morning output
Output using methods and constants Learning memo
Programming learning day 3
[Java] output, variables
Ruby input / output
Ruby Learning # 25 Comments
Ruby Learning # 13 Arrays
For JAVA learning (2018-03-16-01)
Java learning day 5
Ruby Learning # 34 Modules
[ruby] drill output
[ruby] drill output
Ruby Learning # 14 Hashes
[ruby] drill output
Ruby standard output
Rails learning day 3
Rails learning day 4
[ruby] drill output
[ruby] drill output
My learning record
Rails learning day 2
[ruby] drill output
[Output] About each
[ruby] drill output
Ruby Learning # 15 Methods
5th class: Output
rails learning day 1
java learning day 2
java learning day 1