`
hideto
  • 浏览: 2690545 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

每天一剂Rails良药之The Console Is Your Friend

    博客分类:
  • Ruby
阅读更多
我们要多使用ruby script/console,在开发Rails程序时最好启动一个console窗口
我们来看看我们可以使用console干什么:
Person.find_by_first_name("Chad").email

Calendar.column_names

app.get "/"
app.follow_redirect!

如果Ruby编译时有readline支持,我们可以使用Tab键来补全类名和方法名
如果我们修改了Model,我们不需重启console,运行reload!()即可
分享到:
评论

相关推荐

    The Rails 5 Way-Leanpub(2017).pdf

    Since the API documentation is liberally licensed (just like the rest of Rails), there are some sections of the book that draw from the API documentation. But in practically all of those cases, the ...

    The Rails3 Way, 2nd Edition

    Drawing on their unsurpassed experience and track record, they address the real challenges development teams face, showing how to use Rails 3 to maximize your productivity. Using numerous detailed ...

    The Rails 4 Way

    ### 关于《The Rails 4 Way》的知识点总结 #### 标题:The Rails 4 Way 这本书主要讲述了Ruby on Rails 4版本的核心特性和最佳实践。Ruby on Rails(简称Rails)是一个用Ruby语言编写的开源全栈Web应用框架。本书...

    awesome_rails_console, Rails 控制台增强使你的Rails 控制台更加出色.zip

    awesome_rails_console, Rails 控制台增强使你的Rails 控制台更加出色 使你的Rails 控制台非常出色这个 gem 是由使用pry生产,jazz_hands和 jazz_fingers的激发 was 。awesome_rails_console的优点是:减少 gem ...

    the rails way

    《The Rails Way》一书由Obie Fernandez撰写,属于Addison-Wesley Professional Ruby系列,该系列致力于为读者提供实用、面向人且深入的信息,帮助他们利用Ruby平台创建动态技术解决方案。这一系列书籍的创立基于一...

    rails_console_toolkit:可配置的 Rails 控制台助手

    安装将此行添加到应用程序的 Gemfile 中: gem 'rails_console_toolkit' 然后生成初始化程序: $ bin/rails generate rails_console_toolkit:install或手动编写: # config/initializers/console....

    [Rails] Crafting Rails Applications (英文版)

    This pioneering book is the first resource that deep dives into the new Rails 3 APIs and shows you how use them to write better web applications and make your day-to-day work with Rails more ...

    Rails Recipes英文版(清晰文字pdf+源码)

    Ruby三神书之一(其余的两本是Agile.Web.Development.with.Rails和Ruby For Rails,在我的资源列表也有) Rails is large, powerful, and new. How do you use it effectively? How do you harness the power? And, ...

    Rails.Angular.Postgres.and.Bootstrap.2nd.Edition

    Also new is Webpack coverage, to develop the front-end code for your Rails application. Create a usable and attractive login form using Bootstrap's styles, while ensuring the database table backing ...

    rails 5 test prescriptions build a healthy codebase

    Your Ruby on Rails application is sick. Deadlines are looming, but every time you make the slightest change to the code, something else breaks. Nobody remembers what that tricky piece of code was ...

    Rails3常用命令行命令

    Rails3 是 Ruby on Rails 框架的一个版本,它提供了一系列强大的命令行工具,使得开发者可以快速地构建和管理Web应用。在本文中,我们将深入探讨Rails3中的常用命令,帮助你更高效地进行开发工作。 首先,新建一个...

    Ajax on Rails

    Beyond the how-to, Ajax on Rails helps you consider when Ajax is (and isn't) appropriate, and the trade-offs associated with it. For those new to Rails, this book provides a quick introduction, the ...

    Agile Web Development with Rails 4

    You concentrate on creating the application, and Rails takes care of the details., Tens of thousands of developers have used this award-winning book to learn Rails. It’s a broad, far-reaching ...

    awesome_rails_console:Rails 控制台增强 - 让你的 Rails 控制台很棒

    无需担心配置(因为反正没有太多选择)安装宝石档案: gem 'awesome_rails_console' 在终端: bundlerails g awesome_rails_console:install # This will include dependency gems to the gemfile# you should ...

Global site tag (gtag.js) - Google Analytics