You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
Highlights in Rails 4.1: Spring application preloader config/secrets.yml Action Pack variants Action Mailer previews These release notes cover only the major changes. To learn about various bug fixes and changes, please refer to the changelogs or check out the list of commits in the main Rails repository on GitHub. 1 Upgrading to Rails 4.1If you're upgrading an existing application, it's a great i
プロセスが並列にリクエストを投げるようなウェブアプリケーションは、同じ時間に一つだけしかリクエストを投げないアプリケーションに比べて、Dynoのリソースをより効率的に使える状態になります。従って、並列リクエスト処理は本格的なサービスを開発、運用するいかなる場合でも推奨されます。 Railsは元々は同時に1リクエストしか処理しないように設計をされています。そして、徐々にこの設計から、単体のRubyプロセス内でリクエストの並列処理を許すようなスレッドセーフの実装へと移行しています。しかし今日では、ほとんどのRubyアプリケーションはサポートをしていません。 Unicornウェブサーバは、一つのDynoで複数のRubyプロセスを走らせる事で、どんなRailsアプリケーションでも並列に走らせられるようになります。 このガイドでは、Unicornウェブサーバを使ったHerokuへのRailsアプリケ
Devise 2.0 no longer includes helpers for your migrations (even for your old migrations creating tables used in versions prior to 2.0). Instead, we simply list the database fields explicitly. This page shows the before and after of your original Devise migration(s) so you can easily compare and update your code. Meaning: You will need to change your original Devise migration(s) to not use the Befo
Class methods (1) included (<= v2.3.8) Instance methods (9) act_on_ignored_order act_on_order_or_limit_ignored (<= v5.0.0.1) apply_finish_limit (>= v6.0.0) apply_limits apply_start_limit (>= v6.0.0) batch_order find_each find_in_batches in_batches = private = protected find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil) public Yields each batch of records that was foun
Action Mailer Base Action Mailer allows you to send email from your application using a mailer model and views. Mailer Models To use Action Mailer, you need to create a mailer model. $ bin/rails generate mailer Notifier The generated model inherits from ApplicationMailer which in turn inherits from ActionMailer::Base. A mailer model defines methods used to generate an email message. In these metho
This guide provides you with all you need to get started in sending emails from your application, and many internals of Action Mailer. It also covers how to test your mailers. After reading this guide, you will know: How to send email within a Rails application. How to generate and edit an Action Mailer class and mailer view. How to configure Action Mailer for your environment. How to test your Ac
The slides from the 24C3 session "Ruby on Rails Security" by Jonathan Weiss, 30.12.2007. Even though Ruby on Rails introduces a lot of best practices to the developer, it is still quite easy for an imprudent programmer to forget that every web application is a potential target. Web application attacks like Cross Site Scripting or Cross Site Request Forgery are very popular these days and every Rai
This guide covers different ways to retrieve data from the database using Active Record. After reading this guide, you will know: How to find records using a variety of methods and conditions. How to specify the order, retrieved attributes, grouping, and other properties of the found records. How to use eager loading to reduce the number of database queries needed for data retrieval. How to use dy
Devise is a flexible authentication solution for Rails based on Warden. It: Is Rack based; Is a complete MVC solution based on Rails engines; Allows you to have multiple models signed in at the same time; Is based on a modularity concept: use only what you really need. It's composed of 10 modules: Database Authenticatable: hashes and stores a password in the database to validate the authenticity o
The document discusses new features in Ruby 1.9 and Rails 3, including installation instructions for Ruby 1.9.1 and an overview of changes in Rails 3 such as a new plugin API, non-blocking code, and custom responders that provide a public API compatible with Rails 2.3. Key areas covered are Ruby 1.9, Rails 3, middleware, controllers, routing, and JavaScript support.Read less
Ruby on Rails 2.3.2がリリースされたので、さっそくインストールしました。自分の作っているアプリケーションでテストを実行してみると、2.3.1のときに出ていなかった"ActiveRecord::StaleObjectError: Attempted to delete a stale object"というエラーが出てきました。この ActiveRecord::StaleObjectError は lock_version を使ったロック機能によるものですが、いつもは更新時に起きるのに、今回はどうもレコードの削除時に起きているようです。また、エラーを出しているのはいずれもこのロックに加えて、関連先のモデルに対して counter_cache と":dependent => :destroy"による連鎖削除を指定しているモデルのようです。 原因を調べるために、新しく以下のふたつ
思った。 「Railsは覚える事が多過ぎる」 なので、日本一簡単なチュートリアル作成に挑戦! 目次 インストール 雛形の作成 いらないファイルの削除 アプリケーションの作成 Webサーバーの起動 確認 1. インストール RubyGemsのgemコマンドを使ってrailsをインストール。 % sudo gem install rails 2. 雛形の作成 railsのインストールによって入ったrailsコマンドを使って、アプリケーションの雛形を作ります。 使い方:rails <アプリケーション名> % rails hello % cd hello 出来るファイル: README - railsの説明(いらない) Rakefile - Rakeの設定ファイル(気にしない) app - 自分の書くコードを置くところ(良く使う) config - 設定ファイル各種(良く使う) db - データベ
Ruby on Rails Guides (v7.1.3.3) These are the new guides for Rails 7.1 based on v7.1.3.3. These guides are designed to make you immediately productive with Rails, and to help you understand how all of the pieces fit together. The guides for earlier releases: Rails 7.0, Rails 6.1, Rails 6.0, Rails 5.2, Rails 5.1, Rails 5.0, Rails 4.2, Rails 4.1, Rails 4.0, Rails 3.2, Rails 3.1, Rails 3.0, and Rails
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く