I use rails and I need to know how to add a new action to my controller, new to rails, so I really don’t know if I can just type “def action” in controller.rb or is it too much of that?
Thanks.
No, that ... just adding a method to a controller class automatically creates a new action for that controller (at least with a default setting).
Beginning Ruby on Rails . , , " " " " . .
, , . :
map.connect ':controller/:action/:id'
(. ActionController:: Routing).
RESTful, ( ) routes.rb(. ActionController:: Resources).
, , , . .
, :
views/main/index
Source: https://habr.com/ru/post/1707633/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1707628/how-to-route-sub-domains-to-account-pages-how-does-domain-masking-work&usg=ALkJrhj2zPJvnzwcIsozahgvu7N6BprXagDisabling marginpar (marginparwidth), while in a multicol environment - latexWhy are backslashes removed from the request - ASP.NET and Javascript - javascriptEmacs Pabbrev and Python - pythonDoes PHP show the names of all declared classes? - phpOrganization of large volumes of Doc in Sharepoint - sharepointInheritance / polymorphism and serialization WCF - wcfHow to reinstall combobox in winforms? - windowsHow to select rows with a column value equal to a known row value? - sqlCan I use a front controller in Rails? - ruby-on-railsAll Articles