Rails and Stuff at Abel killed Cain

Ruby on Rails and other Webdevelopment

Archive for February, 2010

Building Websites is fun!

Having IE6 Users sucks instead!

Get rid of them by pasting the following code into your document-head.

<!–[if IE 6]>
<script type=”text/javascript”>
alert(”No IE 6! Thanks!”);
document.write(’<style>*{position:relative}</style><table><input></table>’)
</script>
<![endif]–>

IE 6 will crash after asking the user not to use it!

Ruby on Rails provides a nice way to display error_messages; just by adding form.error_messages you get a nice overview of all your errors.

But i prefer to have it in different ways, so i 1) dont want the on_error_message-output to be a div element, 2) further i want to give each input field having bad content to be marked – by adding an error-class to that specific element for example.

Since i had to figure it out, here are the results for changing both.

1) different element instead of a div at on_error_message?
[More]

Rails logging methods are wonderful for development.

Indeed, they often suck when you want to inspect objects or cascaded objects. So here is a codesnipped that helps you inspect any kind of any object in rails, deeply and detailed.

as a new lib-file or, just as i do, in application_controller.rb, add the follogwing code:

[More]