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
<%= javascript_include_tag "jquery-1.4.2", "rails", "highcharts" %> |
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
<div id="fb_chart" style="width: 100%; height: 300px;"></div> | |
<% content_for :javascripts do %> | |
<script type="text/javascript"> | |
new Highcharts.Chart({ | |
chart: { renderTo: 'fb_chart', defaultSeriesType: 'area' }, | |
title: { text: 'Facebook Publish to Token Rate per Day' }, | |
xAxis: { type: 'datetime' }, |
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
config.gem searchlogic |
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
config.gem searchlogic |
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
Post.name_not_like(‘foo”) | |
Equates to: | |
SELECT * FROM "posts" WHERE (post.name NOT LIKE '%foo%') |
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
Post.name_like(“foo”).views_gt(50).views_lt(200) | |
SELECT * FROM "posts" WHERE ((posts.views < 200) AND ((posts.views > 50) AND (post.name LIKE '%foo%'))) |
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
Post.category_type like(“fun”) | |
Post Load (0.4ms) SELECT "posts".* FROM "posts" INNER JOIN "categories" ON "categories".id = "posts".category_id WHERE (categories.type LIKE '%fun%') |
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
Product.search(:category_type_like => "fun"). |
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
@search = Post.search(params[:search]) | |
@posts = @search.all |
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_for @search do |f| %> | |
<ul> | |
<li> | |
<%= f.label :name_like, "Name" %> | |
<%= f.text_field :name_like %> | |
</li> | |
<li> | |
<%= f.label :category_id_equals, "Category" %> | |
<%= f.collection_select :category_id_equals, Category.all, :id, :name, :include_blank => true %> | |
</li> |
OlderNewer