query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
d349210b33c0d093a2256ef8b74c2584 | POST /limites POST /limites.json | [
{
"docid": "a8f220bd83b5ce56d7d962eb331d5380",
"score": "0.5352598",
"text": "def create\n @limite = Limite.new(limite_params)\n\n respond_to do |format|\n if @limite.save\n format.html { redirect_to @limite, notice: 'Limite was successfully created.' }\n format.json { render :s... | [
{
"docid": "5becabfabefb15b582d9be953042efd7",
"score": "0.66476774",
"text": "def create\n @limit = Limit.new(params[:limit])\n\n respond_to do |format|\n if @limit.save\n format.html { redirect_to @limit, notice: 'Limit was successfully created.' }\n format.json { render json:... |
168d4bb2334b83102009e10fb78732fd | go to contact_mailer.rb , ajout ds la class ContactMailer de : | [
{
"docid": "76337ba7792c16dd58a6b5dac65fcada",
"score": "0.75219226",
"text": "def contact\n\t\tmail(to: 'contact@test.fr', subject: 'Sujet de test')\n\tend",
"title": ""
}
] | [
{
"docid": "66ae890794a4be33ba1831a063b93187",
"score": "0.76746625",
"text": "def contact\n\t\tContactMailer.contact()\t\t\n\tend",
"title": ""
},
{
"docid": "bc327b0c8051a8d65726a88aacb7c83a",
"score": "0.7320371",
"text": "def mailer; end",
"title": ""
},
{
"docid": "a... |
c3cfb590c9f5e83de31ad1eaa0911332 | Creates a new OrcaCard object from +options+ | [
{
"docid": "b6337becbff4a2102f6f6c0ab7813e8a",
"score": "0.0",
"text": "def initialize(options)\n @username = options[:Username]\n @password = options[:Password]\n end",
"title": ""
}
] | [
{
"docid": "d193b6a72374e59e4e50d4d2af838c2d",
"score": "0.6835272",
"text": "def initialize(options={})\n self.name = options[:name]\n @card_type = options[:card_type] || nil\n @properties = {}\n end",
"title": ""
},
{
"docid": "52db4f92f3e94109cf3a47d077e24a4c",
"score": "0.6... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "5706e3890e7f4a889dfddcb9b47a1ab4",
"score": "0.0",
"text": "def article_params\n params.require(:article).permit(:image, :title, :body, :position)\n end",
"title": ""
}
] | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.6980629",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.67819995",
"text": "def strong_params\n params.requ... |
a3261c5ba1b26f2b826a4407b83a1226 | Look up the word with a fully qualified name and call it. ==== Parameters: name the name to lookup and call. vocab the name of the vocabulary to search. | [
{
"docid": "faf14832c685880876ef895be7f956a0",
"score": "0.7535103",
"text": "def callq(name, vocab)\r\n @vocabularies[vocab][name].call(@owner)\r\n end",
"title": ""
}
] | [
{
"docid": "1c0f75a86a42d4d6abda28353cdc6c87",
"score": "0.66567767",
"text": "def query_name(vocab)\r\n @vocabularies.rassoc(vocab)[0]\r\n end",
"title": ""
},
{
"docid": "b21a0e4f6e1c165ff8edbd9c7f38811a",
"score": "0.66222936",
"text": "def find_name(name,search_vocabs=@di... |
a2820af5164d81fcd9567522cd97eb62 | GET /message_actions/1 GET /message_actions/1.xml | [
{
"docid": "cd4dff659730092e234cb45b98871071",
"score": "0.7072985",
"text": "def show\n @message_action = MessageAction.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @message_action }\n end\n end",
"title": ""
}
] | [
{
"docid": "365bd0c4814de95e5416e6ba87301200",
"score": "0.6793048",
"text": "def action; @h['msg']['action']; end",
"title": ""
},
{
"docid": "fe6bc8d2d6a605e39e239dfe4c3b54d8",
"score": "0.652218",
"text": "def action message\n reply \"\\001ACTION #{message}\\001\"\n end",
... |
c2c43c2c22296fec1fe5b726c9ca7622 | system received call, notifying all users from is always just number | [
{
"docid": "b5fd2288d05ca8d8f1294340de33bba0",
"score": "0.6478536",
"text": "def notify_all_agents_of_call(from)\n if still_ringing?(from)\n # dial all on_call users\n User.all.each do |agent|\n if agent.on_call?\n dial_user(from, agent, {send_ping: true})\n end\n ... | [
{
"docid": "a679dd6229742af707657be3d5acd873",
"score": "0.6048103",
"text": "def call_to\n @number = params[:number]\n user_id = session[:user_id]\n user = User.find(user_id)\n\n @error = \"\"\n device = user.primary_device\n\n if device\n # originate callback\n src = device... |
8e9742929da72c584686362a5301dbd1 | Returns an object whose to_json evaluates to +code+. Use this to pass a literal JavaScript expression as an argument to another JavaScriptGenerator method. | [
{
"docid": "6dd0b060b47553eec51ca7b561ed38c4",
"score": "0.697589",
"text": "def literal(code)\n ::ActiveSupport::JSON::Variable.new(code.to_s)\n end",
"title": ""
}
] | [
{
"docid": "894d9d7be248c4bd1cbed2b0a5fef617",
"score": "0.71161175",
"text": "def literal(code)\n JsonLiteral.new(code.to_s)\n end",
"title": ""
},
{
"docid": "1970f22adf256498b149a6536445f336",
"score": "0.6792298",
"text": "def literal(code)\n raise ... |
e561e11bcf379ef5dc139c210017366b | Only allow a list of trusted parameters through. | [
{
"docid": "77e258a416c17d8fa89fb3a5fd2fc89a",
"score": "0.0",
"text": "def record_params\n params.require(:record).permit(:duration, :satisfaction, :date, :activity_id)\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... |
c7a63878d8fd42905139177d89168d69 | Checks if the input is a valid Time String | [
{
"docid": "1067425c4b0cdcd6f53f56c872d92e4d",
"score": "0.7071536",
"text": "def valid_timestamp(input)\n begin\n Time.parse(input)\n rescue ArgumentError\n nil\n end\n end",
"title": ""
}
] | [
{
"docid": "e011f8d3050d423addfc98a73b7ecdf0",
"score": "0.85130906",
"text": "def validate_time(time_input)\n return false if time_input.length != 7 # make sure time length is correct #TODOOOO\n\n begin\n Time.parse(time_input)\n rescue ArgumentError\n return false\n end\nend",
"title": "... |
7e90d17730bd33db0a713d42434d2d85 | will fetch a list of assigns to be passed to a code generator block this includes the :assigns from the constructor plus all instance variables from the widget | [
{
"docid": "bb6f13054ee63a2a9ef85940029a67b5",
"score": "0.67035365",
"text": "def get_assigns\n a = @_assigns.clone\n\n self.instance_variables.each do |v|\n vs = v.to_s\n next if vs.match(/^\\@\\_/)\n next if vs.include?('cancel_execution')\t\t# this is some internal key\n a[... | [
{
"docid": "079bb8628734b143696cb89538efdf75",
"score": "0.66222227",
"text": "def expose_assigns\n assigns.each do |key, value|\n instance_variable_set \"@#{key}\", value\n end\n end",
"title": ""
},
{
"docid": "9aa758b44334a1df41ae85bd179e567e",
"score": "0.... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "9e04cd82714bbed185bdd8cd5d117129",
"score": "0.0",
"text": "def image_params\n params.require(:image).permit(:attachment, :product_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... |
abf716073215a9d43424c5418dad5053 | Provide a user friendly representation source://twilioruby//lib/twilioruby/rest/client.rb567 | [
{
"docid": "84c2aa104b8a70acbe3f11eca76559b3",
"score": "0.0",
"text": "def to_s; end",
"title": ""
}
] | [
{
"docid": "5d4815d091643938265751f783ca177a",
"score": "0.6181341",
"text": "def resp_text; end",
"title": ""
},
{
"docid": "5d4815d091643938265751f783ca177a",
"score": "0.6181341",
"text": "def resp_text; end",
"title": ""
},
{
"docid": "7fbb6b90244d94a513ba2ea1e7ae376d... |
a5ebfd6750d2fb4b25631c16c5bf074f | POST /vegresources POST /vegresources.json | [
{
"docid": "90ff9bb6b9c2f95262324ad36f1463a3",
"score": "0.68054664",
"text": "def create\n @vegresource = Vegresource.new(params[:vegresource])\n @vegresource.user_id = current_user.id\n respond_to do |format|\n if @vegresource.save\n format.html { redirect_to @vegresource, :notice... | [
{
"docid": "70b9daf83d60d5a9339070f82dfd80c9",
"score": "0.6544894",
"text": "def add\n @response = self.class.post(\"#{@server_uri}/resources_name.json\", :body => \"{'resource_form_name':#{JSON.generate(@opts)}}\")\n end",
"title": ""
},
{
"docid": "5d93dd3c4198479941993272d9fe4087",
... |
50b94a5ab7b9c9139019c8cd62035370 | PUT /current_projects/1 PUT /current_projects/1.xml | [
{
"docid": "e647f46584deaacad91737e45cee7d29",
"score": "0.6968567",
"text": "def update\n @current_project = CurrentProject.find(params[:id])\n\n respond_to do |format|\n if @current_project.update_attributes(params[:current_project])\n flash[:notice] = 'CurrentProject was successfull... | [
{
"docid": "fe2a0e0ebaafeeb29a99a865a9a8cd81",
"score": "0.72579867",
"text": "def test_should_update_project_via_API_XML\r\n get \"/logout\"\r\n put \"/projects/1.xml\", :project => {:user_id => 1,\r\n :url => 'http://www.apiproject.com',\r\n ... |
0a9950a9dc8541c3bfded4cd0f7260ae | as both the string and array object have a reverse method and with the same name space we can just call it on and array or string without making a difference. | [
{
"docid": "a798f045bbd5d72ff34cca5582236478",
"score": "0.0",
"text": "def palindrome?(obj)\n obj == obj.reverse\nend",
"title": ""
}
] | [
{
"docid": "ca0c2b16eed5a30b209a19298502b076",
"score": "0.7645936",
"text": "def reverse_string (ary)\n ary.reverse!\nend",
"title": ""
},
{
"docid": "66d64fd34fb33521036ff9b1c49959b0",
"score": "0.7625951",
"text": "def test_Array_InstanceMethod_reverse\n\t\tassert ['c','b','a']... |
56055d23066ef8a25e8ad59fc0629bfa | POST /ss_servers POST /ss_servers.json | [
{
"docid": "6b1ba63ecf8186252494b61e86478838",
"score": "0.0",
"text": "def create\n @ss_server = current_user.ss_servers.new(params[:ss_server])\n load_relationship\n @ss_server.system_specification = @system_specification\n\n @ss_server.save!\n\n logger.debug('params:' + params[:ss_ser... | [
{
"docid": "0219da1db8c49b9758fb86b8fe10b818",
"score": "0.67499435",
"text": "def servers\n local_server_address = cluster_manager.local_server_address\n servers={local_server_address => {:server_address => local_server_address}}\n cluster_manager.servers.each do |k,v|\n servers[k] = v.to... |
8b08cbf5e3ab1735923d0142dde4f9ba | GET /hunts GET /hunts.json | [
{
"docid": "9d3288187c678d26088bb90fefb6ec81",
"score": "0.640511",
"text": "def index\n @hunts = Hunt.all.order(:start_date)\n respond_to do |format|\n format.html do\n @hunts = Hunt.where(user_id: current_user.id).order(:updated_at).page(params[:page])\n render :index\n e... | [
{
"docid": "f4a729b7707522bb1b689cda47dad427",
"score": "0.7813703",
"text": "def index\n @hunts = current_user.hunts\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @hunts }\n end\n end",
"title": ""
},
{
"docid": "539e59f704d9d3908... |
2d11abcda99ef71f09389e8b511a902b | Sprunt comically hydrocellulose zira salpingemphraxis sexagesima | [
{
"docid": "4952b9f0cf226757899a2623a290e225",
"score": "0.0",
"text": "def remanet(concupiscibleness, torve_resack)\n seeker(bloomery, crumbcloth_lacepod, inspirant_inalterably)\n antispadix_provencalize(galactophthysis, saintlike)\n japheth(auresca, squamatine, vitalist_pheal)\n end"... | [
{
"docid": "776f11c382403163a6adf04990c9c99a",
"score": "0.60143703",
"text": "def wreathmaking(squilla, noncarbonate_tilly, angionosis_parvolin)\n prealarm_plaidie_premolar(philofelist, unacceptableness_printless)\n suzan()\n end",
"title": ""
},
{
"docid": "ad244bd0c45d5d9274f... |
0e9159b8b5cbec5bedaa7796093336b1 | POST /drivers POST /drivers.xml | [
{
"docid": "e72c1d46271bca3c17212c3181e86309",
"score": "0.5585024",
"text": "def create\n @driver = Driver.new(params[:driver])\n @driver.user_id = session[:user_id]\n\n respond_to do |format|\n if @driver.save\n flash[:notice] = 'Řidič byl úspěšně vytvořen.'\n format.html {... | [
{
"docid": "c6fc6d56930c903c1cab12b819f6ccf1",
"score": "0.602724",
"text": "def create\n @driver = Driver.new(driver_params)\n\n respond_to do |format|\n if @driver.save\n format.html { redirect_to @driver, notice: 'Driver was successfully created.' }\n format.json { render :sh... |
6bedb0a180fff9107b0b4608672ca9f6 | build frame to send to reader | [
{
"docid": "bca8f1f6308740f270c9ddc0bf54d0c4",
"score": "0.60940784",
"text": "def build_send_frame(command, data = nil)\r\n frame = 0xFF, data == nil ? 0 : data.length, command\r\n\t\r\n if data\r\n\t data.each_byte { |c| frame << c }\r\n end\r\n\r\n frame << checksum(command, data)\r\n ... | [
{
"docid": "4e5b94620b02a70c9c32ed9ca8288052",
"score": "0.68613404",
"text": "def build\n mount_frames\n transmit\n end",
"title": ""
},
{
"docid": "276b3aeef8aaf0fcc29f0a34e23631dd",
"score": "0.64717007",
"text": "def init\n\t\tpayload = \"\\x00\\x5a\\x00\\x02\"\n\t\t... |
dec17cd346271c43654df13862fc3e0a | PATCH/PUT /maps/1 PATCH/PUT /maps/1.json | [
{
"docid": "e093639aa4b814f8765a6023f36d2fa1",
"score": "0.63340926",
"text": "def update\n respond_to do |format|\n if @map.update(map_params)\n format.html { redirect_to @map, notice: 'スポットが無事更新されました!' }\n else\n format.html { render :edit }\n end\n end\n end",
... | [
{
"docid": "241e4fbcead67c03cb960df8fd5d36d9",
"score": "0.7008314",
"text": "def update\n @map = Map.find(params[:id])\n\n respond_to do |format|\n if @map.update_attributes(params[:map])\n @map.updateLayers()\n format.html { redirect_to @map, notice: 'Map was successfully upda... |
0f413a3ba7969decdf9f4f3cbedfe88b | PATCH/PUT /construction_stock_fillings/1 PATCH/PUT /construction_stock_fillings/1.json | [
{
"docid": "9957d106d3aefae51395d5feea8437f8",
"score": "0.7626111",
"text": "def update\n respond_to do |format|\n if @construction_stock_filling.update(construction_stock_filling_params)\n format.html { redirect_to @construction_stock_filling, notice: 'Construction stock filling was suc... | [
{
"docid": "1b1a7886e0ddc700c855d9ddb03f9ecf",
"score": "0.682161",
"text": "def update\n respond_to do |format|\n if @construction_stock.update(construction_stock_params)\n format.html { redirect_to @construction_stock, notice: 'Construction stock was successfully updated.' }\n fo... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "ea30d4f322e08d0d0eed1bb0c1d31b60",
"score": "0.0",
"text": "def set_product_and_brand\r\n @product = Product.includes([:launches]).joins(:brand).where({id: params[:id], brands: {:account_id => current_user}}).first\r\n @brand = @product.brand\r\n end",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.6031952",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.6015048",
"text": "def... |
a142583da6aa08384c5062a766092399 | /\b[AZ].[[:punct:]]/ will return true if first word of second sentence is capitalized and ends with a period(.), even if first word of first sentence is not capitalized, and viceversa. Have not figured out how to return false if one or the other don't match criteria. | [
{
"docid": "65aa947b8e10642f0ec2299586504283",
"score": "0.8317916",
"text": "def first_word_capitalized_and_ends_with_punctuation?(punctuation)\n if punctuation.match(/\\A[A-Z].*\\W\\z/) # if first word of second sentence is not capitalized and/or first\n # sentence does not include punctuation it ... | [
{
"docid": "aee18b20dd9b7c7fbb96affbb2207a32",
"score": "0.7650633",
"text": "def first_word_capitalized_and_ends_with_punctuation?(text)\n text.match(/^[A-Z].+[\\.!?]$/) ? true : false\nend",
"title": ""
},
{
"docid": "ad8b360b5ebc98639e2b1bfb3b337428",
"score": "0.76486975",
"text... |
ccb4c425dd36340d01c75caff588374f | Temp workarounds until umi delivers events properly Good example of the necessity of deepschema enforcement for events | [
{
"docid": "58f490fbf632207c9beb87cad734e999",
"score": "0.0",
"text": "def headers\n begin\n JSON(data['message_headers'])\n rescue => e\n return []\n end\n end",
"title": ""
}
] | [
{
"docid": "36af67eeedc38d319e3ccbdae6f5a640",
"score": "0.6982319",
"text": "def event_requirement; end",
"title": ""
},
{
"docid": "06e5f6ba5d3ec93ef3eab9c90a3a1776",
"score": "0.6922192",
"text": "def validate_event; end",
"title": ""
},
{
"docid": "9ee62bc46d51f591a88... |
46ca2d0c3826eb55bbabe85c6ccb3b47 | Determines if current token matches this command's name | [
{
"docid": "bb1595801f7d50551ec3ec509af64af7",
"score": "0.8627588",
"text": "def matches_token?(cmd_line_token)\n cmd_line_token == name\n end",
"title": ""
}
] | [
{
"docid": "d3c817220cb83653b799dc19095b9af4",
"score": "0.8123818",
"text": "def matches_token?(cmd_line_token)\n cmd_line_token == app_name\n end",
"title": ""
},
{
"docid": "cf8f6e8da72f90b0100872b328da7a15",
"score": "0.7544232",
"text": "def matches_token?(cmd_line_token... |
0c48f33fae8ab1890198209baf2a9f34 | GET /transactions GET /transactions.json | [
{
"docid": "b6c5a634dbfe1f20b2837957aa0f16da",
"score": "0.0",
"text": "def index\n host = '192.168.1.11'\n port = 9090\n\n socket = Thrift::Socket.new(host, port)\n $transport = Thrift::BufferedTransport.new(socket)\n $transport.open\n protocol = Thrift::BinaryProtocol.new($transport)... | [
{
"docid": "8c881930159a0e4227bb5dead3cb4e4c",
"score": "0.8518912",
"text": "def transactions(params = {})\n request(:get, '/transactions', params)\n end",
"title": ""
},
{
"docid": "6c8d0bb89b3254ce41f23ee95c5e6976",
"score": "0.7993361",
"text": "def index\n json_respon... |
066675d4dedb4f6f6bebce652b9d552f | Execute the Choreo using the specified InputSet as parameters, wait for the Choreo to complete and return a ResultSet containing the execution results. | [
{
"docid": "4e5405bfa0ebff6a6376915ce8e3b5e4",
"score": "0.0",
"text": "def execute(input_set = nil)\n resp = super(input_set)\n results = GetSpecificNewsItemResultSet.new(resp)\n return results\n end",
"title": ""
}
] | [
{
"docid": "c4ca32683e8ce75eb6a187d63df8fa77",
"score": "0.766611",
"text": "def execute(input_set = nil)\n resp = super(input_set)\n results = DoneResultSet.new(resp)\n return results\n end",
"title": ""
},
{
"docid": "6f7a7d9be674ad4cf17d6743eb1f7836",
"score"... |
aadff49b74f50942f616fd2ebffbde10 | Specify a subset of columns you'd like to select. You can use a hash here to rename columns from their default. If ther is no default name, you must pass them in the context of a hash. | [
{
"docid": "04ab63f34b044019fe953ba0899cf05a",
"score": "0.0",
"text": "def select(*selects)\n @select = Build::SelectList.new(*selects)\n end",
"title": ""
}
] | [
{
"docid": "76daefaaaf2bd88d69351010e31c33ed",
"score": "0.7100045",
"text": "def select!(*columns)\n clone.tap do |data_set|\n data_set.select_columns.replace(columns.flatten)\n end\n end",
"title": ""
},
{
"docid": "76daefaaaf2bd88d69351010e31c33ed",
"score"... |
d6ec54173f8a2e41982d7710f800a3cb | PUT /report_categories/1 PUT /report_categories/1.xml | [
{
"docid": "ba763c3d8f82d99eeb6497ce8bd5f574",
"score": "0.65981907",
"text": "def update\n @report_category = ReportCategory.find(params[:id])\n\n respond_to do |format|\n if @report_category.update_attributes(params[:report_category])\n format.html { redirect_to(@report_category, :no... | [
{
"docid": "ddafb460395d260e9b88b7878cef2abf",
"score": "0.71259296",
"text": "def update\n @report.categories.clear\n\n respond_to do |format|\n if @report.update(report_params)\n format.html { redirect_to @report, notice: 'Report was successfully updated.' }\n format.json { he... |
6d496f551270ea3663eae182801efac9 | Returns JS to be embeded. | [
{
"docid": "c0222371e3a3db1fa8a7229ae88c77ef",
"score": "0.0",
"text": "def js_files(options={})\n returning_value = <<-EOF\n<script src=\"http://www.google.com/jsapi\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\n google.load('search', '1');\n google.setOnLoadCallback(f... | [
{
"docid": "6f0c67c72c64df9c34599648f359be17",
"score": "0.73291975",
"text": "def script\n scr = ''\n scr << js_initialize().to_s\n __getobj__.each { |c|\n if c.respond_to?(:script) then\n c_script = c.script\n scr << c_script.to_s if c_script\n end\n ... |
c9515f817d63425a0634859d3ff2d173 | POST /panel_suggestions POST /panel_suggestions.xml | [
{
"docid": "31757ac9e2da3f5b04eba3a6349e2e3b",
"score": "0.5685163",
"text": "def create\n @panel_suggestion = PanelSuggestion.new(params[:panel_suggestion])\n if current_user != nil\n \t\t@panel_suggestion.user = current_user\n @panel_suggestion.visible = true\n else\n @panel_sugges... | [
{
"docid": "9f9df9a51f4a9e27f474ea966dabcd30",
"score": "0.6299492",
"text": "def new\n @panel_suggestion = PanelSuggestion.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @panel_suggestion }\n end\n end",
"title": ""
},
{
"docid... |
e860bd38505f112c9169c3c9f06b9bc4 | Delete a percolator query. Examples percolator = $client.index("defaultindex").percolator "1" percolator.delete Returns the response body as a Hash | [
{
"docid": "e81f34035c141efaa69d4a35fb4083be",
"score": "0.805704",
"text": "def delete(params = {})\n response = client.delete(\"/{index}/percolator/{id}\", defaults.merge(params.merge(action: \"percolator.delete\")))\n response.body\n end",
"title": ""
}
] | [
{
"docid": "69d320ed85e7295261ae8ff63f8cc7fc",
"score": "0.63600004",
"text": "def delete_by_query **params\n params = {index: @@index}.merge(params)\n @client.delete_by_query params\n end",
"title": ""
},
{
"docid": "7db75e40808cf9c23797bcff365b1f45",
"score... |
eeb278b754dcf5c0f47799a58b332854 | True if the address is already in the redacted state. | [
{
"docid": "871a26cd3694ec019a8ac469145f8e1a",
"score": "0.7185758",
"text": "def redacted?\n local.redacted?\n end",
"title": ""
}
] | [
{
"docid": "12d3d5ad207b5638692c8d3bb2fde472",
"score": "0.63443583",
"text": "def has_already_received_redone?\n return self.customer && self.customer.red_one_shipped?\n end",
"title": ""
},
{
"docid": "af12718cc4041b6723af9f748f5095f7",
"score": "0.6019197",
"text": "def associ... |
fb07004521b1e355cd7619a3c7409381 | POST /user/:id/events AUTHORIZATION NEEDED only the logged in user can create an event under their profile | [
{
"docid": "d34df3691ee9489ceb6a8fc6b1bef153",
"score": "0.0",
"text": "def create\n @event = Event.new(\n description: event_params[:description],\n ending_at: event_params[:ending_at],\n name: event_params[:name],\n user_id: params[:user_id],\n start_time: event_params[:sta... | [
{
"docid": "a0c5ff4e7c26a68c16e6127dff2ff925",
"score": "0.77069825",
"text": "def create\n @event = current_user.events.create(event_params)\n respond_to do |format|\n if @event.save\n format.html { redirect_to [:profile, @event], notice: 'Event was successfully created.' }\n f... |
dc7eef56e1a0d3d3f42daaca7a70deb2 | Get the meta data for this model | [
{
"docid": "49a712c890e2f6d364736898ec87f8b4",
"score": "0.7446117",
"text": "def metadata\n self.class.metadata\n end",
"title": ""
}
] | [
{
"docid": "422129bc19102e888e37741f257aa1b5",
"score": "0.8115454",
"text": "def metadata\n @meta_data\n end",
"title": ""
},
{
"docid": "2dfe6bc359ca9f07c8bef2105eaa3051",
"score": "0.8028239",
"text": "def meta\n Meta.get(self)\n end",
"title": ""
},
{
... |
cff5cdc6236560dcbd1acc71fe25fbe6 | Execution time: weighted time divided by the number of operations in the interval. | [
{
"docid": "e6b3525d6f24478dbe9be0c351965947",
"score": "0.6841263",
"text": "def execution_time\n end",
"title": ""
}
] | [
{
"docid": "74023030f80dc25e7101c6eff47e5d93",
"score": "0.704463",
"text": "def execution_time; end",
"title": ""
},
{
"docid": "4e2b882d1e5ba8c7035704fb1e04fd1f",
"score": "0.69712055",
"text": "def execution_time\n exec_count = 1\n result = nil\n cpu_time = wall_clo... |
50c6c9d773823938986d9363df235710 | GET /session_log_entries/1 GET /session_log_entries/1.json | [
{
"docid": "8413fd6fe5e6309a867689ed939770b2",
"score": "0.7315074",
"text": "def show\n @session_log_entry = SessionLogEntry.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @session_log_entry }\n end\n end",
"title": ""
}... | [
{
"docid": "02dc65513c8b240858f7c6b0a68b5799",
"score": "0.6880268",
"text": "def browser_logs session\n begin\n print_verbose \"Retrieving browser logs [session: #{session}]\"\n response = RestClient.get \"#{@url}logs/#{session}\", {:params => {:token => @token}}\n logs = JSON.parse(response.... |
feb5be19d6c98900d53409e1807133ca | This was moved to Chef::Nodetag, redirecting here for compatibility | [
{
"docid": "25d191b0d7d160e3fde4a4ce9ce82b23",
"score": "0.0",
"text": "def tag(*tags)\n run_context.node.tag(*tags)\n end",
"title": ""
}
] | [
{
"docid": "f3fbde77ab3fc0e00edd8bba549a08b0",
"score": "0.62864745",
"text": "def raw_node; end",
"title": ""
},
{
"docid": "8cd4204418e3219039f8646157a8822c",
"score": "0.62432104",
"text": "def for_node; end",
"title": ""
},
{
"docid": "39b7d76c4b8e18cb0d9ab9da5d177858... |
f8157344b2331a6de8cbc4d1971f2b3f | parse the state of association | [
{
"docid": "3548d267c35d77bfa82120908832d096",
"score": "0.5338651",
"text": "def parseState(response_xml)\n myelement = REXML::Document.new(response_xml);\n root = myelement.root\n myelement.elements.each(\"/configResolveClass/outConfigs/lsServer\") {\n |e|\n\n @state = e.attributes[... | [
{
"docid": "18e77f87613a1636fc1a6bdaeb104f6e",
"score": "0.6205",
"text": "def parse\n \t@parse_status ||= disjunct_linkage_generate\n end",
"title": ""
},
{
"docid": "dcf33e9427932d610bfbef9ee756b741",
"score": "0.58875066",
"text": "def parse_attributes!; end",
"title": ""
... |
5092ee0f816afb19ad635a418d68e459 | DELETE /clausetitles/1 DELETE /clausetitles/1.json | [
{
"docid": "cff574e22883eced10b5d450e78e2c2b",
"score": "0.7708464",
"text": "def destroy\n @clausetitle = Clausetitle.find(params[:id])\n @clausetitle.destroy\n\n respond_to do |format|\n format.html { redirect_to clausetitles_url }\n format.json { head :ok }\n end\n end",
"t... | [
{
"docid": "9861aa399f5c5959cec9be42142a935c",
"score": "0.7027435",
"text": "def destroy\n @arcitle.destroy\n respond_to do |format|\n format.html { redirect_to arcitles_url, notice: 'Arcitle was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"title"... |
e15fe077cbb680ca4da2dbdb1608ffa3 | Optional Method Time Complexity: Space Complexity: | [
{
"docid": "ffb35a2b1876cbadffc46c1db334f3d9",
"score": "0.0",
"text": "def bfs\n raise NotImplementedError\n end",
"title": ""
}
] | [
{
"docid": "5d7317c8a047bda2b765fd7f842d1cbb",
"score": "0.5928942",
"text": "def optimizable?\n right_nil? || right_none?\n end",
"title": ""
},
{
"docid": "1da1a27ac7f96bb6ad678b54d11badc4",
"score": "0.57062703",
"text": "def optional; end",
"title": ""... |
7c62f94654da91a713a2adb8067f4c35 | Return RecipeCards that use this recipe | [
{
"docid": "35e033c884dc1fa6672b454eb6cf0095",
"score": "0.8014821",
"text": "def recipe_cards\n RecipeCard.all.select {|recipe_card| recipe_card.recipe == self}\n end",
"title": ""
}
] | [
{
"docid": "5913a8e9a449dab3f8b54661025e0df2",
"score": "0.7939206",
"text": "def recipes\n recipe_cards.map { |c| c.recipe }\n end",
"title": ""
},
{
"docid": "0ba021dbd60aac20b3bf3c700749ea33",
"score": "0.78830016",
"text": "def recipes\n recipe_cards.map {|recipe_card| rec... |
9c5bb97defe6b6bc169cd0f53019ae58 | is the game a draw? | [
{
"docid": "f6db5199e38684d7a09b2f614e07b6dc",
"score": "0.0",
"text": "def draw?(board)\n if won?(board) || !full?(board)\n return false\n else\n return true\n end\nend",
"title": ""
}
] | [
{
"docid": "a2cb3b2e3c232440cabb4c62e051262b",
"score": "0.84657013",
"text": "def draw?\r\n if won?\r\n return false\r\n elsif full?\r\n return true\r\n else # over\r\n return false\r\n end\r\n end",
"title": ""
},
{
"docid": "4a1dc30340239b7115ab21690f97bde2",
... |
72c7995d64e55837e28b9d018bd27ebe | call this method to reload your models as you write code | [
{
"docid": "0fd830a07bbf281823a34b2c66b542b4",
"score": "0.0",
"text": "def reload\n load 'config/environment.rb'\nend",
"title": ""
}
] | [
{
"docid": "7e377054d3384e02f2c665a3c965c000",
"score": "0.82760686",
"text": "def reload_models\n clear_models\n require_models\n end",
"title": ""
},
{
"docid": "bbd112395c226fc59c187fc116110dab",
"score": "0.81816554",
"text": "def reload_models\n ... |
5bffedfe7e394d65e282c40586d2ebfe | GET /articles GET /articles.json pagination for articles | [
{
"docid": "914ee3b0e132d33440288ef0c2663f59",
"score": "0.0",
"text": "def index\n if params[:search]\n my_search\n else\n @articles = Article.all.order(date_time: :desc)\n @articles = Article.paginate(page: params[:page], per_page: 10).order(date_time: :desc)\n @page_title = ... | [
{
"docid": "f59162cb2e15cf4f630d4cc98c5e1059",
"score": "0.78340477",
"text": "def index # uses paginate\n @articles = Article.paginate page: params[:page], per_page: 10\n #@articles = Article.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "7070e97d9c8c57bc2ee3ec6a6fa51c49",
"score": "0.0",
"text": "def purchase_params\n params.require(:purchase).permit(:name, :purchaser_id, :supplier_id, :code, :discount_money, :paid, :note, :date, :time, :purchase_order_id, product_purchases_attributes: [:id, :product_id, :purchase_id, :... | [
{
"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... |
2d3f2f6291224ca401594a24c4ec21ba | GET /projects GET /projects.json | [
{
"docid": "34732ed8f90965adb3b47bcfa6fb013d",
"score": "0.0",
"text": "def index\r\n @list_tabs = LIST_TABS\r\n @current_tab = params[:tab]\r\n @current_tab ||= LIST_TABS.first.to_s\r\n @current_tab = @current_tab.to_sym\r\n\r\n case @current_tab\r\n when :all\r\n @query_params =... | [
{
"docid": "dc8505687156cb859adc07f1e0435407",
"score": "0.8865399",
"text": "def projects\n return get(\"/projects/list\")\n end",
"title": ""
},
{
"docid": "e5cff083faf736771900db26645e7ffe",
"score": "0.87301385",
"text": "def get_projects\n self.class.get(\"/projects.jso... |
ee5c9a35d463a8e670add4934f145efc | Called by an instance of Parameters to perform the parameter's specified action when it is encountered on the commandline [_opt_] the option string given at the commandline [_arg_] the option's value string [_parms_] the Parameters object | [
{
"docid": "cc441afc9968328d5707c9aec48ca42a",
"score": "0.7478996",
"text": "def action (opt, arg, parms)\n @proc.call(opt, arg, parms)\n end",
"title": ""
}
] | [
{
"docid": "f5b07333efcab36d2bb2426f56582f2e",
"score": "0.62790596",
"text": "def process_option( opt, arg)\n case opt\n when '--ec2-user-id': @ec2_user_id = arg\n when '--aws-access-key-id': @aws_access_key_id = arg\n when '--aws-secret-access-key': @aws_secret_access_key = arg\n ... |
5d0de1b98838a632947afbe162f6905a | Determine whether the given node is included in the list. | [
{
"docid": "e0e9aedbaca14f5f591b48f9cf318d86",
"score": "0.0",
"text": "def include?(needle); end",
"title": ""
}
] | [
{
"docid": "999ac95982a3526c4e195f216bf0d917",
"score": "0.8051462",
"text": "def include?(item)\n @node.include?(item)\n end",
"title": ""
},
{
"docid": "9fd7524d75d8a2d3991fad2877b4e19f",
"score": "0.79940814",
"text": "def include?(node)\n #This is a stub, u... |
e6930ecad6918b706c9420392a7b85f8 | Used for pipe_names and comma_names, uses is_i? to see if the last char is an integer / meaning the date and if so, will reorder the nested arrays to the correct format | [
{
"docid": "f3c0dde390c2bc28d901cecf903f7379",
"score": "0.51436585",
"text": "def reorder_info(info) \n if (info[0][-1][-1]).is_i? == true \n order = [0, 1, 2, 4, 3]\n info.map! do |element|\n order.map {|x| element[x]}\n end\n else \n info \n end\nend",
"title": ""
}
] | [
{
"docid": "b56d0133bfc5aaf2d1ddc25e2dd1bdf0",
"score": "0.6413317",
"text": "def splitByPipe data\n data.each { | person | \n element = person.split(\"|\").map(&:strip)\n gender = returnGenderValue(element[3])\n date = returnDateFormated(element[5], '%d-%m-%Y')\n reorderArray(element[0], ... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "bb21c5e55fa5dc299ed71819466fa0ca",
"score": "0.0",
"text": "def visite_equipement_params\n params[:visite_equipement]\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... |
0a12b49c52d370cdf25be68dbab26f43 | DELETE /dreams/1 DELETE /dreams/1.json | [
{
"docid": "d291a669da562b7fdb026fd4113cd9f7",
"score": "0.6962857",
"text": "def destroy\n @dream = Dream.find_by_id(params[:id])\n @dream.destroy\n respond_to do |format|\n format.html { redirect_to dreams_url, notice: 'dream was successfully destroyed.' }\n format.json { head :no_con... | [
{
"docid": "46d54c81ea2e3f7160506eb23a0b4e37",
"score": "0.75988865",
"text": "def destroy\n @dream.destroy\n respond_to do |format|\n format.html { redirect_to dreams_url }\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
"docid": "689d5a07a403c4b765ba17... |
bc3350bedb4113fac665607771f13b80 | if we need to return replaced child we can, but we have to consider if and when to destroy it | [
{
"docid": "49aafca51f6075a742bf2530711ec9e7",
"score": "0.6821075",
"text": "def replace_child! child, nu\n idx = index_of_child child\n self[idx] = nu\n # debugger; 'make sure to_ruby works'\n nil\n end",
"title": ""
}
] | [
{
"docid": "a355777ec8c99fe0d61b4c18a9969cf7",
"score": "0.7035206",
"text": "def replace_with(child); end",
"title": ""
},
{
"docid": "efcf2878b3e3ce87b092afc5c699477c",
"score": "0.6941566",
"text": "def new_child\n nil\n end",
"title": ""
},
{
"docid": "e1447f5f495... |
46b48807a0f22ef522a4a5682c048d84 | Missed an instruction, but liked my solution so keeping it. | [
{
"docid": "05e6367d047febbe2e8fa4aef914a530",
"score": "0.0",
"text": "def get_number()\n puts \"Please enter a number between 0 and 100\"\n number = gets.chomp.to_i\n\n if number < 0 || number > 100\n puts number.to_s + \" is out of range\"\n get_number()\n else\n test_number(number)\n e... | [
{
"docid": "83d91acc6d13d8a24b2659805611e261",
"score": "0.62747896",
"text": "def fix_bad_instruction(lines, to_change)\n to_change.each do |index|\n # This is copying the array if we simply do 'new_lines = lines' then lines\n # will also be changed when we change new_lines\n new_lines = line... |
374cc597e50105b58e921a3bd44d625e | Executes the given block within the context of the receiver. In order to set the context, the variable self is set to this object while the block is executing, giving the code access to this object's instance variables. Arguments are passed as block parameters. This is a fallback implementation for older rubies that do... | [
{
"docid": "bd7d037ce34080720bf932c78db1ddb1",
"score": "0.6311824",
"text": "def instance_exec(*args, &block)\n begin\n old_critical, Thread.critical = Thread.critical, true\n n = 0\n n += 1 while respond_to?(mname=\"__instance_exec#{n}\")\n InstanceExecHelper.module_ev... | [
{
"docid": "fc3822dc477e1751329e592fb5f5dac3",
"score": "0.7846671",
"text": "def instance_exec(*arguments, &block)\n\t\tblock.bind(self)[*arguments]\n\tend",
"title": ""
},
{
"docid": "ce9f5f3712f7af1de8e973dd295b2c68",
"score": "0.7458468",
"text": "def exec(&block)\n instan... |
3b45856af17f9533eacfca597ad27e57 | Gets action speeds from every battler in battle | [
{
"docid": "c91b68a51d045f3ffc8b228a7cc6bd3b",
"score": "0.8292882",
"text": "def get_action_speeds()\n # Initialize Array\n speeds = []\n # Get All Speeds\n ($game_party.members + $game_troop.members).each do |battler|\n speeds << battler.action.speed\n end\n return speeds\n end... | [
{
"docid": "0cbe5f8dc399284846c4c68bca5eb59c",
"score": "0.62958556",
"text": "def battles\n battles = (self.active_battles + self.passive_battles).sort\n return battles\n end",
"title": ""
},
{
"docid": "d1bc1ad8d56e0a7dbf7c54f38055267b",
"score": "0.61241716",
"text": "def d... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "839cddf024e34b3987dd243a5af5d505",
"score": "0.0",
"text": "def set_gift\n @gift = Gift.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.60339177",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.60135007",
"text": "d... |
9e707e98980b9010c3f04076ea2adea5 | Monta HTML de alertas | [
{
"docid": "55b8c68bbe47135fc9a7d9130a672c78",
"score": "0.67522484",
"text": "def render_alerts(obj)\n\n if obj.errors.any?\n\n html =\n raw('<div class=\"row\">') +\n raw('<div class=\"content-alerts col-md-6\">') +\n raw('<div class=\"alert alert-error\">') +\n ... | [
{
"docid": "77eb77129ffa6a071ebb01a011893a9a",
"score": "0.70682484",
"text": "def content_message(messages={})\n div = \"\"\n messages.each do |t, m|\n div += content_tag(:div, m, :class => \"alert alert-#{t}\")\n end\n raw(div)\n end",
"title": ""
},
{
"docid"... |
f91431ae4d526e1b46f08541ab6a6d75 | return a set of knife command line parameters that are based on the current Chef::Rest config being used by the feature tests | [
{
"docid": "f3b6b87829396d35d0b7d666ef3f7b3d",
"score": "0.71536213",
"text": "def get_knife_config\n [\n \"--user\", @rest.auth_credentials.client_name,\n \"--server-url\", @rest.url,\n \"--key\", @rest.auth_credentials.key_file\n ].join(\" \")\nend",
"title": ""
}
] | [
{
"docid": "08cb1c01c226bde36d7f680fa0619606",
"score": "0.6452617",
"text": "def knife_config(node_name)\n\"\n#!/bin/sh\necho 'Knife configuration'\ncat <<EOK > /home/vagrant/.chef/knife.rb\ncwd = File.dirname(__FILE__)\nlog_level :info # valid values - :debug :info ... |
c050839e26c108c991d74b16c98382dc | DELETE /projects/1 DELETE /projects/1.json | [
{
"docid": "e4eabccf3254c09325b990a2565f4cb9",
"score": "0.0",
"text": "def destroy\n @project.destroy\n respond_to do |format|\n format.html { redirect_to projects_url, notice: 'Project was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"title": ""
... | [
{
"docid": "ce10449f9ce0fd62fdc6ce11492b8372",
"score": "0.7899063",
"text": "def destroy\n @root = \"projects\"\n \n @project = Project.find(params[:id])\n @project.destroy\n\n respond_to do |format|\n format.html { redirect_to projects_url }\n format.json { head :no_content }\... |
afc08efa665e3b84aba6de21e90397c1 | Manage the synchronization, mounting, creation, etc of filesystem objects. | [
{
"docid": "7603f8f7faf3b7636a18586484c21a8b",
"score": "0.5970296",
"text": "def configure_synced_fs_objects(\n machine,\n instance_profile,\n filesystems,\n create_instance_path_default = true,\n group_default = 'root',\n mount_options_default = \"dmode='777',fmode='777'\",\n owner_default = 'r... | [
{
"docid": "d1a9667104c30dbd54c65b03bee766d0",
"score": "0.6209509",
"text": "def _init_filesystem\n\t\t# Temporary work directory\n\t\tFileUtils::mkdir_p \"/tmp/captain\"\n\t\tFileUtils::mkdir_p \"/tmp/captain/transfers\"\n\tend",
"title": ""
},
{
"docid": "45fef1f5ca1c2b37d237ba6c850b1882"... |
e933a6b20626f0d86984a94b6c800d0f | POST /feedbacks POST /feedbacks.xml | [
{
"docid": "b26035d507163432dec642589cf4fb85",
"score": "0.66024816",
"text": "def create\n @feedback = Feedback.new(params[:feedback])\n @feedback.save\n respond_with(@feedback)\n end",
"title": ""
}
] | [
{
"docid": "b065afdb874a4d92b63252693b84cbdd",
"score": "0.69489455",
"text": "def create\n @feedback = Feedback.new(params[:feedback])\n\n respond_to do |format|\n if @feedback.save\n format.html { redirect_to(common_feedbacks_path, :notice => 'Feedback was successfully created.') }\n... |
675e631e28296b4ea7852878ac1f6af5 | Creates the image search | [
{
"docid": "84b64cfed4b817600fb24511e56d2f50",
"score": "0.6853451",
"text": "def create_search_context\n detector = 'akaze'\n matching_algorithm = 'randomBinaryTree'\n folder = nil # File will be saved at the root of the storage\n storage = nil # We are using default Cloud Storage\n... | [
{
"docid": "a8d0187f43d944411292667de0057e52",
"score": "0.7031367",
"text": "def find_images\n if params.has_key?(:image) \n @images = Image.all()\n @image = Image.new()\n @image.tags = \"\"\n helpers.fetch_tags(find_images_params)\n\n tag_array = Array.new()\n tags = @... |
dd097e695c289be23277cbca511acc88 | GET /conceptoegresos/new GET /conceptoegresos/new.xml | [
{
"docid": "f2da0e5f91a484f46e7db83d3486ec47",
"score": "0.0",
"text": "def new\n @conceptoegreso = Conceptoegreso.new\n @plandecuenta = Plandecuenta.find(:all, :order => 'pcue_cuenta')\n codigo = Conceptoegreso.maximum(:cegr_codigo)\n @codigonuevo = codigo.to_i + 1\n respond_to do |forma... | [
{
"docid": "41650db805ea0751d4314f77d3199296",
"score": "0.74481755",
"text": "def new\n @recurso = Recurso.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @recurso }\n end\n end",
"title": ""
},
{
"docid": "41650db805ea0751d4314... |
8307cf749b6979e150d8f1f6780d83b5 | POST /todo_lists POST /todo_lists.json | [
{
"docid": "0f70f28e5f6cdd55f9f7bde8c229a4bf",
"score": "0.0",
"text": "def create\n\n @restaurant = Restaurant.create(order_params)\n\n respond_to do |format|\n if @restaurant\n format.html { redirect_to '/', notice: 'Todo list was successfully created.' }\n format.json { render :sh... | [
{
"docid": "86f0648a97fd7097725d5d1dc6b0f0a9",
"score": "0.7701763",
"text": "def create\n @todo_list = TodoList.new(params[:todo_list])\n\n respond_to do |format|\n if @todo_list.save\n format.html { redirect_to @todo_list, :notice=>\"Todo list was successfully created.\" }\n f... |
20718d3df325f93696bda071349b580a | void a previously authorized payment | [
{
"docid": "4db41f9a5bf7762ab0a771f9d38d157f",
"score": "0.73843837",
"text": "def void(options={})\n transaction do\n if authorization\n void_result = authorization.class.void(\n gross_total,\n authorization_reference,\n payment_options(authorizatio... | [
{
"docid": "1421df35cbd457723222e61d3dff9d95",
"score": "0.75504297",
"text": "def exit_verifying_payment; end",
"title": ""
},
{
"docid": "d8cf8178eebb5992aee09bbf09cc2942",
"score": "0.7288355",
"text": "def handle!\n if (authorisation? || capture?) && !success?\n payment =... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "2331f8b41cf47b34ab8c8e67d4f1b828",
"score": "0.0",
"text": "def book_params\n params.require(:book).permit(:title, :published_at, :isbn, :publisher_id, :blurb, :avatar,:page_count, :price,:author_ids=>[])\n end",
"title": ""
}
] | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.69780594",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.678054",
"text": "def strong_params\n params.requi... |
eb3884bcde7d558a8620525971b5b11c | 0(n) linear time complexity O(1) constant space complexity since keys are the (constant) letters of the alphabet | [
{
"docid": "f0f4aa89eee2a04a6db8cb91e8da94d5",
"score": "0.0",
"text": "def fourth_anagram?(string1, string2)\n letter_counts = Hash.new(0)\n\n (string1 + string2).each_char do |letter|\n letter_counts[letter] += 1\n end\n\n letter_counts.values.uniq.length == 1\nend",
"title": ""
}
] | [
{
"docid": "e303ba5676aa0d826cb713559fb2b516",
"score": "0.6945581",
"text": "def vigenere_cipher(str, arr)\n # get length of the arr to get how many keys are in a sequence\n # iterate through str characters using while loop that skips every length number of indexes\n # transform indexed characters b... |
279db2025df8b4e005c127ff7e85070b | Not having a password method breaks the :validatable module | [
{
"docid": "c4452a81f34e212f9b1598ffd63df9e8",
"score": "0.0",
"text": "def password\n nil\n end",
"title": ""
}
] | [
{
"docid": "f1b36b863305667811ffb6fec3455ee8",
"score": "0.8155083",
"text": "def password_required?; false; end",
"title": ""
},
{
"docid": "9e5b7a276ec4a890aa34379f227dec66",
"score": "0.8148805",
"text": "def password_required?; end",
"title": ""
},
{
"docid": "91f0952... |
1f8b4d3536d75e4aa6b35d8cba142730 | Applies any validation to a parsed value | [
{
"docid": "29773f17d82eb165e1b4eb705d471037",
"score": "0.6164402",
"text": "def validate_value(row, parsed_val)\n return true unless @validate\n\n valid = false\n had_error = Error.with_context(@importer, row, self, parsed_val) do\n valid = DslProxy.exec(@importer, parsed_val, ro... | [
{
"docid": "925c88e5cbbf476c33244e4b0c5fe75d",
"score": "0.65334886",
"text": "def validify value_ptr,params\n value_ptr[0] = \"\" unless value_ptr[0] =~ /\\S/\n value = value_ptr[0]\n #logger.debug(\"checking value for #{self.name} : #{value}\") \n if self._t... |
bec4e343dbbd0d9c95a31c35d60dc3c5 | METADATA lifecycle methods Check if we need to publish/update/unpublish metadata regarding this AT, if so, perform the task | [
{
"docid": "6ba787c18e466d8a78cd124577779b36",
"score": "0.67123353",
"text": "def manage_metadata\n was_published = ((visible_to_was == 'all') or (visible_to_was == 'developer'))\n important_change = metadata_changed?\n\n yield\n\n if metadata_global_id and was_published and publishable?\n ... | [
{
"docid": "caa82d05acd9ef1dc3de0cecf3a02de2",
"score": "0.653118",
"text": "def manage_metadata\n old_pmt = port_mapping_template_id_changed? ? Atmosphere::PortMappingTemplate.find(port_mapping_template_id_was) : nil\n yield\n port_mapping_template.appliance_type.update_metadata if port_mappin... |
4465ca4ec38b0e63998cda2d566de862 | Retuns the chapter to a string, for debug only Returns : the chapter into a String object | [
{
"docid": "0405e0e7ce5b502312a512423b0b9fdf",
"score": "0.69282776",
"text": "def to_s()\n\t\treturn \"Chapter : #{@title}, levels : #{@levels}, stars required : #{@starsRequired}\"\n\tend",
"title": ""
}
] | [
{
"docid": "470818859ed76445f073356859a2b972",
"score": "0.65852016",
"text": "def chapter_title\n self.part_title_by_type('Chapter')\n end",
"title": ""
},
{
"docid": "49dbbb40e00cc871f87c7667666014df",
"score": "0.65589756",
"text": "def sektion\n chapter\n end"... |
58c4755df6efd4e50ef98fac050e9d0c | Find and perform any eligible jobs. | [
{
"docid": "a29db6f436e2ce590e26f5ddf96e5b7e",
"score": "0.0",
"text": "def next\n @target.public_send(@method_name)\n end",
"title": ""
}
] | [
{
"docid": "7ea204df75750b8e39e56e00a6ee16f3",
"score": "0.6650457",
"text": "def all_jobs\n\n find_jobs()\n end",
"title": ""
},
{
"docid": "2807bdef253ad5c3d64a64840c70cb41",
"score": "0.64811337",
"text": "def process_available_jobs\n processed = false\n until sh... |
3e2eb85f8367b42d9a216f75aadc06df | end Edit Method destroys the selected record in the database | [
{
"docid": "16c90367e96ac3790f68ed55fe65d74e",
"score": "0.0",
"text": "def destroy\n\t\n\t\t# allows manipulation of the POST values\n\t\tparams.permit!\n\t\t\n\t\t@user = User.find(params[:id])\n\t\t\n\t\t# saves user's name for display after the record is destroyed - used in notification\n\t\tuser_na... | [
{
"docid": "663cc9d34dde155c23b33e93ab4fa6e0",
"score": "0.67308027",
"text": "def do_destroy\n @record = Entry.find_by_id(params[:id])\n @record.is_active = false\n self.successful = @record.save\n end",
"title": ""
},
{
"docid": "df9f5e7a8ee9177de214354201dafbaa",
"score": "0... |
5c10c2e5eaf1f97e3be1dec98174b5b0 | configure and return an Ecs object | [
{
"docid": "30fc56ea20a30c7bc1bb80c620f8e6bb",
"score": "0.76154435",
"text": "def ecs\n Amazon::Ecs.configure do |options|\n options[:aWS_access_key_id] = @@key_id\n options[:associate_tag] = @@associate_id\n options[:aWS_secret_key] = @@secretkey\n end \n return Amazon::Ecs \nend",
"... | [
{
"docid": "0c1ed91db2989e4505728989af522d5b",
"score": "0.6246313",
"text": "def initialize(config)\n @aws_ec2 = AWS::EC2.new(config)\n end",
"title": ""
},
{
"docid": "6764ecf26e0b10bb78e3943687cb9755",
"score": "0.616462",
"text": "def initialize(ecs_client = Aws::ECS::Cli... |
db72f0fcbd4870f8ff88bf3d2f0a22f7 | GET /careships/1 GET /careships/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "9b6427c00248d19d241eb8f7e2659a00",
"score": "0.72107744",
"text": "def index\n @careships = Careship.all\n end",
"title": ""
},
{
"docid": "e4d639b6e3e615617521987d838c8f09",
"score": "0.6239346",
"text": "def index\n @clips = Clip.all\n\n respond_to do |format|... |
2582a7f64eb6dccaa76ece46869b3ff2 | Test adding item to Window Menu for index 0 passed to this method. | [
{
"docid": "118030ed2051d3ef52d0bd3ed6807cc2",
"score": "0.857062",
"text": "def test_add_item_window_menu_index_0\n menu = UI.menu(\"Window\")\n item = menu.add_item(\"Test\", 0) {}\n assert_not_nil(item)\n end",
"title": ""
}
] | [
{
"docid": "71b7d9e719e7ac223de91f7581f54928",
"score": "0.8151367",
"text": "def test_add_item_help_menu_index_0\n menu = UI.menu(\"Help\")\n item = menu.add_item(\"Test\", 0) {}\n assert_not_nil(item)\n end",
"title": ""
},
{
"docid": "64075cae1f8fa50fac1b8ea5778c2bef",
"s... |
193509582c519cede0754d5d6155307a | Subtracts each matrix element in the specified matrix from its corresponding element in this matrix to form a new matrix of the difference. | [
{
"docid": "972e42922a556487ef21ad889ffe2eec",
"score": "0.0",
"text": "def -(other)\n end",
"title": ""
}
] | [
{
"docid": "e3c2134d0d8bd96af3efd340059bde6c",
"score": "0.7341481",
"text": "def subtract_matrix_minus_matrix\n\traise \"Not Implemented\" # TODO: I think I can remove this. because a + b => a + (-b)\nend",
"title": ""
},
{
"docid": "05e2b63900f0a17845d461601cc650a8",
"score": "0.73082... |
fd5ec903998b78647829ca5d2b4483ab | Aggregates and attempts to store it into the database. This would only work if the class that extends Octo::Counter includes from Cequel::Record | [
{
"docid": "e1b1cfcc78fb1b95ec440c219ba7db30",
"score": "0.63059026",
"text": "def aggregate!(ts = Time.now.floor)\n unless self.ancestors.include?MongoMapper::Document\n raise NoMethodError, \"aggregate! not defined for this counter\"\n end\n\n aggr = aggregate(ts)\n aggr.eac... | [
{
"docid": "d969ecfb47ec7a80d2f4bf3d68e868fa",
"score": "0.6381769",
"text": "def aggregate!(ts = Time.now.floor)\n unless self.ancestors.include?MongoMapper::Document\n raise NoMethodError, 'aggregate! not defined for this counter'\n end\n\n aggr = aggregate(ts)\n sum = aggre... |
50b4ebddebe7cadd57b5a43614375b07 | Create a string that contains the ANSI codes specified and return it | [
{
"docid": "744240ec0cebbc39317b7ee9b726a067",
"score": "0.7612454",
"text": "def ansiCode( *attributes )\n\t\treturn '' unless /(?:vt10[03]|xterm(?:-color)?|linux)/i =~ ENV['TERM']\n\t\tattr = attributes.collect {|a| AnsiAttributes[a] ? AnsiAttributes[a] : nil}.compact.join(';')\n\t\tif attr.empty? \n\... | [
{
"docid": "9e3b74f1c8e28e8c3d4a606bfef528a5",
"score": "0.76314545",
"text": "def ansiCode( *attributes )\n return '' unless $COLOR\n return '' unless /(?:vt10[03]|screen|[aex]term(?:-color)?|linux|rxvt(?:-unicode))/i =~ ENV['TERM']\n attr = attributes.collect {|a| AnsiAttributes[a... |
af630984682f1a0b5a68e6092af0d102 | Update properties of this object | [
{
"docid": "215e247ec23e153668686e3c1c276a44",
"score": "0.0",
"text": "def update!(**args)\n @name = args[:name] if args.key?(:name)\n end",
"title": ""
}
] | [
{
"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... |
e7643b222114871b06844b7dbf269d19 | POST /characteristic_values POST /characteristic_values.json | [
{
"docid": "b7e1bd8feaa35092f45ec1999f137f0a",
"score": "0.70627826",
"text": "def create\n authorize! :create, @characteristic_value = CharacteristicValue.new(characteristic_value_params)\n\n respond_to do |format|\n if @characteristic_value.save\n format.html { redirect_to @charac... | [
{
"docid": "731b4d8abb6ab196c9dc37b070a333cc",
"score": "0.6872789",
"text": "def characteristic_value_params\n params.require(:characteristic_value).permit(:value, :part_of_characteristic_id, :person_id, :time)\n end",
"title": ""
},
{
"docid": "e3961b7d0a0b31e34371832aff668b3e",
... |
ec2041d55a8825d426361e18a8ced8d2 | Get a paginated list of DHCP servers Get a paginated list of DHCP servers | [
{
"docid": "debe651c3156b2dbc693b7be84403b6e",
"score": "0.61980367",
"text": "def list_dhcp_servers(opts = {})\n data, _status_code, _headers = list_dhcp_servers_with_http_info(opts)\n return data\n end",
"title": ""
}
] | [
{
"docid": "5a61fb0cbfaf1fb93dd2cb044f109b18",
"score": "0.73581445",
"text": "def index\n @dhcp_servers = DhcpServer.all\n end",
"title": ""
},
{
"docid": "7d7fed0a52ab96e59ce0d364c51d849b",
"score": "0.7170479",
"text": "def list_dhcp_servers_with_http_info(opts = {})\n if... |
de8ebea25ae31f01cbcffed8940292e7 | Gets the iBooksStoreBlockErotica property value. Indicates whether or not to block the user from downloading media from the iBookstore that has been tagged as erotica. | [
{
"docid": "29fa39abfcec222de83360ca7484c923",
"score": "0.74218065",
"text": "def i_books_store_block_erotica\n return @i_books_store_block_erotica\n end",
"title": ""
}
] | [
{
"docid": "d6b7fb58c3fd91b6dec3ff9288e61db9",
"score": "0.6898715",
"text": "def i_books_store_block_erotica=(value)\n @i_books_store_block_erotica = value\n end",
"title": ""
},
{
"docid": "1a6036380611b277725015296b105c79",
"score": "0.65580237",
"text": ... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "4d555ec6de40391f5eabe19d01c48b51",
"score": "0.0",
"text": "def city_params\n params.require(:city).permit(:name, :country, :city_type)\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... |
a30375e892868cf9238c092ad4724478 | A convenience helper, since we'll be doing this a lot | [
{
"docid": "79d7b73576f76d23d643b2ed8e760a95",
"score": "0.0",
"text": "def upload_entry\n e = Entry.new\n e.image = uploaded_file(\"skanthak.png\", \"image/png\")\n return e\n end",
"title": ""
}
] | [
{
"docid": "ef1e4c0cc26e4eec8642a7d74e09c9d1",
"score": "0.66898656",
"text": "def private; end",
"title": ""
},
{
"docid": "d8ae3e2b236950074c4632d180274b8a",
"score": "0.5804393",
"text": "def specie; end",
"title": ""
},
{
"docid": "d8ae3e2b236950074c4632d180274b8a",
... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "b2103a7385177b1fc34ae03f795c991e",
"score": "0.0",
"text": "def service_params\n params.require(:service).permit(:name, :description, :owner_of_equipment, :is_serviced, :start_date, :end_date, :user_id, components_attributes: [:id, :name, :serial_number, :description, :_destroy])\n e... | [
{
"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... |
066675d4dedb4f6f6bebce652b9d552f | Execute the Choreo using the specified InputSet as parameters, wait for the Choreo to complete and return a ResultSet containing the execution results. | [
{
"docid": "b679883ab0914cb73bb42ee6bb478a8b",
"score": "0.0",
"text": "def execute(input_set = nil)\n resp = super(input_set)\n results = LogHeartRateResultSet.new(resp)\n return results\n end",
"title": ""
}
] | [
{
"docid": "c4ca32683e8ce75eb6a187d63df8fa77",
"score": "0.76639634",
"text": "def execute(input_set = nil)\n resp = super(input_set)\n results = DoneResultSet.new(resp)\n return results\n end",
"title": ""
},
{
"docid": "6f7a7d9be674ad4cf17d6743eb1f7836",
"scor... |
11f72e58d39304118af11b91716a742f | DELETE /inventories/1 DELETE /inventories/1.json | [
{
"docid": "05cd5b5e85a2491c330917848ad07a3f",
"score": "0.676673",
"text": "def destroy\n @inventory.destroy\n respond_to do |format|\n format.html { redirect_to inventories_url, notice: 'Inventory was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"... | [
{
"docid": "eebc5a988a118f597f74482771163865",
"score": "0.7226235",
"text": "def destroy\n @inventory = @user.inventories.find(params[:id])\n @inventory.destroy\n\n respond_to do |format|\n format.html { redirect_to game_user_inventories_url }\n format.json { head :no_content }\n ... |
5b77c0bbbf2011158f6c61af30d24c58 | callback so partner's partner_id is also updated custom validation | [
{
"docid": "dc8b343c7f277f7247ba9ddabb3e81b3",
"score": "0.0",
"text": "def new_santa_constraint\n\t\tif secret_santa_id #validation only happens when a secret santa is assigned/present\n\t\t\t#make sure new santa is not same as old santa\n\t\t\tif previous_secret_santa_id && previous_secret_santa_id ==... | [
{
"docid": "b598f95f8e74c605a377e33f4ee5ebab",
"score": "0.66544044",
"text": "def verify_partner\n partner = TestChamber::Models::Partner.find(@id)\n if @rev_share\n if partner.rev_share != @rev_share\n raise \"The rev_share set on the partner did not match what we set. There ... |
c22c0fc2314fa71667e57ef8e0bd82fc | We need two separate Redis clients: one for subscribing to a channel and the other one to publish to different channels. It is specified in the Redis website: | [
{
"docid": "f8bb5f91c96beb233ada003fc946b8a7",
"score": "0.0",
"text": "def initialize(authorizer, storage, redis_pub, redis_sub,\n auth_ttl, logger, threads)\n @authorizer = authorizer\n @storage = storage\n @redis_pub = redis_pub\n @redis_sub = redis_sub\n @a... | [
{
"docid": "81947ad2a288b59381cbcd239d2d0570",
"score": "0.72470516",
"text": "def subscribe\n @thr.exit\n @thr = Thread.new do\n redis_sub = Redis.new(:url => ENV['REDISTOGO_URL'])\n redis_sub.subscribe(@channels.keys) do |on|\n on.message do |channel, msg|\n ... |
94565331dc25cc77e7d61bd4dfab358e | Returns a Teambox::ResultSet of comments in this project | [
{
"docid": "4a9c533f8f61b1637e0699100bfbc5bb",
"score": "0.6923052",
"text": "def comments(query=nil)\n @list.client.get(\"#{url}/comments\", query)\n end",
"title": ""
}
] | [
{
"docid": "cea3c31f222da2d78435e12c1dcb5d16",
"score": "0.7363389",
"text": "def comments(project)\n @comments ||= get(\"/projects/#{project}/comments.json\").map {|x| Comment.new(x[\"comment\"])}\n end",
"title": ""
},
{
"docid": "1a1f94593df02899e7fb0386655b3b1e",
"score": "0.7168... |
95dc832d2486a98fd0c0d972b1310840 | Match a class with `belongs_to` with no regard to `foreign_key` option | [
{
"docid": "70c04472fbb5eb0678db730c478489b0",
"score": "0.63348705",
"text": "def any_belongs_to?(param0 = T.unsafe(nil), association:); end",
"title": ""
}
] | [
{
"docid": "38dd9d6a15cb0f2466231e5e8f1d027b",
"score": "0.72021574",
"text": "def belongs_to_class\n has_belongs_to? && fields[table_hash_key]['target_class']\n end",
"title": ""
},
{
"docid": "8bbc2db422c734f6aa7d030ab5ebc0b0",
"score": "0.69955736",
"text": "def belong... |
176b9b15dc6a90d3ee12fefe8f164ac9 | http_basic_authenticate_with name: ENV.fetch('BASIC_AUTHENTICATE_USER'), password: ENV.fetch('BASIC_AUTHENTICATE_SECRET') GET /tenants GET /tenants.json | [
{
"docid": "75ddaf484c14c736deffe667677bb208",
"score": "0.0",
"text": "def index\n @tenants = Tenant.all\n end",
"title": ""
}
] | [
{
"docid": "eedca14c46ae21fdb2debfb3398fc0f1",
"score": "0.79413474",
"text": "def basic_auth\n authenticate_or_request_with_http_basic do |username, password|\n username == ENV[\"BASIC_AUTH_USER\"] && password == ENV[\"BASIC_AUTH_PASSWORD\"]\n end\n end",
"title": ""
},
{
"docid... |
a73160af4bfa93015631008176809371 | Tells this member that he/she has overdue books. (What the method actually does is just print out this member's name along with the notice.) | [
{
"docid": "b035624cd032743e143659db0fbf12a0",
"score": "0.6148109",
"text": "def send_overdue_notice(notice)\n \"#{@name} #{notice}\"\n end",
"title": ""
}
] | [
{
"docid": "e1aacf140b4fb5e7088991caf947dc88",
"score": "0.7256967",
"text": "def overdue_books\n borrowed_books.each do |book|\n puts \"#{book.title} was due on #{book.due_date.strftime(\"%B %d, %Y\")}.}\" if book.check_overdue(book.borrower.first)\n end\n end",
"title": ""
},
{
... |
3124a82e5da815e212fcb322805c084d | Renew account described by +account_descr+ hash until +expiration_time+. | [
{
"docid": "ae03db6590929e1a54fbaa2ebe5e39f6",
"score": "0.76709974",
"text": "def renew_account_until(account_descr, expiration_time, authorizer)\n if account_descr.is_a?(OMF::SFA::Model::Account)\n account = account_descr\n else\n account = find_account(account_descr, authorize... | [
{
"docid": "fcc110d4bc333d50a0cb9b192eeba317",
"score": "0.7431161",
"text": "def renew_account_until(account_descr, expiration_time, authorizer)\n debug \"central renew_account_until: #{account_descr} - #{expiration_time}\"\n raise 'Method not implemented because the Central Manager just need... |
fa21347f9907e4315186bc523d62a3f8 | Does the given part of a pathname designate a filesystem root? On Unix, this means anything that starts with a slash; on Windows, it means anything that starts with [AZaz]:/. | [
{
"docid": "2c16519b7e31c6fc2b23fefee8e0bd63",
"score": "0.64840627",
"text": "def is_absolute_part(part)\n part.strip.starts_with?('/') || part.strip.starts_with?('\\\\') ||\n part.strip =~ /^[A-Za-z]:([\\/\\\\])?/\n end",
"title": ""
}
] | [
{
"docid": "8bc2e05ddc8a53a992a1f0f7ecc11388",
"score": "0.77848405",
"text": "def root?\n !!(chop_basename(@path) == nil && /#{SEPARATOR_PAT}/o =~ @path)\n end",
"title": ""
},
{
"docid": "9a71632cfd8ad39de990fe89a3f26926",
"score": "0.71052754",
"text": "def file_inside_roo... |
a122df684ef2df296848f4215734d4ba | PATCH/PUT /nota_prova_livros/1 PATCH/PUT /nota_prova_livros/1.json | [
{
"docid": "97fcc463a5d65e5affde97097e42f196",
"score": "0.7155681",
"text": "def update\n respond_to do |format|\n if @nota_prova_livro.update(nota_prova_livro_params)\n format.html { redirect_to @nota_prova_livro, notice: 'Nota prova livro was successfully updated.' }\n format.js... | [
{
"docid": "23938c68ef9abf0f7f952b2be1a5b0e8",
"score": "0.6755176",
"text": "def update\n @pelicula = Pelicula.find(params[:id])\n @pelicula.update(update_params)\n render json: @pelicula, status: :ok\n end",
"title": ""
},
{
"docid": "fd674aa53e4d7fb56755a30f28606019",
"score... |