Rails 中的 Action Pack 组件 [英] Action Pack components in Rails

查看:37
本文介绍了Rails 中的 Action Pack 组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Rails 初学者,正在阅读 RailsGuides.

I'm a Rails beginner and reading RailsGuides.

在 RailsGuides 中,它说:

In RailsGuides, it says:

Action View 和 Action Controller 是两个主要组件动作包.
- RailsGuides 操作视图概览

Action View and Action Controller are the two major components of Action Pack.
- RailsGuides Action View Overview

动作包部分GitHub 上的 Rails ,它说,Action Pack 由 Action Dispatch 和 Action Controller 组件组成.

and in Action Pack section of Rails on GitHub, it says, Action Pack consists of Action Dispatch and Action Controller components.

我的问题是,Action Pack 组件实际上是什么?

My questions is, what are the Action Pack components in fact?

推荐答案

我注意到了同样的差异.看来 Rails 指南不正确.ActionView 不是 ActionPack 的一部分.

I noticed the same discrepancy. It appears the Rails Guide is incorrect. ActionView is not part of ActionPack.

ActionPack 是一个与 Rails 捆绑在一起的 gem,它由 Action_dispatch 和 Action_controller 模块组成.ActionView 是一个单独的 gem,也与 Rails 捆绑在一起.每个都有自己的 Github 存储库 https://github.com/rails/rails/tree/master/actionpackhttps://github.com/rails/rails/tree/主/动作视图.

ActionPack is a gem bundled with Rails that consists of the Action_dispatch and Action_controller modules. ActionView is a separate gem also bundled with Rails. Each has it's own Github repository https://github.com/rails/rails/tree/master/actionpack and https://github.com/rails/rails/tree/master/actionview.

如果您查看任何 Rails 项目中的 gemfile.lock,您会看到 Rails 下有单独的 actionpack 和 actionview 模块.您还可以查看计算机上实际的 gem 文件,您将看到一个 actionpack-4.xx 文件夹(其中将有一个 lib/action_controller 文件夹和 lib/action_dispatch 文件夹)和一个 actionview-4 文件夹.xx

If you look at a gemfile.lock on any Rails project, you'll see under Rails there are separate modules for actionpack and actionview. You can also look within your actual gem files on your computer and you'll see a folder for actionpack-4.x.x (within that there will be a lib/action_controller folder and lib/action_dispatch folder) and a folder for actionview-4.x.x.

这篇关于Rails 中的 Action Pack 组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆