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
login: &login | |
username: root | |
development: | |
adapter: mysql | |
database: searchlogic_development | |
<<: *login | |
test: | |
adapter: mysql |
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
A common idiom is to use || to assign a value to a variable only if that variable isn't already set. This can be written as: | |
1. @variable = @variable || "default value" | |
@variable = @variable || "default value" | |
or, more idiomatically, as: | |
1. @variable ||= "default value" |
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
# application.helper | |
def default_text(text) | |
onClickFunction = "field = event.target; if (field.value=='#{text}') {field.value = '';}else {return false}" | |
onBlurFunction = "field = event.target; if (field.value=='') {field.value = '#{text}';}else {return false}" | |
{:value => text, :onclick => onClickFunction, :onblur => onBlurFunction} | |
end | |
# view |
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
The easiest way to tweak this imho is to edit the .git/config file in your repository. Look for the entry you messed up and just tweak the URL. | |
On my machine in a repo I reguarlly use it looks like this: | |
KidA% cat .git/config | |
[core] | |
repositoryformatversion = 0 | |
filemode = true | |
bare = false | |
logallrefupdates = true |