gitignore is very important in many aspects, we also put in some local config files which pointed to some needed data files for the application (linux vs windows have different path seperators for example) to avoid rewriting after every pull the gitignore can be very helpful as long as you remember to forcefully commit a real change
Window.event does not exist in Firefox. Different browsers have different event models. Firefox handles the events slightly different IE and Chrome and for that reason it has not worked. A work-around is to pass the event as an argument to the function:<a onclick="testfunction(event);">
//...
</a>
testfunction(e){
evt = e || window.event;
//...
}
or use a library like jQuery to avoid dealing with all the differences between the browsers.
Apparently in Rails you need to manually set the MIME-Type of attachments, otherwise their filesize, filetype and other Metadata are not properly recognized by the E-Mail client and images will not be displayed within the html e-mail.
In this case using the hash :mime_type and the corresponding value 'image/png' in the rails controller solved this problem:
attachments.inline["img.png"] = {:data => File.read('img.png'), :mime_type => 'image/png'}
Joins are more expensive than a pure concatenation. In your case maybe UNION or UNION ALL might be a good solution because it parses the first SELECT statement and moves on to the next SELECT statement and adds the results to the end of an output table. The finding of the different connections of the joined tables is a huge cost factor.
In this case the error code 401 Unauthorized will be the right HTTP error code, because the existing session token doesn't authorize you any more. Sending the error code 404 is incorrect, because the resource still exists but you aren't currently authorized to see it. Actually a session token is only a shortcut to avoid providing credentials for every request.