This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= form_tag "", :method => "get" do %> | |
<div class="toolbar"> | |
<div class="left"> | |
<%= label_tag(:from, "From:") %> | |
<%= text_field_tag :from, params[:from], :class => "datepicker" %> | |
<%= label_tag(:to, "to") %> | |
<%= text_field_tag :to, params[:to], :class => "datepicker" %> | |
</div> | |
<div class="right"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.9.3-p0 :017 > Statistic.where(:id=>234, :website_id=>12) | |
Statistic Load (0.4ms) SELECT "statistics".* FROM "statistics" WHERE "statistics"."id" = 234 AND "statistics"."website_id" = 12 | |
=> [#<Statistic id: 234, organic_visits: 55, paid_visits: nil, organic_conversions: 0, paid_conversions: nil, organic_conversion_rate: #<BigDecimal:7ff1abe91890,'0.0',9(36)>, paid_conversion_rate: nil, date: "2012-01-05 00:00:00", website_id: 12, created_at: "2012-02-07 17:27:21", updated_at: "2012-02-07 17:27:21">] | |
1.9.3-p0 :018 > Statistic.find_by_website_id_and_date(12,Time.now-35.days) | |
Statistic Load (0.5ms) SELECT "statistics".* FROM "statistics" WHERE "statistics"."website_id" = 12 AND "statistics"."date" = '2012-01-05 00:20:40.456598' LIMIT 1 | |
=> nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mod = Module.new do | |
Junk = 123 | |
end | |
mod.const_defined?(:Junk) #=> false | |
mod.const_defined?(:Junk, false) #=> ArgumentError | |
mod.constants #=> [] | |
module Foo | |
Junk = 123 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#some_div{:class => baz ? 'foo' : 'bar'} |