Posted by Rob Anderton on April 21st, 2008 @ 10:48 – 2 comments
Updated on June 10th, 2008 @ 12:13
Tagged with actionview, error, hpricot, html, rails, rails development, ruby, validation
The default Rails behaviour for highlighting form fields with errors is to wrap them in a div, so:
<div>
<%= f.label(:email) %>
<%= f.text_field(:email, :size => '30') %>
</div>
Becomes:
<div>
<div class="fieldWithErrors"><label for="user_email">Email</label></div>
<div class="fieldWithErrors"><input id="user_email" name="user[email]" size="30" type="text" value="" /></div>
</div>
This is great when knocking together a quick prototype but as your site evolves you’ll probably want to customise it. This can be done very easily by using ActionView::Base.field_error_proc, assign a Proc to it either in your environment.rb or, if you’re a modern thinker, in an initializer and you’re good to go.
Read more of this entry
Posted by Chris Anderton on April 14th, 2008 @ 14:23 – 0 comments
Updated on April 14th, 2008 @ 14:24
Tagged with amazon, clusters, ec2, hosting, rails, ruby, s3, storage, xen
Good news - persistent storage for EC2 is on it's way - it's already in private beta and will be 'publicly available later this year'.
Read more of this entry
Posted by Chris Anderton on April 14th, 2008 @ 12:27 – 0 comments
Updated on April 14th, 2008 @ 12:28
Tagged with apache, deployment, donations, mod_rails, mod_ruby, open source, passenger, phusion, rails, ruby
About a month ago Gregory Brown created a buzz with his blog post about working on open source projects for money. Gregory opens with a "Here’s a crazy idea" - but then outlined an idea that was pretty fresh, and not crazy at all (in my book!). This evolved into a wiki around the subject - an interesting read.
As is usual, it created a lot of discussion on blog sites and also fed into talks of a similar nature that had been happening at TheWebFellas HQ.
Read more of this entry
Posted by Rob Anderton on April 8th, 2008 @ 18:55 – 16 comments
Updated on July 17th, 2010 @ 23:37
Tagged with dhtml, fckeditor, javascript, prototype, rails, rails development, rich text editor, tinymce, widgeditor, wysiwyg
So today I found myself in need of a WYSIWYG editor for the admin pages of the site I’m currently working on. I’ve used FCKEditor and Scott Rutherford’s Rails plugin before and Chris has recently been using TinyMCE for a few of our other projects but both of them seemed too heavy, especially when the project requirements only stated a need to apply simple formatting like bold, italic and headings.
Read more of this entry