Generators in Rails 3 have been rewritten to use Thor which means the code used to create a generator is quite different. Here you will learn the new way to make generators in Rails 3.
One of the most frustrating things about deploying a Rails application is seeing a default static error page when something goes wrong. It’s not just that internal groaning initiated by the fact that something has gone wrong, but more the unprofessional1 way in which this event is reported to the user. In Rails 2.3.x it is possible to use rescue_from in a controller to render a custom error page u
This article targets Rails 3 The article was written as of Rails 3.0. The information contained in this page might not apply to different versions. One of the biggest changes on the frontend side of the upcoming Rails 3 version is the replacement of the Prototype JavaScript helpers in favor of Unobtrusive JavaScript (UJS). The implementation of Unobtrusive JavaScript, and the consequent removal of
Feb 18, 2010217 likes13,118 viewsAI-enhanced description The document discusses the features and syntax updates in Rails 3 compared to earlier versions, focusing on starting a new app, routing, action controller improvements, action mailer, and active relation changes. It highlights new conventions for generating code and managing database queries more efficiently with lazy loading. The document a
【最新刊】 Elixir実践ガイド[機能拡張編] impress top gearシリーズ 2020年5月22日発売! 『Ruby on Rails 6実践ガイド』の続編です。 ▶ 読者サポートページ 【最新刊】 Elixir実践ガイド impress top gearシリーズ 2021年2月5日発売!Elixir 1.11対応! 本書の主要なテーマは、モジュール、関数、データ型、パターンマッチングなどです。 ▶ 読者サポートページ Elixir/Phoenix 初級④: バリデーション (OIAX BOOKS) Kindle版 本書は、『Elixir/Phoenix初級』シリーズの第4巻です。Phoenix 1.4に対応しています。webpackの設定、whereマクロの使い方、真偽値と日付のあ使い方、Gettextモジュールによる国際化、バリデーション、エラーメッセージの日本語化、など
達人出版会の高橋です。こんにちは。 先日から近刊としてページを公開しております『はじめる! Rails3(1)』ですが、本日発売を開始する予定ですいたしました。 『はじめる! Rails3(1)』(黒田努・著) 本書は、まさに今求められるRails 3に関する書籍として提供できる、当社ならではの一冊だと思うのですが、発表してからの反響がこれまでの本以上に大きいため、正直ちょっとびびっていることもあり、本書の位置づけについて少し長めに説明しておきます。 Rails 3が公開されたのは昨年8月、もう半年ほど前になります。が、世界的にもまだあまり書籍が出ていない状態です。これまで「Railsのバイブル」的な存在であった、『Agile Web Development with Rails』の第4版も、3月に刊行予定とのことで、まだβ版です(ちなみに著者もSam Rubyのみに変わってます。なんと)
As you may have read, Rails adds XSS protection by default in Rails 3. This means that you no longer have to manually escape user input with the h helper, because Rails will automatically escape it for you. However, it's not as simple as all that. Consider the following: Hello <strong>friends</strong>! <%= tag(:p, some_text) %> <%= some_text %> In the above example, we have a few different scenari
いつのまにか、Rails3+1.9.2というモテコンビで仕事をやっております。で、Rails3から入った新機能として、SexyValidationというのができたので、それを使ってみました。 Sexy Validationとは、いままでのRailsのvalidationの書き方とは違い、Modelに対してのvalidationがスッキリ書けるようになりました。例えば、titleカラムを持つPostというModelがあるときに、title要素は必須なんだというvalidationを書こうとすると、以下のようになります。 class Post < ActiveRecord::Base validates :title, :presence => true end 今迄の validates_presence_of :name よりわかりやすいのではないでしょうか。 独自のvalidationを
(2010-08-30: Rails 3.0.0がリリースされたのでそれにあわせて更新。generator関連が少し変わってる) 会社用の、小物Webアプリを作ろうかと思い、せっかくなのでRuby on Rails 3でmongoDB使ってみようかな、と思い、とりあえず環境を作るところまでのメモ。 Rails 3 のインストール とりあえず Rails 3 のインストール。Bundlerで入れる。Bundler自体のバージョンが1.0以上でないとダメみたいなんで、もしそれ未満しか入っていない場合にはBundlerのインストールからする。 プロジェクトのトップディレクトリとなるところを作成し、そこにGemfileを作る。 $ mkdir ~/workspace/hoge_prj $ cd ~/workspace/hoge_prj Gemfile source 'http://rubygems
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く