app/models/carnival/field.rb in carnival-0.1.5 vs app/models/carnival/field.rb in carnival-0.1.6
- old
+ new
@@ -7,13 +7,13 @@
@name = name
set_position_by_params
validate
end
- def name
- @name.to_s
- end
+ #def name
+ # @name.to_s
+ #end
def specified_association?
not get_association_and_field[:association].nil?
end
@@ -152,9 +152,14 @@
@params[:widget].present? ? @params[:widget] : :input
end
def show_view
@params[:show_view]
+ end
+
+ def sort_name
+ return @params[:related_to].to_s if @params[:related_to].present?
+ @name.to_s
end
private
def get_association_and_field