Action Controller Metal ActionController::Metal is the simplest possible controller, providing a valid Rack interface without the additional niceties provided by ActionController::Base. A sample metal controller might look like this: class HelloController < ActionController::Metal def index self.response_body = "Hello World!" end end And then to route requests to your metal controller, you would a
Active Support Multibyte Chars Chars enables you to work transparently with UTF-8 encoding in the Ruby String class without having extensive knowledge about the encoding. A Chars object accepts a string upon initialization and proxies String methods in an encoding safe manner. All the normal String methods are also implemented on the proxy. String methods are proxied through the Chars object, and
Action Controller Streaming Allows views to be streamed back to the client as they are rendered. By default, Rails renders views by first rendering the template and then the layout. The response is sent to the client after the whole template is rendered, all queries are made, and the layout is processed. Streaming inverts the rendering flow by rendering the layout first and subsequently each part
civil_from_format(utc_or_local, year, month = 1, day = 1, hour = 0, min = 0, sec = 0) Link Returns DateTime with local offset for given year if format is local else offset is zero. DateTime.civil_from_format :local, 2012 # => Sun, 01 Jan 2012 00:00:00 +0300 DateTime.civil_from_format :local, 2012, 12, 17 # => Mon, 17 Dec 2012 00:00:00 +0000 # File activesupport/lib/active_support/core_ext/date_tim
Active Record Active Record objects don’t specify their attributes directly, but rather infer them from the table definition with which they’re linked. Adding, removing, and changing attributes and their type is done directly in the database. Any change is instantly reflected in the Active Record objects. The mapping that binds a given Active Record class to a certain database table will happen au
Active Record Callbacks Callbacks are hooks into the life cycle of an Active Record object that allow you to trigger logic before or after a change in the object state. This can be used to make sure that associated and dependent objects are deleted when ActiveRecord::Base#destroy is called (by overwriting before_destroy) or to massage attributes before they’re validated (by overwriting before_vali
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く