I'm just starting to learn Rails. I created an empty Rails application. And instead of writing a controller, I want to put all my controller logic in my views, and not in separate controller classes.
To do this, should I use .erb files or .rhtml files and what's the difference?
First of all, they are almost the same, but you should use the new standard .html.erb naming format
Secondly, stop what you are doing and review everything !!!!!
MVC , . , .
, .
" . , , , , .
?
.
rails 3.0.rhtml ..html.erb - .
, , MVC. /, .
- . , . , , , . , , , , , , . Rails, , , , - , , .
, , , , .
Rails. , .
, , ? , , -, , xml , -/ , . - ASP ( )? , , ASP, . , unit test ? , , -.
, "" Ruby
, Ruby? , irb? Rails Ruby. , , Ruby, irb, Rails. Ruby, .
, , , , , , - . , , -: ASP, ASP.Net, PHP, JSP, Perl, Ruby rails, , -.
MVC - . , . , . , . .
, . Rails 1 Rails 2. Rails 2 .rhtml, file.rxml file.rjs. Rails file.content_type.template_engine. , file.html.erb, - html, - ERb. rxml xml.builder, rjs ( ) js.rjs
The new rails 3.0.rhtml files will not be supported .. html.erb is the new standard.
Source: https://habr.com/ru/post/1707614/More articles:Dev C ++ to compile C source file - cDetermining if an object is in std :: set - c ++Is it possible to duplicate the following credential process in VB.NET? - windowsHow to specify an external website for XMLHTTPRequest - javascriptInclude file contents in JSP - jsphigher order linear regression - mathStream Duplication - c #What is the best way to display the exact current time and date in Django? - djangoSql Server 2008 Closing Connections After Database Reset - c #Is it possible to run fake scrolling in WinForms? - c #All Articles