This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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" = "アイコンのデザイン"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% | |
socket = ["/tmp/mysqld.sock", | |
"/tmp/mysql.sock", | |
"/var/run/mysqld/mysqld.sock", | |
"/var/lib/mysql/mysql.sock", | |
"/opt/local/var/run/mysql5/mysqld.sock" | |
].detect{|socket| File.exist?(socket)} | |
%> | |
development: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ruby knows what you | |
# mean, even if you | |
# want to do math on | |
# an entire Array | |
cities = %w[ London | |
Oslo | |
Paris | |
Amsterdam | |
Berlin ] | |
visited = %w[Berlin Oslo] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Takehiro: like theres a table which contains all the state ( = states table ) | |
Takehiro: and theres User table | |
Takehiro: which contains state_id | |
Takehiro: when u create a new user, u need to get all the state data to show a select box or something right | |
pduersteler: Takehire yes. for that you can provide a :collection to your select | |
Takehiro: oh | |
Takehiro: kk thx :P | |
pduersteler: :) | |
Takehiro: so if i provide :collection to my select, when i do @user = User.new | |
Takehiro: i get all the data from states aswell? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description: | |
# tanshiba | |
# | |
# Dependencies: | |
# None | |
# | |
# Configuration: | |
# None | |
# | |
# Commands: |