タグ

ブックマーク / railscasts.com (8)

  • #415 Upgrading to Rails 4 - RailsCasts

    Download: source codeProject Files in Zip (63.4 KB)mp4Full Size H.264 Video (35.6 MB)m4vSmaller H.264 Video (17.7 MB)webmFull Size VP8 Video (18.6 MB)ogvFull Size Theora Video (46.4 MB) 先週のRailsConfでRails 4.0のRC1が発表されました。この機会に自分のアプリケーションをRails 4にアップグレードし、動作確認をして、見つけたバグを報告してみてはいかがでしょうか。Rails 4の新機能の多くについてエピソード400で紹介したので、今回はRails 3.2のアプリケーションをアップグレードする方法に焦点をあてます。そうすることによって、自分のアプリケーションを使って順を追って理解することが

    anoworl
    anoworl 2014/10/22
  • #338 Globalize3 - RailsCasts

    “Wookieespeak”のリンクをクリックすると、ページ上部のタイトルが変わりますが、記事の内容は英語のままです。データベースからの内容を、ユーザが希望する言語で表示させるためには、どのように修正すればいいのでしょうか? Railsアプリケーションの国際化は通常YAMLファイルを使っておこなわれます。/config/localesディレクトリの下に、アプリケーションがサポートする言語ごとの翻訳されたテキストを含んだ複数のファイルがあります。このアプローチについてはエピソード138で詳しく説明しました。静的なテキストであればこの方法でうまくいきますが、データベースからのテキストを別の言語で表示させる場合には対応していません。それをおこなうには、各翻訳文をデータベースのテーブルに格納する必要がありますが、Globalize3 gemを利用すればこれをとても簡単におこなうことができます。Gl

    anoworl
    anoworl 2013/11/19
  • #198 Edit Multiple Individually - RailsCasts

    <% form_tag edit_individual_products_path do %> <table> <tr> <th></th> <th>Name</th> <th>Category</th> <th>Price</th> </tr> <% for product in @products %> <tr> <td><%= check_box_tag "product_ids[]", product.id %></td> <td><%=h product.name %></td> <td><%=h product.category.name %></td> <td><%= number_to_currency product.price %></td> <td><%= link_to "Edit", edit_product_path(product) %></td> <td><

    anoworl
    anoworl 2013/09/08
  • #412 Fast Rails Commands - RailsCasts

    Download: source codeProject Files in Zip (44.5 KB)mp4Full Size H.264 Video (21.7 MB)m4vSmaller H.264 Video (9.71 MB)webmFull Size VP8 Video (10 MB)ogvFull Size Theora Video (22.4 MB) Railsコマンドの多くが実行時間が遅いということにお気づきの方もいるでしょう。例えばRailsアプリケーションのジェネレータを実行した場合、画面への出力が始まるまでに数秒の遅れがあります。その理由はこれらのコマンドが実行されたときにアプリケーションが起動されるからで、開発時にテストを頻繁に実行する場合にこれが最も顕著になります。アプリケーションが大きくなるにつれ、この待ち時間は長くなります。今回のエピソードでは、これらのコマン

    anoworl
    anoworl 2013/07/22
    Zeusも個人のプロジェクトで用いてみよう。
  • #383 Uploading to Amazon S3 (pro) - RailsCasts

  • #314 Pretty URLs with FriendlyId - RailsCasts

    If you are tired of model ids in the URL, overriding to_param can only get you so far. The friendly_id plugin can help by making it easy to generate a URL slug and maintain a history.

    anoworl
    anoworl 2013/07/09
  • #411 Performance Testing (pro) - RailsCasts

  • #241 Simple OmniAuth - RailsCasts

    There is a newer version of this episode, see the revised episode. Resources OmniAuth Episode 235: Omniauth Part 1 Full episode source code Update 12/5/11: Some things have changed since OmniAuth version 1.0 was released. Each provider is now a separate gem that should be included in the Gemfile, and the "user_info" hash is now simply "info". The changes have been made below.

    anoworl
    anoworl 2013/06/02
  • 1