Reading Note for Rails Recipes 2018 程序啪啪啪
对于目录的翻译整理,方便以后查阅。
Introduction
- What Makes a Good Recipe Book?
- Who’s It For?
- Rails Version
- Resources
- Acknowledgments
- Tags and Thumbtabs
Part I—User Interface Recipes
- In-Place Form Editing 原地Ajax表单编辑
- Making Your Own JavaScript Helper 制作方便自己使用的JS生成方法
- Live Preview 实时编辑查看结果显示
- Live Search 实时搜索结果显示
- Creating a Drag-and-Drop Sortable List 创建可以拖动的排序列表
- Update Multiple Page Elements With One Ajax Request 通过一个Ajax请求更新多个页面的元素
- Lightning-Fast JavaScript Auto-completion 快速的JS自动补全
- Cheap and Easy Theme Support 页面主题变更支持
- Use Ajax To Trim Fat, Static Pages 利用Ajax修剪复杂的页面
- Smart Pluralization 通过工具实现I18N
- Debugging Ajax 调试Ajax
- Creating a Custom Form Builder 自定义表单生成
- Make Pretty Graphs 生成漂亮的图像
Part II—Database Recipes
- Rails Without A Database 不用DB
- Connecting to Multiple Databases 同时连接使用过个DB
- Integrating with Legacy Databases 集成废弃的DB
- DRY Up Your Database Configuration 做通用的DB配置
- Self-referential Many-to-Many Relationships Model自身的多对多关系实现
- Tagging 文本数据打Tag
- Versioning Your ActiveRecord Models 版本控制用户编辑的数据Model(类似于草稿)
- Convert an Existing Application to Migrations 对存在的应用做迁移
- Many to Many Relationships Where the Relationship Itself Has Data 多对多关系中,关系表中存在私有数据
- Polymorphic Associations - has_many :whatevers 一对多关系中同时对应多个Model
- Adding Behavior to Your ActiveRecord Associations 在关联中添加行为,方便在关联获取时添加搜索条件约束
- Dynamic Database Config 动态DB配置:类似于ERB
- Use ActiveRecord Outside of Rails 将ActiveRecord模型抽取出来单独使用
- Perform Calculations on Yor Model Data 检测Model的性能
- DRY Up Your ActiveRecord Code With Scoping 使Scoping不重复
- Make Dumb Data Smart with composed_of 将一个复杂的对象映射到DB表中的一个表项
- Safely Use Models in Migrations 在Model迁移中注意一致性
Part III—Controller Recipes
- Authentication 验证
- Role-Based Authorization 基于规则的验证
- Cleaning Up Controllers with Postback Actions 去掉冗余的action
- Keep An Eye On Your Session Expiry 注意session有效期
- Rendering Comma Separated Values From Your Actions 将返回数据格式化:Json, xml, cvs
- Make your URLs Meaningful (and pretty) 使URL有意义
- Stub Out Authentication 将验证作为过滤器的一部分
- Convert Your Sessions To ActiveRecord 将session放入DB
- Write Code That Writes Code 制作代码生成器
- Manage a Static Site With Rails 利用Rails管理静态网站
Part IV—Testing Recipes
- Creating Dynamic Test Fixtures 制作动态测试数据
- Extracting Test Fixtures From Live Data 从实际数据中抽取测试数据
- Testing Across Multiple Controllers 测试多请求访问
- Write Tests for Your Helpers 为辅助方法做测试
Part V—Big Picture Recipes
- Automating Development With Your Own Generators 制作自己的生成器
- Continuous Integration 持续集成
- Getting Notified of Unhandled Exceptions 捕获异常
- Creating Your Own Rake Tasks 制作自己的Rake任务
- Dealing With Time-zones 解决时区问题
- Living On The Edge (of Rails Development) 跟紧各种更新
- Syndicate Your Site With RSS 将数据RSS化
- Making Your Own Rails Plugins 制作自己的插件
- Secret URLs 带有验证信息的URL,需要在URL携带身份信息的处理方法
- Quickly Inspect Your Sessions’ Contents 访问本地的session保护
- Sharing Models Between Your Applications 通过链接等方式共享Model
- Generate Documentation For Your Application 利用Rdoc
- Processing Uploaded Images 处理上传的图片
- Easily Group Lists of Things 对List做处理的API
- Keeping Track of Who Did What 对信息做标注,记录操作用户
- Distributing Your Application As One Directory Tree 利用目录树机制实现应用的分布式
- Adding Support for Localization L10N
- The Console Is Your Friend 充分利用Console
- Automatically Save a Draft of a Form 自动表单保存
- Validating Non-ActiveRecord Objects 对非ActiveRecord对象做验证
- Easy HTML Whitelists 对HTML敏感字符做过滤
- Adding Simple Web Services To Your Actions 添加WebServices到Action
Part VI—E-Mail Recipes
- Send Gracefully Degrading Rich-Content Emails 发送富文本邮件(例如颜色什么的)
- Testing Incoming Email 检查收到的邮件
- Sending Email With Attachments 发送带有附件的邮件
- Handling Bounced Email 搜集邮件失败信息的反馈邮件
Part VII—Appendix
- Resources
- Bibliography
- Source Code
文章目录 |
创建@
2013-01-30
最后修改@
2014-01-20