Skip to content

Instantly share code, notes, and snippets.

@rodrigopinto
Created June 3, 2010 13:26
Show Gist options
  • Save rodrigopinto/423882 to your computer and use it in GitHub Desktop.
Save rodrigopinto/423882 to your computer and use it in GitHub Desktop.
#
# Generating theme from web-app-theme
#
#
# Commnad to generate theme
#
script/generate theme --theme=name_theme
#
# Commnad to generate theme for a model
#
script/generate themed model_name
#
# Configure the show message for field errors using web-app-theme on environment.rb
#
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
if html_tag =~ /<label/
%|<div class="fieldWithErrors">#{html_tag} <span class="error">#{[instance.error_message].join(', ')}</span></div>|
else
html_tag
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment