Skip to content

Commit

Permalink
Merge 9646d05 into 0e6b7e6
Browse files Browse the repository at this point in the history
  • Loading branch information
parndt committed Nov 16, 2014
2 parents 0e6b7e6 + 9646d05 commit c72c019
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion core/lib/refinery/admin/base_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ def group_by_date(records)

records.each do |record|
key = record.created_at.strftime("%Y-%m-%d")
record_group = new_records.collect{|records| records.last if records.first == key }.flatten.compact << record
record_group = new_records.map{|r|
r.last if r.first == key
}.flatten.compact << record
(new_records.delete_if {|i| i.first == key}) << [key, record_group]
end

Expand Down
4 changes: 2 additions & 2 deletions core/lib/refinery/core/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ def refinery_inclusion!
config.autoload_paths += %W( #{config.root}/lib )

# Include the refinery controllers and helpers dynamically
config.to_prepare &method(:refinery_inclusion!).to_proc
config.to_prepare(&method(:refinery_inclusion!).to_proc)

after_inclusion &method(:register_decorators!).to_proc
after_inclusion(&method(:register_decorators!).to_proc)

# Wrap errors in spans
config.to_prepare do
Expand Down
4 changes: 2 additions & 2 deletions core/lib/refinery/ext/action_view/helpers/form_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ def required_label(object_name, method, options = {})
end


def label_humanize_text method, options = {}
def label_humanize_text(method, options = {})
object = options[:object]

content ||= if object && object.class.respond_to?(:human_attribute_name)
object.class.human_attribute_name(method)
end

content ||= method.humanize
content || method.humanize
end

end

0 comments on commit c72c019

Please sign in to comment.