Skip to content

Instantly share code, notes, and snippets.

@take
take / InfoPlist.strings
Last active December 17, 2015 16:09 — forked from mps/InfoPlist.strings
/* Localized versions of Info.plist keys */
"Credits" = "クレジット";
"Here are some great libraries I used to create this application:" = "これらの素晴らしいライブラリを使ってこのアプリを開発しました:";
"About" = "このアプリについて";
"Thank You" = "ありがとう";
"Thank you to the amazing team at GitHub for creating a great product, without their hard work, none of this would have been possible." = "GitHub社の皆さんにお礼を言いたいと思います。GitHubのスタッフの大変な苦労が無ければ、このようなアプリは作れませんでした。";
"About the Developer" = "このアプリのデベロッパーについて";
"Icon Design" = "アイコンのデザイン";
@take
take / spec_helper.rb
Created October 9, 2012 16:33 — forked from pauljamesrussell/spec_helper.rb
RSpec matcher for ensuring a model is accepting nested attributes for an association, and accepting/rejecting the right values.
# Use: it { should accept_nested_attributes_for(:association_name).and_accept({valid_values => true}).but_reject({ :reject_if_nil => nil })}
RSpec::Matchers.define :accept_nested_attributes_for do |association|
match do |model|
@model = model
@nested_att_present = model.respond_to?("#{association}_attributes=".to_sym)
if @nested_att_present && @reject
model.send("#{association}_attributes=".to_sym,[@reject])
@reject_success = model.send("#{association}").empty?
end
model.send("#{association}").clear