Category: rails
5 posts
rails基础
控制器接受向应用发起的特定访问请求。路由决定哪些访问请求被哪些控制器接收。一般情况下,一个控制器会对应多个路由,不同路由对应不同动作,动作搜集数据并把数据提供给视图。...
Read More →rails7 使用jquery bootstrap的设置
需要在config/importmap.rb中添加 ``` 需要在config/importmap.rb 中添加 pin "jquery", to:...
Read More →as: 选项可以修改默认生成的具名路由名称
``` Rails.application.routes.draw do root 'static_pages#home' get '/help', to: 'static_pages#help', as: 'helf' get...
Read More →rails撤销操作
rails可以使用destroy命令完成撤销操作。一般来说,下面这两个命令时相互抵消的 rails generate controller StaticPages home help rails destroy controller...
Read More →