I have the following code:
def analytics
@user_registrations = User.count(:conditions => ["created_at >= ?", 30.days.ago.to_date], group: "date(created_at)")
@daily_count = []
30.times do |day|
@daily_count << [Date.today - day, @user_registrations['#{Date.today - day}']]
end
end
which when run with: <%= simple_format @user_registrations.to_yaml %> produces:
--- !omap
- '2012-08-23': 11
I want to get the 11 value out and put that in my daily_count array.
How can I do that?
update:
<%= simple_format @user_registrations.to_yaml %>
<%= simple_format @daily_count.to_yaml %>
results in the image:

Just replace:
with:
Single quotes will cause the #{} escape syntax to be treated as a literal, double quotes cause it to be eval’ed.