よく忘れるので。細かい話は他の記事にお任せして、テンプレートからファイルを作れるところまで。 0. こんなのを作りたいとかんがえる 抽象クラスFigureのサブクラスをapp/modelsに作るようなジェネレータがほしい。 クラス名は引数で指定したい こんな感じで使うイメージ: $ rails g figure triangle --color blue 1. ジェネレータをジェネレートする $ rails g generator figure これでlib/generators/figure以下に USAGE : 使い方を記述するテキストファイル figure_generator.rb : 生成処理を実装するファイル templates/ : テンプレートファイルを置くディレクトリ が作られる。 2. 作り方を記述する USAGEファイルに0.のようなことを記述する。 3. 生成処理を記
[小ネタ]RailsのScaffoldテンプレートを上書きするススメの勝手に追補的な記事。 コントローラのテンプレートはrailties/lib/rails/generators/rails/scaffold_controller/templates/controller.rbあたりから#{Rails.root}/lib/templates/rails/scaffold_controller/controller.rbにコピーしてくる。 このへんのどこからどこへコピーしてくるみたいなのはこのへんに書いてある(もしかしてRails Guideに公式のものがあるのかな?)。 以上。 ちなみにsaveとかupdateのコードはRails::Generators::ActiveModel経由で出力しているんだけど、そこにはsave!やupdate!、destroy!がない。これについては次のような
.buttonClass { font-size:15px; font-family:Arial; width:140px; height:50px; border-width:1px; color:#fff; border-color:#18ab29; font-weight:bold; border-top-left-radius:28px; border-top-right-radius:28px; border-bottom-left-radius:28px; border-bottom-right-radius:28px; text-shadow: 1px 1px 0px #2f6627; background:#44c767; } .buttonClass:hover { background: #5cbf2a }
Photoshopのレイヤースタイルパネルを模したインターフェイスで、ドロップシャドウや角丸やグラデーションなどを生成できるCSSジェネレーターを紹介します。
いわゆるバーコードジェネレータなのですが、今までのものと違って自分の個人情報を埋め込むことができるというなかなか画期的なジェネレータです。作成したバーコードはダウンロードすることも可能ですし、印刷したりすることも可能。 実際の使い方などは以下から。 Scott Blake - Bar Code Art http://www.barcodeart.com/art/yourself/yourself_frames.html まずは「start」をクリック 性別を選択 年齢を入力 国を選択 身長を入力 体重を入力 完成! 右上の「Diagram」をクリックすると解説が出てきます 「Download」をクリックすると作成したバーコードがダウンロードできるようです
Home Upload Image Preview & Download apple-touch-icon usage .ico & favicon usage Favicons, apple-touch-icons, iphone application icons: An often overlooked design element which brands your website with an icon are generally called Favicons. The original Favicon was a Windows resource file which includes a 16x16 pixel image. Today, with Vista and Windows 7, the .ico format can display an
This webpage was generated by the domain owner using Sedo Domain Parking. Disclaimer: Sedo maintains no relationship with third party advertisers. Reference to any specific service or trade mark is not controlled by Sedo nor does it constitute or imply its association, endorsement or recommendation.
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く