タグ

2011年8月2日のブックマーク (3件)

  • HOWTOs for Ruby on Rails, RSpec, Cucumber and Javascript - makandra notes

    Some rubygems come in platform-specific versions (i.e. "x86_64-linux") in addition to the usual "ruby" platform. This is often is done for gems with native extensions that want to deliver precompiled binaries for ease of installation. However, there is an issue on some versions of Bundler (at least 2.3.x) that makes it inconsistent which versions of a gem will be installed. Why this happens On (ve

    HOWTOs for Ruby on Rails, RSpec, Cucumber and Javascript - makandra notes
    HeRo
    HeRo 2011/08/02
    link_toでのajaxレスポンスの扱い
  • ActionView::Helpers::UrlHelper

    This helper may be included in any class that includes the URL helpers of a routes (routes.url_helpers). Some methods provided here will only work in the context of a request (link_to_unless_current, for instance), which must be provided as a method called request on the context. Generates a form containing a single button that submits to the URL created by the set of options. This is the safest m

    HeRo
    HeRo 2011/08/02
    link_toの使い方
  • Views

    ビューの描画 全てのコントローラーのアクションはビューとの関連付けの為に、renderメソッドを呼んでいるでしょう。例えばusersコントローラーのindexアクションはapp/views/users/index.ejsファイルをビューとして描画します。 ビューは、コントローラーで指定されたレイアウトで描画されます。標準のレイアウト名はこの場合、コントローラー名と同じapp/views/layouts/users_layout.ejsとなります。このレイアウトファイルが存在しない場合には、applicationレイアウトが使用されます。 レイアウト無しでビューを描画したい場合には、コントローラー内で、layout(false)を呼び出せば、レイアウトの描画はスキップされるでしょう。 標準のヘルパー railwayはいくつか標準でヘルパーを使用することができます。 link_to link_