Skip to content

Instantly share code, notes, and snippets.

View nmerouze's full-sized avatar

Nicolas Mérouze nmerouze

View GitHub Profile
module ActionView
module Helpers
class FormBuilder
module FormBuilderExtension
def hint(method, text)
errors = object.errors.on(method)
hint_message = "<span class='hint'>#{text}</span>"
if errors.blank?
hint_message
document.observe("dom:loaded", function() {
if ($$('.flash').length > 0) $$('.flash').invoke('fade', { delay: 3.0 });
});
def flash_messages
fl = ''
[:help, :notice, :error].each do |name|
next unless flash[name]
fl << content_tag(:div, flash[name], :class => "flash #{name}")
flash[name] = nil
end
fl unless fl.empty?
end
document.observe("dom:loaded", function() {
$$('#nav li:first-child').invoke('addClassName', 'first');
});
/usr/bin/c++ -bundle -headerpad_max_install_names -o qtruby4.so "CMakeFiles/qtruby4.dir/Qt.o" "CMakeFiles/qtruby4.dir/handlers.o" "CMakeFiles/qtruby4.dir/marshall_types.o" -L/Users/nicolas/Downloads/qt4-qtruby-1.4.10/smoke/qt -F/Library/Frameworks -framework QtCore -lpthread -lruby -F/Library/Frameworks -framework QtNetwork -lsmokeqt -F/Library/Frameworks -framework QtCore -lpthread -F/Library/Frameworks -framework QtGui -F/Library/Frameworks -framework QtNetwork -F/Library/Frameworks -framework QtOpenGL -F/Library/Frameworks -framework QtDBus -F/Library/Frameworks -framework QtSql -F/Library/Frameworks -framework QtSvg -lQtUiTools -F/Library/Frameworks -framework QtXml -F/Library/Frameworks -framework QtWebKit
/usr/bin/c++ -bundle -headerpad_max_install_names -o qtruby4.so "CMakeFiles/qtruby4.dir/Qt.o" "CMakeFiles/qtruby4.dir/handlers.o" "CMakeFiles/qtruby4.dir/marshall_types.o" -L/Users/nicolas/Downloads/qt4-qtruby-1.4.10/smoke/qt -F/Library/Frameworks -framework QtCore -lpthread -lruby -F/Library/Frameworks -framework QtNetwork -lsmokeqt -F/Library/Frameworks -framework QtCore -lpthread -F/Library/Frameworks -framework QtGui -F/Library/Frameworks -framework QtNetwork -F/Library/Frameworks -framework QtOpenGL -F/Library/Frameworks -framework QtDBus -F/Library/Frameworks -framework QtSql -F/Library/Frameworks -framework QtSvg -lQtUiTools -F/Library/Frameworks -framework QtXml -F/Library/Frameworks -framework QtWebKit