Sapporo RubyKaigi 03
into Models
if params[:skip_preview] == '1'
...
株式会社 万葉
2010年12月6日月曜日
88.
Sapporo RubyKaigi 03
into Models
if params[:skip_preview] == '1'
...
株式会社 万葉
2010年12月6日月曜日
89.
Sapporo RubyKaigi 03
into Models
if params[:skip_preview] == '1'
...
params[:book][:skip_preview]
株式会社 万葉
2010年12月6日月曜日
90.
Sapporo RubyKaigi 03
into Models
if params[:skip_preview] == '1'
...
params[:book][:skip_preview]
attr_accessor :skip_preview
...
if skip_preview?
...
株式会社 万葉
2010年12月6日月曜日
Sapporo RubyKaigi 03
Really hard if it’s used in super
class, modules or plug-ins !
継承元や
モジュールや
プラグインで
使われていたら
なお大変! ?1 new attribute
株式会社 万葉
2010年12月6日月曜日
121.
Sapporo RubyKaigi 03
Really hard if it’s used in super
class, modules or plug-ins !
継承元や attr_accessible
モジュールや
プラグインで
使われていたら
なお大変! ?1 new attribute
株式会社 万葉
2010年12月6日月曜日
122.
Sapporo RubyKaigi 03
Really hard if it’s used in super
class, modules or plug-ins !
継承元や attr_accessible
モジュールや
プラグインで
使われていたら
なお大変! ?1 new attribute
株式会社 万葉
2010年12月6日月曜日
Sapporo RubyKaigi 03
Reason is required where the
code is not natural
コードが不自然なと
ころに理由を書く
株式会社 万葉
2010年12月6日月曜日
147.
Sapporo RubyKaigi 03
Things unnatural
「不自然」の例
• Leaving code commented out
コードのコメントアウトを残してる
• not using common helper method
ヘルパーメソッドを使っていない
• checking it’s really nil
falseとnilを区別してる
2010年12月6日月曜日
• etc... 株式会社 万葉
148.
Sapporo RubyKaigi 03
comments should be checked
in code reviews
あるべきコメントが
ないのも指摘する
株式会社 万葉
2010年12月6日月曜日