Skip to content

Commit

Permalink
Fixed indent in FormBuilder#input_class.
Browse files Browse the repository at this point in the history
  • Loading branch information
ebeigarts authored and gregbell committed Oct 15, 2011
1 parent f6dc0c7 commit 3606e8d
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions lib/active_admin/form_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,25 +91,25 @@ def has_many(association, options = {}, &block)
def active_admin_input_class_name(as)
"ActiveAdmin::Inputs::#{as.to_s.camelize}Input"
end

def input_class(as)
@input_classes_cache ||= {}
@input_classes_cache[as] ||= begin
@input_classes_cache ||= {}
@input_classes_cache[as] ||= begin
begin
begin
custom_input_class_name(as).constantize
rescue NameError
begin
custom_input_class_name(as).constantize
active_admin_input_class_name(as).constantize
rescue NameError
begin
active_admin_input_class_name(as).constantize
rescue NameError
standard_input_class_name(as).constantize
end
standard_input_class_name(as).constantize
end
rescue NameError
raise Formtastic::UnknownInputError
end
rescue NameError
raise Formtastic::UnknownInputError
end
end
end

private

Expand Down

0 comments on commit 3606e8d

Please sign in to comment.