需要帮助为这种情况设置脚手架

时间:2022-12-24 02:04:26

I asked a question earlier, and got an excellent response, but, being a newbie to Rails and still getting the basics down, I need someone to show me how to set up some scaffolding for the situation that Hates_ was nice enough to outline for me. I've set up my application and whatnot, but I basically want to have, for example purposes:

我之前问了一个问题,得到了很好的回答,但是,作为Rails的新手并且仍然掌握了基础知识,我需要有人向我展示如何设置一些脚手架来解决Hates_很好的问题。我已经设置了我的应用程序和诸如此类的东西,但我基本上想要拥有,例如:

  • A "Stories" table, for a list of stories
  • 一个“故事”表,用于列出故事

  • A "Pages" table, for a list of pages that can be attached to stories
  • “页面”表,用于可附加到故事的页面列表

  • A "LinkedPages" table, to link one page to multiple other pages
  • “LinkedPages”表,用于将一个页面链接到多个其他页面

The idea is that users can create Stories. Stories have Pages. Pages link to other Pages in a branching sort of way, and Hates_ suggested using a LinkedPages table to assist the process of determining which pages link to which other pages.

这个想法是用户可以创建故事。故事有页面。页面以分支方式链接到其他页面,Hates_建议使用LinkedPages表来帮助确定哪些页面链接到哪些页面。

If someone could use the example models Hates_ provided on the link above (or give me better ones if needed), and just show me how to get this started, I'd be extremely grateful. Rails has had the highest initial learning curve of any programming or scripting language I've learned in the past, I'm just starting to understand many of the basics.

如果有人可以使用上面链接中提供的示例模型Hates_(或者如果需要可以给我更好的那些),并且只是告诉我如何开始这个,我将非常感激。 Rails拥有我过去学到的任何编程或脚本语言的最高初始学习曲线,我刚刚开始理解许多基础知识。

Thanks in advance!

提前致谢!

1 个解决方案

#1


2  

Here is an updated fast paced video that quickly presents some of the wicked sweet features in Rails via a somewhat contrived Blog tutorial.

这是一个更新的快节奏视频,通过一个有点人为的博客教程快速呈现Rails中的一些邪恶的甜蜜功能。

http://media.rubyonrails.org/video/rails_blog_2.mov

The presenter crams a lot of information into a very short time frame and does paste in some prepared code from time to time, but over all he hits on many of the key features.

演示者在很短的时间内掌握了大量信息,并不时粘贴一些准备好的代码,但总的来说,他在很多关键功能上都有所体现。

He explains how to set up scaffolding as well in about probably the last 5 mins or so.

他解释了如何在大约5分钟左右的时间内建立脚手架。

#1


2  

Here is an updated fast paced video that quickly presents some of the wicked sweet features in Rails via a somewhat contrived Blog tutorial.

这是一个更新的快节奏视频,通过一个有点人为的博客教程快速呈现Rails中的一些邪恶的甜蜜功能。

http://media.rubyonrails.org/video/rails_blog_2.mov

The presenter crams a lot of information into a very short time frame and does paste in some prepared code from time to time, but over all he hits on many of the key features.

演示者在很短的时间内掌握了大量信息,并不时粘贴一些准备好的代码,但总的来说,他在很多关键功能上都有所体现。

He explains how to set up scaffolding as well in about probably the last 5 mins or so.

他解释了如何在大约5分钟左右的时间内建立脚手架。