stackoverfeeds 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +15 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +121 -0
- data/Rakefile +32 -0
- data/app/assets/javascripts/stackoverfeeds/application.js +13 -0
- data/app/assets/stylesheets/stackoverfeeds/application.css +13 -0
- data/app/controllers/stackoverfeeds/application_controller.rb +4 -0
- data/app/controllers/stackoverfeeds/so_feeds_controller.rb +10 -0
- data/app/helpers/stackoverfeeds/application_helper.rb +4 -0
- data/app/helpers/stackoverfeeds/stackoverfeeds_helper.rb +8 -0
- data/app/models/stackoverfeeds/so_feed.rb +9 -0
- data/app/views/stackoverfeeds/_stackoverflow_feeds.html.erb +28 -0
- data/app/views/stackoverfeeds/application.html.erb +14 -0
- data/config/routes.rb +3 -0
- data/db/migrate/20140402191249_create_stackoverfeeds_so_feeds.rb +14 -0
- data/lib/generators/stackoverfeeds/install/install_generator.rb +74 -0
- data/lib/generators/stackoverfeeds/install/templates/application.css +7 -0
- data/lib/generators/stackoverfeeds/install/templates/application.js +16 -0
- data/lib/generators/stackoverfeeds/install/templates/config.yml +14 -0
- data/lib/generators/stackoverfeeds/install/templates/feeds.css +791 -0
- data/lib/generators/stackoverfeeds/install/templates/feeds.js +21 -0
- data/lib/generators/stackoverfeeds/install/templates/schedule.rb +7 -0
- data/lib/generators/stackoverfeeds/install/templates/sprites.png +0 -0
- data/lib/stackoverfeeds.rb +4 -0
- data/lib/stackoverfeeds/engine.rb +11 -0
- data/lib/stackoverfeeds/stackoverfeeds_handler.rb +34 -0
- data/lib/stackoverfeeds/version.rb +3 -0
- data/lib/tasks/stackoverfeeds_tasks.rake +14 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +28 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +29 -0
- data/spec/dummy/config/environments/production.rb +80 -0
- data/spec/dummy/config/environments/test.rb +36 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +12 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/routes.rb +4 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20140403144550_create_stackoverfeeds_so_feeds.stackoverfeeds.rb +15 -0
- data/spec/dummy/db/schema.rb +27 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +19 -0
- data/spec/dummy/log/test.log +772 -0
- data/spec/dummy/public/404.html +58 -0
- data/spec/dummy/public/422.html +58 -0
- data/spec/dummy/public/500.html +57 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/spec/helpers/stackoverfeeds_spec.rb +20 -0
- data/spec/dummy/spec/lib/stackoverfeeds_handler_spec.rb +17 -0
- data/spec/dummy/spec/models/so_feed_spec.rb +32 -0
- data/spec/dummy/spec/resources/member.atom +243 -0
- data/spec/dummy/spec/spec_helper.rb +18 -0
- data/spec/dummy/spec/support/blueprints.rb +10 -0
- metadata +256 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
|
2
|
+
|
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
|
5
|
+
|
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
|
2
|
+
|
|
3
|
+
# Add new inflection rules using the following format. Inflections
|
|
4
|
+
# are locale specific, and you may define rules for as many different
|
|
5
|
+
# locales as you wish. All of these examples are active by default:
|
|
6
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
|
7
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
|
8
|
+
# inflect.singular /^(ox)en/i, '\1'
|
|
9
|
+
# inflect.irregular 'person', 'people'
|
|
10
|
+
# inflect.uncountable %w( fish sheep )
|
|
11
|
+
# end
|
|
12
|
+
|
|
13
|
+
# These inflection rules are supported but not enabled by default:
|
|
14
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
|
15
|
+
# inflect.acronym 'RESTful'
|
|
16
|
+
# end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
|
2
|
+
|
|
3
|
+
# Your secret key is used for verifying the integrity of signed cookies.
|
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
|
5
|
+
|
|
6
|
+
# Make sure the secret is at least 30 characters and all random,
|
|
7
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
|
8
|
+
# You can use `rake secret` to generate a secure secret key.
|
|
9
|
+
|
|
10
|
+
# Make sure your secret_key_base is kept private
|
|
11
|
+
# if you're sharing your code publicly.
|
|
12
|
+
Dummy::Application.config.secret_key_base = '0a28fba499814c3fc6bce931ff469c09b382c13762e7cbe0d0cf4449e329a92410cd08071044766466cf77e2486a0ac2c1e5c2cfeb2a3367aa85172a70b88e4b'
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
|
2
|
+
|
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
|
4
|
+
# is enabled by default.
|
|
5
|
+
|
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
|
8
|
+
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# To enable root element in JSON for ActiveRecord objects.
|
|
12
|
+
# ActiveSupport.on_load(:active_record) do
|
|
13
|
+
# self.include_root_in_json = true
|
|
14
|
+
# end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Files in the config/locales directory are used for internationalization
|
|
2
|
+
# and are automatically loaded by Rails. If you want to use locales other
|
|
3
|
+
# than English, add the necessary files in this directory.
|
|
4
|
+
#
|
|
5
|
+
# To use the locales, use `I18n.t`:
|
|
6
|
+
#
|
|
7
|
+
# I18n.t 'hello'
|
|
8
|
+
#
|
|
9
|
+
# In views, this is aliased to just `t`:
|
|
10
|
+
#
|
|
11
|
+
# <%= t('hello') %>
|
|
12
|
+
#
|
|
13
|
+
# To use a different locale, set it with `I18n.locale`:
|
|
14
|
+
#
|
|
15
|
+
# I18n.locale = :es
|
|
16
|
+
#
|
|
17
|
+
# This would use the information in config/locales/es.yml.
|
|
18
|
+
#
|
|
19
|
+
# To learn more, please read the Rails Internationalization guide
|
|
20
|
+
# available at http://guides.rubyonrails.org/i18n.html.
|
|
21
|
+
|
|
22
|
+
en:
|
|
23
|
+
hello: "Hello world"
|
|
Binary file
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# This migration comes from stackoverfeeds (originally 20140402191249)
|
|
2
|
+
class CreateStackoverfeedsSoFeeds < ActiveRecord::Migration
|
|
3
|
+
def change
|
|
4
|
+
create_table :stackoverfeeds_so_feeds do |t|
|
|
5
|
+
t.string :author
|
|
6
|
+
t.string :entry_id
|
|
7
|
+
t.text :summary
|
|
8
|
+
t.string :title
|
|
9
|
+
t.datetime :updated
|
|
10
|
+
t.datetime :published
|
|
11
|
+
|
|
12
|
+
t.timestamps
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# encoding: UTF-8
|
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
|
5
|
+
#
|
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
|
7
|
+
# database schema. If you need to create the application database on another
|
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
|
11
|
+
#
|
|
12
|
+
# It's strongly recommended that you check this file into your version control system.
|
|
13
|
+
|
|
14
|
+
ActiveRecord::Schema.define(version: 20140403144550) do
|
|
15
|
+
|
|
16
|
+
create_table "stackoverfeeds_so_feeds", force: true do |t|
|
|
17
|
+
t.string "author"
|
|
18
|
+
t.string "entry_id"
|
|
19
|
+
t.text "summary"
|
|
20
|
+
t.string "title"
|
|
21
|
+
t.datetime "updated"
|
|
22
|
+
t.datetime "published"
|
|
23
|
+
t.datetime "created_at"
|
|
24
|
+
t.datetime "updated_at"
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
end
|
|
Binary file
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[1m[36m (342.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
|
2
|
+
[1m[35m (299.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
|
3
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
4
|
+
[1m[36m (378.5ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
|
5
|
+
[1m[35m (355.0ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
|
6
|
+
[1m[36m (0.3ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
|
7
|
+
[1m[35m (390.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('0')
|
|
8
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
|
9
|
+
Migrating to CreateStackoverfeedsSoFeeds (20140403144550)
|
|
10
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
11
|
+
[1m[36m (0.5ms)[0m [1mCREATE TABLE "stackoverfeeds_so_feeds" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "author" varchar(255), "entry_id" varchar(255), "summary" text, "title" varchar(255), "updated" datetime, "published" datetime, "created_at" datetime, "updated_at" datetime) [0m
|
|
12
|
+
[1m[35mSQL (1.5ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140403144550"]]
|
|
13
|
+
[1m[36m (446.6ms)[0m [1mcommit transaction[0m
|
|
14
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
|
15
|
+
[1m[36m (330.3ms)[0m [1mCREATE TABLE "stackoverfeeds_so_feeds" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "author" varchar(255), "entry_id" varchar(255), "summary" text, "title" varchar(255), "updated" datetime, "published" datetime, "created_at" datetime, "updated_at" datetime) [0m
|
|
16
|
+
[1m[35m (353.5ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
|
17
|
+
[1m[36m (367.1ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
|
18
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
|
19
|
+
[1m[36m (366.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140403144550')[0m
|
|
@@ -0,0 +1,772 @@
|
|
|
1
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
|
2
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
|
3
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
|
4
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
|
5
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
|
6
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
|
7
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
|
8
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
|
9
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
|
10
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
|
11
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
|
12
|
+
[1m[35m (0.2ms)[0m rollback transaction
|
|
13
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
|
14
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
|
15
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
|
16
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
|
17
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
|
18
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
|
19
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
|
20
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
|
21
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
|
22
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
|
23
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
|
24
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
|
25
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
|
26
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
|
27
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
|
28
|
+
[1m[35m (0.2ms)[0m rollback transaction
|
|
29
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
|
30
|
+
[1m[35m (0.2ms)[0m rollback transaction
|
|
31
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
|
32
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
|
33
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
|
34
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22795691/-/22797446#22797446' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
35
|
+
SQLite3::SQLException: no such table: stackoverfeeds_so_feeds: SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22795691/-/22797446#22797446' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
36
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
37
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
|
38
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22795691/-/22797446#22797446' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
39
|
+
SQLite3::SQLException: no such table: stackoverfeeds_so_feeds: SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22795691/-/22797446#22797446' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
40
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
41
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
|
42
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22795691/-/22797446#22797446' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
43
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
44
|
+
[1m[35mSQL (35.7ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:46:16 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22795691/-/22797446#22797446"], ["published", Tue, 01 Apr 2014 21:41:35 UTC +00:00], ["summary", "<p>You can do something like this:</p>\n\n<pre><code>Song.joins(:albums).where('albums.released_on >= ?', from).where('albums.rating > ?', rating).where('albums.genre = ?', genres)\n</code></pre>\n\n<p>It makes only one query.</p>\n"], ["title", "Answer by VAIRIX for Joining a table and a filtered table in ActiveRecord"], ["updated", Tue, 01 Apr 2014 21:41:35 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:46:16 UTC +00:00]]
|
|
45
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
46
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22796203/in-rails-4-using-ajax-how-do-i-update-a-particular-div-on-success/22796990#22796990' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
47
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
48
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:46:16 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22796203/in-rails-4-using-ajax-how-do-i-update-a-particular-div-on-success/22796990#22796990"], ["published", Tue, 01 Apr 2014 21:13:17 UTC +00:00], ["summary", "<p>This should work for you:</p>\n\n<pre><code>html = render_to_string(partial: 'images', locals: {user: user})\n</code></pre>\n"], ["title", "Answer by VAIRIX for In Rails 4 using AJAX, how do I update a particular div on success?"], ["updated", Tue, 01 Apr 2014 21:13:17 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:46:16 UTC +00:00]]
|
|
49
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
50
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22761911/-/22762973#22762973' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
51
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
52
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:46:16 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22761911/-/22762973#22762973"], ["published", Mon, 31 Mar 2014 13:34:39 UTC +00:00], ["summary", "<p>A possible solution that implies more than one line, is using scope to make it cleaner, you will have two extra lines of code, but I found it more readable:</p>\n\n<pre><code>scope :path => '/', :controller => :static_pages do\n get 'index' => :index, :as => 'index'\n get 'home' => :index, :as => 'home'\nend\n</code></pre>\n\n<p>That way you make explicit which controller to use for all routes + the path (first part of it).</p>\n"], ["title", "Answer by VAIRIX for How to implement root route and get \"index\" to the same page"], ["updated", Mon, 31 Mar 2014 13:34:39 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:46:16 UTC +00:00]]
|
|
53
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
54
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22762135/-/22762326#22762326' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
55
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
56
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:46:16 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22762135/-/22762326#22762326"], ["published", Mon, 31 Mar 2014 13:05:05 UTC +00:00], ["summary", "<p>What you should expect from the assign after calling your controller, is to have the value that the controller sets to the instance variable. You could see it like using @category. So the category created with FactoryGirl is not equals to the one created by your controller (in this case seems your action is returning nil value in your instance variable)</p>\n"], ["title", "Answer by VAIRIX for I don't really know what RSPEC assigns do, and my tests are failing"], ["updated", Mon, 31 Mar 2014 13:05:05 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:46:16 UTC +00:00]]
|
|
57
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
58
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22720472/-/22720669#22720669' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
59
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
60
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:46:16 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22720472/-/22720669#22720669"], ["published", Fri, 28 Mar 2014 18:35:10 UTC +00:00], ["summary", "<p>This should be work!</p>\n\n<pre><code>Foo.joins(:bazs).where(bazs: {name: 'x'})\n</code></pre>\n"], ["title", "Answer by VAIRIX for Select objects based on grandchild attribute with joins in ActiveRecord"], ["updated", Fri, 28 Mar 2014 18:35:10 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:46:16 UTC +00:00]]
|
|
61
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
62
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22717251/-/22717807#22717807' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
63
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
64
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:46:16 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22717251/-/22717807#22717807"], ["published", Fri, 28 Mar 2014 16:04:58 UTC +00:00], ["summary", "<p>One way to do this, is by doing the following:\nIn the view</p>\n\n<pre><code><img src=\"/get_img/tlotr\">\n</code></pre>\n\n<p>That will make a request to the server, so in the routes.rb add</p>\n\n<pre><code>get '/get_img/:filename' => 'test#img'\n</code></pre>\n\n<p>In my case I have a TestController with an action call img like:</p>\n\n<pre><code>def img\n send_file( \"/your_path/\#{params[:filename]}.png\",\n :disposition => 'inline',\n :type => 'image/png',\n :x_sendfile => true )\nend\n</code></pre>\n\n<p>With this solution you hit the server one more time, but you don't have to send the data using the read method.</p>\n"], ["title", "Answer by VAIRIX for How can I display png data as an image inside in the browser?"], ["updated", Fri, 28 Mar 2014 16:04:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:46:16 UTC +00:00]]
|
|
65
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
66
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22716263/-/22716782#22716782' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
67
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
68
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:46:16 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22716263/-/22716782#22716782"], ["published", Fri, 28 Mar 2014 15:20:09 UTC +00:00], ["summary", "<p>You can do something like that:</p>\n\n<p>In your javascript file:</p>\n\n<pre><code>$('#my_button').click(function(){\n $.ajax({\n type:'GET',\n url: '/table',\n data:{ rows: $('#my_text_field').val() },\n success: function(data){\n $('#my_table_container').html(data);\n }\n });\n});\n</code></pre>\n\n<p>In your controller:</p>\n\n<pre><code>def table\n render partial: 'table', locals: { rows: params[:rows] }\nend\n</code></pre>\n\n<p>In your routes.rb:</p>\n\n<pre><code>match 'table' => 'your_controller#table'\n</code></pre>\n\n<p>And then in your partial (_partial.html.rb), you have to iterate over number of rows that you receive in the rows param. </p>\n"], ["title", "Answer by VAIRIX for Use form to send ajax request to rails app"], ["updated", Fri, 28 Mar 2014 15:20:09 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:46:16 UTC +00:00]]
|
|
69
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
70
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22715588/-/22716096#22716096' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
71
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
72
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:46:16 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22715588/-/22716096#22716096"], ["published", Fri, 28 Mar 2014 14:48:22 UTC +00:00], ["summary", "<p>Define it in the ApplicationController like:</p>\n\n<pre><code>class ApplicationController < ActionController::Base\n\n helper_method :paypal_url\n\n def paypal_url\n 'https://www.paypal.com/cgi-bin/webscr'\n end\n\nend\n</code></pre>\n\n<p>After that you'll be able to use the helper method from any view or controller.</p>\n"], ["title", "Answer by VAIRIX for Helper for controller and views"], ["updated", Fri, 28 Mar 2014 14:48:22 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:46:16 UTC +00:00]]
|
|
73
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
74
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22761911/how-to-implement-root-route-and-get-index-to-the-same-page/22762973?cid=34709045#22762973' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
75
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
76
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:46:16 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22761911/how-to-implement-root-route-and-get-index-to-the-same-page/22762973?cid=34709045#22762973"], ["published", Mon, 31 Mar 2014 16:45:30 UTC +00:00], ["summary", "You can add <code>root to: 'static_pages#index'</code> inside or outside your scope. It's a possible solution and maybe doesn't fit what you expect, cause it takes more code to solve the problem."], ["title", "Comment by VAIRIX on How to implement root route and get \"index\" to the same page"], ["updated", Mon, 31 Mar 2014 16:45:30 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:46:16 UTC +00:00]]
|
|
77
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
78
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22759923/how-to-let-the-user-create-cron-jobs-in-rails?cid=34699568' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
79
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
80
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:46:16 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22759923/how-to-let-the-user-create-cron-jobs-in-rails?cid=34699568"], ["published", Mon, 31 Mar 2014 12:58:30 UTC +00:00], ["summary", "If you want to schedule a task every X period of time, and your user only sets when and the task (as you said), you could try doing it with delayedjob ` class.delay(run_at: 5.hours.from_now).method(param)` and call recursive in the method. Of course you will have some delay of excecution (even if the first thing in your method is calling the recursion). It should be some similar way to do it with Sidekiq (really don't know). Be careful with overlapping of tasks."], ["title", "Comment by VAIRIX on How to let the user create cron jobs in rails?"], ["updated", Mon, 31 Mar 2014 12:58:30 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:46:16 UTC +00:00]]
|
|
81
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
82
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22716263/use-form-to-send-ajax-request-to-rails-app/22716782?cid=34623992#22716782' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
83
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
84
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:46:16 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22716263/use-form-to-send-ajax-request-to-rails-app/22716782?cid=34623992#22716782"], ["published", Fri, 28 Mar 2014 17:57:47 UTC +00:00], ["summary", "If you need more params from the view, just add them in the "data ajax attribute" like <code>data:{ rows: val1, sort: val2 }</code>"], ["title", "Comment by VAIRIX on Use form to send ajax request to rails app"], ["updated", Fri, 28 Mar 2014 17:57:47 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:46:16 UTC +00:00]]
|
|
85
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
86
|
+
[1m[35m (0.2ms)[0m rollback transaction
|
|
87
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
|
88
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22795691/-/22797446#22797446' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
89
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
90
|
+
[1m[35mSQL (6.1ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:46:59 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22795691/-/22797446#22797446"], ["published", Tue, 01 Apr 2014 21:41:35 UTC +00:00], ["summary", "<p>You can do something like this:</p>\n\n<pre><code>Song.joins(:albums).where('albums.released_on >= ?', from).where('albums.rating > ?', rating).where('albums.genre = ?', genres)\n</code></pre>\n\n<p>It makes only one query.</p>\n"], ["title", "Answer by VAIRIX for Joining a table and a filtered table in ActiveRecord"], ["updated", Tue, 01 Apr 2014 21:41:35 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:46:59 UTC +00:00]]
|
|
91
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
92
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22796203/in-rails-4-using-ajax-how-do-i-update-a-particular-div-on-success/22796990#22796990' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
93
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
94
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:46:59 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22796203/in-rails-4-using-ajax-how-do-i-update-a-particular-div-on-success/22796990#22796990"], ["published", Tue, 01 Apr 2014 21:13:17 UTC +00:00], ["summary", "<p>This should work for you:</p>\n\n<pre><code>html = render_to_string(partial: 'images', locals: {user: user})\n</code></pre>\n"], ["title", "Answer by VAIRIX for In Rails 4 using AJAX, how do I update a particular div on success?"], ["updated", Tue, 01 Apr 2014 21:13:17 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:46:59 UTC +00:00]]
|
|
95
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
96
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22761911/-/22762973#22762973' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
97
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
98
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:46:59 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22761911/-/22762973#22762973"], ["published", Mon, 31 Mar 2014 13:34:39 UTC +00:00], ["summary", "<p>A possible solution that implies more than one line, is using scope to make it cleaner, you will have two extra lines of code, but I found it more readable:</p>\n\n<pre><code>scope :path => '/', :controller => :static_pages do\n get 'index' => :index, :as => 'index'\n get 'home' => :index, :as => 'home'\nend\n</code></pre>\n\n<p>That way you make explicit which controller to use for all routes + the path (first part of it).</p>\n"], ["title", "Answer by VAIRIX for How to implement root route and get \"index\" to the same page"], ["updated", Mon, 31 Mar 2014 13:34:39 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:46:59 UTC +00:00]]
|
|
99
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
100
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22762135/-/22762326#22762326' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
101
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
102
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:46:59 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22762135/-/22762326#22762326"], ["published", Mon, 31 Mar 2014 13:05:05 UTC +00:00], ["summary", "<p>What you should expect from the assign after calling your controller, is to have the value that the controller sets to the instance variable. You could see it like using @category. So the category created with FactoryGirl is not equals to the one created by your controller (in this case seems your action is returning nil value in your instance variable)</p>\n"], ["title", "Answer by VAIRIX for I don't really know what RSPEC assigns do, and my tests are failing"], ["updated", Mon, 31 Mar 2014 13:05:05 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:46:59 UTC +00:00]]
|
|
103
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
104
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22720472/-/22720669#22720669' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
105
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
106
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:46:59 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22720472/-/22720669#22720669"], ["published", Fri, 28 Mar 2014 18:35:10 UTC +00:00], ["summary", "<p>This should be work!</p>\n\n<pre><code>Foo.joins(:bazs).where(bazs: {name: 'x'})\n</code></pre>\n"], ["title", "Answer by VAIRIX for Select objects based on grandchild attribute with joins in ActiveRecord"], ["updated", Fri, 28 Mar 2014 18:35:10 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:46:59 UTC +00:00]]
|
|
107
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
108
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22717251/-/22717807#22717807' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
109
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
110
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:46:59 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22717251/-/22717807#22717807"], ["published", Fri, 28 Mar 2014 16:04:58 UTC +00:00], ["summary", "<p>One way to do this, is by doing the following:\nIn the view</p>\n\n<pre><code><img src=\"/get_img/tlotr\">\n</code></pre>\n\n<p>That will make a request to the server, so in the routes.rb add</p>\n\n<pre><code>get '/get_img/:filename' => 'test#img'\n</code></pre>\n\n<p>In my case I have a TestController with an action call img like:</p>\n\n<pre><code>def img\n send_file( \"/your_path/\#{params[:filename]}.png\",\n :disposition => 'inline',\n :type => 'image/png',\n :x_sendfile => true )\nend\n</code></pre>\n\n<p>With this solution you hit the server one more time, but you don't have to send the data using the read method.</p>\n"], ["title", "Answer by VAIRIX for How can I display png data as an image inside in the browser?"], ["updated", Fri, 28 Mar 2014 16:04:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:46:59 UTC +00:00]]
|
|
111
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
112
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22716263/-/22716782#22716782' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
113
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
114
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:46:59 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22716263/-/22716782#22716782"], ["published", Fri, 28 Mar 2014 15:20:09 UTC +00:00], ["summary", "<p>You can do something like that:</p>\n\n<p>In your javascript file:</p>\n\n<pre><code>$('#my_button').click(function(){\n $.ajax({\n type:'GET',\n url: '/table',\n data:{ rows: $('#my_text_field').val() },\n success: function(data){\n $('#my_table_container').html(data);\n }\n });\n});\n</code></pre>\n\n<p>In your controller:</p>\n\n<pre><code>def table\n render partial: 'table', locals: { rows: params[:rows] }\nend\n</code></pre>\n\n<p>In your routes.rb:</p>\n\n<pre><code>match 'table' => 'your_controller#table'\n</code></pre>\n\n<p>And then in your partial (_partial.html.rb), you have to iterate over number of rows that you receive in the rows param. </p>\n"], ["title", "Answer by VAIRIX for Use form to send ajax request to rails app"], ["updated", Fri, 28 Mar 2014 15:20:09 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:46:59 UTC +00:00]]
|
|
115
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
116
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22715588/-/22716096#22716096' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
117
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
118
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:46:59 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22715588/-/22716096#22716096"], ["published", Fri, 28 Mar 2014 14:48:22 UTC +00:00], ["summary", "<p>Define it in the ApplicationController like:</p>\n\n<pre><code>class ApplicationController < ActionController::Base\n\n helper_method :paypal_url\n\n def paypal_url\n 'https://www.paypal.com/cgi-bin/webscr'\n end\n\nend\n</code></pre>\n\n<p>After that you'll be able to use the helper method from any view or controller.</p>\n"], ["title", "Answer by VAIRIX for Helper for controller and views"], ["updated", Fri, 28 Mar 2014 14:48:22 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:46:59 UTC +00:00]]
|
|
119
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
120
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22761911/how-to-implement-root-route-and-get-index-to-the-same-page/22762973?cid=34709045#22762973' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
121
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
122
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:46:59 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22761911/how-to-implement-root-route-and-get-index-to-the-same-page/22762973?cid=34709045#22762973"], ["published", Mon, 31 Mar 2014 16:45:30 UTC +00:00], ["summary", "You can add <code>root to: 'static_pages#index'</code> inside or outside your scope. It's a possible solution and maybe doesn't fit what you expect, cause it takes more code to solve the problem."], ["title", "Comment by VAIRIX on How to implement root route and get \"index\" to the same page"], ["updated", Mon, 31 Mar 2014 16:45:30 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:46:59 UTC +00:00]]
|
|
123
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
124
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22759923/how-to-let-the-user-create-cron-jobs-in-rails?cid=34699568' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
125
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
126
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:46:59 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22759923/how-to-let-the-user-create-cron-jobs-in-rails?cid=34699568"], ["published", Mon, 31 Mar 2014 12:58:30 UTC +00:00], ["summary", "If you want to schedule a task every X period of time, and your user only sets when and the task (as you said), you could try doing it with delayedjob ` class.delay(run_at: 5.hours.from_now).method(param)` and call recursive in the method. Of course you will have some delay of excecution (even if the first thing in your method is calling the recursion). It should be some similar way to do it with Sidekiq (really don't know). Be careful with overlapping of tasks."], ["title", "Comment by VAIRIX on How to let the user create cron jobs in rails?"], ["updated", Mon, 31 Mar 2014 12:58:30 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:46:59 UTC +00:00]]
|
|
127
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
128
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22716263/use-form-to-send-ajax-request-to-rails-app/22716782?cid=34623992#22716782' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
129
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
130
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:46:59 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22716263/use-form-to-send-ajax-request-to-rails-app/22716782?cid=34623992#22716782"], ["published", Fri, 28 Mar 2014 17:57:47 UTC +00:00], ["summary", "If you need more params from the view, just add them in the "data ajax attribute" like <code>data:{ rows: val1, sort: val2 }</code>"], ["title", "Comment by VAIRIX on Use form to send ajax request to rails app"], ["updated", Fri, 28 Mar 2014 17:57:47 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:46:59 UTC +00:00]]
|
|
131
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
132
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
|
133
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
|
134
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22795691/-/22797446#22797446' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
135
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
136
|
+
[1m[35mSQL (6.1ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:48:35 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22795691/-/22797446#22797446"], ["published", Tue, 01 Apr 2014 21:41:35 UTC +00:00], ["summary", "<p>You can do something like this:</p>\n\n<pre><code>Song.joins(:albums).where('albums.released_on >= ?', from).where('albums.rating > ?', rating).where('albums.genre = ?', genres)\n</code></pre>\n\n<p>It makes only one query.</p>\n"], ["title", "Answer by VAIRIX for Joining a table and a filtered table in ActiveRecord"], ["updated", Tue, 01 Apr 2014 21:41:35 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:48:35 UTC +00:00]]
|
|
137
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
138
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22796203/in-rails-4-using-ajax-how-do-i-update-a-particular-div-on-success/22796990#22796990' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
139
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
140
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:48:35 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22796203/in-rails-4-using-ajax-how-do-i-update-a-particular-div-on-success/22796990#22796990"], ["published", Tue, 01 Apr 2014 21:13:17 UTC +00:00], ["summary", "<p>This should work for you:</p>\n\n<pre><code>html = render_to_string(partial: 'images', locals: {user: user})\n</code></pre>\n"], ["title", "Answer by VAIRIX for In Rails 4 using AJAX, how do I update a particular div on success?"], ["updated", Tue, 01 Apr 2014 21:13:17 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:48:35 UTC +00:00]]
|
|
141
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
142
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22761911/-/22762973#22762973' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
143
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
144
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:48:35 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22761911/-/22762973#22762973"], ["published", Mon, 31 Mar 2014 13:34:39 UTC +00:00], ["summary", "<p>A possible solution that implies more than one line, is using scope to make it cleaner, you will have two extra lines of code, but I found it more readable:</p>\n\n<pre><code>scope :path => '/', :controller => :static_pages do\n get 'index' => :index, :as => 'index'\n get 'home' => :index, :as => 'home'\nend\n</code></pre>\n\n<p>That way you make explicit which controller to use for all routes + the path (first part of it).</p>\n"], ["title", "Answer by VAIRIX for How to implement root route and get \"index\" to the same page"], ["updated", Mon, 31 Mar 2014 13:34:39 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:48:35 UTC +00:00]]
|
|
145
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
146
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22762135/-/22762326#22762326' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
147
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
148
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:48:35 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22762135/-/22762326#22762326"], ["published", Mon, 31 Mar 2014 13:05:05 UTC +00:00], ["summary", "<p>What you should expect from the assign after calling your controller, is to have the value that the controller sets to the instance variable. You could see it like using @category. So the category created with FactoryGirl is not equals to the one created by your controller (in this case seems your action is returning nil value in your instance variable)</p>\n"], ["title", "Answer by VAIRIX for I don't really know what RSPEC assigns do, and my tests are failing"], ["updated", Mon, 31 Mar 2014 13:05:05 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:48:35 UTC +00:00]]
|
|
149
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
150
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22720472/-/22720669#22720669' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
151
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
152
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:48:35 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22720472/-/22720669#22720669"], ["published", Fri, 28 Mar 2014 18:35:10 UTC +00:00], ["summary", "<p>This should be work!</p>\n\n<pre><code>Foo.joins(:bazs).where(bazs: {name: 'x'})\n</code></pre>\n"], ["title", "Answer by VAIRIX for Select objects based on grandchild attribute with joins in ActiveRecord"], ["updated", Fri, 28 Mar 2014 18:35:10 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:48:35 UTC +00:00]]
|
|
153
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
154
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22717251/-/22717807#22717807' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
155
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
156
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:48:35 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22717251/-/22717807#22717807"], ["published", Fri, 28 Mar 2014 16:04:58 UTC +00:00], ["summary", "<p>One way to do this, is by doing the following:\nIn the view</p>\n\n<pre><code><img src=\"/get_img/tlotr\">\n</code></pre>\n\n<p>That will make a request to the server, so in the routes.rb add</p>\n\n<pre><code>get '/get_img/:filename' => 'test#img'\n</code></pre>\n\n<p>In my case I have a TestController with an action call img like:</p>\n\n<pre><code>def img\n send_file( \"/your_path/\#{params[:filename]}.png\",\n :disposition => 'inline',\n :type => 'image/png',\n :x_sendfile => true )\nend\n</code></pre>\n\n<p>With this solution you hit the server one more time, but you don't have to send the data using the read method.</p>\n"], ["title", "Answer by VAIRIX for How can I display png data as an image inside in the browser?"], ["updated", Fri, 28 Mar 2014 16:04:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:48:35 UTC +00:00]]
|
|
157
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
158
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22716263/-/22716782#22716782' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
159
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
160
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:48:35 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22716263/-/22716782#22716782"], ["published", Fri, 28 Mar 2014 15:20:09 UTC +00:00], ["summary", "<p>You can do something like that:</p>\n\n<p>In your javascript file:</p>\n\n<pre><code>$('#my_button').click(function(){\n $.ajax({\n type:'GET',\n url: '/table',\n data:{ rows: $('#my_text_field').val() },\n success: function(data){\n $('#my_table_container').html(data);\n }\n });\n});\n</code></pre>\n\n<p>In your controller:</p>\n\n<pre><code>def table\n render partial: 'table', locals: { rows: params[:rows] }\nend\n</code></pre>\n\n<p>In your routes.rb:</p>\n\n<pre><code>match 'table' => 'your_controller#table'\n</code></pre>\n\n<p>And then in your partial (_partial.html.rb), you have to iterate over number of rows that you receive in the rows param. </p>\n"], ["title", "Answer by VAIRIX for Use form to send ajax request to rails app"], ["updated", Fri, 28 Mar 2014 15:20:09 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:48:35 UTC +00:00]]
|
|
161
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
162
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22715588/-/22716096#22716096' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
163
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
164
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:48:35 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22715588/-/22716096#22716096"], ["published", Fri, 28 Mar 2014 14:48:22 UTC +00:00], ["summary", "<p>Define it in the ApplicationController like:</p>\n\n<pre><code>class ApplicationController < ActionController::Base\n\n helper_method :paypal_url\n\n def paypal_url\n 'https://www.paypal.com/cgi-bin/webscr'\n end\n\nend\n</code></pre>\n\n<p>After that you'll be able to use the helper method from any view or controller.</p>\n"], ["title", "Answer by VAIRIX for Helper for controller and views"], ["updated", Fri, 28 Mar 2014 14:48:22 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:48:35 UTC +00:00]]
|
|
165
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
166
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22761911/how-to-implement-root-route-and-get-index-to-the-same-page/22762973?cid=34709045#22762973' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
167
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
168
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:48:35 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22761911/how-to-implement-root-route-and-get-index-to-the-same-page/22762973?cid=34709045#22762973"], ["published", Mon, 31 Mar 2014 16:45:30 UTC +00:00], ["summary", "You can add <code>root to: 'static_pages#index'</code> inside or outside your scope. It's a possible solution and maybe doesn't fit what you expect, cause it takes more code to solve the problem."], ["title", "Comment by VAIRIX on How to implement root route and get \"index\" to the same page"], ["updated", Mon, 31 Mar 2014 16:45:30 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:48:35 UTC +00:00]]
|
|
169
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
170
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22759923/how-to-let-the-user-create-cron-jobs-in-rails?cid=34699568' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
171
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
172
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:48:35 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22759923/how-to-let-the-user-create-cron-jobs-in-rails?cid=34699568"], ["published", Mon, 31 Mar 2014 12:58:30 UTC +00:00], ["summary", "If you want to schedule a task every X period of time, and your user only sets when and the task (as you said), you could try doing it with delayedjob ` class.delay(run_at: 5.hours.from_now).method(param)` and call recursive in the method. Of course you will have some delay of excecution (even if the first thing in your method is calling the recursion). It should be some similar way to do it with Sidekiq (really don't know). Be careful with overlapping of tasks."], ["title", "Comment by VAIRIX on How to let the user create cron jobs in rails?"], ["updated", Mon, 31 Mar 2014 12:58:30 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:48:35 UTC +00:00]]
|
|
173
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
174
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22716263/use-form-to-send-ajax-request-to-rails-app/22716782?cid=34623992#22716782' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
175
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
176
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:48:35 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22716263/use-form-to-send-ajax-request-to-rails-app/22716782?cid=34623992#22716782"], ["published", Fri, 28 Mar 2014 17:57:47 UTC +00:00], ["summary", "If you need more params from the view, just add them in the "data ajax attribute" like <code>data:{ rows: val1, sort: val2 }</code>"], ["title", "Comment by VAIRIX on Use form to send ajax request to rails app"], ["updated", Fri, 28 Mar 2014 17:57:47 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:48:35 UTC +00:00]]
|
|
177
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
178
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
|
179
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
|
180
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22795691/-/22797446#22797446' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
181
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
182
|
+
[1m[35mSQL (6.1ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:50:01 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22795691/-/22797446#22797446"], ["published", Tue, 01 Apr 2014 21:41:35 UTC +00:00], ["summary", "<p>You can do something like this:</p>\n\n<pre><code>Song.joins(:albums).where('albums.released_on >= ?', from).where('albums.rating > ?', rating).where('albums.genre = ?', genres)\n</code></pre>\n\n<p>It makes only one query.</p>\n"], ["title", "Answer by VAIRIX for Joining a table and a filtered table in ActiveRecord"], ["updated", Tue, 01 Apr 2014 21:41:35 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:50:01 UTC +00:00]]
|
|
183
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
184
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22796203/in-rails-4-using-ajax-how-do-i-update-a-particular-div-on-success/22796990#22796990' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
185
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
186
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:50:01 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22796203/in-rails-4-using-ajax-how-do-i-update-a-particular-div-on-success/22796990#22796990"], ["published", Tue, 01 Apr 2014 21:13:17 UTC +00:00], ["summary", "<p>This should work for you:</p>\n\n<pre><code>html = render_to_string(partial: 'images', locals: {user: user})\n</code></pre>\n"], ["title", "Answer by VAIRIX for In Rails 4 using AJAX, how do I update a particular div on success?"], ["updated", Tue, 01 Apr 2014 21:13:17 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:50:01 UTC +00:00]]
|
|
187
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
188
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.3ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22761911/-/22762973#22762973' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
189
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
190
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:50:01 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22761911/-/22762973#22762973"], ["published", Mon, 31 Mar 2014 13:34:39 UTC +00:00], ["summary", "<p>A possible solution that implies more than one line, is using scope to make it cleaner, you will have two extra lines of code, but I found it more readable:</p>\n\n<pre><code>scope :path => '/', :controller => :static_pages do\n get 'index' => :index, :as => 'index'\n get 'home' => :index, :as => 'home'\nend\n</code></pre>\n\n<p>That way you make explicit which controller to use for all routes + the path (first part of it).</p>\n"], ["title", "Answer by VAIRIX for How to implement root route and get \"index\" to the same page"], ["updated", Mon, 31 Mar 2014 13:34:39 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:50:01 UTC +00:00]]
|
|
191
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
192
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22762135/-/22762326#22762326' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
193
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
194
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:50:01 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22762135/-/22762326#22762326"], ["published", Mon, 31 Mar 2014 13:05:05 UTC +00:00], ["summary", "<p>What you should expect from the assign after calling your controller, is to have the value that the controller sets to the instance variable. You could see it like using @category. So the category created with FactoryGirl is not equals to the one created by your controller (in this case seems your action is returning nil value in your instance variable)</p>\n"], ["title", "Answer by VAIRIX for I don't really know what RSPEC assigns do, and my tests are failing"], ["updated", Mon, 31 Mar 2014 13:05:05 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:50:01 UTC +00:00]]
|
|
195
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
196
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22720472/-/22720669#22720669' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
197
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
198
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:50:01 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22720472/-/22720669#22720669"], ["published", Fri, 28 Mar 2014 18:35:10 UTC +00:00], ["summary", "<p>This should be work!</p>\n\n<pre><code>Foo.joins(:bazs).where(bazs: {name: 'x'})\n</code></pre>\n"], ["title", "Answer by VAIRIX for Select objects based on grandchild attribute with joins in ActiveRecord"], ["updated", Fri, 28 Mar 2014 18:35:10 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:50:01 UTC +00:00]]
|
|
199
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
200
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22717251/-/22717807#22717807' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
201
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
202
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:50:01 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22717251/-/22717807#22717807"], ["published", Fri, 28 Mar 2014 16:04:58 UTC +00:00], ["summary", "<p>One way to do this, is by doing the following:\nIn the view</p>\n\n<pre><code><img src=\"/get_img/tlotr\">\n</code></pre>\n\n<p>That will make a request to the server, so in the routes.rb add</p>\n\n<pre><code>get '/get_img/:filename' => 'test#img'\n</code></pre>\n\n<p>In my case I have a TestController with an action call img like:</p>\n\n<pre><code>def img\n send_file( \"/your_path/\#{params[:filename]}.png\",\n :disposition => 'inline',\n :type => 'image/png',\n :x_sendfile => true )\nend\n</code></pre>\n\n<p>With this solution you hit the server one more time, but you don't have to send the data using the read method.</p>\n"], ["title", "Answer by VAIRIX for How can I display png data as an image inside in the browser?"], ["updated", Fri, 28 Mar 2014 16:04:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:50:01 UTC +00:00]]
|
|
203
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
204
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22716263/-/22716782#22716782' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
205
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
206
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:50:01 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22716263/-/22716782#22716782"], ["published", Fri, 28 Mar 2014 15:20:09 UTC +00:00], ["summary", "<p>You can do something like that:</p>\n\n<p>In your javascript file:</p>\n\n<pre><code>$('#my_button').click(function(){\n $.ajax({\n type:'GET',\n url: '/table',\n data:{ rows: $('#my_text_field').val() },\n success: function(data){\n $('#my_table_container').html(data);\n }\n });\n});\n</code></pre>\n\n<p>In your controller:</p>\n\n<pre><code>def table\n render partial: 'table', locals: { rows: params[:rows] }\nend\n</code></pre>\n\n<p>In your routes.rb:</p>\n\n<pre><code>match 'table' => 'your_controller#table'\n</code></pre>\n\n<p>And then in your partial (_partial.html.rb), you have to iterate over number of rows that you receive in the rows param. </p>\n"], ["title", "Answer by VAIRIX for Use form to send ajax request to rails app"], ["updated", Fri, 28 Mar 2014 15:20:09 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:50:01 UTC +00:00]]
|
|
207
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
208
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22715588/-/22716096#22716096' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
209
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
210
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:50:01 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22715588/-/22716096#22716096"], ["published", Fri, 28 Mar 2014 14:48:22 UTC +00:00], ["summary", "<p>Define it in the ApplicationController like:</p>\n\n<pre><code>class ApplicationController < ActionController::Base\n\n helper_method :paypal_url\n\n def paypal_url\n 'https://www.paypal.com/cgi-bin/webscr'\n end\n\nend\n</code></pre>\n\n<p>After that you'll be able to use the helper method from any view or controller.</p>\n"], ["title", "Answer by VAIRIX for Helper for controller and views"], ["updated", Fri, 28 Mar 2014 14:48:22 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:50:01 UTC +00:00]]
|
|
211
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
212
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22761911/how-to-implement-root-route-and-get-index-to-the-same-page/22762973?cid=34709045#22762973' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
213
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
214
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:50:01 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22761911/how-to-implement-root-route-and-get-index-to-the-same-page/22762973?cid=34709045#22762973"], ["published", Mon, 31 Mar 2014 16:45:30 UTC +00:00], ["summary", "You can add <code>root to: 'static_pages#index'</code> inside or outside your scope. It's a possible solution and maybe doesn't fit what you expect, cause it takes more code to solve the problem."], ["title", "Comment by VAIRIX on How to implement root route and get \"index\" to the same page"], ["updated", Mon, 31 Mar 2014 16:45:30 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:50:01 UTC +00:00]]
|
|
215
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
216
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22759923/how-to-let-the-user-create-cron-jobs-in-rails?cid=34699568' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
217
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
218
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:50:01 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22759923/how-to-let-the-user-create-cron-jobs-in-rails?cid=34699568"], ["published", Mon, 31 Mar 2014 12:58:30 UTC +00:00], ["summary", "If you want to schedule a task every X period of time, and your user only sets when and the task (as you said), you could try doing it with delayedjob ` class.delay(run_at: 5.hours.from_now).method(param)` and call recursive in the method. Of course you will have some delay of excecution (even if the first thing in your method is calling the recursion). It should be some similar way to do it with Sidekiq (really don't know). Be careful with overlapping of tasks."], ["title", "Comment by VAIRIX on How to let the user create cron jobs in rails?"], ["updated", Mon, 31 Mar 2014 12:58:30 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:50:01 UTC +00:00]]
|
|
219
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
220
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22716263/use-form-to-send-ajax-request-to-rails-app/22716782?cid=34623992#22716782' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
221
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
222
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:50:01 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22716263/use-form-to-send-ajax-request-to-rails-app/22716782?cid=34623992#22716782"], ["published", Fri, 28 Mar 2014 17:57:47 UTC +00:00], ["summary", "If you need more params from the view, just add them in the "data ajax attribute" like <code>data:{ rows: val1, sort: val2 }</code>"], ["title", "Comment by VAIRIX on Use form to send ajax request to rails app"], ["updated", Fri, 28 Mar 2014 17:57:47 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:50:01 UTC +00:00]]
|
|
223
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
224
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.5ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" ORDER BY published DESC LIMIT 20
|
|
225
|
+
Rendered /home/vairix/projects/stackoverfeeds/app/views/stackoverfeeds/_stackoverflow_feeds.html.erb (7.5ms)
|
|
226
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
|
227
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
|
228
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22795691/-/22797446#22797446' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
229
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
230
|
+
[1m[35mSQL (6.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:51:54 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22795691/-/22797446#22797446"], ["published", Tue, 01 Apr 2014 21:41:35 UTC +00:00], ["summary", "<p>You can do something like this:</p>\n\n<pre><code>Song.joins(:albums).where('albums.released_on >= ?', from).where('albums.rating > ?', rating).where('albums.genre = ?', genres)\n</code></pre>\n\n<p>It makes only one query.</p>\n"], ["title", "Answer by VAIRIX for Joining a table and a filtered table in ActiveRecord"], ["updated", Tue, 01 Apr 2014 21:41:35 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:51:54 UTC +00:00]]
|
|
231
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
232
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22796203/in-rails-4-using-ajax-how-do-i-update-a-particular-div-on-success/22796990#22796990' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
233
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
234
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:51:54 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22796203/in-rails-4-using-ajax-how-do-i-update-a-particular-div-on-success/22796990#22796990"], ["published", Tue, 01 Apr 2014 21:13:17 UTC +00:00], ["summary", "<p>This should work for you:</p>\n\n<pre><code>html = render_to_string(partial: 'images', locals: {user: user})\n</code></pre>\n"], ["title", "Answer by VAIRIX for In Rails 4 using AJAX, how do I update a particular div on success?"], ["updated", Tue, 01 Apr 2014 21:13:17 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:51:54 UTC +00:00]]
|
|
235
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
236
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22761911/-/22762973#22762973' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
237
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
238
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:51:54 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22761911/-/22762973#22762973"], ["published", Mon, 31 Mar 2014 13:34:39 UTC +00:00], ["summary", "<p>A possible solution that implies more than one line, is using scope to make it cleaner, you will have two extra lines of code, but I found it more readable:</p>\n\n<pre><code>scope :path => '/', :controller => :static_pages do\n get 'index' => :index, :as => 'index'\n get 'home' => :index, :as => 'home'\nend\n</code></pre>\n\n<p>That way you make explicit which controller to use for all routes + the path (first part of it).</p>\n"], ["title", "Answer by VAIRIX for How to implement root route and get \"index\" to the same page"], ["updated", Mon, 31 Mar 2014 13:34:39 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:51:54 UTC +00:00]]
|
|
239
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
240
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22762135/-/22762326#22762326' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
241
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
242
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:51:54 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22762135/-/22762326#22762326"], ["published", Mon, 31 Mar 2014 13:05:05 UTC +00:00], ["summary", "<p>What you should expect from the assign after calling your controller, is to have the value that the controller sets to the instance variable. You could see it like using @category. So the category created with FactoryGirl is not equals to the one created by your controller (in this case seems your action is returning nil value in your instance variable)</p>\n"], ["title", "Answer by VAIRIX for I don't really know what RSPEC assigns do, and my tests are failing"], ["updated", Mon, 31 Mar 2014 13:05:05 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:51:54 UTC +00:00]]
|
|
243
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
244
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22720472/-/22720669#22720669' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
245
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
246
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:51:54 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22720472/-/22720669#22720669"], ["published", Fri, 28 Mar 2014 18:35:10 UTC +00:00], ["summary", "<p>This should be work!</p>\n\n<pre><code>Foo.joins(:bazs).where(bazs: {name: 'x'})\n</code></pre>\n"], ["title", "Answer by VAIRIX for Select objects based on grandchild attribute with joins in ActiveRecord"], ["updated", Fri, 28 Mar 2014 18:35:10 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:51:54 UTC +00:00]]
|
|
247
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
248
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22717251/-/22717807#22717807' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
249
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
250
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:51:54 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22717251/-/22717807#22717807"], ["published", Fri, 28 Mar 2014 16:04:58 UTC +00:00], ["summary", "<p>One way to do this, is by doing the following:\nIn the view</p>\n\n<pre><code><img src=\"/get_img/tlotr\">\n</code></pre>\n\n<p>That will make a request to the server, so in the routes.rb add</p>\n\n<pre><code>get '/get_img/:filename' => 'test#img'\n</code></pre>\n\n<p>In my case I have a TestController with an action call img like:</p>\n\n<pre><code>def img\n send_file( \"/your_path/\#{params[:filename]}.png\",\n :disposition => 'inline',\n :type => 'image/png',\n :x_sendfile => true )\nend\n</code></pre>\n\n<p>With this solution you hit the server one more time, but you don't have to send the data using the read method.</p>\n"], ["title", "Answer by VAIRIX for How can I display png data as an image inside in the browser?"], ["updated", Fri, 28 Mar 2014 16:04:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:51:54 UTC +00:00]]
|
|
251
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
252
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22716263/-/22716782#22716782' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
253
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
254
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:51:54 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22716263/-/22716782#22716782"], ["published", Fri, 28 Mar 2014 15:20:09 UTC +00:00], ["summary", "<p>You can do something like that:</p>\n\n<p>In your javascript file:</p>\n\n<pre><code>$('#my_button').click(function(){\n $.ajax({\n type:'GET',\n url: '/table',\n data:{ rows: $('#my_text_field').val() },\n success: function(data){\n $('#my_table_container').html(data);\n }\n });\n});\n</code></pre>\n\n<p>In your controller:</p>\n\n<pre><code>def table\n render partial: 'table', locals: { rows: params[:rows] }\nend\n</code></pre>\n\n<p>In your routes.rb:</p>\n\n<pre><code>match 'table' => 'your_controller#table'\n</code></pre>\n\n<p>And then in your partial (_partial.html.rb), you have to iterate over number of rows that you receive in the rows param. </p>\n"], ["title", "Answer by VAIRIX for Use form to send ajax request to rails app"], ["updated", Fri, 28 Mar 2014 15:20:09 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:51:54 UTC +00:00]]
|
|
255
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
256
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22715588/-/22716096#22716096' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
257
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
258
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:51:54 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22715588/-/22716096#22716096"], ["published", Fri, 28 Mar 2014 14:48:22 UTC +00:00], ["summary", "<p>Define it in the ApplicationController like:</p>\n\n<pre><code>class ApplicationController < ActionController::Base\n\n helper_method :paypal_url\n\n def paypal_url\n 'https://www.paypal.com/cgi-bin/webscr'\n end\n\nend\n</code></pre>\n\n<p>After that you'll be able to use the helper method from any view or controller.</p>\n"], ["title", "Answer by VAIRIX for Helper for controller and views"], ["updated", Fri, 28 Mar 2014 14:48:22 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:51:54 UTC +00:00]]
|
|
259
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
260
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22761911/how-to-implement-root-route-and-get-index-to-the-same-page/22762973?cid=34709045#22762973' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
261
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
262
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:51:54 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22761911/how-to-implement-root-route-and-get-index-to-the-same-page/22762973?cid=34709045#22762973"], ["published", Mon, 31 Mar 2014 16:45:30 UTC +00:00], ["summary", "You can add <code>root to: 'static_pages#index'</code> inside or outside your scope. It's a possible solution and maybe doesn't fit what you expect, cause it takes more code to solve the problem."], ["title", "Comment by VAIRIX on How to implement root route and get \"index\" to the same page"], ["updated", Mon, 31 Mar 2014 16:45:30 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:51:54 UTC +00:00]]
|
|
263
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
264
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22759923/how-to-let-the-user-create-cron-jobs-in-rails?cid=34699568' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
265
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
266
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:51:54 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22759923/how-to-let-the-user-create-cron-jobs-in-rails?cid=34699568"], ["published", Mon, 31 Mar 2014 12:58:30 UTC +00:00], ["summary", "If you want to schedule a task every X period of time, and your user only sets when and the task (as you said), you could try doing it with delayedjob ` class.delay(run_at: 5.hours.from_now).method(param)` and call recursive in the method. Of course you will have some delay of excecution (even if the first thing in your method is calling the recursion). It should be some similar way to do it with Sidekiq (really don't know). Be careful with overlapping of tasks."], ["title", "Comment by VAIRIX on How to let the user create cron jobs in rails?"], ["updated", Mon, 31 Mar 2014 12:58:30 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:51:54 UTC +00:00]]
|
|
267
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
268
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22716263/use-form-to-send-ajax-request-to-rails-app/22716782?cid=34623992#22716782' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
269
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
270
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:51:54 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22716263/use-form-to-send-ajax-request-to-rails-app/22716782?cid=34623992#22716782"], ["published", Fri, 28 Mar 2014 17:57:47 UTC +00:00], ["summary", "If you need more params from the view, just add them in the "data ajax attribute" like <code>data:{ rows: val1, sort: val2 }</code>"], ["title", "Comment by VAIRIX on Use form to send ajax request to rails app"], ["updated", Fri, 28 Mar 2014 17:57:47 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:51:54 UTC +00:00]]
|
|
271
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
272
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.4ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" ORDER BY published DESC LIMIT 20
|
|
273
|
+
Rendered /home/vairix/projects/stackoverfeeds/app/views/stackoverfeeds/_stackoverflow_feeds.html.erb (6.6ms)
|
|
274
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
|
275
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
|
276
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.3ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22795691/-/22797446#22797446' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
277
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
278
|
+
[1m[35mSQL (6.1ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:59:44 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22795691/-/22797446#22797446"], ["published", Tue, 01 Apr 2014 21:41:35 UTC +00:00], ["summary", "<p>You can do something like this:</p>\n\n<pre><code>Song.joins(:albums).where('albums.released_on >= ?', from).where('albums.rating > ?', rating).where('albums.genre = ?', genres)\n</code></pre>\n\n<p>It makes only one query.</p>\n"], ["title", "Answer by VAIRIX for Joining a table and a filtered table in ActiveRecord"], ["updated", Tue, 01 Apr 2014 21:41:35 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:59:44 UTC +00:00]]
|
|
279
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
280
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22796203/in-rails-4-using-ajax-how-do-i-update-a-particular-div-on-success/22796990#22796990' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
281
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
282
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:59:44 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22796203/in-rails-4-using-ajax-how-do-i-update-a-particular-div-on-success/22796990#22796990"], ["published", Tue, 01 Apr 2014 21:13:17 UTC +00:00], ["summary", "<p>This should work for you:</p>\n\n<pre><code>html = render_to_string(partial: 'images', locals: {user: user})\n</code></pre>\n"], ["title", "Answer by VAIRIX for In Rails 4 using AJAX, how do I update a particular div on success?"], ["updated", Tue, 01 Apr 2014 21:13:17 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:59:44 UTC +00:00]]
|
|
283
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
284
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22761911/-/22762973#22762973' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
285
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
286
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:59:44 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22761911/-/22762973#22762973"], ["published", Mon, 31 Mar 2014 13:34:39 UTC +00:00], ["summary", "<p>A possible solution that implies more than one line, is using scope to make it cleaner, you will have two extra lines of code, but I found it more readable:</p>\n\n<pre><code>scope :path => '/', :controller => :static_pages do\n get 'index' => :index, :as => 'index'\n get 'home' => :index, :as => 'home'\nend\n</code></pre>\n\n<p>That way you make explicit which controller to use for all routes + the path (first part of it).</p>\n"], ["title", "Answer by VAIRIX for How to implement root route and get \"index\" to the same page"], ["updated", Mon, 31 Mar 2014 13:34:39 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:59:44 UTC +00:00]]
|
|
287
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
288
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22762135/-/22762326#22762326' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
289
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
290
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:59:44 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22762135/-/22762326#22762326"], ["published", Mon, 31 Mar 2014 13:05:05 UTC +00:00], ["summary", "<p>What you should expect from the assign after calling your controller, is to have the value that the controller sets to the instance variable. You could see it like using @category. So the category created with FactoryGirl is not equals to the one created by your controller (in this case seems your action is returning nil value in your instance variable)</p>\n"], ["title", "Answer by VAIRIX for I don't really know what RSPEC assigns do, and my tests are failing"], ["updated", Mon, 31 Mar 2014 13:05:05 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:59:44 UTC +00:00]]
|
|
291
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
292
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22720472/-/22720669#22720669' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
293
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
294
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:59:44 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22720472/-/22720669#22720669"], ["published", Fri, 28 Mar 2014 18:35:10 UTC +00:00], ["summary", "<p>This should be work!</p>\n\n<pre><code>Foo.joins(:bazs).where(bazs: {name: 'x'})\n</code></pre>\n"], ["title", "Answer by VAIRIX for Select objects based on grandchild attribute with joins in ActiveRecord"], ["updated", Fri, 28 Mar 2014 18:35:10 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:59:44 UTC +00:00]]
|
|
295
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
296
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22717251/-/22717807#22717807' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
297
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
298
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:59:44 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22717251/-/22717807#22717807"], ["published", Fri, 28 Mar 2014 16:04:58 UTC +00:00], ["summary", "<p>One way to do this, is by doing the following:\nIn the view</p>\n\n<pre><code><img src=\"/get_img/tlotr\">\n</code></pre>\n\n<p>That will make a request to the server, so in the routes.rb add</p>\n\n<pre><code>get '/get_img/:filename' => 'test#img'\n</code></pre>\n\n<p>In my case I have a TestController with an action call img like:</p>\n\n<pre><code>def img\n send_file( \"/your_path/\#{params[:filename]}.png\",\n :disposition => 'inline',\n :type => 'image/png',\n :x_sendfile => true )\nend\n</code></pre>\n\n<p>With this solution you hit the server one more time, but you don't have to send the data using the read method.</p>\n"], ["title", "Answer by VAIRIX for How can I display png data as an image inside in the browser?"], ["updated", Fri, 28 Mar 2014 16:04:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:59:44 UTC +00:00]]
|
|
299
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
300
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22716263/-/22716782#22716782' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
301
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
302
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:59:44 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22716263/-/22716782#22716782"], ["published", Fri, 28 Mar 2014 15:20:09 UTC +00:00], ["summary", "<p>You can do something like that:</p>\n\n<p>In your javascript file:</p>\n\n<pre><code>$('#my_button').click(function(){\n $.ajax({\n type:'GET',\n url: '/table',\n data:{ rows: $('#my_text_field').val() },\n success: function(data){\n $('#my_table_container').html(data);\n }\n });\n});\n</code></pre>\n\n<p>In your controller:</p>\n\n<pre><code>def table\n render partial: 'table', locals: { rows: params[:rows] }\nend\n</code></pre>\n\n<p>In your routes.rb:</p>\n\n<pre><code>match 'table' => 'your_controller#table'\n</code></pre>\n\n<p>And then in your partial (_partial.html.rb), you have to iterate over number of rows that you receive in the rows param. </p>\n"], ["title", "Answer by VAIRIX for Use form to send ajax request to rails app"], ["updated", Fri, 28 Mar 2014 15:20:09 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:59:44 UTC +00:00]]
|
|
303
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
304
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22715588/-/22716096#22716096' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
305
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
306
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:59:44 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22715588/-/22716096#22716096"], ["published", Fri, 28 Mar 2014 14:48:22 UTC +00:00], ["summary", "<p>Define it in the ApplicationController like:</p>\n\n<pre><code>class ApplicationController < ActionController::Base\n\n helper_method :paypal_url\n\n def paypal_url\n 'https://www.paypal.com/cgi-bin/webscr'\n end\n\nend\n</code></pre>\n\n<p>After that you'll be able to use the helper method from any view or controller.</p>\n"], ["title", "Answer by VAIRIX for Helper for controller and views"], ["updated", Fri, 28 Mar 2014 14:48:22 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:59:44 UTC +00:00]]
|
|
307
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
308
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22761911/how-to-implement-root-route-and-get-index-to-the-same-page/22762973?cid=34709045#22762973' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
309
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
310
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:59:44 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22761911/how-to-implement-root-route-and-get-index-to-the-same-page/22762973?cid=34709045#22762973"], ["published", Mon, 31 Mar 2014 16:45:30 UTC +00:00], ["summary", "You can add <code>root to: 'static_pages#index'</code> inside or outside your scope. It's a possible solution and maybe doesn't fit what you expect, cause it takes more code to solve the problem."], ["title", "Comment by VAIRIX on How to implement root route and get \"index\" to the same page"], ["updated", Mon, 31 Mar 2014 16:45:30 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:59:44 UTC +00:00]]
|
|
311
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
312
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22759923/how-to-let-the-user-create-cron-jobs-in-rails?cid=34699568' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
313
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
314
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:59:44 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22759923/how-to-let-the-user-create-cron-jobs-in-rails?cid=34699568"], ["published", Mon, 31 Mar 2014 12:58:30 UTC +00:00], ["summary", "If you want to schedule a task every X period of time, and your user only sets when and the task (as you said), you could try doing it with delayedjob ` class.delay(run_at: 5.hours.from_now).method(param)` and call recursive in the method. Of course you will have some delay of excecution (even if the first thing in your method is calling the recursion). It should be some similar way to do it with Sidekiq (really don't know). Be careful with overlapping of tasks."], ["title", "Comment by VAIRIX on How to let the user create cron jobs in rails?"], ["updated", Mon, 31 Mar 2014 12:58:30 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:59:44 UTC +00:00]]
|
|
315
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
316
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22716263/use-form-to-send-ajax-request-to-rails-app/22716782?cid=34623992#22716782' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
317
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
318
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 14:59:44 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22716263/use-form-to-send-ajax-request-to-rails-app/22716782?cid=34623992#22716782"], ["published", Fri, 28 Mar 2014 17:57:47 UTC +00:00], ["summary", "If you need more params from the view, just add them in the "data ajax attribute" like <code>data:{ rows: val1, sort: val2 }</code>"], ["title", "Comment by VAIRIX on Use form to send ajax request to rails app"], ["updated", Fri, 28 Mar 2014 17:57:47 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 14:59:44 UTC +00:00]]
|
|
319
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
320
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.4ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" ORDER BY published DESC LIMIT 20
|
|
321
|
+
Rendered /home/vairix/projects/stackoverfeeds/app/views/stackoverfeeds/_stackoverflow_feeds.html.erb (6.5ms)
|
|
322
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
|
323
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
|
324
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "stackoverfeeds_so_feeds"
|
|
325
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.2ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22795691/-/22797446#22797446' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1[0m
|
|
326
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
327
|
+
[1m[36mSQL (5.9ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:03:33 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22795691/-/22797446#22797446"], ["published", Tue, 01 Apr 2014 21:41:35 UTC +00:00], ["summary", "<p>You can do something like this:</p>\n\n<pre><code>Song.joins(:albums).where('albums.released_on >= ?', from).where('albums.rating > ?', rating).where('albums.genre = ?', genres)\n</code></pre>\n\n<p>It makes only one query.</p>\n"], ["title", "Answer by VAIRIX for Joining a table and a filtered table in ActiveRecord"], ["updated", Tue, 01 Apr 2014 21:41:35 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:03:33 UTC +00:00]]
|
|
328
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
329
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22796203/in-rails-4-using-ajax-how-do-i-update-a-particular-div-on-success/22796990#22796990' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1[0m
|
|
330
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
331
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:03:33 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22796203/in-rails-4-using-ajax-how-do-i-update-a-particular-div-on-success/22796990#22796990"], ["published", Tue, 01 Apr 2014 21:13:17 UTC +00:00], ["summary", "<p>This should work for you:</p>\n\n<pre><code>html = render_to_string(partial: 'images', locals: {user: user})\n</code></pre>\n"], ["title", "Answer by VAIRIX for In Rails 4 using AJAX, how do I update a particular div on success?"], ["updated", Tue, 01 Apr 2014 21:13:17 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:03:33 UTC +00:00]]
|
|
332
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
333
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22761911/-/22762973#22762973' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1[0m
|
|
334
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
335
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:03:33 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22761911/-/22762973#22762973"], ["published", Mon, 31 Mar 2014 13:34:39 UTC +00:00], ["summary", "<p>A possible solution that implies more than one line, is using scope to make it cleaner, you will have two extra lines of code, but I found it more readable:</p>\n\n<pre><code>scope :path => '/', :controller => :static_pages do\n get 'index' => :index, :as => 'index'\n get 'home' => :index, :as => 'home'\nend\n</code></pre>\n\n<p>That way you make explicit which controller to use for all routes + the path (first part of it).</p>\n"], ["title", "Answer by VAIRIX for How to implement root route and get \"index\" to the same page"], ["updated", Mon, 31 Mar 2014 13:34:39 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:03:33 UTC +00:00]]
|
|
336
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
|
337
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22762135/-/22762326#22762326' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1[0m
|
|
338
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
339
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:03:33 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22762135/-/22762326#22762326"], ["published", Mon, 31 Mar 2014 13:05:05 UTC +00:00], ["summary", "<p>What you should expect from the assign after calling your controller, is to have the value that the controller sets to the instance variable. You could see it like using @category. So the category created with FactoryGirl is not equals to the one created by your controller (in this case seems your action is returning nil value in your instance variable)</p>\n"], ["title", "Answer by VAIRIX for I don't really know what RSPEC assigns do, and my tests are failing"], ["updated", Mon, 31 Mar 2014 13:05:05 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:03:33 UTC +00:00]]
|
|
340
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
341
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22720472/-/22720669#22720669' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1[0m
|
|
342
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
343
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:03:33 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22720472/-/22720669#22720669"], ["published", Fri, 28 Mar 2014 18:35:10 UTC +00:00], ["summary", "<p>This should be work!</p>\n\n<pre><code>Foo.joins(:bazs).where(bazs: {name: 'x'})\n</code></pre>\n"], ["title", "Answer by VAIRIX for Select objects based on grandchild attribute with joins in ActiveRecord"], ["updated", Fri, 28 Mar 2014 18:35:10 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:03:33 UTC +00:00]]
|
|
344
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
|
345
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22717251/-/22717807#22717807' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1[0m
|
|
346
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
347
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:03:33 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22717251/-/22717807#22717807"], ["published", Fri, 28 Mar 2014 16:04:58 UTC +00:00], ["summary", "<p>One way to do this, is by doing the following:\nIn the view</p>\n\n<pre><code><img src=\"/get_img/tlotr\">\n</code></pre>\n\n<p>That will make a request to the server, so in the routes.rb add</p>\n\n<pre><code>get '/get_img/:filename' => 'test#img'\n</code></pre>\n\n<p>In my case I have a TestController with an action call img like:</p>\n\n<pre><code>def img\n send_file( \"/your_path/\#{params[:filename]}.png\",\n :disposition => 'inline',\n :type => 'image/png',\n :x_sendfile => true )\nend\n</code></pre>\n\n<p>With this solution you hit the server one more time, but you don't have to send the data using the read method.</p>\n"], ["title", "Answer by VAIRIX for How can I display png data as an image inside in the browser?"], ["updated", Fri, 28 Mar 2014 16:04:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:03:33 UTC +00:00]]
|
|
348
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
|
349
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22716263/-/22716782#22716782' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1[0m
|
|
350
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
351
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:03:33 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22716263/-/22716782#22716782"], ["published", Fri, 28 Mar 2014 15:20:09 UTC +00:00], ["summary", "<p>You can do something like that:</p>\n\n<p>In your javascript file:</p>\n\n<pre><code>$('#my_button').click(function(){\n $.ajax({\n type:'GET',\n url: '/table',\n data:{ rows: $('#my_text_field').val() },\n success: function(data){\n $('#my_table_container').html(data);\n }\n });\n});\n</code></pre>\n\n<p>In your controller:</p>\n\n<pre><code>def table\n render partial: 'table', locals: { rows: params[:rows] }\nend\n</code></pre>\n\n<p>In your routes.rb:</p>\n\n<pre><code>match 'table' => 'your_controller#table'\n</code></pre>\n\n<p>And then in your partial (_partial.html.rb), you have to iterate over number of rows that you receive in the rows param. </p>\n"], ["title", "Answer by VAIRIX for Use form to send ajax request to rails app"], ["updated", Fri, 28 Mar 2014 15:20:09 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:03:33 UTC +00:00]]
|
|
352
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
|
353
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22715588/-/22716096#22716096' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1[0m
|
|
354
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
355
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:03:33 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22715588/-/22716096#22716096"], ["published", Fri, 28 Mar 2014 14:48:22 UTC +00:00], ["summary", "<p>Define it in the ApplicationController like:</p>\n\n<pre><code>class ApplicationController < ActionController::Base\n\n helper_method :paypal_url\n\n def paypal_url\n 'https://www.paypal.com/cgi-bin/webscr'\n end\n\nend\n</code></pre>\n\n<p>After that you'll be able to use the helper method from any view or controller.</p>\n"], ["title", "Answer by VAIRIX for Helper for controller and views"], ["updated", Fri, 28 Mar 2014 14:48:22 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:03:33 UTC +00:00]]
|
|
356
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
|
357
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22761911/how-to-implement-root-route-and-get-index-to-the-same-page/22762973?cid=34709045#22762973' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1[0m
|
|
358
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
359
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:03:33 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22761911/how-to-implement-root-route-and-get-index-to-the-same-page/22762973?cid=34709045#22762973"], ["published", Mon, 31 Mar 2014 16:45:30 UTC +00:00], ["summary", "You can add <code>root to: 'static_pages#index'</code> inside or outside your scope. It's a possible solution and maybe doesn't fit what you expect, cause it takes more code to solve the problem."], ["title", "Comment by VAIRIX on How to implement root route and get \"index\" to the same page"], ["updated", Mon, 31 Mar 2014 16:45:30 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:03:33 UTC +00:00]]
|
|
360
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
|
361
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22759923/how-to-let-the-user-create-cron-jobs-in-rails?cid=34699568' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1[0m
|
|
362
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
363
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:03:33 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22759923/how-to-let-the-user-create-cron-jobs-in-rails?cid=34699568"], ["published", Mon, 31 Mar 2014 12:58:30 UTC +00:00], ["summary", "If you want to schedule a task every X period of time, and your user only sets when and the task (as you said), you could try doing it with delayedjob ` class.delay(run_at: 5.hours.from_now).method(param)` and call recursive in the method. Of course you will have some delay of excecution (even if the first thing in your method is calling the recursion). It should be some similar way to do it with Sidekiq (really don't know). Be careful with overlapping of tasks."], ["title", "Comment by VAIRIX on How to let the user create cron jobs in rails?"], ["updated", Mon, 31 Mar 2014 12:58:30 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:03:33 UTC +00:00]]
|
|
364
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
365
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22716263/use-form-to-send-ajax-request-to-rails-app/22716782?cid=34623992#22716782' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1[0m
|
|
366
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
367
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:03:33 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22716263/use-form-to-send-ajax-request-to-rails-app/22716782?cid=34623992#22716782"], ["published", Fri, 28 Mar 2014 17:57:47 UTC +00:00], ["summary", "If you need more params from the view, just add them in the "data ajax attribute" like <code>data:{ rows: val1, sort: val2 }</code>"], ["title", "Comment by VAIRIX on Use form to send ajax request to rails app"], ["updated", Fri, 28 Mar 2014 17:57:47 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:03:33 UTC +00:00]]
|
|
368
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
|
369
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "stackoverfeeds_so_feeds"[0m
|
|
370
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
|
371
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
|
372
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22795691/-/22797446#22797446' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
373
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
374
|
+
[1m[35mSQL (32.8ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:04:09 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22795691/-/22797446#22797446"], ["published", Tue, 01 Apr 2014 21:41:35 UTC +00:00], ["summary", "<p>You can do something like this:</p>\n\n<pre><code>Song.joins(:albums).where('albums.released_on >= ?', from).where('albums.rating > ?', rating).where('albums.genre = ?', genres)\n</code></pre>\n\n<p>It makes only one query.</p>\n"], ["title", "Answer by VAIRIX for Joining a table and a filtered table in ActiveRecord"], ["updated", Tue, 01 Apr 2014 21:41:35 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:04:09 UTC +00:00]]
|
|
375
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
376
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22796203/in-rails-4-using-ajax-how-do-i-update-a-particular-div-on-success/22796990#22796990' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
377
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
378
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:04:09 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22796203/in-rails-4-using-ajax-how-do-i-update-a-particular-div-on-success/22796990#22796990"], ["published", Tue, 01 Apr 2014 21:13:17 UTC +00:00], ["summary", "<p>This should work for you:</p>\n\n<pre><code>html = render_to_string(partial: 'images', locals: {user: user})\n</code></pre>\n"], ["title", "Answer by VAIRIX for In Rails 4 using AJAX, how do I update a particular div on success?"], ["updated", Tue, 01 Apr 2014 21:13:17 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:04:09 UTC +00:00]]
|
|
379
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
380
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22761911/-/22762973#22762973' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
381
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
382
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:04:09 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22761911/-/22762973#22762973"], ["published", Mon, 31 Mar 2014 13:34:39 UTC +00:00], ["summary", "<p>A possible solution that implies more than one line, is using scope to make it cleaner, you will have two extra lines of code, but I found it more readable:</p>\n\n<pre><code>scope :path => '/', :controller => :static_pages do\n get 'index' => :index, :as => 'index'\n get 'home' => :index, :as => 'home'\nend\n</code></pre>\n\n<p>That way you make explicit which controller to use for all routes + the path (first part of it).</p>\n"], ["title", "Answer by VAIRIX for How to implement root route and get \"index\" to the same page"], ["updated", Mon, 31 Mar 2014 13:34:39 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:04:09 UTC +00:00]]
|
|
383
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
384
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22762135/-/22762326#22762326' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
385
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
386
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:04:09 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22762135/-/22762326#22762326"], ["published", Mon, 31 Mar 2014 13:05:05 UTC +00:00], ["summary", "<p>What you should expect from the assign after calling your controller, is to have the value that the controller sets to the instance variable. You could see it like using @category. So the category created with FactoryGirl is not equals to the one created by your controller (in this case seems your action is returning nil value in your instance variable)</p>\n"], ["title", "Answer by VAIRIX for I don't really know what RSPEC assigns do, and my tests are failing"], ["updated", Mon, 31 Mar 2014 13:05:05 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:04:09 UTC +00:00]]
|
|
387
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
388
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22720472/-/22720669#22720669' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
389
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
390
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:04:09 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22720472/-/22720669#22720669"], ["published", Fri, 28 Mar 2014 18:35:10 UTC +00:00], ["summary", "<p>This should be work!</p>\n\n<pre><code>Foo.joins(:bazs).where(bazs: {name: 'x'})\n</code></pre>\n"], ["title", "Answer by VAIRIX for Select objects based on grandchild attribute with joins in ActiveRecord"], ["updated", Fri, 28 Mar 2014 18:35:10 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:04:09 UTC +00:00]]
|
|
391
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
392
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22717251/-/22717807#22717807' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
393
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
394
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:04:09 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22717251/-/22717807#22717807"], ["published", Fri, 28 Mar 2014 16:04:58 UTC +00:00], ["summary", "<p>One way to do this, is by doing the following:\nIn the view</p>\n\n<pre><code><img src=\"/get_img/tlotr\">\n</code></pre>\n\n<p>That will make a request to the server, so in the routes.rb add</p>\n\n<pre><code>get '/get_img/:filename' => 'test#img'\n</code></pre>\n\n<p>In my case I have a TestController with an action call img like:</p>\n\n<pre><code>def img\n send_file( \"/your_path/\#{params[:filename]}.png\",\n :disposition => 'inline',\n :type => 'image/png',\n :x_sendfile => true )\nend\n</code></pre>\n\n<p>With this solution you hit the server one more time, but you don't have to send the data using the read method.</p>\n"], ["title", "Answer by VAIRIX for How can I display png data as an image inside in the browser?"], ["updated", Fri, 28 Mar 2014 16:04:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:04:09 UTC +00:00]]
|
|
395
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
396
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22716263/-/22716782#22716782' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
397
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
398
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:04:09 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22716263/-/22716782#22716782"], ["published", Fri, 28 Mar 2014 15:20:09 UTC +00:00], ["summary", "<p>You can do something like that:</p>\n\n<p>In your javascript file:</p>\n\n<pre><code>$('#my_button').click(function(){\n $.ajax({\n type:'GET',\n url: '/table',\n data:{ rows: $('#my_text_field').val() },\n success: function(data){\n $('#my_table_container').html(data);\n }\n });\n});\n</code></pre>\n\n<p>In your controller:</p>\n\n<pre><code>def table\n render partial: 'table', locals: { rows: params[:rows] }\nend\n</code></pre>\n\n<p>In your routes.rb:</p>\n\n<pre><code>match 'table' => 'your_controller#table'\n</code></pre>\n\n<p>And then in your partial (_partial.html.rb), you have to iterate over number of rows that you receive in the rows param. </p>\n"], ["title", "Answer by VAIRIX for Use form to send ajax request to rails app"], ["updated", Fri, 28 Mar 2014 15:20:09 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:04:09 UTC +00:00]]
|
|
399
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
400
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22715588/-/22716096#22716096' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
401
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
402
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:04:09 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22715588/-/22716096#22716096"], ["published", Fri, 28 Mar 2014 14:48:22 UTC +00:00], ["summary", "<p>Define it in the ApplicationController like:</p>\n\n<pre><code>class ApplicationController < ActionController::Base\n\n helper_method :paypal_url\n\n def paypal_url\n 'https://www.paypal.com/cgi-bin/webscr'\n end\n\nend\n</code></pre>\n\n<p>After that you'll be able to use the helper method from any view or controller.</p>\n"], ["title", "Answer by VAIRIX for Helper for controller and views"], ["updated", Fri, 28 Mar 2014 14:48:22 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:04:09 UTC +00:00]]
|
|
403
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
404
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22761911/how-to-implement-root-route-and-get-index-to-the-same-page/22762973?cid=34709045#22762973' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
405
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
406
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:04:09 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22761911/how-to-implement-root-route-and-get-index-to-the-same-page/22762973?cid=34709045#22762973"], ["published", Mon, 31 Mar 2014 16:45:30 UTC +00:00], ["summary", "You can add <code>root to: 'static_pages#index'</code> inside or outside your scope. It's a possible solution and maybe doesn't fit what you expect, cause it takes more code to solve the problem."], ["title", "Comment by VAIRIX on How to implement root route and get \"index\" to the same page"], ["updated", Mon, 31 Mar 2014 16:45:30 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:04:09 UTC +00:00]]
|
|
407
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
408
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22759923/how-to-let-the-user-create-cron-jobs-in-rails?cid=34699568' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
409
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
410
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:04:09 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22759923/how-to-let-the-user-create-cron-jobs-in-rails?cid=34699568"], ["published", Mon, 31 Mar 2014 12:58:30 UTC +00:00], ["summary", "If you want to schedule a task every X period of time, and your user only sets when and the task (as you said), you could try doing it with delayedjob ` class.delay(run_at: 5.hours.from_now).method(param)` and call recursive in the method. Of course you will have some delay of excecution (even if the first thing in your method is calling the recursion). It should be some similar way to do it with Sidekiq (really don't know). Be careful with overlapping of tasks."], ["title", "Comment by VAIRIX on How to let the user create cron jobs in rails?"], ["updated", Mon, 31 Mar 2014 12:58:30 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:04:09 UTC +00:00]]
|
|
411
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
412
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22716263/use-form-to-send-ajax-request-to-rails-app/22716782?cid=34623992#22716782' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
413
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
414
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:04:09 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22716263/use-form-to-send-ajax-request-to-rails-app/22716782?cid=34623992#22716782"], ["published", Fri, 28 Mar 2014 17:57:47 UTC +00:00], ["summary", "If you need more params from the view, just add them in the "data ajax attribute" like <code>data:{ rows: val1, sort: val2 }</code>"], ["title", "Comment by VAIRIX on Use form to send ajax request to rails app"], ["updated", Fri, 28 Mar 2014 17:57:47 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:04:09 UTC +00:00]]
|
|
415
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
416
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22795691/-/22797446#22797446' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
417
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.2ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22796203/in-rails-4-using-ajax-how-do-i-update-a-particular-div-on-success/22796990#22796990' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1[0m
|
|
418
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22761911/-/22762973#22762973' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
419
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22762135/-/22762326#22762326' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1[0m
|
|
420
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22720472/-/22720669#22720669' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
421
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22717251/-/22717807#22717807' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1[0m
|
|
422
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22716263/-/22716782#22716782' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
423
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22715588/-/22716096#22716096' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1[0m
|
|
424
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22761911/how-to-implement-root-route-and-get-index-to-the-same-page/22762973?cid=34709045#22762973' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
425
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22759923/how-to-let-the-user-create-cron-jobs-in-rails?cid=34699568' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1[0m
|
|
426
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22716263/use-form-to-send-ajax-request-to-rails-app/22716782?cid=34623992#22716782' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
427
|
+
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "stackoverfeeds_so_feeds"[0m
|
|
428
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22795691/-/22797446#22797446' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
429
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.2ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22796203/in-rails-4-using-ajax-how-do-i-update-a-particular-div-on-success/22796990#22796990' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1[0m
|
|
430
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22761911/-/22762973#22762973' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
431
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.2ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22762135/-/22762326#22762326' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1[0m
|
|
432
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22720472/-/22720669#22720669' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
433
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.3ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22717251/-/22717807#22717807' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1[0m
|
|
434
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22716263/-/22716782#22716782' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
435
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.2ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22715588/-/22716096#22716096' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1[0m
|
|
436
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22761911/how-to-implement-root-route-and-get-index-to-the-same-page/22762973?cid=34709045#22762973' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
437
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.2ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22759923/how-to-let-the-user-create-cron-jobs-in-rails?cid=34699568' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1[0m
|
|
438
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22716263/use-form-to-send-ajax-request-to-rails-app/22716782?cid=34623992#22716782' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
439
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "stackoverfeeds_so_feeds"[0m
|
|
440
|
+
[1m[35m (0.2ms)[0m rollback transaction
|
|
441
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
|
442
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
|
443
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
|
444
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
|
445
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
|
446
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
|
447
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
|
448
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
|
449
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
|
450
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
|
451
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
|
452
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
|
453
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
|
454
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
455
|
+
[1m[36mSQL (6.0ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00]]
|
|
456
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
457
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.2ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1[0m [["id", 1]]
|
|
458
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
459
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00]]
|
|
460
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
461
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1[0m [["id", 2]]
|
|
462
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
463
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00]]
|
|
464
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
|
465
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.0ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1[0m [["id", 3]]
|
|
466
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
467
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00]]
|
|
468
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
469
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1[0m [["id", 4]]
|
|
470
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
471
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00]]
|
|
472
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
473
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1[0m [["id", 5]]
|
|
474
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
475
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00]]
|
|
476
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
477
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1[0m [["id", 6]]
|
|
478
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
479
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00]]
|
|
480
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
481
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1[0m [["id", 7]]
|
|
482
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
483
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00]]
|
|
484
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
485
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.0ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1[0m [["id", 8]]
|
|
486
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
487
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00]]
|
|
488
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
489
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1[0m [["id", 9]]
|
|
490
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
491
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00]]
|
|
492
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
493
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1[0m [["id", 10]]
|
|
494
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
495
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00]]
|
|
496
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
|
497
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.0ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1[0m [["id", 11]]
|
|
498
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
499
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00]]
|
|
500
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
501
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.0ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1[0m [["id", 12]]
|
|
502
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" ORDER BY published DESC LIMIT 5
|
|
503
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
|
504
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
505
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
506
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00]]
|
|
507
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
508
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1 [["id", 1]]
|
|
509
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
510
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00]]
|
|
511
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
512
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1 [["id", 2]]
|
|
513
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
514
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00]]
|
|
515
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
516
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.0ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1 [["id", 3]]
|
|
517
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
518
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00]]
|
|
519
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
520
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1 [["id", 4]]
|
|
521
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
522
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00]]
|
|
523
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
524
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1 [["id", 5]]
|
|
525
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
526
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00]]
|
|
527
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
528
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1 [["id", 6]]
|
|
529
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
530
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00]]
|
|
531
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
532
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1 [["id", 7]]
|
|
533
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
534
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00]]
|
|
535
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
536
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.0ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1 [["id", 8]]
|
|
537
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
538
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00]]
|
|
539
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
540
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.0ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1 [["id", 9]]
|
|
541
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
542
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00]]
|
|
543
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
544
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.0ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1 [["id", 10]]
|
|
545
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
546
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00]]
|
|
547
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
548
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.0ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1 [["id", 11]]
|
|
549
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
550
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00]]
|
|
551
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
552
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.0ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1 [["id", 12]]
|
|
553
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
554
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Sat, 05 Apr 2014 15:09:58 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:09:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:09:58 UTC +00:00]]
|
|
555
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
556
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1 [["id", 13]]
|
|
557
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.2ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" ORDER BY published DESC LIMIT 1[0m
|
|
558
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
|
559
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
|
560
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22795691/-/22797446#22797446' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
561
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
562
|
+
[1m[35mSQL (5.7ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22795691/-/22797446#22797446"], ["published", Tue, 01 Apr 2014 21:41:35 UTC +00:00], ["summary", "<p>You can do something like this:</p>\n\n<pre><code>Song.joins(:albums).where('albums.released_on >= ?', from).where('albums.rating > ?', rating).where('albums.genre = ?', genres)\n</code></pre>\n\n<p>It makes only one query.</p>\n"], ["title", "Answer by VAIRIX for Joining a table and a filtered table in ActiveRecord"], ["updated", Tue, 01 Apr 2014 21:41:35 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
563
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
564
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22796203/in-rails-4-using-ajax-how-do-i-update-a-particular-div-on-success/22796990#22796990' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
565
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
566
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22796203/in-rails-4-using-ajax-how-do-i-update-a-particular-div-on-success/22796990#22796990"], ["published", Tue, 01 Apr 2014 21:13:17 UTC +00:00], ["summary", "<p>This should work for you:</p>\n\n<pre><code>html = render_to_string(partial: 'images', locals: {user: user})\n</code></pre>\n"], ["title", "Answer by VAIRIX for In Rails 4 using AJAX, how do I update a particular div on success?"], ["updated", Tue, 01 Apr 2014 21:13:17 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
567
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
568
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22761911/-/22762973#22762973' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
569
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
570
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22761911/-/22762973#22762973"], ["published", Mon, 31 Mar 2014 13:34:39 UTC +00:00], ["summary", "<p>A possible solution that implies more than one line, is using scope to make it cleaner, you will have two extra lines of code, but I found it more readable:</p>\n\n<pre><code>scope :path => '/', :controller => :static_pages do\n get 'index' => :index, :as => 'index'\n get 'home' => :index, :as => 'home'\nend\n</code></pre>\n\n<p>That way you make explicit which controller to use for all routes + the path (first part of it).</p>\n"], ["title", "Answer by VAIRIX for How to implement root route and get \"index\" to the same page"], ["updated", Mon, 31 Mar 2014 13:34:39 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
571
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
572
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22762135/-/22762326#22762326' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
573
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
574
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22762135/-/22762326#22762326"], ["published", Mon, 31 Mar 2014 13:05:05 UTC +00:00], ["summary", "<p>What you should expect from the assign after calling your controller, is to have the value that the controller sets to the instance variable. You could see it like using @category. So the category created with FactoryGirl is not equals to the one created by your controller (in this case seems your action is returning nil value in your instance variable)</p>\n"], ["title", "Answer by VAIRIX for I don't really know what RSPEC assigns do, and my tests are failing"], ["updated", Mon, 31 Mar 2014 13:05:05 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
575
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
576
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22720472/-/22720669#22720669' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
577
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
578
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22720472/-/22720669#22720669"], ["published", Fri, 28 Mar 2014 18:35:10 UTC +00:00], ["summary", "<p>This should be work!</p>\n\n<pre><code>Foo.joins(:bazs).where(bazs: {name: 'x'})\n</code></pre>\n"], ["title", "Answer by VAIRIX for Select objects based on grandchild attribute with joins in ActiveRecord"], ["updated", Fri, 28 Mar 2014 18:35:10 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
579
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
580
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22717251/-/22717807#22717807' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
581
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
582
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22717251/-/22717807#22717807"], ["published", Fri, 28 Mar 2014 16:04:58 UTC +00:00], ["summary", "<p>One way to do this, is by doing the following:\nIn the view</p>\n\n<pre><code><img src=\"/get_img/tlotr\">\n</code></pre>\n\n<p>That will make a request to the server, so in the routes.rb add</p>\n\n<pre><code>get '/get_img/:filename' => 'test#img'\n</code></pre>\n\n<p>In my case I have a TestController with an action call img like:</p>\n\n<pre><code>def img\n send_file( \"/your_path/\#{params[:filename]}.png\",\n :disposition => 'inline',\n :type => 'image/png',\n :x_sendfile => true )\nend\n</code></pre>\n\n<p>With this solution you hit the server one more time, but you don't have to send the data using the read method.</p>\n"], ["title", "Answer by VAIRIX for How can I display png data as an image inside in the browser?"], ["updated", Fri, 28 Mar 2014 16:04:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
583
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
584
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22716263/-/22716782#22716782' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
585
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
586
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22716263/-/22716782#22716782"], ["published", Fri, 28 Mar 2014 15:20:09 UTC +00:00], ["summary", "<p>You can do something like that:</p>\n\n<p>In your javascript file:</p>\n\n<pre><code>$('#my_button').click(function(){\n $.ajax({\n type:'GET',\n url: '/table',\n data:{ rows: $('#my_text_field').val() },\n success: function(data){\n $('#my_table_container').html(data);\n }\n });\n});\n</code></pre>\n\n<p>In your controller:</p>\n\n<pre><code>def table\n render partial: 'table', locals: { rows: params[:rows] }\nend\n</code></pre>\n\n<p>In your routes.rb:</p>\n\n<pre><code>match 'table' => 'your_controller#table'\n</code></pre>\n\n<p>And then in your partial (_partial.html.rb), you have to iterate over number of rows that you receive in the rows param. </p>\n"], ["title", "Answer by VAIRIX for Use form to send ajax request to rails app"], ["updated", Fri, 28 Mar 2014 15:20:09 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
587
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
588
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22715588/-/22716096#22716096' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
589
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
590
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22715588/-/22716096#22716096"], ["published", Fri, 28 Mar 2014 14:48:22 UTC +00:00], ["summary", "<p>Define it in the ApplicationController like:</p>\n\n<pre><code>class ApplicationController < ActionController::Base\n\n helper_method :paypal_url\n\n def paypal_url\n 'https://www.paypal.com/cgi-bin/webscr'\n end\n\nend\n</code></pre>\n\n<p>After that you'll be able to use the helper method from any view or controller.</p>\n"], ["title", "Answer by VAIRIX for Helper for controller and views"], ["updated", Fri, 28 Mar 2014 14:48:22 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
591
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
592
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22761911/how-to-implement-root-route-and-get-index-to-the-same-page/22762973?cid=34709045#22762973' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
593
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
594
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22761911/how-to-implement-root-route-and-get-index-to-the-same-page/22762973?cid=34709045#22762973"], ["published", Mon, 31 Mar 2014 16:45:30 UTC +00:00], ["summary", "You can add <code>root to: 'static_pages#index'</code> inside or outside your scope. It's a possible solution and maybe doesn't fit what you expect, cause it takes more code to solve the problem."], ["title", "Comment by VAIRIX on How to implement root route and get \"index\" to the same page"], ["updated", Mon, 31 Mar 2014 16:45:30 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
595
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
596
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22759923/how-to-let-the-user-create-cron-jobs-in-rails?cid=34699568' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
597
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
598
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22759923/how-to-let-the-user-create-cron-jobs-in-rails?cid=34699568"], ["published", Mon, 31 Mar 2014 12:58:30 UTC +00:00], ["summary", "If you want to schedule a task every X period of time, and your user only sets when and the task (as you said), you could try doing it with delayedjob ` class.delay(run_at: 5.hours.from_now).method(param)` and call recursive in the method. Of course you will have some delay of excecution (even if the first thing in your method is calling the recursion). It should be some similar way to do it with Sidekiq (really don't know). Be careful with overlapping of tasks."], ["title", "Comment by VAIRIX on How to let the user create cron jobs in rails?"], ["updated", Mon, 31 Mar 2014 12:58:30 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
599
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
600
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22716263/use-form-to-send-ajax-request-to-rails-app/22716782?cid=34623992#22716782' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
601
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
602
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22716263/use-form-to-send-ajax-request-to-rails-app/22716782?cid=34623992#22716782"], ["published", Fri, 28 Mar 2014 17:57:47 UTC +00:00], ["summary", "If you need more params from the view, just add them in the "data ajax attribute" like <code>data:{ rows: val1, sort: val2 }</code>"], ["title", "Comment by VAIRIX on Use form to send ajax request to rails app"], ["updated", Fri, 28 Mar 2014 17:57:47 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
603
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
604
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.3ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" ORDER BY published DESC LIMIT 20
|
|
605
|
+
Rendered /home/vairix/projects/stackoverfeeds/app/views/stackoverfeeds/_stackoverflow_feeds.html.erb (32.3ms)
|
|
606
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
|
607
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
608
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
609
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
610
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
611
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
612
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
613
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
614
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
615
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
616
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
617
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
618
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
619
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
620
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
621
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
622
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
623
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1 [["id", 1]]
|
|
624
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
625
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
626
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
627
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1 [["id", 2]]
|
|
628
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
629
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
630
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
631
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1 [["id", 3]]
|
|
632
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
633
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
634
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
635
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1 [["id", 4]]
|
|
636
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
637
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
638
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
639
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1 [["id", 5]]
|
|
640
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
641
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
642
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
643
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1 [["id", 6]]
|
|
644
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
645
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
646
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
647
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1 [["id", 7]]
|
|
648
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
649
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
650
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
651
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1 [["id", 8]]
|
|
652
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
653
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
654
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
655
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1 [["id", 9]]
|
|
656
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
657
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
658
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
659
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1 [["id", 10]]
|
|
660
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
661
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
662
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
663
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1 [["id", 11]]
|
|
664
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
665
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
666
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
667
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1 [["id", 12]]
|
|
668
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.2ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" ORDER BY published DESC LIMIT 5[0m
|
|
669
|
+
[1m[35m (0.2ms)[0m rollback transaction
|
|
670
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
|
671
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
672
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
673
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
674
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1[0m [["id", 1]]
|
|
675
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
676
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
677
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
678
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1[0m [["id", 2]]
|
|
679
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
680
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
681
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
|
682
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1[0m [["id", 3]]
|
|
683
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
684
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
685
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
|
686
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1[0m [["id", 4]]
|
|
687
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
688
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
689
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
|
690
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1[0m [["id", 5]]
|
|
691
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
692
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
693
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
|
694
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1[0m [["id", 6]]
|
|
695
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
696
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
697
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
|
698
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1[0m [["id", 7]]
|
|
699
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
700
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
701
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
|
702
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1[0m [["id", 8]]
|
|
703
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
704
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
705
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
|
706
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1[0m [["id", 9]]
|
|
707
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
708
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
709
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
|
710
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1[0m [["id", 10]]
|
|
711
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
712
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
713
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
714
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1[0m [["id", 11]]
|
|
715
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
|
716
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
717
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
|
718
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1[0m [["id", 12]]
|
|
719
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
|
720
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["author", "vairix-mvillero"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "tag:github.com,2008:CreateEvent/1946558445"], ["published", Sat, 05 Apr 2014 15:10:40 UTC +00:00], ["summary", "<div> <span> </span> </div>"], ["title", "vairix-mvillero created branch mvillero at vairix-garbeletche/vairix_test"], ["updated", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
721
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
|
722
|
+
[1m[36mStackoverfeeds::SoFeed Load (0.1ms)[0m [1mSELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."id" = ? LIMIT 1[0m [["id", 13]]
|
|
723
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" ORDER BY published DESC LIMIT 1
|
|
724
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
|
725
|
+
[1m[35m (0.1ms)[0m begin transaction
|
|
726
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "stackoverfeeds_so_feeds"[0m
|
|
727
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22795691/-/22797446#22797446' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
728
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
729
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22795691/-/22797446#22797446"], ["published", Tue, 01 Apr 2014 21:41:35 UTC +00:00], ["summary", "<p>You can do something like this:</p>\n\n<pre><code>Song.joins(:albums).where('albums.released_on >= ?', from).where('albums.rating > ?', rating).where('albums.genre = ?', genres)\n</code></pre>\n\n<p>It makes only one query.</p>\n"], ["title", "Answer by VAIRIX for Joining a table and a filtered table in ActiveRecord"], ["updated", Tue, 01 Apr 2014 21:41:35 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
730
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
731
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22796203/in-rails-4-using-ajax-how-do-i-update-a-particular-div-on-success/22796990#22796990' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
732
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
733
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22796203/in-rails-4-using-ajax-how-do-i-update-a-particular-div-on-success/22796990#22796990"], ["published", Tue, 01 Apr 2014 21:13:17 UTC +00:00], ["summary", "<p>This should work for you:</p>\n\n<pre><code>html = render_to_string(partial: 'images', locals: {user: user})\n</code></pre>\n"], ["title", "Answer by VAIRIX for In Rails 4 using AJAX, how do I update a particular div on success?"], ["updated", Tue, 01 Apr 2014 21:13:17 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
734
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
735
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22761911/-/22762973#22762973' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
736
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
737
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22761911/-/22762973#22762973"], ["published", Mon, 31 Mar 2014 13:34:39 UTC +00:00], ["summary", "<p>A possible solution that implies more than one line, is using scope to make it cleaner, you will have two extra lines of code, but I found it more readable:</p>\n\n<pre><code>scope :path => '/', :controller => :static_pages do\n get 'index' => :index, :as => 'index'\n get 'home' => :index, :as => 'home'\nend\n</code></pre>\n\n<p>That way you make explicit which controller to use for all routes + the path (first part of it).</p>\n"], ["title", "Answer by VAIRIX for How to implement root route and get \"index\" to the same page"], ["updated", Mon, 31 Mar 2014 13:34:39 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
738
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
739
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22762135/-/22762326#22762326' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
740
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
741
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22762135/-/22762326#22762326"], ["published", Mon, 31 Mar 2014 13:05:05 UTC +00:00], ["summary", "<p>What you should expect from the assign after calling your controller, is to have the value that the controller sets to the instance variable. You could see it like using @category. So the category created with FactoryGirl is not equals to the one created by your controller (in this case seems your action is returning nil value in your instance variable)</p>\n"], ["title", "Answer by VAIRIX for I don't really know what RSPEC assigns do, and my tests are failing"], ["updated", Mon, 31 Mar 2014 13:05:05 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
742
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
743
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22720472/-/22720669#22720669' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
744
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
745
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22720472/-/22720669#22720669"], ["published", Fri, 28 Mar 2014 18:35:10 UTC +00:00], ["summary", "<p>This should be work!</p>\n\n<pre><code>Foo.joins(:bazs).where(bazs: {name: 'x'})\n</code></pre>\n"], ["title", "Answer by VAIRIX for Select objects based on grandchild attribute with joins in ActiveRecord"], ["updated", Fri, 28 Mar 2014 18:35:10 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
746
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
747
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22717251/-/22717807#22717807' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
748
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
749
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22717251/-/22717807#22717807"], ["published", Fri, 28 Mar 2014 16:04:58 UTC +00:00], ["summary", "<p>One way to do this, is by doing the following:\nIn the view</p>\n\n<pre><code><img src=\"/get_img/tlotr\">\n</code></pre>\n\n<p>That will make a request to the server, so in the routes.rb add</p>\n\n<pre><code>get '/get_img/:filename' => 'test#img'\n</code></pre>\n\n<p>In my case I have a TestController with an action call img like:</p>\n\n<pre><code>def img\n send_file( \"/your_path/\#{params[:filename]}.png\",\n :disposition => 'inline',\n :type => 'image/png',\n :x_sendfile => true )\nend\n</code></pre>\n\n<p>With this solution you hit the server one more time, but you don't have to send the data using the read method.</p>\n"], ["title", "Answer by VAIRIX for How can I display png data as an image inside in the browser?"], ["updated", Fri, 28 Mar 2014 16:04:58 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
750
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
751
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22716263/-/22716782#22716782' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
752
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
753
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22716263/-/22716782#22716782"], ["published", Fri, 28 Mar 2014 15:20:09 UTC +00:00], ["summary", "<p>You can do something like that:</p>\n\n<p>In your javascript file:</p>\n\n<pre><code>$('#my_button').click(function(){\n $.ajax({\n type:'GET',\n url: '/table',\n data:{ rows: $('#my_text_field').val() },\n success: function(data){\n $('#my_table_container').html(data);\n }\n });\n});\n</code></pre>\n\n<p>In your controller:</p>\n\n<pre><code>def table\n render partial: 'table', locals: { rows: params[:rows] }\nend\n</code></pre>\n\n<p>In your routes.rb:</p>\n\n<pre><code>match 'table' => 'your_controller#table'\n</code></pre>\n\n<p>And then in your partial (_partial.html.rb), you have to iterate over number of rows that you receive in the rows param. </p>\n"], ["title", "Answer by VAIRIX for Use form to send ajax request to rails app"], ["updated", Fri, 28 Mar 2014 15:20:09 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
754
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
755
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22715588/-/22716096#22716096' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
756
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
757
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22715588/-/22716096#22716096"], ["published", Fri, 28 Mar 2014 14:48:22 UTC +00:00], ["summary", "<p>Define it in the ApplicationController like:</p>\n\n<pre><code>class ApplicationController < ActionController::Base\n\n helper_method :paypal_url\n\n def paypal_url\n 'https://www.paypal.com/cgi-bin/webscr'\n end\n\nend\n</code></pre>\n\n<p>After that you'll be able to use the helper method from any view or controller.</p>\n"], ["title", "Answer by VAIRIX for Helper for controller and views"], ["updated", Fri, 28 Mar 2014 14:48:22 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
758
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
759
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.2ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22761911/how-to-implement-root-route-and-get-index-to-the-same-page/22762973?cid=34709045#22762973' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
760
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
761
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22761911/how-to-implement-root-route-and-get-index-to-the-same-page/22762973?cid=34709045#22762973"], ["published", Mon, 31 Mar 2014 16:45:30 UTC +00:00], ["summary", "You can add <code>root to: 'static_pages#index'</code> inside or outside your scope. It's a possible solution and maybe doesn't fit what you expect, cause it takes more code to solve the problem."], ["title", "Comment by VAIRIX on How to implement root route and get \"index\" to the same page"], ["updated", Mon, 31 Mar 2014 16:45:30 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
762
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
763
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22759923/how-to-let-the-user-create-cron-jobs-in-rails?cid=34699568' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
764
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
765
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22759923/how-to-let-the-user-create-cron-jobs-in-rails?cid=34699568"], ["published", Mon, 31 Mar 2014 12:58:30 UTC +00:00], ["summary", "If you want to schedule a task every X period of time, and your user only sets when and the task (as you said), you could try doing it with delayedjob ` class.delay(run_at: 5.hours.from_now).method(param)` and call recursive in the method. Of course you will have some delay of excecution (even if the first thing in your method is calling the recursion). It should be some similar way to do it with Sidekiq (really don't know). Be careful with overlapping of tasks."], ["title", "Comment by VAIRIX on How to let the user create cron jobs in rails?"], ["updated", Mon, 31 Mar 2014 12:58:30 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
766
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
767
|
+
[1m[35mStackoverfeeds::SoFeed Load (0.1ms)[0m SELECT "stackoverfeeds_so_feeds".* FROM "stackoverfeeds_so_feeds" WHERE "stackoverfeeds_so_feeds"."entry_id" = 'http://stackoverflow.com/questions/22716263/use-form-to-send-ajax-request-to-rails-app/22716782?cid=34623992#22716782' ORDER BY "stackoverfeeds_so_feeds"."id" ASC LIMIT 1
|
|
768
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
|
769
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "stackoverfeeds_so_feeds" ("author", "created_at", "entry_id", "published", "summary", "title", "updated", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["author", "VAIRIX"], ["created_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00], ["entry_id", "http://stackoverflow.com/questions/22716263/use-form-to-send-ajax-request-to-rails-app/22716782?cid=34623992#22716782"], ["published", Fri, 28 Mar 2014 17:57:47 UTC +00:00], ["summary", "If you need more params from the view, just add them in the "data ajax attribute" like <code>data:{ rows: val1, sort: val2 }</code>"], ["title", "Comment by VAIRIX on Use form to send ajax request to rails app"], ["updated", Fri, 28 Mar 2014 17:57:47 UTC +00:00], ["updated_at", Thu, 03 Apr 2014 15:10:40 UTC +00:00]]
|
|
770
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
|
771
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "stackoverfeeds_so_feeds"
|
|
772
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|