This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # frozen_string_literal: true | |
| ## | |
| # Validator for array columns | |
| # | |
| # Credits go to Alexander Menzhinsky, who created an initial version of this [https://gist.github.com/amenzhinsky/c961f889a78f4557ae0b]. | |
| # | |
| # Usage: | |
| # validates :array_column, array: { length: { is: 20 }, allow_blank: true } | |
| # validates :array_column, array: { numericality: true } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Form < ActiveRecord::Base | |
| has_many :questions, :dependent => :destroy | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ curl http://localhost:9200/massactioncasecms_development_sharings/_search?pretty=true | |
| { | |
| "took" : 1, | |
| "timed_out" : false, | |
| "_shards" : { | |
| "total" : 5, | |
| "successful" : 5, | |
| "failed" : 0 | |
| }, | |
| "hits" : { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class AllowTranscodingUserToBeNull < ActiveRecord::Migration | |
| def up | |
| change_column :transcodings, :user_id, :string, :null => true | |
| end | |
| def down | |
| change_column :transcodings, :user_id, :string, :null => false | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class DashboardReplies | |
| constructor: -> | |
| $('form.discussion-reply').formSubmit | |
| disableWhileLoading: true | |
| success: (form$, data, params) => | |
| @format_reply(form$, data.discussion_entry) | |
| error: (data) -> | |
| console.log "*** IT FAILED" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SQL (0.3ms) SET client_min_messages TO 'panic' | |
| SQL (0.3ms) SET standard_conforming_strings = on | |
| SQL (0.3ms) SET client_min_messages TO 'notice' | |
| Setting Load (1.8ms) SELECT * FROM "settings" WHERE ("settings"."name" = 'default_account_id') LIMIT 1 | |
| Cache read: _account_lookup2/2 | |
| Cache hit: _account_lookup2/2 ({:expires=>3600 seconds}) | |
| Processing CoursesController#index (for 96.49.86.58 at 2012-12-10 18:33:02) [GET] | |
| Parameters: {"action"=>"index", "controller"=>"courses"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| config.middleware.use AssetAccess |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1.9.2p318 :019 > a.reload | |
| ActionActivity Load (2.0ms) SELECT "activities".* FROM "activities" WHERE "activities"."type" IN ('ActionActivity') AND "activities"."id" = $1 LIMIT 1 [["id", 38]] | |
| => #<ActionActivity id: 38, contribution_id: 10, contribution_type: "Show", type: "ActionActivity", activity_at: "2012-07-20 10:58:00", content: "Also a new one", covered_episode: nil, episode_released_on: "2012-07-20", email_from: nil, email_to: nil, title: nil, user_id: 1, deleted: false, created_at: "2012-07-20 10:58:39", updated_at: "2012-07-20 11:38:21", action_status_id: 2> | |
| 1.9.2p318 :020 > a.activity_at | |
| => Fri, 20 Jul 2012 03:58:00 PDT -07:00 | |
| 1.9.2p318 :021 > a.attributes = {:activity_at => '2012-07-20 03:58:00'} | |
| => {:activity_at=>"2012-07-20 03:58:00"} | |
| 1.9.2p318 :022 > a.changed? | |
| => true | |
| 1.9.2p318 :023 > a.changes |