query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
92d1b4e1b07fad8a80a8695bef8e593f | Add a new instrumentor | [
{
"docid": "a34aa02d35fdec0cbce62c2d7938c56c",
"score": "0.75747573",
"text": "def add(instrumentor)\n @lock.synchronize do\n if !instrumentor.is_a?(Core) && !instrumentor.respond_to?(:instrument)\n raise TypeError, \"Instrumentors must implement `#instrument`\"\n end... | [
{
"docid": "8160d4b79048dcd3f4a554f4888ea494",
"score": "0.71305555",
"text": "def add_instrument(instrument)\n unless self.instruments.include?(instrument)\n self.instruments << instrument\n end\n end",
"title": ""
},
{
"docid": "27663bc25597ca333eada4e0cc0fd418",
"score": "... |
9dc6d05669627292dc7d2857b72eab4d | PATCH/PUT /holiday_exceptions/1 PATCH/PUT /holiday_exceptions/1.json | [
{
"docid": "42fb199d3989f3c3e9f038d5bf6ae539",
"score": "0.72125435",
"text": "def update\n respond_to do |format|\n begin\n status = @holiday_exception.update(holiday_exception_params)\n rescue => e\n status = false\n customer_holiday_ids = CustomersHoliday.where(custome... | [
{
"docid": "2e341bd566a210ad22dac7d8fed31d14",
"score": "0.66124696",
"text": "def update\n respond_to do |format|\n if @extra_holiday.update(extra_holiday_params)\n format.html { redirect_to @extra_holiday, notice: 'Extra holiday was successfully updated.' }\n format.json { render... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "211045cc8dd6266e5f4f6bcbe293ad49",
"score": "0.0",
"text": "def product_application_buy_params\n params.require(:product_application_buy).permit(:buy_date, :application_product_id, :quanity, \n :unit_cost, :total_cost, :supplier_id,... | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.69792545",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.6781151",
"text": "def strong_params\n params.requ... |
dd8d3cb4e3cc3a75e51d71a79f056404 | GET /qrgenerators/1 GET /qrgenerators/1.json | [
{
"docid": "feafa77312c4320c8785020e4adeb7a3",
"score": "0.5756263",
"text": "def show\n rotp_service = RotpService.new()\n # secret = @Qrgenerator.otp_secret\n email_or_mobile = \"pravin@example.com\"\n @qr_details = rotp_service.get_qr_code_details(email_or_mobile)\n @qr = RQRCode::QRCo... | [
{
"docid": "f2c7d1650a7df998f180fea33559f77c",
"score": "0.7436751",
"text": "def index\n @qrgenerators = Qrgenerator.all\n end",
"title": ""
},
{
"docid": "26f9ca8e5040b8c234b188821c9a6883",
"score": "0.68099713",
"text": "def create\n @qrgenerator = Qrgenerator.new(qrgenerat... |
5720d2802d386673a8c3d1a213c1eed8 | add and set must have the same return value because of DalliStorewrite_entry | [
{
"docid": "f65fc14162c0e8fe34dbeeaec6c2d4fb",
"score": "0.0",
"text": "def op_addset_succeeds(rsp)\n rsp.is_a?(Integer) && rsp > 0\n end",
"title": ""
}
] | [
{
"docid": "fec2747b400efed4a6823da0b5b993b0",
"score": "0.65951437",
"text": "def my_set key, value\n @database[key] = value\n end",
"title": ""
},
{
"docid": "e3dcace51f5f93c30e170b9a47f0ced8",
"score": "0.6560765",
"text": "def store(key, value); end",
"title": ""
... |
98815db82f7d0a806cb6aea1abc0e8fe | Takes the options from the default trait for merging. | [
{
"docid": "0389923f6680c2c40340de0709676e57",
"score": "0.0",
"text": "def initialize(options = {})\n options = class_trait[:defaults].merge(options).values_at(:host, :name, :all_notifies, :default_notifies, :password)\n super(*options)\n end",
"title": ""
}
] | [
{
"docid": "198870d329785067ff6d2b583db95a9b",
"score": "0.7917477",
"text": "def merge(new_options); end",
"title": ""
},
{
"docid": "cfb9373a62a7dce65974573858bb3ae2",
"score": "0.7708634",
"text": "def merge(opts); end",
"title": ""
},
{
"docid": "e889d48fd7fc8cb38aaac... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "4f6ae3c8f21819a32e1c649ae43ae1ff",
"score": "0.0",
"text": "def token_params\n params.require(:token).permit(:token_type, :message, :client_id)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7495027",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.69566035",
"text": "def strong_params\n params.require(:request).permit(param_whit... |
2d36ae32b791ed0ff9ebbcc7c4de3d58 | Get specific leases of a given dhcp server Get specific leases of a given dhcp server. As a dhcp server could manage millions of leases, the API has to limit the number of the returned leases via two mutuallyexcluded request parameters, i.e. \"pool_id\" and \"address\". Either a \"pool_id\" or an \"address\" can be pro... | [
{
"docid": "1a9bbf65d343f4026eef284e2065de48",
"score": "0.49415338",
"text": "def get_dhcp_lease_info(server_id, opts = {})\n data, _status_code, _headers = get_dhcp_lease_info_with_http_info(server_id, opts)\n data\n end",
"title": ""
}
] | [
{
"docid": "b3019e2d6facb870845d895ad02f0088",
"score": "0.5796299",
"text": "def get_ippool_block_lease_by_moid(moid, opts = {})\n data, _status_code, _headers = get_ippool_block_lease_by_moid_with_http_info(moid, opts)\n data\n end",
"title": ""
},
{
"docid": "8dee00a936474260... |
3422ae8b4489910f5ca3bbd70118a427 | Returns the Cell to the right of the edge. | [
{
"docid": "d9c0d95b0c8cb31d82c3f75bf6468d98",
"score": "0.5892091",
"text": "def rh_cell\n v1.cells[clockwise_directions.index(direction)]\n end",
"title": ""
}
] | [
{
"docid": "8710dbc6549ecd2b9970ece1eb451d15",
"score": "0.72963935",
"text": "def right_cell(cell)\n get_next_cell(cell) { | cell | Coordinates.new(cell.col+1, cell.row)}\n end",
"title": ""
},
{
"docid": "2e5747431e018b30fe50d919cdf4d54d",
"score": "0.7207825",
"text": "def rig... |
33876b728356e95f3674184ab60e5f72 | [Create Assignment Story 4.27] To create a new problem in an assignment. Parameters: problem_params[:id]: parameters that are needed to save a problem. Returns: A message if the problem is saved or not. Author: Nadine Adel | [
{
"docid": "ac7549a5bce3caae8817c610f7dea1b2",
"score": "0.7631648",
"text": "def create\n\t\t@assignment = Assignment.find_by_id(session[:assignment_id])\n\t\t@new_problem = AssignmentProblem.new\n\t\t@new_problem.title = problem_params[:title]\n\t\t@new_problem.description = problem_params[:descriptio... | [
{
"docid": "9a15e0e27b67fbfede19d1404e736889",
"score": "0.777339",
"text": "def add_problem\n @assignment = Assignment.find(params[:id])\n problem_id = problem_params[:problem]\n\n if @assignment.add_problem(problem_id)\n flash[:success] = 'Problem added successfully to assignment'\n e... |
02b0a9f4767a4b2eeb41d11b38e29630 | to_s Defines how the variables in the object are returned as a string. We can use a Class Object to modify defaults for that object type. | [
{
"docid": "0e593fd678222d3e032e4da24c82fb06",
"score": "0.0",
"text": "def to_s\n\n\t\treturn \"Owner Name: #{@owner_name} \\nPet Type: #{@pet_type} \\nPet Name: #{@pet_name} \\nHome: #{@home}\" \n\n\tend",
"title": ""
}
] | [
{
"docid": "5fa0fdf4f6bdf14d3aa202170b260fbb",
"score": "0.7659279",
"text": "def to_s\n @string || @object.to_s('F')\n end",
"title": ""
},
{
"docid": "5fa0fdf4f6bdf14d3aa202170b260fbb",
"score": "0.7659279",
"text": "def to_s\n @string || @object.to_s('F')\n end",
... |
fb258a0f9b026650492a2748f5491d23 | GET /glo_records GET /glo_records.json | [
{
"docid": "f75ddd3508e103e23125f8f9be8ad4da",
"score": "0.7419535",
"text": "def index\n @glo_records = GloRecord.all\n end",
"title": ""
}
] | [
{
"docid": "39554b904e5600b09262f2d6d1191664",
"score": "0.73545676",
"text": "def records\n get '/records'\n end",
"title": ""
},
{
"docid": "b8d837b25915c998796985ecb86fd0be",
"score": "0.6560692",
"text": "def list_records\n session_check!\n begin\n output = J... |
7adb9e0761ae41fbb2b96f4d81c0cd89 | Wraps +text+ to width | [
{
"docid": "1503edda1e503e2245ae689479cdb463",
"score": "0.7669327",
"text": "def wrap text\n return unless text && !text.empty?\n\n text_len = @width - @indent\n\n text_len = 20 if text_len < 20\n\n re = /^(.{0,#{text_len}})[ \\n]/\n next_prefix = ' ' * @indent\n\n prefix = @prefix ||... | [
{
"docid": "2b8c5f23bffc2f3076d57f55dafdfc95",
"score": "0.8010534",
"text": "def boxed_text(text, text_width) \n Structurograme.wrap_text(\n text.strip,\n (text_width.to_f / char_width).floor\n )\n end",
"title": ""
},
{
"docid": "abac78c5f60dccadf0fc0c535764... |
69f81c6c2cba706b85f82600d50ad101 | There's no such thing as 0 in ruby | [
{
"docid": "b9188c57083eff0771689a7089aad8de",
"score": "0.0",
"text": "def negative(num)\n -(num.abs)\nend",
"title": ""
}
] | [
{
"docid": "bdae7f1451845a364fcb575ce3233cb5",
"score": "0.8529851",
"text": "def zero?; end",
"title": ""
},
{
"docid": "bdae7f1451845a364fcb575ce3233cb5",
"score": "0.8529851",
"text": "def zero?; end",
"title": ""
},
{
"docid": "71ea4a4080c37e8c055038712b271e2e",
"... |
f94c2102aed015df97f5ee7b4f42ed5a | Set methods to be explicitly included in PHI access logging. | [
{
"docid": "89acb5ece21d7c32b1d836cb663a5673",
"score": "0.5869706",
"text": "def include_in_phi(*methods)\n self.__phi_include_methods = methods.map(&:to_s)\n end",
"title": ""
}
] | [
{
"docid": "06e5d58d0562449cb050e7b44819d0a3",
"score": "0.63509685",
"text": "def extend_phi_access(*methods)\n self.__phi_extend_methods = methods.map(&:to_s)\n end",
"title": ""
},
{
"docid": "a7dc1dd330370bb7017ae0ecb4121dc9",
"score": "0.58697295",
"text": "def tempo... |
58ef1493fac3b24d885cc736d3e374d9 | GET /s3Configs/1 GET /s3Configs/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "88298a04f9dd48c17f577a98ff041294",
"score": "0.7946986",
"text": "def index\n @s3Configs = S3Config.all\n end",
"title": ""
},
{
"docid": "980c73c52320e01b54b327596ab24416",
"score": "0.69087696",
"text": "def set_s3config\n @s3config = S3Config.find(params[:id])... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "c962bd2e391cc807126d8c452e0d8827",
"score": "0.0",
"text": "def set_truck\n @truck = Truck.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "bd89022716e537628dd314fd23858181",
"score": "0.61642385",
"text": "def set_required_actions\n # TODO: check what fields change to asign required fields\n end",
"title": ""
},
{
"docid": "3db61e749c16d53a52f73ba0492108e9",
"score": "0.60448",
"text": "def action_hook; ... |
07f8c4846aba875afc1eba8917b416b9 | Reload authority configurations get "/reload/linked_data/authorities?auth_token=YOUR_AUTH_TOKEN_DEFINED_HERE" | [
{
"docid": "c2ea2fe7a0096750cdc3b7082fc0e4ae",
"score": "0.772701",
"text": "def reload\n Qa::LinkedData::AuthorityService.load_authorities\n list\n end",
"title": ""
}
] | [
{
"docid": "fde1e964146f6577f303b7459630da13",
"score": "0.5967893",
"text": "def load_authorities\n\t\tauthorities_proc = Proc.new do |response_body|\n\t\t\t@authorities_service.parse_authorities response_body\n\t\tend\n\n\t\tload_values AUTH_LIST_URL, AUTH_HEADERS, [], &authorities_proc\t\n\tend",
... |
daf1897c41f259790b2acf9705356042 | Converts the given CalendarBuilder to an iCal stream. | [
{
"docid": "7659d4114de68e04af5da63a2795865a",
"score": "0.60990274",
"text": "def to_ical\n create_internal_calendar\n @calendar.export\n end",
"title": ""
}
] | [
{
"docid": "a4d08acdf3c5bb114c0327895b548d0d",
"score": "0.5841535",
"text": "def to_ical\n events\n Rails.logger.info 'Generating calendar from Facebook events'\n @calendar.to_ical\n end",
"title": ""
},
{
"docid": "d46f4ff66ed788240b3fa760df66252b",
"score": "0.5796641",
... |
338a9554e697ca0c5906737f549dd363 | These methods return trucker and logger rates for the tickets | [
{
"docid": "414c1b5999c718d1bb140134a9ab2c09",
"score": "0.60804707",
"text": "def trucker_rate\n @trucker_rate = TruckerRate.find_by_destination_id_and_job_id_and_partner_id(self.destination_id, self.job_id, Job.find(self.job_id).trucker.id)\n end",
"title": ""
}
] | [
{
"docid": "0380a307636b5737d88ca13d147ace25",
"score": "0.69790864",
"text": "def regular_rates(tickets_sold)\n total = 0.0\n\n tickets_sold.each do |tickets|\n # the price per ticket is merely the base rate, plus any additional modifiers\n total += viewer_price(tickets[0], tickets[1]) ... |
b6c67800260d8c9c143ccdfde9779aa3 | Sets twitterbootstrap theme as default for pagination. | [
{
"docid": "37c76853126dab4fa51b1aebd5950afa",
"score": "0.60457426",
"text": "def paginate(objects, options = {})\n options.reverse_merge!(theme: 'twitter-bootstrap-3')\n super(objects, options)\n end",
"title": ""
}
] | [
{
"docid": "c47d06e90e9ea218a668c7ada54b2b31",
"score": "0.6103766",
"text": "def default_theme\n nil\n end",
"title": ""
},
{
"docid": "ea4cdb5bcfd4ebfede4ec1a7fd7cccc1",
"score": "0.5542662",
"text": "def theme\n options.fetch(:theme, nil)\n end"... |
65911e617d1c3df75ab69348141675f7 | Sets the password reset attributes. | [
{
"docid": "1bd18669844cd6fde749256a6c3f5566",
"score": "0.0",
"text": "def create_reset_digest\n self.reset_token = User.new_token\n update_attribute(:reset_digest, User.digest(reset_token))\n update_attribute(:reset_sent_at, Time.zone.now)\n end",
"title": ""
}
] | [
{
"docid": "58e818e594c709af66259ea48fb80ae5",
"score": "0.7047396",
"text": "def send_reset_password_instructions(attributes={})\n send_instructions_for(:reset_password, attributes)\n end",
"title": ""
},
{
"docid": "7454cdddbc2413bb9dfde35d05b67b1e",
"score": "0.6958357... |
bf7bd16e437e685716a5f0f79aa05c71 | Reset the current eval string. If the user has entered part of a multiline expression, this discards that input. source://pry//lib/pry/pry_instance.rb231 | [
{
"docid": "03938f4cd39f50af116d825935961403",
"score": "0.7574786",
"text": "def reset_eval_string; end",
"title": ""
}
] | [
{
"docid": "58332ec3dc88f312ec7f33e1a8c67a47",
"score": "0.7500878",
"text": "def reset_eval_string\n @eval_string = ''.dup\n end",
"title": ""
},
{
"docid": "fefead52080bc54c37131b530a49b1ed",
"score": "0.595222",
"text": "def clear_expression\n @input = \"\"\n @output.tex... |
a380eb65957679272ce217d8fa67d0c3 | Hackish stubs: Noah Paessel | [
{
"docid": "27f7590ae3050da419e4d5c27be268bd",
"score": "0.0",
"text": "def offerings\n []\n end",
"title": ""
}
] | [
{
"docid": "a9b4b561b04ad3aa44d429bfab1373ef",
"score": "0.76669127",
"text": "def stubbee; end",
"title": ""
},
{
"docid": "cd8ac8982186a40f61e4b73e00c896f3",
"score": "0.7510731",
"text": "def stubs=(_arg0); end",
"title": ""
},
{
"docid": "a2f6da6aea75b4622167b6f2af631... |
af95fd4fabc25b5402dda935edf64263 | Returns +true+ if the +other+ object is a MIME::Type and the content types match. | [
{
"docid": "69537a5ae9840382a4a567d9de6559a7",
"score": "0.0",
"text": "def eql?(other); end",
"title": ""
}
] | [
{
"docid": "c4129bb978829d6becb8373bb06c6093",
"score": "0.8267476",
"text": "def eql?(other)\n other.kind_of?(MIME::Type) and self == other\n end",
"title": ""
},
{
"docid": "5afb53b68ee58db0466bb42507fe017b",
"score": "0.82538056",
"text": "def eql?(other) #:nodoc:\n other... |
2d7fae632b1e59cfb225dffb1516b5d8 | Internal functions to generate the list of options for each layer name. The names order needs to be kept in options. | [
{
"docid": "58442df7b99b75fab36cbfa599df87aa",
"score": "0.61790466",
"text": "def _set_data_options_per_names(names, section)\n data_options = []\n\n names.each do |name|\n data_options << _data_options_per_layer(name, section)\n end\n\n data_options\n end",
"title": "... | [
{
"docid": "431287a3a89265b47eca53a7a45b418c",
"score": "0.6185826",
"text": "def make_options(flag, items)\n items.map { |item| \"#{flag}#{item}\" }.join(\" \")\nend",
"title": ""
},
{
"docid": "c264069ee29505dd4e6453f80c018e88",
"score": "0.6131726",
"text": "def built_option_name... |
69ea26b77787160a6cb9d8de5c7252da | Just to see if the json is being rendered correctly | [
{
"docid": "af2a39c30d0236ddbd10ab2c3ad6ebad",
"score": "0.0",
"text": "def test\n @user = User.first\n render json: @user\n end",
"title": ""
}
] | [
{
"docid": "c5d02ce6eaddb0ce3dc6935ca23b7c61",
"score": "0.7376181",
"text": "def it_is_expected_to_render_json\n it { expect(response.body).to start_with('{') }\n end",
"title": ""
},
{
"docid": "3397c2cddda218fb9e152d03ba677e34",
"score": "0.722965",
"text": "def json_ok\n ... |
8baddcc60838bfd3b1e941802304d1d6 | Extracts link to next page | [
{
"docid": "6b4d30a3656bf907f80bf1bc6f4f7694",
"score": "0.74016804",
"text": "def get_next_page(doc)\n\t\tdoc.xpath(@@XPATH_NEXT_PAGE).each do |node|\n\t\t\treturn node[\"href\"]\n\t\tend\n\t\treturn nil\n\tend",
"title": ""
}
] | [
{
"docid": "e095fcdbb92ea01a0696ea6ac2b8c842",
"score": "0.7930249",
"text": "def link_next_page; target_uri(next_page); end",
"title": ""
},
{
"docid": "7fbadf731503a71cb626907bff9ec34c",
"score": "0.78633034",
"text": "def next_page_href\n unless @next_page_href\n cursor = ... |
7e8c8f76aa6414553ac9c5f7695236c6 | DELETE /servers/1 DELETE /servers/1.json | [
{
"docid": "e86c3930de8ec2387e4cb4c61c27493a",
"score": "0.7336874",
"text": "def destroy\n @server.destroy\n\n respond_to do |format|\n format.html { redirect_to servers_url }\n format.json { head :ok }\n end\n end",
"title": ""
}
] | [
{
"docid": "95a8ad72a1b56a408d5af3231bdb0223",
"score": "0.7449699",
"text": "def destroy\n @server = compute.get_server(params[:id])\n @server.delete!\n\n respond_to do |format|\n format.html { redirect_to servers_url }\n format.json { head :ok }\n end\n end",
"title": ""
}... |
b90f343712ac105abb18a4e0356ac1c5 | The callback fired by coremidi when new MIDI messages are in the buffer | [
{
"docid": "83c8d6490c6e79ebab58e742b3e1a118",
"score": "0.60531",
"text": "def get_event_callback\n Proc.new do |new_packets, refCon_ptr, connRefCon_ptr|\n begin\n # p \"packets received: #{new_packets[:numPackets]}\"\n timestamp = Time.now.to_f\n messages = get_m... | [
{
"docid": "afb3e4463c9b34a5c283f92a772b902d",
"score": "0.67335325",
"text": "def handle_event_received(patch, event, &callback)\n messages = event[:message]\n patch_messages = ::Patch::IO::MIDI::Message.to_patch_messages(patch, messages)\n yield(patch_messages) if block_give... |
8e32ce6349f02f21c1a93d4a6eb530d5 | Returns the mobile number represented in this string (no protocol and + prefix removed) | [
{
"docid": "746e8b4df9dc82ab8cbdc63ca04e5b20",
"score": "0.87803197",
"text": "def mobile_number\n num = self.without_protocol\n num = num[1..-1] if num.length > 0 and num[0].chr == '+'\n num\n end",
"title": ""
}
] | [
{
"docid": "b0841167834b482aebc7942b21ff4a6a",
"score": "0.83163553",
"text": "def mobile_number\n if self.mobile.empty? then return self.mobile end\n formatted_did = clean_did(self.mobile)\n format_did(formatted_did)\n end",
"title": ""
},
{
"docid": "b0841167834b482aebc7942b21ff4... |
f6852097a484cc4b1b18e85cfe4cefe8 | DELETE /employee_masters/1 DELETE /employee_masters/1.xml | [
{
"docid": "9a76794845f299bae0664667f2051f43",
"score": "0.72051847",
"text": "def destroy\n @employee_master = EmployeeMaster.find(params[:id])\n @employee_master.destroy\n\n respond_to do |format|\n format.html { redirect_to(employee_masters_url) }\n format.xml { head :ok }\n en... | [
{
"docid": "197fd1ce109dae083bafa8b98e3a762e",
"score": "0.6738272",
"text": "def destroy\n @occupationmaster = Occupationmaster.find(params[:id])\n @occupationmaster.destroy\n\n respond_to do |format|\n format.html { redirect_to(occupationmasters_url) }\n format.xml { head :ok }\n ... |
f760563ef5bbc0bbdb1e709f02b15d63 | Get unread SMS count Get number of SMS unread. Unread means has not been viewed in dashboard or returned in an email API response | [
{
"docid": "3021f209ea71968c5ecb13a3303c40a7",
"score": "0.70727277",
"text": "def get_unread_sms_count_with_http_info(opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: SmsControllerApi.get_unread_sms_count ...'\n end\n # resource path\n ... | [
{
"docid": "92b27fe6d129ea46df16093f9cf0f2d1",
"score": "0.8398736",
"text": "def getUnreadCount\n request \"/Message/getUnreadCount.json\"\n end",
"title": ""
},
{
"docid": "046744ac095835347a21b2f48c5ee1c7",
"score": "0.8297823",
"text": "def unread_count\n @client.mak... |
3023bbfd2874f1195f8ed7f99d1b86c6 | index presents a list of submissions received via webhook | [
{
"docid": "628d89d86ab2ccb9b8995bc4e189af9b",
"score": "0.73541856",
"text": "def index\n @submissions = tool_proxy.submissions\n end",
"title": ""
}
] | [
{
"docid": "f3d1bce8002850cf14218c16364705dd",
"score": "0.7756235",
"text": "def index\n @submissions = Submission.all\n end",
"title": ""
},
{
"docid": "f3d1bce8002850cf14218c16364705dd",
"score": "0.7756235",
"text": "def index\n @submissions = Submission.all\n end",
"... |
0c8d35fb78a2e8945f45635779e9e5fa | Each Report will have its own descendant of Params in order to safely add validations | [
{
"docid": "7efb3f1be0882e3f8ced0c51baed0b5b",
"score": "0.0",
"text": "def params_class\n @params_class ||= Class.new(Params)\n end",
"title": ""
}
] | [
{
"docid": "3b9d24e0a4ba9f07481c877edd26bc39",
"score": "0.74609584",
"text": "def report_params\n params.require(:report)\n end",
"title": ""
},
{
"docid": "74bfe102fb6d39115ba0d950c80fe515",
"score": "0.70498544",
"text": "def report_parameter_params\n params.require(:... |
27ada0c2b759f5ce0713fa53bde9d3b5 | overrides the tables method from ActiveRecord's SQLite3Adapter to return only tables, and not views. | [
{
"docid": "5814f63d327656fb3fcdc26806929ebd",
"score": "0.6250618",
"text": "def tables(name = nil, table_name = nil)\n sql = <<-SQL\n SELECT name\n FROM sqlite_master\n WHERE type = 'table' AND NOT name = 'sqlite_sequence'\n SQL\n sql << \" AND name = #{... | [
{
"docid": "763e22ca0122e119f74bb3350393ee95",
"score": "0.7636336",
"text": "def tables\n all_tables.reject{ |t| t.ignored? || t.polymorphic? }\n end",
"title": ""
},
{
"docid": "e3360efab56db9709c028746bc3fb862",
"score": "0.71641695",
"text": "def filter_tables tables\n ... |
8bdcc9c3decedcea35b1b8d11546396a | A description of this time zone in relation to the country, e.g. "Eastern Time". This is usually `nil` for countries that have a single time zone. | [
{
"docid": "3cf00cdf059ad5e7c61304c18faab969",
"score": "0.0",
"text": "def description; end",
"title": ""
}
] | [
{
"docid": "80afb64c5af5e373beeac284e2949546",
"score": "0.73000073",
"text": "def time_zone\n \"Mountain Time (US & Canada)\"\n #{}\"Eastern Time (US & Canada)\"\n end",
"title": ""
},
{
"docid": "f072ba92f869d1c8349c37d2031103c4",
"score": "0.72574353",
"text": "def time_zon... |
7aee0a6aecb2c94a474b5aef529ea70d | This is a method to save studetns into a csv | [
{
"docid": "b05167ab9cc035f15be6556622e23f26",
"score": "0.7049358",
"text": "def save_students\n\t#open the file for writing\n\tfile = File.open(filename = \"students.csv\" , \"w\")\n\t#iterate over the array of students\n\t@students.each do |student|\n\t\tstudent_data = [student[:name], student[:cohor... | [
{
"docid": "d1a0239f8452829eb2d566f93dd32d28",
"score": "0.73436046",
"text": "def save_students()\n # open file for write\n file = File.open(\"students.csv\", \"w+\")\n # iterate over students and save\n @students.each do |student|\n student_data = [student.name, student.cohort]\n ... |
75348c9dc515894c80f5059607a640c5 | PATCH/PUT /chagas/1 PATCH/PUT /chagas/1.json | [
{
"docid": "7a9591498a579efcc4214ffe65207e61",
"score": "0.6518389",
"text": "def update\n respond_to do |format|\n if @chaga.update(chaga_params)\n format.html { redirect_to @chaga, notice: 'Chaga was successfully updated.' }\n format.json { head :no_content }\n else\n ... | [
{
"docid": "62d5bb8566b999bb4c822a5d12fd14f7",
"score": "0.65381026",
"text": "def update\n @eleicao_chapa = Eleicao::Chapa.find(params[:id])\n\n respond_to do |format|\n if @eleicao_chapa.update_attributes(params[:eleicao_chapa])\n format.html { redirect_to @eleicao_chapa, notice: 'Ch... |
ae54d3e7fc649b92cb91d04c47016333 | Update the UI inputs | [
{
"docid": "9d33d48670b4a234a4cf83d45b81c679",
"score": "0.62916124",
"text": "def update_inputs\n return action_A if Input.trigger?(:A)\n return action_X if Input.trigger?(:X)\n return action_Y if Input.trigger?(:Y)\n return action_B if Input.trigger?(:B)\n return false if @pag... | [
{
"docid": "eaa39df71d540d8e9dd45cefb4f57e9a",
"score": "0.72589564",
"text": "def update\n\t\t@state.update\n\t\tclear_text_input_assign\n\tend",
"title": ""
},
{
"docid": "761c55b9cd7c2ed4e2dee74d4b1f0d19",
"score": "0.7137175",
"text": "def update_input\n @input.clear\n ... |
e561e11bcf379ef5dc139c210017366b | Only allow a list of trusted parameters through. | [
{
"docid": "274995dbe5252c99231bbf511b7ffb82",
"score": "0.0",
"text": "def user_params\n params.require(:user).permit(:name, :email, :password, :password_confirmation, :admin)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.74768823",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "36956168ba2889cff7bf17d9f1db41b8",
"score": "0.71700543",
"text": "def set_param_whitelist(*param_list)\n self.param_whitelist... |
d9572cc7d76d1a6848f0bd93409bae29 | PUT /admin/books/1 PUT /admin/books/1.json | [
{
"docid": "570385a23caf5e998238d04933726693",
"score": "0.64714354",
"text": "def update\n @book = Book.find(params[:id])\n\n if @book.update_attributes(params[:book])\n redirect_to [:admin,@book], notice: 'Book was successfully updated.' \n else\n render action: \"edit\" \n end\n... | [
{
"docid": "1be2b883b12900bad8b63f92a3c09dd0",
"score": "0.7095687",
"text": "def update\n respond_to do |format|\n if @book.update(admin_book_params)\n format.html { redirect_to admin_book_path(id: @book.id), notice: 'Book was successfully updated.' }\n format.json { render :show,... |
64e9288766729f1e3c631b152b5e4bfc | returns which side is the normal side (based on kind) | [
{
"docid": "04d3b26a29ae006e334ec09376bee0d6",
"score": "0.7998377",
"text": "def normal_side_physical\n self.class.normal_side_physical(kind)\n end",
"title": ""
}
] | [
{
"docid": "9bbdfd5412cea6af35e4d2939b235601",
"score": "0.7482902",
"text": "def kind\n if @side_a == @side_b && @side_a == @side_c\n :equilateral\n elsif @side_a == @side_b || @side_b == @side_c || @side_c == @side_a\n :isosceles\n else\n :scalene\n end\n end",
"title":... |
40e7a403e80c2abc872ddc64604f4de0 | POST /api/v1/cookbookversions/foodcritic_evaluation Take the foodcritic evaluation results from Fieri and store them on the applicable +CookbookVersion+. If the +CookbookVersion+ does not exist, render a 404 not_found. If the request is unauthorized, render unauthorized. This endpoint expects +cookbook_name+, +cookbook... | [
{
"docid": "bf5e5d0691cbf0f2fb65e9e61a2e47f7",
"score": "0.78598833",
"text": "def foodcritic_evaluation\n require_evaluation_params\n\n create_metric(\n @cookbook_version,\n QualityMetric.foodcritic_metric,\n params[:foodcritic_failure],\n params[:foodcritic_feedback]\n )\n... | [
{
"docid": "d460ac6d1850673f16c67115ed0cf659",
"score": "0.6812925",
"text": "def cookstyle_evaluation\n require_evaluation_params\n\n create_metric(\n @cookbook_version,\n QualityMetric.cookstyle_metric,\n params[:cookstyle_failure],\n params[:cookstyle_feedback]\n )\n\n ... |
373f400409673b6cde07f1eb64c29807 | DELETE /work_groups/1 DELETE /work_groups/1.json | [
{
"docid": "43ac8dd6c35d86e6de782ccc77a5f339",
"score": "0.781194",
"text": "def destroy\n @work_group.destroy\n respond_to do |format|\n format.html { redirect_to work_groups_url, notice: 'Work group was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
... | [
{
"docid": "27dbf54d123c717384c30088d17fcaf0",
"score": "0.7863672",
"text": "def destroy\r\n @workgroup.destroy\r\n respond_to do |format|\r\n format.html { redirect_to workgroups_url }\r\n format.json { head :no_content }\r\n end\r\n end",
"title": ""
},
{
"docid": "7bb... |
6d5eab4e2dda5376e90bc1e1ef199f15 | PATCH/PUT /investigationinjurytypes/1 PATCH/PUT /investigationinjurytypes/1.json | [
{
"docid": "21f5c3b6a932ed6394ed6266e46caf99",
"score": "0.7467892",
"text": "def update\n respond_to do |format|\n if @investigationinjurytype.update(investigationinjurytype_params)\n format.html { redirect_to @investigationinjurytype.investigation, notice: 'Investigationinjurytype was s... | [
{
"docid": "18962ff0a270a1409df28e9b42418f44",
"score": "0.72334933",
"text": "def update\n respond_to do |format|\n if @investigation_type.update(investigation_type_params)\n format.html { redirect_to @investigation_type, notice: 'Investigation type was successfully updated.' }\n ... |
3c792799f4971001692b59103c0bca0a | Gets the number of rows in table 'table_name' This will (obviously) blow up if there is no such table! | [
{
"docid": "d9305f5cb9a5e91fddd7906f15d7ae79",
"score": "0.8293363",
"text": "def get_table_rowcount( table_name )\r\n return execute_scalar( \"select coalesce(count(*), 0) as count from #{table_name};\" )\r\n end",
"title": ""
}
] | [
{
"docid": "b789648210f1d5d6b310be9553b74081",
"score": "0.75932294",
"text": "def count_table(table_name)\r\n client = self.connect\r\n period_count = -1\r\n \r\n # figure out number of periods in the db.\r\n # assume the index is 1-n\r\n db_str = \"SELECT COUNT(*) FROM \" + table_nam... |
c70fffdf12d341bcf1b29d000c3702df | GET /events/1 GET /events/1.json | [
{
"docid": "a247e37db857ddd39197cfd294e5b4e3",
"score": "0.0",
"text": "def show\n\t\tif !isLogin\n\t\t\tredirect_to controller: 'login', action: 'login'\n\t\t\treturn\n\t\tend\n\n\tend",
"title": ""
}
] | [
{
"docid": "2d5580b43c7c18bcd8a06713fa4be0f1",
"score": "0.75926495",
"text": "def show\n\t\tevent_id = params[:id]\n\t\tif event_id.present?\n\t\t\t@event = Com::Nbos::Events::Event.active_events.where(:id => event_id)\n\t\t\trender :json => @event\n\t\telse\n\t\t\trender :json => {status: 400, message... |
b812134f8c3ab3a83d5295e5e8430a10 | If 6 is given for x, assuming x and z are valid objects, should return an integer 4. | [
{
"docid": "55d193161679c3370c4ad40c4ac0954c",
"score": "0.0",
"text": "def test_new_location_mock_high_bound\r\n random = Minitest::Mock.new(\"test_random\")\r\n def random.rand(num); 0; end\r\n location = Minitest::Mock.new(\"test_location_arr\")\r\n def location.neighbor_count(index); 2; ... | [
{
"docid": "9034b0a651a9eea37723f281f9827b17",
"score": "0.61176497",
"text": "def four_of_a_kind\n repetitions(4).any? ? repetitions(4).keys.max.to_i : 0\n end",
"title": ""
},
{
"docid": "e872149177b5f96e82a077d1c0ea5d5d",
"score": "0.5918115",
"text": "def largest_num_1(x, y, ... |
a505702de17b4f87d3ea3a6b6cbd7c22 | PUT /imageuploads/1 PUT /imageuploads/1.json | [
{
"docid": "ce9e2c7caa06059e9f2908a206680201",
"score": "0.6191231",
"text": "def update\n @imageupload = Imageupload.find(params[:id])\n\n respond_to do |format|\n if @imageupload.update_attributes(params[:imageupload])\n format.html { redirect_to @imageupload, notice: 'Imageupload wa... | [
{
"docid": "1672475d7ba8467055df2694ed66ed78",
"score": "0.72733516",
"text": "def update\n render json: Image.update(params[\"id\"], params[\"image\"])\n end",
"title": ""
},
{
"docid": "457f589782dd14d0823d6e5557b2563d",
"score": "0.6711013",
"text": "def upload_image_file(args... |
69beaa3e957d1fc356539d0314d703e1 | Custom attribute writer method checking allowed values (enum). | [
{
"docid": "6993f255796f58e235bb163128977861",
"score": "0.0",
"text": "def cdn_support=(cdn_support)\n validator = EnumAttributeValidator.new('String', [\"platform-default\", \"disabled\", \"enabled\", \"LOMs Only\"])\n unless validator.valid?(cdn_support)\n fail ArgumentError, \"inval... | [
{
"docid": "af6d0e33773bc681443214ce777b13e1",
"score": "0.7088127",
"text": "def write_attribute_with_enum(attr, value)\n write_attribute_without_enum attr, converted_enum(attr, value)\n end",
"title": ""
},
{
"docid": "85eec95603dc239e3d18923b2c672b31",
"score": "0.6482... |
af630984682f1a0b5a68e6092af0d102 | Update properties of this object | [
{
"docid": "4f6b13efc20c7a29450e1fe0009f698c",
"score": "0.0",
"text": "def update!(**args)\n @create_time = args[:create_time] if args.key?(:create_time)\n @failure_count = args[:failure_count] if args.key?(:failure_count)\n @success_count = args[:success_count] if args.key?(... | [
{
"docid": "150fa2bdc1fc43d28ac45e2278a1f797",
"score": "0.7012263",
"text": "def update_properties(hash)\n hash.each do |key, value|\n setter_method = \"#{key}=\"\n if self.respond_to?(setter_method)\n self.send(setter_method, value)\n end\n end\n end",
"t... |
52297e27e38be8ed92a09dcc3ba33366 | Function to find longest path for Rook | [
{
"docid": "96cfdee73bde914a0792e9fb2bf16b3b",
"score": "0.6763975",
"text": "def ROOK_long_path(position, target)\n now = getposition(position)\n moves = ['move_down', 'move_up', 'move_right', 'move_left']\n\n steps = 0\n long_position = ''\n for i in moves do\n path =... | [
{
"docid": "fcea8d19058f621b66d13dbfdc493701",
"score": "0.79454404",
"text": "def longest_path_1(edges)\nend",
"title": ""
},
{
"docid": "d9a98242ff85f586ad9065ea26e0abe2",
"score": "0.76643443",
"text": "def find_longest_path_length_to_leaf(source)\n longest = 0\n\n find_leav... |
36970a3cf4e3098bb80e021258f2a5b8 | === >roar (Fin de combat) === | [
{
"docid": "eb7537459e922c31472b8d1a942da760",
"score": "0.56828475",
"text": "def roar(target)\n @scene.battle_end(1) #>Fuite, à améliorer\n end",
"title": ""
}
] | [
{
"docid": "acf27f4fccf6cbac2be056662bac20fb",
"score": "0.68568957",
"text": "def combat_subroutine\n # TODO:\n end",
"title": ""
},
{
"docid": "e7e8232ea6a4ceff772e6a757993b743",
"score": "0.67298216",
"text": "def end \n puts \"------------------------------------------... |
4f73fef59d85b3b53d1e5a44439f54d5 | the json hash for this CisSubscriptionProfileResult | [
{
"docid": "81893de6d96bcd3f5c0f809eb4f40177",
"score": "0.59536535",
"text": "def to_jaxb_json_hash\n _h = super\n _h['profileId'] = profileId.to_jaxb_json_hash unless profileId.nil?\n _h['validationResult'] = validationResult.to_jaxb_json_hash unless validationResult.nil?\n _h['cur... | [
{
"docid": "2ce4c3b671f7681af0e6b1bddcf0d2ae",
"score": "0.6537743",
"text": "def to_json\r\n @profile.to_json\r\n end",
"title": ""
},
{
"docid": "d318d1a57737544fd9e57741c0b54f46",
"score": "0.6042072",
"text": "def to_json\n obj = {}\n obj[:events] = Arra... |
ff6a6e8cb096823ef2dfbb5deb44bad2 | Returns the commands for this Thor class. | [
{
"docid": "f1d3d037a774980f1be88b90760d5e5b",
"score": "0.69477373",
"text": "def commands\n @commands ||= HashWithIndifferentAccess.new\n end",
"title": ""
}
] | [
{
"docid": "b8271ed1757bf748c36a475db9787319",
"score": "0.8526073",
"text": "def get_commands\n @commands\n end",
"title": ""
},
{
"docid": "4dc9bd7cf5b9a2623370479868431edd",
"score": "0.84855115",
"text": "def commands\n @commands\n end",
"title": ""
},
{
... |
b33e8ba043dc6a77b4423b3af67ae194 | Builds the object from hash | [
{
"docid": "7da411a70b9c5b35752df000e9754ff1",
"score": "0.0",
"text": "def build_from_hash(attributes)\n return nil unless attributes.is_a?(Hash)\n attributes = attributes.transform_keys(&:to_sym)\n self.class.openapi_types.each_pair do |key, type|\n if attributes[self.class.attri... | [
{
"docid": "da5b02ceb9bf503ea3a6f61c2d096a77",
"score": "0.8011074",
"text": "def build(hash)\n obj = new\n hash.each_pair do |k,v|\n obj[k] = v if variables[k]\n end\n return obj\n end",
"title": ""
},
{
"docid": "795e2d6be19d924e231b866fbebec323",
... |
34e110b7a591ba71fb7098cd6e601fcd | ==== Returns String:: The failure message to be displayed in negative matches. | [
{
"docid": "19be10aa60d04570426fcc96af410538",
"score": "0.0",
"text": "def negative_failure_message\n \"expected#{inspect_target} not to redirect\"\n end",
"title": ""
}
] | [
{
"docid": "1352e6afa115f0921eabd6d1d66423e9",
"score": "0.85243374",
"text": "def negative_failure_message\n \"expected #{actual_text} not to contains #{@expected}, but it did\"\n end",
"title": ""
},
{
"docid": "980a1ea340034dbfa243a6efb80e3d3e",
"score": "0.84731275",
"text": ... |
f013fa152527b4862ddf6d70ff1b2f3d | 5. Write a method to collect all Winter supplies from all the winter holidays. ex: `winter_suppliers(holiday_supplies) => ["Lights", "Wreath", etc]` | [
{
"docid": "20315f562f57c74468ea3237fc8d4725",
"score": "0.785249",
"text": "def winter_supplies(holiday_supplies)\n winter_supplies = []\n holiday_supplies[:winter].each do | holiday, supply_array |\n supply_array.each {|supply| winter_supplies << supply}\n end\n winter_supplies\nend",
"titl... | [
{
"docid": "a9a20502d4b622ba890eb5699917a9a2",
"score": "0.8606174",
"text": "def winter_suppliers(holiday_supplies)\n\twinter_suppliers = []\n\tholiday_supplies.each do |season, hash|\n\t\tif season == \"winter\"\n\t\t\thash.each do |holiday, array|\n\t\t\t\tarray.each do |supplies|\n\t\t\t\t\twinter_s... |
2aab7252afbbcaa17b052dec26fd8519 | GET message_url(:id => 1) | [
{
"docid": "063fcb140371701984b13d8410e88c72",
"score": "0.0",
"text": "def show\n # find and return a specific message\n end",
"title": ""
}
] | [
{
"docid": "555dc08870d101d10ac7910b164a1fd9",
"score": "0.7877094",
"text": "def url; TelerivetBridge.url_for_message_id(id); end",
"title": ""
},
{
"docid": "5d889592da56fad44380112da9f7221d",
"score": "0.7638446",
"text": "def view\n @message = Message.find(params[:id].to_s)\n ... |
7952e5b7b9387be2aadba34507c3d70b | The default port for POP3 connections, port 110 source://netpop//lib/net/pop.rb210 | [
{
"docid": "a8d4a7c8fd444b33172e87e0fcaec1e3",
"score": "0.8339266",
"text": "def default_pop3_port; end",
"title": ""
}
] | [
{
"docid": "c8d63493f309b75f14c68a489982885c",
"score": "0.703744",
"text": "def default_imap_port; end",
"title": ""
},
{
"docid": "c8d63493f309b75f14c68a489982885c",
"score": "0.703744",
"text": "def default_imap_port; end",
"title": ""
},
{
"docid": "f4b648e2f707af27f7... |
39b03f448f31d7301f46c7a153f720bc | PATCH/PUT /stage_common_options/1 PATCH/PUT /stage_common_options/1.json | [
{
"docid": "097b232724278791b3f0b83412eb37bb",
"score": "0.75841135",
"text": "def update\n respond_to do |format|\n if @stage_common_option.update(stage_common_option_params)\n format.html { redirect_to @stage_common_option, notice: 'Stage common option was successfully updated.' }\n ... | [
{
"docid": "fe6291869788255c94517647653e5616",
"score": "0.6569395",
"text": "def set_stage_common_option\n @stage_common_option = StageCommonOption.find(params[:id])\n end",
"title": ""
},
{
"docid": "6f077a2edb49e8f5aae10d4dbc311f30",
"score": "0.6294511",
"text": "def upda... |
a3c73a60531b18a2249d0176145570cb | DELETE /locations/1 DELETE /locations/1.json | [
{
"docid": "915f347467d6a9348b21629199e8df7c",
"score": "0.0",
"text": "def destroy\n @location.destroy\n respond_to do |format|\n format.html { redirect_to admin_locations_url, notice: 'Location was successfully destroyed.' }\n end\n end",
"title": ""
}
] | [
{
"docid": "4da4dd82c73d871c95906ca2a0d70575",
"score": "0.7461899",
"text": "def destroy\n record = Location.find(params[:id])\n record.destroy\n\n respond_to do |format| \n format.json { head :no_content }\n end\n end",
"title": ""
},
{
"docid": "faf9b1ec3a056040b2c981... |
0ed8d779c35a026fad0389cc8bcea5d3 | upload files to parameter specified folder ID | [
{
"docid": "3a41f418de8362ccec96ea75602fac21",
"score": "0.0",
"text": "def tax_upload\n\n puts \"uploading file...\"\n mixpanel_tab_event(\"Tax Return\", \"Upload File\")\n\n #http://www.dropzonejs.com/\n client = user_client\n path = \"#{session[:userinfo]['info']['name']} - Shared File... | [
{
"docid": "c94cc11bfa68eeb3223c0afefa1789f2",
"score": "0.74013835",
"text": "def upload_file_to_folder(folder_name)\n upload_files_to_folder(folder_name)\n end",
"title": ""
},
{
"docid": "c94cc11bfa68eeb3223c0afefa1789f2",
"score": "0.74013835",
"text": "def upload_file_to_fol... |
11f1945b16f813c4705892813cd44b98 | Checks that specifid +hash+ has a specified +key+ | [
{
"docid": "d79026149f5e52cb6045b030471b0e5f",
"score": "0.7028787",
"text": "def has_key!(hash, key)\n unless hash.has_key?(key)\n raise ArgError, \"#{hash} should has #{key} key\"\n end\n end",
"title": ""
}
] | [
{
"docid": "15a6cc0e4ec9949066cb166ebd0ba2c5",
"score": "0.7141599",
"text": "def has_key!(hash, key)\n unless hash.has_key?(key)\n raise ArgError, \"#{hash} should have '#{key}' key\"\n end\n end",
"title": ""
},
{
"docid": "63787b9a16ae14e8b5ce8a07ff76da8c",
"score"... |
a3ee8f3903999fc114cbfc535cdd2096 | Add this method to before_action to authenticate access with 401 response code | [
{
"docid": "7e6a4e9237db8b0d24f2223a6cb06d65",
"score": "0.72331107",
"text": "def authenticate_with_response\n render nothing: true, status: 401 if current_user.nil?\n end",
"title": ""
}
] | [
{
"docid": "79606c3c9d541d52e7edb5686001ef9b",
"score": "0.75400543",
"text": "def unauthorized\n render \"errors/401\", :status => 401\n\tend",
"title": ""
},
{
"docid": "0ef56a9d6e428eca2c92909597aa6d6b",
"score": "0.73379165",
"text": "def access_denied!\n render partial: 'e... |
900578b5cbb16b4a0a5dd3aa1380f6f9 | Get list of AWS CF stacks | [
{
"docid": "d2db4a78185cfcb9d7c36e9b81eeb609",
"score": "0.7961304",
"text": "def get_aws_cf_stacks(options)\n cf = initiate_aws_cf_client(options['access'],options['secret'],options['region'])\n begin\n stacks = cf.describe_stacks.stacks \n rescue Aws::CloudFormation::Errors::AccessDenied\n ha... | [
{
"docid": "ea8e3e3d7f457cb7416a64c133a648f7",
"score": "0.84098905",
"text": "def list_aws_cf_stacks(options)\n if not options['name'].to_s.match(/[A-Z]|[a-z]|[0-9]/)\n options['name'] = \"all\"\n end\n stacks = get_aws_cf_stacks(options)\n stacks.each do |stack|\n stack_name = stack.stack_n... |
90e92dabbcc0249e45186401e431f0b5 | GET /videos/1 GET /videos/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "fa4650928c92a5eca6789239e3cadb9c",
"score": "0.79387313",
"text": "def show\n @api_v1_video = Api::V1::Video.find(params[:id])\n\n render json: @api_v1_video\n end",
"title": ""
},
{
"docid": "a23736874359c6932c4592c34c695148",
"score": "0.7522829",
"text": "def sh... |
483ce1bb029eb533f1d3f8ff892e822b | GET /budget_posts/1 GET /budget_posts/1.xml | [
{
"docid": "471e0faad45fa891c0e2acce5eef8606",
"score": "0.6692518",
"text": "def show\n @budget_post = current_user.budget_posts.find(params[:id])\n @transactions = @budget_post.transactions\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @budg... | [
{
"docid": "bd336589ad6b77a9b0d7aeac37fffde2",
"score": "0.6698268",
"text": "def index\n @budgets = Budget.find(:all)\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @budgets }\n end\n end",
"title": ""
},
{
"docid": "3edee9f8e397... |
f5716e96da39a071b72fe5fa2d8e8d35 | PATCH/PUT /pokebuilds/1 PATCH/PUT /pokebuilds/1.json | [
{
"docid": "b84c7278aeb16521d167b94101bb5530",
"score": "0.6258649",
"text": "def update\n respond_to do |format|\n if @pokebuild.update(pokebuild_params)\n format.html { redirect_to @pokebuild, notice: '編集しました' }\n format.json { render :show, status: :ok, location: @pokebuild }\n ... | [
{
"docid": "e7c70fa38921cafae8b55adb919170be",
"score": "0.65620524",
"text": "def build_fixed(build, previous_build)\n rest_put build, :current_status => :success\n end",
"title": ""
},
{
"docid": "f71faab24bf890dd4b924134db7d6e81",
"score": "0.629183",
"text": "def update\n ... |
cf25cf4b40737a9654ec807f453e7f05 | human readable description of modeling approach | [
{
"docid": "321292903154a74c8947cd777e7886a1",
"score": "0.0",
"text": "def modeler_description\n return 'This measure will test the BCL gem'\n end",
"title": ""
}
] | [
{
"docid": "23c6c36d104147cc2f9b0bbe41f6db81",
"score": "0.7360922",
"text": "def modeler_description\r\n return \"This model is only applied to heating coil of water system\"\r\n end",
"title": ""
},
{
"docid": "a042ed207268bf5f87441de34032850a",
"score": "0.7314063",
"text": "d... |
c7580d53c7155c18682aa12f95a627a1 | GET /offer_messages/1 GET /offer_messages/1.json | [
{
"docid": "fc27406fe7c1055538ea84241f8ecac7",
"score": "0.7640557",
"text": "def show\n @offer_message = OfferMessage.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @offer_message }\n end\n end",
"title": ""
}
] | [
{
"docid": "04c5087dda9ed62686e3638ddca24357",
"score": "0.72209543",
"text": "def new\n @offer_message = OfferMessage.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @offer_message }\n end\n end",
"title": ""
},
{
"docid": "ea7086... |
9a387346ca37ac0bcc3dee8e5f8443ef | GET /games/1 GET /games/1.json | [
{
"docid": "a54561fb42c1397dafc134539a93fc05",
"score": "0.74728286",
"text": "def show\n @game = Game.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @game }\n end\n end",
"title": ""
}
] | [
{
"docid": "5068a0ca27ae23b1d06258f1bf2f195a",
"score": "0.7841512",
"text": "def index\n @games = Game.all\n render json: @games, status: 200\n end",
"title": ""
},
{
"docid": "b49a9213c2fcfbaf78c0ef75757e30ee",
"score": "0.77346104",
"text": "def index\n @games = Game.all... |
6cf48ecdf04cd96b05ad4e5790d433ff | Parses the quoted header values: `=?...?=`. key String or Symbol header name Returns unquoted String. | [
{
"docid": "56c582a874c9c2511f4c74ac4e88c794",
"score": "0.6674981",
"text": "def unquoted_header(key)\n if header = @mail[key]\n value = header.respond_to?(:map) ?\n header.map { |h| h.value }.join(\"\\n\") :\n header.value\n Mail::Encodings.value_decode(value)\n ... | [
{
"docid": "ad6eea771f297194b914e07579ba2b94",
"score": "0.7126173",
"text": "def unquote_header(value)\n if value =~ QUOTED\n $1\n else\n value\n end\n end",
"title": ""
},
{
"docid": "8f4727ab96008fdbf6330eb09b401aff",
"score": "0.6786157",
... |
062bf8df389cdfa2263e435979742df1 | GET /abrechnungs/new GET /abrechnungs/new.xml | [
{
"docid": "a770cf2dc7d34a79280db0ed2c01598a",
"score": "0.76024336",
"text": "def new\n @abrechnung = Abrechnung.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @abrechnung }\n end\n end",
"title": ""
}
] | [
{
"docid": "09659b5e0a0b570d5c8019b81ae00efa",
"score": "0.7648942",
"text": "def new\n @lien = Lien.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @lien }\n end\n end",
"title": ""
},
{
"docid": "be26db5f0081be6c1b5d8fc423eda12... |
439cf806dfa08245f3001a0151fe0c10 | Renders the primary_navigation with the configured renderer. Calling render_navigation(:level => :primary) has the same effect. | [
{
"docid": "f51408b5b8077620c38c050b014ccfa6",
"score": "0.8466951",
"text": "def render_primary_navigation(options = {})\n render_navigation(options.merge(:level => :primary))\n end",
"title": ""
}
] | [
{
"docid": "ec52cf1e5f0f1657c3cf64f77b550951",
"score": "0.71770066",
"text": "def render_primary_navigation(options = {})\n ActiveSupport::Deprecation.warn(\"SimpleNavigation::Helpers.render_primary_navigation has been deprecated. Please use render_navigation(:level => 1) instead\")\n render_... |
fa0ba1ed320680f97c7a48f19283aa06 | Implement a function to check if a binary tree is a binary search tree | [
{
"docid": "4c1bcc18973bd661205efef1a1e4ba04",
"score": "0.60885596",
"text": "def validateBST(root)\n queue = [root]\n\n i = 0\n until i == queue.length\n current = queue[i]\n if current.left == nil && current.right == nil\n i = i + 1\n next\n elsif current.left && current.right =... | [
{
"docid": "7b1af8124d04a450743c2a14c69a6fce",
"score": "0.77570444",
"text": "def valid_bst_a?(tree)\n valid_bst_node?(tree.root)\nend",
"title": ""
},
{
"docid": "4a7142034c27003df743fdb604b7c9f7",
"score": "0.7548194",
"text": "def is_bst?(root)\nend",
"title": ""
},
{
... |
8ac56dda129a40737b900e8bfb78ad07 | Returns the absolute path of the specified file | [
{
"docid": "138f5de889577415dcc138745901f0ab",
"score": "0.8664912",
"text": "def abspath(file)\n File.absolute_path(file)\nend",
"title": ""
}
] | [
{
"docid": "c9d1731938f3910e721e2c676c3a9c2e",
"score": "0.8159715",
"text": "def get_absolute_path(file)\n File.expand_path file\nend",
"title": ""
},
{
"docid": "4e1b82b3145c53995d7a0b1f02cedc8f",
"score": "0.7759863",
"text": "def absolute(file)\n if File.directory?(full_p... |
304c6bd79b7aef369177054e5cc8272a | returns the list of suffix offset values where the searchString has been found | [
{
"docid": "161e0b2492db710eae66cac2153acb36",
"score": "0.0",
"text": "def findString(searchString)\n node = self.findNode(StringDataSource.new(searchString))\n return self.findResults(node)\n end",
"title": ""
}
] | [
{
"docid": "2acfdf108b9546d686b9dcb00e8e9d12",
"score": "0.6815445",
"text": "def find_suffixes(word)\n matched_regexps = []\n result = []\n suffix_regexps.each_with_index do |regexp_str, regexp_i|\n regexp = Regexp.new(regexp_str)\n if (matched = regexp.match(word))\n ... |
cb032fabab37461edc84193cfcaa00f4 | This method used for single media content id related tag list Gets the media content id Gets the front matter related to that tag list mediahelper.get_tag_data(12) | [
{
"docid": "e4a053be9dc4865b64a86d091fdca055",
"score": "0.7370788",
"text": "def get_tag_data(media_content_id)\n front_matter = ''\n content_tag_data = self.get_content_tag_from_media_content_id(media_content_id)\n if content_tag_data.fetchable? then\n front_matter = \"\\ntag: \"... | [
{
"docid": "8e9987699e1016f4303708e59b7081fe",
"score": "0.6922848",
"text": "def get_content_tag_from_media_content_id(media_content_id)\n begin\n content_tag_sql = \"SELECT * FROM contenttag WHERE MediaContentID = #{media_content_id}\";\n content_tag_data = Immutable.dbh.execute(con... |
f1fa0a7344d711dc28f263773b6b22ec | GET /polls GET /polls.json | [
{
"docid": "c4358ee22929f847a614eb68483d7aa6",
"score": "0.5761523",
"text": "def index\n @pending_polls = Poll.where(id: current_user.user_poll.where(answered: nil).pluck(:poll_id))\n @done_polls = Poll.where(id: current_user.user_poll.where(answered: true).pluck(:poll_id))\n end",
"title": ... | [
{
"docid": "1a0a0eaa90e11a0902abf703be487cad",
"score": "0.7491467",
"text": "def index\n @polls = Poll.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @polls }\n end\n end",
"title": ""
},
{
"docid": "38ab764c8ff72f4871f607ece6c... |
daaca96ddf0665a48157c5b080a184d4 | Method to print a list and make it look pretty print_grocery_list input: hash output: nicely formated string with hash contents steps: Run through EACH hash key/value pair and print a neatly formated string | [
{
"docid": "965f9d992f19dea60b57e835bc1c56bb",
"score": "0.0",
"text": "def print_grocery_list(grocery_list)\n puts \"_____GROCERY LIST______\"\n grocery_list.each_with_index do |item_quantity, index|\n puts \"#{index}. #{grocery_list.keys[index]}, qty: #{grocery_list.values[index]}\"\n end\n p... | [
{
"docid": "02e1c968d9a7da8cb16b319f471a9d13",
"score": "0.8326533",
"text": "def print_list(full_grocery_hash)\n# steps: iterate through the list(hash) and print so it looks nice\n# output: the list looking prettier\n\tfull_grocery_hash.each {|key, value| puts \"#{key}\"+\":\"+\" #{value}\"}\nend",
... |
3f0976f4557b7bfb5acf743ccefc76e8 | Total amount of money to pay via gateway | [
{
"docid": "d7c5e303cc80f33739b9af663e2df6fb",
"score": "0.0",
"text": "def payment_price\n\t\t\t\t\treturn self.price\n\t\t\t\tend",
"title": ""
}
] | [
{
"docid": "cae70c018636f7321e6440c6dc1bafa0",
"score": "0.77599823",
"text": "def amount\n result = 0\n if gateway_mode === :test\n result = 1000\n else\n result = (@order.price * 100)\n end\n result.to_i\n end",
"title": ""
},
{
"docid": "923264b084f55b5899907388b... |
6c195bdb232ce65e1535abe59b1dbfe8 | GET /office/blogs/1 GET /office/blogs/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "c520af8971f74f723ce2eae068384784",
"score": "0.76161563",
"text": "def blogs\n @blogs = Blog.all\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @administration }\n end\n end",
"title": ""
},
{
"docid": "07f973645e0e4ed1d9... |
e2fbe0f26f13fc6348dea89730dd8f8b | TODO: use Knife libs as a plugin instead of shelling out A simple uploader would be something like this (unused) | [
{
"docid": "cfa17ef35966df2a013d0bf500b56dcc",
"score": "0.0",
"text": "def upload_cookbook(c)\n Chef::CookbookUploader.new(c, \"#{@work_dir}/cookbooks\").upload_cookbook\n end",
"title": ""
}
] | [
{
"docid": "f5df94d4d910b5f005c075202c3bfa89",
"score": "0.8017955",
"text": "def uploader; end",
"title": ""
},
{
"docid": "f5df94d4d910b5f005c075202c3bfa89",
"score": "0.8017955",
"text": "def uploader; end",
"title": ""
},
{
"docid": "041c1675b36e52dacf0b07540159f134",... |
0b1c3553085e6269642583c6a8d1ec10 | Sets up the heartbeat to be broadcast via sidekiq. Only enable this when you have disabled the resque heart beat schedule as well, as having both may cause issues. While this will work so long as every time sidekiq boots it triggers this set up. You may consider enabling dynamic schedules to keep all nodes up to date i... | [
{
"docid": "b8a9c9f61c04d1dd78c3606c2bd5ac08",
"score": "0.7695329",
"text": "def setup_heartbeat!(queue_name)\n require 'sidekiq-scheduler'\n\n ::Sidekiq.configure_server do |config|\n config.on(:startup) { set_schedule(queue_name) }\n end\n end",
"title": ""
}
... | [
{
"docid": "6a3d1e0aefac63881d8611aa734af99e",
"score": "0.65309536",
"text": "def start_heartbeat\n # once successfully registered send out periodic heartbeat on the bus letting the registry know that you are still alive\n\n end",
"title": ""
},
{
"docid": "142b97a9ef06c60d7321bf5d0... |
c0b3446bb667e65f3329c980286c2e89 | Given a host and a port (dottedquad or hostname OK), creates a Query::Minecraft object. Note that this will still require an authentication packet (see the auth() method) before commands can be sent. | [
{
"docid": "885d9e4e6da15344de98e924c90ed267",
"score": "0.5631559",
"text": "def initialize(host = 'localhost', port = 25575)\r\n @host = host\r\n @port = port\r\n @socket = nil\r\n @packet = nil\r\n @authed = false\r\n @return_packets = false\r\n end",
"title": ""
... | [
{
"docid": "fc4678b94385902041ae7fa44ff6c484",
"score": "0.5951272",
"text": "def client(host:, port:, command: nil)\n @clients ||= {}\n @clients[[host, port, command]] ||= begin\n Server.start!(host: host, port: port, command: command) if command\n Client.new host: host, port: port\n ... |
d8eeda52dce8aef8a15b586fe119e50a | A synonym for rows_for_ids. | [
{
"docid": "157f1bb4de25dabe565c905151bc1990",
"score": "0.68294513",
"text": "def row_for_id(id)\n rows_for_ids(id)\n end",
"title": ""
}
] | [
{
"docid": "e9053ca5dada419c90a340a0b2b2b0fa",
"score": "0.6317947",
"text": "def rows\n @pz.group_by.each_with_index { |val, n| row_id(n) }\n end",
"title": ""
},
{
"docid": "b98011f6d1e2100c324ad5fcba30c6c9",
"score": "0.6212253",
"text": "def row_id(&block)\n @row_id_proc... |
d726043225f782848b6e61fb89105e25 | Update the includes and voltage players to find their schedules in the shared directory, not the .glm's home directory | [
{
"docid": "a8b53541edb26ae789cbf53699fc0e18",
"score": "0.0",
"text": "def use_shared_path\n include_str = '#include \"'\n include_re = Regexp.new \"^#{include_str}(.*)\"\n @lines.each_with_index do |l, i|\n if l =~ include_re\n @lines[i] = include_str + shared_file($1)\n end\... | [
{
"docid": "8ba8db8af1ba896a77db490bbbecf6ea",
"score": "0.5346698",
"text": "def update\n\n # Vérifie si il y a les points des matches dans les params\n if (params[:points_manche])\n\n # Additionne tous les points des annonces\n team1_total_point_announce = params[:team1_num0_announce].... |
d41a40387cdbb377950e9495d1169dca | POST /need_helps POST /need_helps.json | [
{
"docid": "a4c15e11bb42fe83131b51934b3f0d41",
"score": "0.6634669",
"text": "def create\n @need_help = NeedHelp.new(params[:need_help])\n\n respond_to do |format|\n if @need_help.save\n format.json {render json: @need_help, status: :created, location: @need_help}\n else\n ... | [
{
"docid": "c0af8c83f5da3eed70f43149ff088dfd",
"score": "0.6320461",
"text": "def helps(id)\n helps_data(request(\"needs/helps/#{id}.xml\", :auth => true))\n end",
"title": ""
},
{
"docid": "16124ffb2cd14c6a8f6f3e7a50047551",
"score": "0.59060323",
"text": "def hot_needs\n ... |
8086a66676c6908ee8dc02297fce9b92 | POST /students POST /students.json | [
{
"docid": "1f17dae11e04b96eed58a94509398857",
"score": "0.70311",
"text": "def create\n @student = Student.new(params[:student])\n\n respond_to do |format|\n if @student.save\n format.html { redirect_to @student, notice: 'Student was successfully created.' }\n format.json { ren... | [
{
"docid": "2befafcc6f076a73b42fca9ccbe2e9dc",
"score": "0.7812279",
"text": "def create\n require 'net/http'\n require 'json'\n\n student = Student.new(student_params)\n\n uri = URI('http://localhost:3000/students.json')\n\n request = Net::HTTP::Post.new uri, { 'Content-Type' => 'applica... |
f38f501dd7fc2b3e6aa3488df33bf75c | Returns the value of attribute ts. source://regexp_parser//lib/regexp_parser/expression.rb5 | [
{
"docid": "de1087401c6d37cbf98b70f2690688e1",
"score": "0.55157125",
"text": "def ts; end",
"title": ""
}
] | [
{
"docid": "c71dd7bcf143dc677d615028d46b0d34",
"score": "0.5834303",
"text": "def parse(ts); end",
"title": ""
},
{
"docid": "0d8a933ac280e70e34af559e6233a816",
"score": "0.57378227",
"text": "def evalue (elt_name, att_name, options={})\n\n v = @entry.extensions.find { |e|\n ... |
8f9af0418b8949b02990921a970f35f8 | show one users and inputandouputs where id | [
{
"docid": "234182a11e8319442196925baf305fdb",
"score": "0.0",
"text": "def getId\n @inputandoutput = Inputandoutput.joins(\"INNER JOIN users ON inputandoutputs.user_id = users.id \").select(\"users.*,inputandoutputs.*\").where(\"users.id=?\", params[:id])\n if @inputandoutput.present?\n render js... | [
{
"docid": "9c4270e3f9e7beb77d033c3943960c37",
"score": "0.6908791",
"text": "def show\n\n @user_id = params[:id]\n @users = User.where(\"id=?\",@user_id)\n end",
"title": ""
},
{
"docid": "444d5d413c29cba32ac67cd33a1380c9",
"score": "0.6775871",
"text": "def show\n # @user... |
4b16acb099a2f458e8e22c8fb054df10 | For items for which the ArchivesSpace top container no longer exists due to reprocessing | [
{
"docid": "d70b7ec5b79b6cfef5dfb8cfbaca2fd7",
"score": "0.5593643",
"text": "def mark_as_obsolete\n replacement_items = []\n\n item_orders.each do |io|\n return_items = io.update_archivesspace_item\n replacement_items += return_items\n end\n\n eligible_for_obsolete = !replacement_... | [
{
"docid": "7a9744ec298c10a4a0e47e7f25cb4799",
"score": "0.57791424",
"text": "def unprocessed_items\n operations\n end",
"title": ""
},
{
"docid": "feab86ffab4eb54c62aaf796e8341dbc",
"score": "0.57141316",
"text": "def reindex_top_containers_by_any_means_necessary(extra_... |
ab5a5081d60414cb4faa7df3977e9612 | return the cc'ed recipients. | [
{
"docid": "0231ab7c3fa73be60186c289d3b77311",
"score": "0.0",
"text": "def copied\n self.recipients.select { |r| r.id != self.signee.id }\n end",
"title": ""
}
] | [
{
"docid": "3c9561141545d87e87bc72ede6c3f81c",
"score": "0.8748712",
"text": "def cc_recipients\n return @cc_recipients\n end",
"title": ""
},
{
"docid": "c72ac8abc2e714a2cdc29ecf64f34375",
"score": "0.8121359",
"text": "def recipients\n [self.to, self.cc, sel... |
820abbf47a06bf1291b20a9916fc95e5 | Cookbook Name:: fmw_domain Provider:: nodemanager_service Copyright 2015 Oracle. All Rights Reserved nodemanager_service provider for RedHat family | [
{
"docid": "5df439bcfb982aa8a070e97f159fa342",
"score": "0.0",
"text": "def whyrun_supported?\n true\nend",
"title": ""
}
] | [
{
"docid": "1202612ce0f47f8ce0dc73978b71d2c2",
"score": "0.65733004",
"text": "def services_for(node)\n # This info is taken from our JSON inventory file\n [JSON.parse(File.read(\"#{repository_path}/hosts.json\"))[\"#{node}.hpc_tutorial.org\"]]\n end",
"title": ""
},
{
... |
ce343857c1ce941f4095e37ab0a5d586 | Public: remove a named Item. list_name the String name of the List. name the String name of the Item. Example Commands.delete_item("alistname", "anitemname") Returns nothing. | [
{
"docid": "9e6692ede4d44ea7cf033761de40effa",
"score": "0.7511639",
"text": "def delete_item(list_name,name)\n if storage.list_exists?(list_name)\n list = List.find(list_name)\n if list.delete_item(name)\n output \"#{cyan(\"Boom!\")} #{yellow(name)} is gone forever.\... | [
{
"docid": "c052869f965ef5d0f3da8cd5d27eb6d8",
"score": "0.8102607",
"text": "def remove(list, item_name)\n\tlist.delete(item_name)\nend",
"title": ""
},
{
"docid": "492ca313c37aa0cf96ea42b51b8949c8",
"score": "0.8019028",
"text": "def remove_item(list, item_name)\n list.delete(item... |
a7a817661c0faa5c863dfc7d8fa829b2 | Returns the string representation of the object | [
{
"docid": "a408df9f3be79d7c20500741a990725c",
"score": "0.0",
"text": "def to_s\n to_hash.to_s\n end",
"title": ""
}
] | [
{
"docid": "fbdd4f858146598aaabf84003282a8d1",
"score": "0.901777",
"text": "def to_s\n @object.to_s\n end",
"title": ""
},
{
"docid": "d69be2e09bbb16dc0e9df0ec2905d3f4",
"score": "0.88380826",
"text": "def to_s\n\t\treturn self.obj.to_s\n\tend",
"title": ""
},
... |
08bc17a7bfe63c05362ce44bd81bea6b | Write the data to the git object store | [
{
"docid": "68ce66c9f1334db5300d9e71c29b06a2",
"score": "0.6977768",
"text": "def write\n @id = store.put_object('blob', data)\n end",
"title": ""
}
] | [
{
"docid": "3e0e9573802c3776ea8aecb9d7fca58e",
"score": "0.72084016",
"text": "def write_to_store \n if modified?\n @modified = false\n @id = store.put_object(data, 'blob')\n else\n @id\n end\n end",
"title": ""
},
{
"docid": "dc76c8b0cc40e148c99bc... |
e5e995f30009c078f1bdb50ee43eb0be | POST /programs POST /programs.json | [
{
"docid": "e0acb90ecdb1ef51ee2e4c71f7c395ae",
"score": "0.6747585",
"text": "def create\n @program = Program.new(program_params)\n UserMailer.notify_approver(@program).deliver\n\n respond_to do |format|\n if @program.save\n format.html { redirect_to brand_programs_path(@program.bra... | [
{
"docid": "04a03a905ed11141f44b9c76d4cc69a6",
"score": "0.74857515",
"text": "def create\n @program = Program.new(params[:program])\n\n respond_to do |format|\n if @program.save\n format.html { redirect_to @program, :notice => 'Program was successfully created.' }\n format.json... |