What is the recommended file extension for rail viewing pages (2.3.2)
1.RHTML 2.html.erb
any meaning in that.
Standard naming:
template_name.mime_type.erb
Value:
The controller will search for the corresponding template file when responding to various request formats:
def show @user = User.find(params[:id]) respond_to do |format| format.html # Looks for show.html.erb format.xml # this will look for show.xml.erb # OR you can always use render :xml facility # format.xml { render :xml => @user } end end
Link for API documents: http://api.rubyonrails.org/classes/ActionController/MimeResponds/InstanceMethods.html
afaik, .rhtml has long been deprecated.
Source: https://habr.com/ru/post/1766136/More articles:Какая хорошая техника для отображения изображения "Загрузка..."? - javascriptJQuery Ajax function called twice with the same data - jqueryMy.Computer.FileSystem.DeleteDirectory () with read-only files? - .netcreate.js.erb, destroy.js.erb: how these files fit into a Rails application - ruby-on-railsHow to convert an ISO 8601 date to a UNIX timestamp in Ruby? - ruby | fooobar.comAn object reference is required for a non-static field, method, or property - c #PHP Doctrine - Best practice for setting default encoding for all applications - phpJcheckBox in Jtable - swingCreating a database of local locations / enterprises - geolocationHow to interpret the control times reported by the Perl Benchmark module? - benchmarkingAll Articles