アークウェブ
システム開発
SandBox
Web制作会社アークウェブのスタッフが、システム開発のTips・ノウハウをまとめているWikiです
アークウェブシステム開発SandBox
アークウェブWebマーケティングSandBox
アークウェブWebデザインSandBox
アークウェブ アクセシビリティWiki
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
なんか見つけたらわかることだけでもいいからメモっていくこ...
** まとめサイト [#ie289c00]
- http://railsnotes.com/rails-3/
** [[Rails 3 and the Real Secret to High Productivity:htt...
- いきなり分からんが ^^;
In Rails 3, ActionController::Base is built on top of Ac...
うーん、
-- ActionController::Metalというのが用意される
-- それには、callbacks, rendering, layouts, helpersがない...
-- ActionController::BaseはActionController::Metalを継承...
-- ActionController::Baseが、必要に応じて内部的にinclude...
- URL /loginを GETメソッドなら、SessionsController#loginに
- POSTメソッドなら、SessionsController#createに
- そんな感じでルーティングする、ってことかな。URLにこだわ...
contrller :sessions do
match 'login', do
get :new, :as => :login
post :create
end
end
- routesで、resourcesの入れ子のとき、こんな風に記述できる...
resources :projects, :controller => :project do
resources :attachments
resources :participants do
:put => :update_all, :on => :collection
end
resources :companies do
resources :people
resource :avator
end
end
- XSS対策、デフォルトでサニタイズされるらしい。rawでサニ...
<%# => "I'm hacked you good! <sciprt>" %>
<%= comment.body %>
<%# => "I'm hacked you bad! <script>" %>
<%= raw comment.body %>
- link_to_remote -> link_to :remote => true みたいになっ...
<%= link_to "Delete", @comment, :remote => true, :method...
<a href="/comments/1" data-remote="true" data-method="de...
- このdata-xxx っていうのは、HTML5のdata-xxx アトリビュー...
** [[My Five Favorite Things About Rails 3 | Engine Yard ...
- respond_toが宣言的に記述できるらしい
respond_to :html, :xml # class level
def create
@user = User.new(params[:user])
flash[:notice] = 'User was successfully created.' if @...
respond_with(@user)
end
- ActiveModelというのができて、ActiveRecordを継承しなくて...
class Person
include ActiveModel::Validations
validates_presence_of :name
attr_accessor :name
def initialize(name)
@name = name
end
end
Person.new.valid? #=> false
Person.new.errors #=> {:name => ["cannot be blan...
Person.new("matz").valid? #=> true
** [[Customizing your scaffold template become easier in ...
- scaffoldのテンプレートのカスタマイズが楽になるらしい
- RAILS_ROOT/lib/templates/rails/scaffold_controller/cont...
置いておけばそれをテンプレートにしてくれるらしい。
- scaffoldに限らずgeneratorは全部?
** [[Rails 3 の Gem 管理ツール Bundler を使う - ursmの日...
- rake gem ではなく、Bundlerという仕組みを使うらしい
- config/environment.rbではなく、Gemfileに読み込みたいgem...
- gem bundle でインストールされるらしい
#blikifooter(志田)
終了行:
なんか見つけたらわかることだけでもいいからメモっていくこ...
** まとめサイト [#ie289c00]
- http://railsnotes.com/rails-3/
** [[Rails 3 and the Real Secret to High Productivity:htt...
- いきなり分からんが ^^;
In Rails 3, ActionController::Base is built on top of Ac...
うーん、
-- ActionController::Metalというのが用意される
-- それには、callbacks, rendering, layouts, helpersがない...
-- ActionController::BaseはActionController::Metalを継承...
-- ActionController::Baseが、必要に応じて内部的にinclude...
- URL /loginを GETメソッドなら、SessionsController#loginに
- POSTメソッドなら、SessionsController#createに
- そんな感じでルーティングする、ってことかな。URLにこだわ...
contrller :sessions do
match 'login', do
get :new, :as => :login
post :create
end
end
- routesで、resourcesの入れ子のとき、こんな風に記述できる...
resources :projects, :controller => :project do
resources :attachments
resources :participants do
:put => :update_all, :on => :collection
end
resources :companies do
resources :people
resource :avator
end
end
- XSS対策、デフォルトでサニタイズされるらしい。rawでサニ...
<%# => "I'm hacked you good! <sciprt>" %>
<%= comment.body %>
<%# => "I'm hacked you bad! <script>" %>
<%= raw comment.body %>
- link_to_remote -> link_to :remote => true みたいになっ...
<%= link_to "Delete", @comment, :remote => true, :method...
<a href="/comments/1" data-remote="true" data-method="de...
- このdata-xxx っていうのは、HTML5のdata-xxx アトリビュー...
** [[My Five Favorite Things About Rails 3 | Engine Yard ...
- respond_toが宣言的に記述できるらしい
respond_to :html, :xml # class level
def create
@user = User.new(params[:user])
flash[:notice] = 'User was successfully created.' if @...
respond_with(@user)
end
- ActiveModelというのができて、ActiveRecordを継承しなくて...
class Person
include ActiveModel::Validations
validates_presence_of :name
attr_accessor :name
def initialize(name)
@name = name
end
end
Person.new.valid? #=> false
Person.new.errors #=> {:name => ["cannot be blan...
Person.new("matz").valid? #=> true
** [[Customizing your scaffold template become easier in ...
- scaffoldのテンプレートのカスタマイズが楽になるらしい
- RAILS_ROOT/lib/templates/rails/scaffold_controller/cont...
置いておけばそれをテンプレートにしてくれるらしい。
- scaffoldに限らずgeneratorは全部?
** [[Rails 3 の Gem 管理ツール Bundler を使う - ursmの日...
- rake gem ではなく、Bundlerという仕組みを使うらしい
- config/environment.rbではなく、Gemfileに読み込みたいgem...
- gem bundle でインストールされるらしい
#blikifooter(志田)
ページ名:
アークウェブのサービスやソリューションはこちら
サービス
Webの企画・戦略立案
Webデザイン
Webシステム開発
Zen Cartソリューション
Zen Cart導入コンサルティング, RFP作成, トラブル診断
Zen Cartで大規模ECサイト構築
Zen Cartモジュールの開発・カスタマイズ
Zen Cart制作会社(デザイン・企画会社)様向けサービス
Zen Cart海外向け・多言語ECサイトの制作
Zen Cartのデザイン, ペルソナ/シナリオ法, RIA(Ajax・Flex)
Zen Cartのセキュリティ・運用保守サポート
Zen Cart企画・マーケティング戦略, SEO・SEM(サーチエンジン広告)
Zen Cartハイエンド版(大規模サイト用高可用バージョン)
EC-CUBEとZen Cart 機能比較表(概要)
Zen Cart携帯モジュール(モバイルショップ構築用)
Zen Cartの導入事例
Zen-Cart.JPのご紹介とアークウェブの取り組み
Zen-Cartモバイルショップ構築サービス
Movable Typeソリューション
企業サイトでのMovable Type活用
Movable Type用プラグイン一覧
MT用フォーム作成プラグイン「A-Form」
A-Formパートナー制度
その他ソリューション
AjaxでRIA開発
Ruby on Rails
Flexによる業務システム構築
ペルソナ/シナリオ法
ビジネスブログ
SNS・ソーシャルソフトウェア
SEO・SEM
アークウェブのCSR(企業の社会的責任)
アークウェブのCSR指針