<%=
options = {}
all_attributes.each_pair{|k,v| options[k.to_sym] = h(v)}
k = options.delete(:key)
I18n.t(k, {:default=>all_parameters.default}.merge(options)).html_safe
%>
<%=
model ||= this
model = model.class unless model.kind_of? Class
# prepare symbolized attributes for merging
attrs = {}
all_attributes.each_pair{|k,v| attrs[k.to_sym] = v}
model.model_name.human( attrs )
%>
<%=
model ||= this
model = model.class unless model.kind_of? Class
# prepare symbolized attributes for merging
attrs = {}
all_attributes.each_pair{|k,v| attrs[k.to_sym] = v}
model.human_attribute_name( attribute.to_sym, attrs )
%>
<%
raise Hobo::Error, "The 'collection' attribute must be defined" if collection.blank?
belong_class = this.kind_of?(Class) ? this : this.class
raise Hobo::Error, "The context is not an ActiveRecord::Base instance or class. (this = #{this.typed_id rescue this.inspect})" unless belong_class < ActiveRecord::Base
# prepare symbolized attributes for merging
attrs = {}
all_attributes.each_pair{|k,v| attrs[k.to_sym] = v} -%>
<% if your && belong_class < Hobo::Model::User && this.kind_of?(Hobo::Model::User) && I18n.locale == :en -%>
<%= belong_class.human_attribute_name(collection.to_sym, attrs) %>
<% else -%>
<%= belong_class.human_attribute_name( collection.to_sym, attrs ) %>
<% end %>