Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 424b539bfb
Fetching contributors…

Cannot retrieve contributors at this time

42 lines (38 sloc) 1.231 kb
require 'controllers_helpers'
require 'pdf_helper'
require 'prince'
require 'authenticated_system'
require 'include_javascripts'
require 'better_errors'
require 'better_nested_set'
require 'better_nested_set_helper'
require 'better_tag_helper'
require 'better_error_messages_for'
require 'without_table'
require 'lipsiadmin_helper'
require 'serializo'
ActiveRecord::Base.class_eval do
include LipsiaSoft::Acts::NestedSet
include LipsiaSoft::BetterErrors
end
ActionView::Base.class_eval do
include LipsiaSoft::Acts::BetterNestedSetHelper
include LipsiaSoft::IncludeJavascripts
include LipsiaSoft::BetterTagHelper
include LipsiaSoft::BetterErrorMessagesFor
end
ActionController::Base.class_eval do
include LipsiaSoft::ControllersHelpers
include LipsiaSoft::AuthenticatedSystem
end
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
error_class = "fieldWithErrors"
if html_tag =~ /<(input|textarea|select)[^>]+class=/
class_attribute = html_tag =~ /class=['"]/
html_tag.insert(class_attribute + 7, "#{error_class} ")
elsif html_tag =~ /<(input|textarea|select)/
first_whitespace = html_tag =~ /\s/
html_tag[first_whitespace] = " class='#{error_class}' "
end
html_tag
end
Jump to Line
Something went wrong with that request. Please try again.