query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "99d70b8a714c84f502229b1de27a72f3",
"score": "0.0",
"text": "def client_document_sync_params\n params.require(:client_document_sync).permit(:client_document_id, :time_stamp)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.74964964",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.6957765",
"text": "def strong_params\n params.require(:request).permit(param_whit... |
e33d6d9e10fada654f17f37816908881 | Fetches all design documents from the server | [
{
"docid": "09068f14027e6f4801af415527f0f6d7",
"score": "0.7324877",
"text": "def get_all_design_documents(namespace, options = GetAllDesignDocumentsOptions.new)\n resp = @backend.view_index_get_all(@bucket_name, namespace, options.timeout)\n resp.map do |entry|\n extract_design_d... | [
{
"docid": "35fa80da2df602d992da28975699ff1f",
"score": "0.75185066",
"text": "def design_documents\n documents(:startkey => \"_design/\")\n end",
"title": ""
},
{
"docid": "fa99d9f6cea1a5831fd88588cab4529e",
"score": "0.69715077",
"text": "def all_design_docs(options = {})\n... |
b9cbe20c6e0af4701edf4ec7bbb33c3d | Return the value of a tag | [
{
"docid": "31418f7d215481b07b1136c7c6e5a469",
"score": "0.0",
"text": "def read_tag(tag)\n @options[:connection].get(\"/objects/#{@options[:id]}/#{tag}\")\n end",
"title": ""
}
] | [
{
"docid": "ca81fcd1b2fe245997fe2efc8881bb73",
"score": "0.80687946",
"text": "def value\n @val.nil? ? @tag : @val\n end",
"title": ""
},
{
"docid": "ca81fcd1b2fe245997fe2efc8881bb73",
"score": "0.80687946",
"text": "def value\n @val.nil? ? @tag : @val\n end",... |
145179aed43992aa96e24a276241a533 | Detect lambda functions by looking for source//lib files | [
{
"docid": "96920ee8fb2b824cf29a4596e18812e7",
"score": "0.6627631",
"text": "def functions\n @functions ||= Dir[\"#{IdentityIdpFunctions.root_path}/source/*/lib\"].sort.map do |lib_dir|\n *_prefix, function, _lib = lib_dir.split('/')\n function\n end\n end",
"title": ""
... | [
{
"docid": "b539e2cc044da06aae1278f8927ac60b",
"score": "0.67659587",
"text": "def discover_functions!\n core_paths = lambda_directories\n core_paths.each do |path|\n Dir.new(path).each do |dir_item|\n next if dir_item.start_with?('.')\n next unless File.directory?(Fil... |
72d216fd16cfd89f3cc22a4cf4d1ee8a | configuration of all children will get reverse_deep_merge'd with weak_children_config def weak_children_config= (c) | [
{
"docid": "f3fb69ab098fcf8d6ed4dff2be1b8ed6",
"score": "0.82636756",
"text": "def weak_children_config\n @weak_children_config ||= {}\n end",
"title": ""
}
] | [
{
"docid": "09701b465374cffe22b6b810987e25d5",
"score": "0.76040137",
"text": "def strong_children_config\n @strong_children_config ||= parent.nil? ? {} : parent.strong_children_config\n end",
"title": ""
},
{
"docid": "677dad83b1c64de34c85e0e58d03ac00",
"score": "0.58949596",
... |
db828c029bb16c11b75f9f6c7e2149f1 | Swim the item in position k to a higher level to restore the heap innvariant | [
{
"docid": "e3bff6c84e76f7d95aa8ba6d5cf12700",
"score": "0.70213485",
"text": "def swim(k)\n current = @pq[k]\n while k/2 >= 1 and (@pq[k/2] <=> current) > 0\n @pq[k] = @pq[k/2]\n k = k/2\n end\n @pq[k] = current\n end",
"title": ""
}
] | [
{
"docid": "9a951a02f9130e91e20f83ba5357ca7f",
"score": "0.66627824",
"text": "def swim(k); end",
"title": ""
},
{
"docid": "9a951a02f9130e91e20f83ba5357ca7f",
"score": "0.66627824",
"text": "def swim(k); end",
"title": ""
},
{
"docid": "64135caca9fe4386468597634426039c",... |
2a3e5228815afe1c1d3578babf394e6c | if a user exists and the user's password is right, this method should return a true context value (not false, nil). if a user exists and the user's password is wrong, this method should return a false context value (false or nil). if a user does not exist, this method should return a false context value (false or nil). | [
{
"docid": "b58df96b83c18bd31e9b8634470983a1",
"score": "0.0",
"text": "def compare_password(username, password)\n if (raw_password = fetch_password(username)) then\n password == raw_password\n end\n end",
"title": ""
}
] | [
{
"docid": "4576b6e7ef085269a5fee380399a4a8a",
"score": "0.75506455",
"text": "def user_details?\n !!(@username && @password)\n end",
"title": ""
},
{
"docid": "7fdcfcadd4ed3e0969ead17b5820498a",
"score": "0.7300742",
"text": "def user_password?\n user_password\n ... |
fc6f7bc114e97f1f0117bc72ba3ab77f | POST /paquetes POST /paquetes.xml | [
{
"docid": "0d27061e5dfce4297522a1ff6a14d295",
"score": "0.6237619",
"text": "def create\n @paquete = Paquete.new(params[:paquete])\n respond_to do |format|\n if @paquete.save\n format.html { redirect_to(@paquete, :notice => 'Paquete was successfully created.') }\n format.xml {... | [
{
"docid": "6af72106c9060be9e662e73cd04ab1c4",
"score": "0.55406106",
"text": "def create(params)\n\nxml =<<XML\n<entry xmlns=\"http://purl.org/atom/ns#\">\n <title>#{params[:title]}</title>\n <link rel=\"related\" type=\"text/html\" href=\"#{params[:url]}\" />\n <summary type=\"text/plain\">#{params... |
8e77204c87c6862d8acb9ce16c364342 | Current price of BTC in USD (float returned). | [
{
"docid": "9ae5d605e9f27f7005af210d16907f60",
"score": "0.68645364",
"text": "def price(_currency = 'USD')\n raise Sibit::NotSupportedError, 'Cryptoapis doesn\\'t provide BTC price'\n end",
"title": ""
}
] | [
{
"docid": "5ddbc2adf6cf245274ce8fcb4884b220",
"score": "0.75839454",
"text": "def estimated_dollar_value\n estimated_bitcoin_value * Exchange::CoindeskHelper.bitcoin_to_usd\n end",
"title": ""
},
{
"docid": "49eb57ac741f64a38688c1b7e716b882",
"score": "0.74343675",
"text... |
c6410633c64673044a9deb76e1d61dda | PUT /quantities/1 PUT /quantities/1.json | [
{
"docid": "ca854d3ce7bfa3595997b719b5127104",
"score": "0.61528933",
"text": "def update\n @quantity = Quantity.find(params[:id])\n\n respond_to do |format|\n if @quantity.update_attributes(params[:quantity])\n format.html { redirect_to @quantity, notice: 'Quantity was successfully up... | [
{
"docid": "a7d90374eb77ad8dd9b96ee24a3a1b3a",
"score": "0.6541947",
"text": "def update\n product = Product.find(params[:id])\n product_details = params.permit(:title, :inventory_count, :price)\n\n product.update(product_details)\n\n render json: product\n end",
"title": ""
},
{
... |
4825424f02a790bcc6ea4eb09bb9d154 | Return the array of ascendants, including itself. | [
{
"docid": "c2959cafc135871f0613007912279005",
"score": "0.68257767",
"text": "def ascendants(category_id)\n category = listing(category_id)\n return [] unless category\n ascendants = []\n\n loop do\n parent = listing(category.parent_cat_id)\n break unless parent.present?\n as... | [
{
"docid": "4a90fffb503c578803f2d169af71a22d",
"score": "0.7945299",
"text": "def descendants\n ascendants.reverse\n end",
"title": ""
},
{
"docid": "74ca33b7e7c561798d2d607d2d3d2c19",
"score": "0.7855942",
"text": "def descendants\n _descendants.flatten.uniq\n end",
... |
695bade3c4bdb43d07e2a9ed6d9d356c | Use no layout for 404 | [
{
"docid": "c094b953cd5cff3057b1e38e669dc052",
"score": "0.0",
"text": "def set_layout\n response_code == 200 ? :\"layouts/application.#{@response.output_format}\" : nil\n end",
"title": ""
}
] | [
{
"docid": "791b306b13fbef7962f9591a0f9a8207",
"score": "0.77352196",
"text": "def render_404\n render file: \"public/404.html\", layout: false\n end",
"title": ""
},
{
"docid": "0fa0c3f141baf72e485184fba7dc91c2",
"score": "0.76612943",
"text": "def not_found\n render file: 'p... |
3f20b8bc23a70d3cde34cc99a0ef1682 | the json hash for this RepositoryProblemFacet | [
{
"docid": "162fa318f7d3f226bbefb5ae6ddf78a6",
"score": "0.0",
"text": "def to_jaxb_json_hash\n _h = {}\n _h['project'] = project.to_jaxb_json_hash unless project.nil?\n _h['name'] = name.to_jaxb_json_hash unless name.nil?\n _h['id'] = id.to_jaxb_json_hash unless id.nil?\n _h['f... | [
{
"docid": "591e6b17363dd41043a0033dec7d99d2",
"score": "0.69845766",
"text": "def hashed\n Digest::SHA256.hexdigest(to_hash.to_json)\n end",
"title": ""
},
{
"docid": "eaf6fa4a20a500b9975e64c27c67f6b1",
"score": "0.68688065",
"text": "def hash\n digest.hash\n end... |
7df944d8c236ab0b7049746d906154ec | Wrap a delete link | [
{
"docid": "533e838cc1fe03f9523289b08116087f",
"score": "0.7358802",
"text": "def delete_link(*args)\n options = {:method => :delete, :confirm => \"Are you sure you want to delete this?\"}.merge(extract_options_from_args!(args)||{})\n args << options\n link_to(*args)\n end",
"title... | [
{
"docid": "43d235d9838a468e733d99fb66d9c1ce",
"score": "0.770087",
"text": "def delete_link(item)\n content_tag :span, (link_to '×'.html_safe, item, confirm: \"Are you sure you want to delete #{item.part_name}?\", method: :delete, rel: 'tooltip', data: {'original-title' => 'delete part'}, cla... |
10806e276e5a5e48cfa2c29790db937b | Getter de la jugada del jugador | [
{
"docid": "8d627d1b5a7b290c030811e99d772c5a",
"score": "0.8057389",
"text": "def jugada_jugador\n @jugada_jugador\n end",
"title": ""
}
] | [
{
"docid": "bb948f732153042b5c9ab50e39683893",
"score": "0.7800523",
"text": "def jugada_ordenador\n @jugada_ordenador\n end",
"title": ""
},
{
"docid": "60ccbbfe0fb10dc9284400479e77f98b",
"score": "0.7233713",
"text": "def tu_turno\n Jugador.tu_turno\n end",
"title": ""
... |
02c6c9f833aff6936b561ff102440782 | Internal: Compares two jobs by their id. | [
{
"docid": "8f5ea601b7dc54540f6b90e7008949b1",
"score": "0.5401646",
"text": "def ==(other)\n self.id == other.id\n end",
"title": ""
}
] | [
{
"docid": "ac4c82ed72ca147a72a85fac37743876",
"score": "0.68829817",
"text": "def seen_job_with_id?(job_id)\n @processed_job_ids.include?(job_id)\n end",
"title": ""
},
{
"docid": "2e1c52139c28e5d25930e1cc4a149792",
"score": "0.68020946",
"text": "d... |
a2099a77c85e91272ae2f9e35b937953 | Only allow a trusted parameter "white list" through. | [
{
"docid": "62d791fef9263f7ca000c8adb4c89241",
"score": "0.0",
"text": "def user_params\n #from markdown\n # params.require(:user).permit(:username, :password, :password_digest, :img, :post)\n #guesswork\n params.require(:user).permit(:username, :password, :password_digest, :img, :po... | [
{
"docid": "c1f317213d917a1e3cfa584197f82e6c",
"score": "0.7121987",
"text": "def allowed_params\n ALLOWED_PARAMS\n end",
"title": ""
},
{
"docid": "b32229655ba2c32ebe754084ef912a1a",
"score": "0.70541996",
"text": "def expected_permitted_parameter_names; end",
"title": "... |
f0429166cf49f3497087f2bb783e5ad4 | Add an 'itemprop' to the properties | [
{
"docid": "6f6128af786de31671a8e42b44d09eda",
"score": "0.62723845",
"text": "def add_item_prop(item_prop)\n properties = Itemprop.parse(item_prop, @page_url)\n properties.each { |name, value| (@properties[name] ||= []) << value }\n end",
"title": ""
}
] | [
{
"docid": "bc2ab4c40c7219502652365090df82b5",
"score": "0.8231624",
"text": "def add_itemprop(itemprop)\n properties = Itemprop.parse(itemprop, @page_url)\n properties.each { |name, value| (@properties[name] ||= []) << value }\n end",
"title": ""
},
{
"docid": "1bf683677ac4f861... |
0e832a36cdd4842e7ee7ba58759d4a77 | Iterates over the given records and yields a CollectionIdsFormBuilder object used to build an id field for that record. It also yields the record. For example, the following code: | [
{
"docid": "a1510188d42af69ca5983513a9901657",
"score": "0.79248965",
"text": "def fields_for_collection_ids(collection_ids_name, records)\n raise ArgumentError, \"No block given\" unless block_given?\n \n records.each do |record|\n fields = Conductor::ActionView::CollectionIdsFormBuilder.... | [
{
"docid": "82494c7fbb4dba6ac1dead51bfa5d857",
"score": "0.57715046",
"text": "def construct_id_map_for_composite(records)\n id_to_record_map = {}\n ids = []\n records.each do |record|\n primary_key ||= record.class.primary_key\n ids << record.id\n ... |
303b322ec1e72a29869f26744abce4ed | GET /uruns GET /uruns.json | [
{
"docid": "28aa4f5c081af4c895db0b9e360b967f",
"score": "0.0",
"text": "def index\n @search=UrunSearch.new(params[:search])\n @uruns=@search.scope.order(\"created_at DESC\").page params[:page]\n\n @search=SutSearch.new(params[:search])\n @suts=@search.scope\n\n\n\n respond_to do |format|\... | [
{
"docid": "bc214e2a6226f30ab90a07cb6bf6c1b0",
"score": "0.66450906",
"text": "def index\n @universes = Universe.all.page(params[:page]).per(25)\n respond_to do |format|\n format.html\n format.json { render json: @universes }\n end\n end",
"title": ""
},
{
"docid": "828a4... |
e8ae221a8a5ea3f6eeaf1c440ec5fe65 | syntactic predicate synpred506_Plsql (in plsql.ruby.g) 1099:52: synpred506_Plsql : keyLIKE2 ; This is an imaginary rule inserted by ANTLR to implement a syntactic predicate decision | [
{
"docid": "062ea2f24822339fb725829d80f402a8",
"score": "0.7803609",
"text": "def synpred506_Plsql\n # -> uncomment the next line to manually enable rule tracing\n # trace_in( __method__, 873 )\n\n # at line 1099:52: keyLIKE2\n @state.following.push( TOKENS_FOLLOWING_keyLIKE2_IN_synp... | [
{
"docid": "c7a008976cc7a9e11483e18e0473412b",
"score": "0.7244263",
"text": "def synpred505_Plsql\n # -> uncomment the next line to manually enable rule tracing\n # trace_in( __method__, 872 )\n\n # at line 1099:41: keyLIKEC\n @state.following.push( TOKENS_FOLLOWING_keyLIKEC_IN_synp... |
40b03e73737782132d9b24706b8ff821 | fetches all objects via pagination. Be careful, this could be a lot! | [
{
"docid": "142ab9fc6d140d40c27d6527c6f281fd",
"score": "0.0",
"text": "def all!(filter = {})\n result = []\n page = 0\n total_pages = 1\n begin\n page += 1\n result += self.all(filter, page, MAX_PER_PAGE) { |meta_data| total_pages = meta_data['total_pages']... | [
{
"docid": "4f8ad4ade394fd9d8350bbba6cb27c6c",
"score": "0.7745851",
"text": "def get_all(opts = {})\n after = nil\n objects = []\n opts[:limit] ||= MAX_PAGE_SIZE\n loop do\n page_opts = opts.merge(after: after)\n page = get_page(page_opts)\n object... |
d9c939e3d11a251b937795778e135039 | Visit nodes in the AST. visitor An instance of a subclass of `Curlybars::Visitor`. source The source HBS String used to generate an AST. identifier The the file name of the template being checked (defaults to `nil`). | [
{
"docid": "b7988651d73b57749b0753815d43f22b",
"score": "0.7594933",
"text": "def visit(visitor, source, identifier = nil)\n tree = ast(transformed_source(source), identifier, run_processors: true)\n visitor.accept(tree)\n end",
"title": ""
}
] | [
{
"docid": "a0047558b52f9ba1cb2251c76573adbb",
"score": "0.5387396",
"text": "def src!\n # -> uncomment the next line to manually enable rule tracing\n # trace_in( __method__, 60 )\n # - - - - label initialization - - - -\n file = nil\n line = nil\n\n\n \n # - - - - ma... |
d01bcfa7b3a9a706edcdb0d290dd1e1d | GET /girltypes/new GET /girltypes/new.json | [
{
"docid": "4063fa5f070167510d5c36a14ee0b4c5",
"score": "0.83949",
"text": "def new\n @girltype = Girltype.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @girltype }\n end\n end",
"title": ""
}
] | [
{
"docid": "615c1e1c8a1ddd10fae6d3c3e710813d",
"score": "0.77713066",
"text": "def new\n @type = Type.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @type }\n end\n end",
"title": ""
},
{
"docid": "7ed3c91ae2f81f5354d3881617ae4ddc... |
1b31cc37e40973157be24353a0dff106 | Collection of attributes that could be serialized for public. Override this method if you need additional attributes to be serialized. | [
{
"docid": "6f34a842240ef69e4978eac22cc7579b",
"score": "0.78367025",
"text": "def serializable_attributes\n attributes = %w[id name created_at]\n attributes << \"uid\" unless confidential?\n attributes\n end",
"title": ""
}
] | [
{
"docid": "714180e8db2bc0a99e9b8cb0570abd1a",
"score": "0.7576011",
"text": "def public_attributes\n self.attribute_names.select{|a| !Profile::PRIVATE_FIELDS.include?(a)}\n end",
"title": ""
},
{
"docid": "714180e8db2bc0a99e9b8cb0570abd1a",
"score": "0.7576011",
"text": "def pub... |
e413c21a78db8690091325661b960c10 | DELETE /vendor_parts/1 DELETE /vendor_parts/1.json | [
{
"docid": "3d31aee5693f6061c21564fdbf5e0915",
"score": "0.7785819",
"text": "def destroy\n @vendor_part = VendorPart.find(params[:id])\n @vendor_part.destroy\n\n respond_to do |format|\n format.html { redirect_to vendor_parts_url }\n format.json { head :no_content }\n end\n end",... | [
{
"docid": "c42b001f9e8d0e19b0f8384239549cba",
"score": "0.70530933",
"text": "def destroy\n @part = @product.parts.find(params[:id])\n @part.destroy\n\n respond_to do |format|\n format.html { redirect_to product_parts_url }\n format.json { head :no_content }\n end\n end",
"ti... |
0ac31798a38f3169885fb66d3b147dfe | Removes the object at the beginning of the linked list. Returns the removed object. | [
{
"docid": "807e3b198324cca2d7356144a225b409",
"score": "0.67662644",
"text": "def delete_begin()\n node = @first\n @first = @first.next\n return node.value\n end",
"title": ""
}
] | [
{
"docid": "7335b8ae63f3ef34d1705f72d0317fad",
"score": "0.77861845",
"text": "def remove_first\n raise 'Empty List' if empty?\n\n item = @head\n @head = item.next_node\n @head.prev_node = nil if @head\n @size -= 1\n item.data\n end",
"title": ""
},
{
"docid"... |
04790cf1311cedcedc7dbfe3b138d2cb | Show a dialog and get the values from the user TODO: The data variable is a Hash of values to get from the user. Because it is a Hash, the order is not specified. I really need some way for the derived classes to control the order that the parameters are displayed to the user. | [
{
"docid": "c0f552ea9e997e040d3b7249b624bdb6",
"score": "0.58556175",
"text": "def prompt(operation)\n # get the parameters\n if( @entity )\n data = self.parameters\n else\n data = self.default_parameters\n end\n if( not data )\n puts \"No parameters attached to the e... | [
{
"docid": "3c04c6e4e215b889b637e2d7b263af8f",
"score": "0.6820598",
"text": "def input\n @dialog.display\n return nil if @dialog.getDialogResult == false\n\n @dialog.toMap\n end",
"title": ""
},
{
"docid": "d7b0e29509b5adefbd323fafdc736933",
"score": "0.6803753",
"text": "... |
40db6c9b171d19a03f6b0c157ded6913 | Gets the internal temperature sensor value, in celsius or fahrenheit. | [
{
"docid": "12c5cd77c006b7e10f527798fcd61b04",
"score": "0.7533411",
"text": "def internal_temperature(unit = :c)\n convert_temperature((@fields[9].to_i / 10.0), unit)\n end",
"title": ""
}
] | [
{
"docid": "1ef6810ca6f3fc73e99befebeb8797a6",
"score": "0.77882105",
"text": "def get_value\n raw_temperature = get_raw_value;\n integer = raw_temperature >> INTEGER_MASK;\n fractional = (raw_temperature & FRACTIONAL_MASK)*10/16;\n temperature = integer.to_s + '.' + fractional.to_s;\n end"... |
dc58f0860884be67b5c49787253ac9f2 | =============================================================================== Methods that determine the duration of an audio file. =============================================================================== | [
{
"docid": "a394ffaef6d2e83ced52af9780983939",
"score": "0.0",
"text": "def getOggPage(file)\r\n fgetdw = proc { |file|\r\n (file.eof? ? 0 : (file.read(4).unpack(\"V\")[0] || 0))\r\n }\r\n dw = fgetdw.call(file)\r\n return nil if dw != 0x5367674F\r\n header = file.read(22)\r\n bodysize = 0\r\n ... | [
{
"docid": "8752045fe36bae15c5f2d4788cc22487",
"score": "0.85017335",
"text": "def compute_audio_duration\n\t\tdur_io = IO.popen(\"ffmpeg -i #{@path} 2>&1 | grep Duration\", 'r+')\n\t\tdur_s = dur_io.read.match(/\\d+:\\d+:\\d+/)[0]\n\t\tdur = duration_string_to_sec dur_s\n\tend",
"title": ""
},
... |
d710767f299dada30d22d78eff102b78 | GET /fuels/new GET /fuels/new.xml | [
{
"docid": "022d67fddaf60eb7d55319be7b5bb88b",
"score": "0.7757686",
"text": "def new\n @fuel = Fuel.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @fuel }\n end\n end",
"title": ""
}
] | [
{
"docid": "aa8a1ab42a5c75557d288954514a3045",
"score": "0.7654853",
"text": "def new\n @fuel_up = FuelUp.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @fuel_up }\n end\n end",
"title": ""
},
{
"docid": "a2a6800af16e8c661c220b0... |
43b5b130d0d60f804003deed7cb1348f | Part 3 the method calls for the array movie data | [
{
"docid": "208462f3dc607e48be8198fa93623421",
"score": "0.0",
"text": "def bond_actors(array)\n #the variable actors is equal to a new array that only has the key actors in each of the movies\n actors = array.map {|movie| movie[:actor]}\n #outputs only the unique actors so no duplicates will be show... | [
{
"docid": "377a429c6ac478ad45130e0f46bc21bc",
"score": "0.6936607",
"text": "def movie_array(character)\n films_array = get_char_hash(character)[\"films\"]\n films_array.map do |movie_url|\n movie_info(movie_url)[\"title\"]\n end\nend",
"title": ""
},
{
"docid": "1d7e1b2562a6ff259d4ab... |
661684b50924e89966b548c09c74b61a | this method called only when the replies link is hit | [
{
"docid": "04e05e1a692c5b19f425ac1cc93c3d67",
"score": "0.0",
"text": "def show\n @parent = Comment.find(params[:id])\n @comment = Comment.build_from(@parent.commentable, @current_member.id, \"\") if logged_in?\n end",
"title": ""
}
] | [
{
"docid": "9af227c8f8eabb1739cdaf5e4f153810",
"score": "0.7913319",
"text": "def replies\n \n end",
"title": ""
},
{
"docid": "976c8f2f33a04c4512daa38a9b527131",
"score": "0.70134324",
"text": "def receive_replies(connection); end",
"title": ""
},
{
"docid": "3a3b978... |
5990cd61c88df27cd41c8dec4e1c1d81 | GET /consultants/1 GET /consultants/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "37279854c175899aeef0bee3da04e895",
"score": "0.77284175",
"text": "def show\n @consultant = Consultant.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @consultant }\n end\n end",
"title": ""
},
{
"docid":... |
415c30eb10e02221871d3e7214a311d1 | Sets the maximumDuration property value. The maximum duration allowed for eligibility or assignment which is not permanent. Required when isExpirationRequired is true. | [
{
"docid": "8b80ecea9fdf9d9204949d988df85cd4",
"score": "0.86637014",
"text": "def maximum_duration=(value)\n @maximum_duration = value\n end",
"title": ""
}
] | [
{
"docid": "e8697c53f2ae9494db007b76541045f8",
"score": "0.7354659",
"text": "def max_record_duration_in_seconds=(value)\n @max_record_duration_in_seconds = value\n end",
"title": ""
},
{
"docid": "f2d60f667afb6ab85e2424bdfdcf22e4",
"scor... |
1892ee2e52e7c44cf736ad75c31ec724 | Provide a user friendly representation source://twilioruby//lib/twilioruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb161 | [
{
"docid": "84c2aa104b8a70acbe3f11eca76559b3",
"score": "0.0",
"text": "def to_s; end",
"title": ""
}
] | [
{
"docid": "bfabb1b5d2574eedd45b0adf43d6a489",
"score": "0.5577918",
"text": "def product\n compute_stats :product\n end",
"title": ""
},
{
"docid": "d9008cc693962cb95f746e4a67532139",
"score": "0.55679846",
"text": "def handle_product(p)\n product = {}\n p... |
c38bf3fea90032e41739bc2060b02a16 | Returns the value of attribute node | [
{
"docid": "28591c192d02897f69d772480c5f7d11",
"score": "0.0",
"text": "def node; end",
"title": ""
}
] | [
{
"docid": "9b7ec781d7de1b2bb372578737514189",
"score": "0.8358751",
"text": "def attr(node,name_attribute='Name')\n node.attributes[name_attribute].value\n end",
"title": ""
},
{
"docid": "172905362168474c40e3768b157db41e",
"score": "0.8061649",
"text": "def value(node, attr... |
784ed3d8217c080035cf787c404f289f | Check if voter_id do an up vote on votee_id | [
{
"docid": "64f9ff642fed07d3f1acf84359b9c782",
"score": "0.75269055",
"text": "def up_voted?(options)\n validate_and_normalize_vote_options(options)\n up_voted_by(options[:voter_id]).where(:_id => options[:votee_id]).count == 1\n end",
"title": ""
}
] | [
{
"docid": "f2ca24681465cb302084cf8dcc6cb53b",
"score": "0.7626275",
"text": "def vote_up(voter=nil)\n self.vote(1, voter)\n end",
"title": ""
},
{
"docid": "42c5d2a7ad9d3889dad50e9cdebdbd69",
"score": "0.7501897",
"text": "def up_voted?(votable)\n is_votable?(votabl... |
b5fb2a5ca97127c50c94e2bad906782b | Ducktype methods for CarrierWave::SanitizedFile. | [
{
"docid": "8c2a09fff842def5053ee3650d13d753",
"score": "0.0",
"text": "def content_type\n \"image/jpg\"\n end",
"title": ""
}
] | [
{
"docid": "4b705ec59f3f6e803d82d9928913286b",
"score": "0.6270411",
"text": "def allowed_types\n [ParsableFile]\nend",
"title": ""
},
{
"docid": "eea17f4cc147867ef2201833f76249f9",
"score": "0.614125",
"text": "def retrieve!(identifier = nil)\n # use StringIO to act as a Fil... |
0ae589094b2215fec98ffe3e40e7caf3 | a checkbox that toggles the innerHTML of another guarded element. | [
{
"docid": "7974aa8dc5346daf83842bba870900ee",
"score": "0.70501065",
"text": "def check_box_toggle(name, checked, elt, ifchecked, ifnotchecked)\n check_box_tag name, 1, checked, :onchange => %Q{$('##{elt}').text($(this).is(':checked') ? '#{escape_javascript ifchecked}' : '#{escape_javascript ifnotch... | [
{
"docid": "4e0d6d6420553b9d997aea32819e9bc6",
"score": "0.6214809",
"text": "def toggle_field(attrs = {})\n if attrs.has_key?(:checked)\n if attrs[:checked]\n attrs[:checked] = \"checked\"\n else\n attrs.delete(:checked)\n end\n end\n \n check_... |
cf3ab8c238053c3141ff012c41ccf8d5 | Returns a unique path for a job | [
{
"docid": "6588e30dc8e60356694f9cbcae1fc06e",
"score": "0.6650366",
"text": "def new_jobdir\n @target + unique_dir\n end",
"title": ""
}
] | [
{
"docid": "6adb62a024b1d50ef3ada7ea529a37cd",
"score": "0.7953368",
"text": "def jobPath\n @jobPath ||= File.join(Utils.getSpoolPath, Utils.getJobFilename(@id))\n end",
"title": ""
},
{
"docid": "93b2edc9c0264f5dee0055f837131718",
"score": "0.7749",
"text": "def jo... |
8feee3998ca1424d654f7502abda8fa8 | Function to import operations from CSV. | [
{
"docid": "98bbe9bcb73d7edabdaddb73a39c48c6",
"score": "0.0",
"text": "def import(file, parsing_log_id = new_parsing_log_id)\n notify_on_parsing_log\n @log = ParsingLog.find(parsing_log_id)\n\n SmarterCSV.process(file) do |data|\n data = data.first\n sync_data(data)\n ... | [
{
"docid": "8d353a59aef47462ed4f34c343b3410e",
"score": "0.70252544",
"text": "def import_from_csv(file_name)\n csv_text = File.read(file_name)\n csv = CSV.parse(csv_text, headers: true, skip_blanks: true)\n# #8 Iterate over the CSV::Table object's rows. Create a hash for each row, and convert each ... |
9820163d5c2bcb57185ccf02af94c73c | Verifies the authenticity of ciphertext. | [
{
"docid": "6f97dca4f58d0e068c76cf73a6332ec1",
"score": "0.5322611",
"text": "def verify(data, mac, key)\n data_mac = sign(data, key)\n unless constant_time_comparison(mac, data_mac)\n raise ArgumentError, 'MAC check failed!'\n end\n end",
"title": ""
}
] | [
{
"docid": "7b5ecc878326da1c681bf51ba506d4ef",
"score": "0.65489596",
"text": "def authKey(ciphertext)\n\t\t\tmy_key = OpenSSL::PKey::RSA.new(@private_key)\n\n\t\t\tbegin\n\t\t\t\tif my_key.private_decrypt(ciphertext).force_encoding(\"UTF-8\") == @deploy_secret.force_encoding(\"UTF-8\")\n\t\t\t\t\tMU.lo... |
e946a644f66cd2fe402b7e0ff66353f7 | Checks if the given string is a valid http/https URL | [
{
"docid": "9d20862ca9e82a5a35405fae4613f49e",
"score": "0.80410767",
"text": "def url_valid?(url)\n url = URI.parse(url) rescue false\n url.kind_of?(URI::HTTP) || url.kind_of?(URI::HTTPS)\n end",
"title": ""
}
] | [
{
"docid": "d712db603af63e87f739b29ec91fd54e",
"score": "0.8679992",
"text": "def is_url? string\n uri = URI.parse(string)\n %w( http https ).include?(uri.scheme)\n rescue URI::BadURIError\n false\n rescue URI::InvalidURIError\n false\n end",
"title": ""
},
{
"do... |
1f945ef8bc6267e3b70f4007b025e142 | GET /eba_questions/1 GET /eba_questions/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "f21bdf5068d061850a35a8ce3e340eba",
"score": "0.769713",
"text": "def questions\n self.class.get('/2.2/questions', @options)\n end",
"title": ""
},
{
"docid": "6b4bc6123184f36d8ce205147c430cbc",
"score": "0.7564127",
"text": "def index\n render json: @questions\n e... |
58297dc990cf153d3ee4fd73a3c44949 | GET /squishes/new GET /squishes/new.json | [
{
"docid": "56dd2afa91c792ffb127f1b3696efffc",
"score": "0.7366993",
"text": "def new\n @squish = Squish.new\n \n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @squish }\n end\n end",
"title": ""
}
] | [
{
"docid": "f6edcb8ae96a152ef1399db5455dc366",
"score": "0.7064084",
"text": "def new\n @squishee_cup = SquisheeCup.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @squishee_cup }\n end\n end",
"title": ""
},
{
"docid": "a7333090ff... |
05d5634e49734a98b3100798a9db08e4 | This method is used to remove an extension state listener that has been registered by the extension. | [
{
"docid": "f88cf9e3de88acbcaa5acb41927dca58",
"score": "0.8657253",
"text": "def removeExtensionStateListener(listener)\n _check_and_callback(:removeExtensionStateListener, listener)\n end",
"title": ""
}
] | [
{
"docid": "865f40541c1d8b82ec374b6da31da4b1",
"score": "0.69690686",
"text": "def unloadExtension\n _check_and_callback(:unloadExtension)\n end",
"title": ""
},
{
"docid": "6d7f63fe044951863ec7c1caff463212",
"score": "0.6808971",
"text": "def onstatechange_unregister(b)\n ... |
3662e269b9a1c50842a8cea5835c4a7b | Parses and publishes a snippet. Filters out snippets rendered empty after redaction. | [
{
"docid": "860ef88663ade2207257428d521458d1",
"score": "0.6919852",
"text": "def publish_snippet(snippet, published)\n ['last-week', 'this-week'].each do |field|\n text = snippet[field] || ''\n redact! text\n if snippet['markdown']\n @markdown_snippet_munger.yield tex... | [
{
"docid": "ffdd9e012eb9d0f88f166387d0b5774e",
"score": "0.6683084",
"text": "def publish_snippet(snippet, published)\n ['last-week', 'this-week'].each do |field|\n text = snippet[field]\n next if text == nil\n redact! text\n text.gsub!(/^\\n\\n+/m, '')\n\n parsed... |
df61d9bbea9d72eeedf9fc8ad0dbb1cf | Creates a client access token | [
{
"docid": "f9c764e516e7fbe0ac5b69d4b1920c25",
"score": "0.0",
"text": "def post_users_auth_clientaccesstoken(opts = {})\n data, _status_code, _headers = post_users_auth_clientaccesstoken_with_http_info(opts)\n data\n end",
"title": ""
}
] | [
{
"docid": "dd164c6addf5201e552b2b8e61fce88c",
"score": "0.78816533",
"text": "def create_token_for(client, scope, identity = nil, expires = nil)\n expires_at = Time.now + expires if expires && expires != 0\n\n token = self.create({ scope: scope, client_uuid: client.uuid, expires_a... |
0d87c05f64102c7a561c679f193906bb | self.arguments = [ CLAide::Argument.new() ] | [
{
"docid": "966272217519dd46b666a0e2df725a75",
"score": "0.0",
"text": "def initialize(argv)\n @mypodfile_path = Pathname.pwd + 'Mypodfile'\n super\n end",
"title": ""
}
] | [
{
"docid": "49665d066ffcf52f2c37b2b1c268e6fd",
"score": "0.75617737",
"text": "def arguments; end",
"title": ""
},
{
"docid": "49665d066ffcf52f2c37b2b1c268e6fd",
"score": "0.75617737",
"text": "def arguments; end",
"title": ""
},
{
"docid": "49665d066ffcf52f2c37b2b1c268e6... |
306f57b33fed1485fdad0469b7e91fa7 | DELETE /correlations/1 DELETE /correlations/1.json | [
{
"docid": "3a5bc3a3737d835166390e6212e63391",
"score": "0.782101",
"text": "def destroy\n @correlation = Correlation.find(params[:id])\n @correlation.destroy\n\n respond_to do |format|\n format.html { redirect_to correlations_url }\n format.json { head :no_content }\n end\n end",... | [
{
"docid": "e839695262e34a19d9f27eefad535704",
"score": "0.76765925",
"text": "def destroy\n @correlation.destroy\n respond_to do |format|\n format.html { redirect_to correlations_url, notice: 'Correlation was successfully destroyed.' }\n format.json { head :no_content }\n end\n end"... |
8f9594c732ca061f9b39aeb0db1a49a1 | Gets the classification property value. Specifies whether the alert represents a true threat. Possible values are: unknown, falsePositive, truePositive, benignPositive, unknownFutureValue. | [
{
"docid": "842ff7775f9b85240df75e3ffcf11de8",
"score": "0.62299865",
"text": "def classification\n return @classification\n end",
"title": ""
}
] | [
{
"docid": "9346e99897315cbab1407f7d2a4d40a1",
"score": "0.62741077",
"text": "def classification\n return @classification\n end",
"title": ""
},
{
"docid": "491bc543786fc4507fe101ebee69631c",
"score": "0.6078418",
"text": "de... |
ea22189742a53fc738bc54fdcc7e3093 | Flushes the output buffer and returns all the data | [
{
"docid": "0520cedc94a2a87c3d90fd6e2bbbcea0",
"score": "0.7641463",
"text": "def flush_next_out\n\t\t\t@out_pos = @output_buffer.length\n\t\t\t@finished = true\n\t\t\tret = @output_buffer.pack(\"c*\")\n\t\t\t@output_buffer = []\n\t\t\tret\n\t\tend",
"title": ""
}
] | [
{
"docid": "19f4ff63687739597d675a311ee2700f",
"score": "0.7617253",
"text": "def flush_next_out\n\t\t@out_pos = @output_buffer.length\n\t\t@finished = true\n\t\tret = @output_buffer.pack(\"c*\")\n\t\t@output_buffer = []\n\t\tret\n\tend",
"title": ""
},
{
"docid": "120064a4da948bea81cf571506... |
4e5072663ec801ed925d1fe6a7942ec8 | GET /city_maps/new GET /city_maps/new.json | [
{
"docid": "5050472a09018e92c9cfbeccd91eee3b",
"score": "0.8219801",
"text": "def new\n @city_map = CityMap.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @city_map }\n end\n end",
"title": ""
}
] | [
{
"docid": "956dafcd2cc15a99dc35124fc2272df8",
"score": "0.77165264",
"text": "def new\n @map = Map.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @map }\n end\n end",
"title": ""
},
{
"docid": "956dafcd2cc15a99dc35124fc2272df8",
... |
d69131a5e44e87439b5916ef2faa91bd | List Cluster Node Configurations Returns information about all NSX cluster nodes. | [
{
"docid": "dae7afb852baf24d0b34f71f0574b89d",
"score": "0.73558545",
"text": "def list_cluster_node_configs(opts = {})\n data, _status_code, _headers = list_cluster_node_configs_with_http_info(opts)\n return data\n end",
"title": ""
}
] | [
{
"docid": "1c70b58a7fe6146ddb74ad416699f495",
"score": "0.6892525",
"text": "def nodes\n @cluster.nodes\n end",
"title": ""
},
{
"docid": "970622f20c69e4eebadfee472cf8871f",
"score": "0.6861513",
"text": "def cluster_nodes\n cluster_nodes_list = []\n @nodes_graph.e... |
6be14f9bb68ef93bd73bfe0e3ee09770 | Create snapshot if it wasn't done yet today | [
{
"docid": "e6b27391a3203beb9a6fa6066a5780d0",
"score": "0.7543898",
"text": "def try_snapshot!\n if already_done_today?\n puts \">> No need to make a snapshot for #{@db_name}\"\n return false\n end\n\n snapshot!\n end",
"title": ""
}
] | [
{
"docid": "1e8de360f7de8355d04d6a0480af9c1c",
"score": "0.6661829",
"text": "def create_empty_snapshot name\n create_snapshot name, 'empty'\n end",
"title": ""
},
{
"docid": "5212aa33be3eda3fc5d21fa7de2f3d89",
"score": "0.61980975",
"text": "def populate_snapshot\n self.snaps... |
dd083b933f12b2993d7ddd264f5ca84e | token received from CreateSession/RenewSession API call USAGE: asset_ids = ["1234567890","1234567890"] | [
{
"docid": "4750984b73ef5baca70f96ce793f2704",
"score": "0.4812207",
"text": "def get_image_details(token, assetIds)\n\n request = {\n :RequestHeader => {\n :Token => token,\n :CoordinationId => \"MyUniqueId\"\n },\n :GetImageDetailsRequestBody => {\n ... | [
{
"docid": "35c04305a83cf485e1448bb65c8dbe6c",
"score": "0.5656624",
"text": "def share_token\r\n CustomerToken.create(:expires_at => Time.now + 1.month, :issue_id => id)\r\n end",
"title": ""
},
{
"docid": "49262615d05784b3562125e3163accad",
"score": "0.5506949",
"text": "def in... |
6f8e31bc641aec644c45df788fb726e1 | create some number of commits, each a minute apart | [
{
"docid": "be061c2ada1c020cbd57febb49ee6e2d",
"score": "0.7767059",
"text": "def make_commits(date, commits = 20)\n commits.times do |n|\n puts fast_export_commit(noon(date) + n * 60)\n end\nend",
"title": ""
}
] | [
{
"docid": "f54e507da6d514777b85d7e97208a2f1",
"score": "0.6630504",
"text": "def commits(count = 30)\n data = git \"log -n#{count} --pretty=format:\\\"%H %ct %s\\\" #{@repo.commit} #{@path}\"\n data.split(\"\\n\").map {|c|\n sha1, timestamp, subject = c.split /\\s+/, 3\n\n Commi... |
cef47dedee7f1792d5b96b17e0b61cc1 | Creates a new search | [
{
"docid": "f240498e6ac18c92d28a71208ff7aeba",
"score": "0.0",
"text": "def initialize(*)\n clear\n super\n end",
"title": ""
}
] | [
{
"docid": "50a14d20507755a7d3dec28fcca4a89c",
"score": "0.81047904",
"text": "def new \n\t\t@search = Search.new\n\tend",
"title": ""
},
{
"docid": "69fcecb5d5eaaf40ec8b2cedc3a2ca4c",
"score": "0.8027449",
"text": "def create_search(params = {})\n post(\"/searches\", params)\... |
02df3f5f850107f0fd54b15e9d33a996 | Returns true if this list is empty, otherwise returns false. | [
{
"docid": "e04c7cf3ce5491177f23abb84034f754",
"score": "0.0",
"text": "def empty?\n @sentinel.next == @sentinel\n end",
"title": ""
}
] | [
{
"docid": "8b31ddddf3a9035ee53735156650de92",
"score": "0.8953526",
"text": "def empty?\n @list.empty?\n end",
"title": ""
},
{
"docid": "9881b59aa82d00fa39dad75ffeef45ee",
"score": "0.84866995",
"text": "def list_empty?\n return (@first_node == nil) ? true : fals... |
b2e576d5acf8489432f43091bdb103ca | got a little carried away with this constructor ;) | [
{
"docid": "84e650f101c632463a9256ad95c99222",
"score": "0.0",
"text": "def initialize(*value)\n if (value.size == 1)\n if (value[0].respond_to?(:to_str))\n build_from_string(value[0])\n elsif (value[0].respond_to?(:to_int))\n build_from_value(value[0])\n end\n elsif (... | [
{
"docid": "170e7cc6f3b91fc8d88704f0d36db709",
"score": "0.78530204",
"text": "def initialize; super; end",
"title": ""
},
{
"docid": "27b17d3efbfa96fcae1899acb992e406",
"score": "0.77940565",
"text": "def initialize; end",
"title": ""
},
{
"docid": "27b17d3efbfa96fcae189... |
bef4ac8ae2677817f10b41fe738fd4ac | => ["mal", "bien", "mal", "bien", "bien", "bien", "mal", "bien", "mal"] | [
{
"docid": "21d8f14906c9fa5b89d629c7e8f030f5",
"score": "0.580839",
"text": "def scan_addicts(param)\r\n #array = []\r\n arr = []\r\n param.each do |i|\r\n \r\n if i >= 90\r\n arr.push('mal') \r\n else\r\n arr.push('bien')\r\n end \r\... | [
{
"docid": "cfed7193a5744c28a319a4a896dab54e",
"score": "0.6327573",
"text": "def veichles\n ['Bil', 'Moped', 'Motorsykkel', 'Tungt kjøretøy', 'ATV', 'Buss', 'Sykkel']\n end",
"title": ""
},
{
"docid": "d7cf104e59fb90adf2e4de1a45226927",
"score": "0.62765837",
"text": "def ge... |
b8a4f651ba9e5e344ca34a272af91de0 | Roll up the stats from individual PIDs into a summary | [
{
"docid": "99f66cbbfe007c7692edf07c62e448f5",
"score": "0.52312607",
"text": "def report(process_pids)\n ret = {}\n return ret if pid_stats_map.size == 0\n age_sec = 0\n cpu_pct = 0\n resident_set_bytes = 0\n threads = 0\n virtual_mem_bytes = 0\n pid_stats_map.ea... | [
{
"docid": "585b5a0be3196bd4f5deea66936f8d5f",
"score": "0.61231524",
"text": "def stats_summary\n html = \"\"\n %w(inhale exhale cycle).each do |phase|\n %w(min max avg).each do |stat|\n time = format_time(self.meditations.map {|med| med.send(phase + \"_\" + stat)}.max)\n html ... |
c4ecb725f2ea46351387c83dcd6990ff | Requires :login => 'your SecurenetID' and :password => 'your SecureKey' Optionally, pass :test => true to run all operations in test mode. | [
{
"docid": "aa416af3d84448150639c4c024ff5708",
"score": "0.0",
"text": "def initialize(options = {})\n requires!(options, :login, :password)\n @options = options\n @login, @password = options.values_at( :login, :password )\n super\n end",
"title": ""
}
] | [
{
"docid": "af0959a65ea862e79f503e9e3e9e4adb",
"score": "0.6075106",
"text": "def login\n run \"cf api --skip-ssl-validation api.#{ENV['CF_DOMAIN']}\"\n run \"cf auth #{ENV['CF_USERNAME']} #{ENV['CF_PASSWORD']}\"\nend",
"title": ""
},
{
"docid": "f6e098fbaa40675779cef82ecdb4273e",
... |
a2099a77c85e91272ae2f9e35b937953 | Only allow a trusted parameter "white list" through. | [
{
"docid": "ab4656aa16e9d99a61731cf5dcb2315a",
"score": "0.0",
"text": "def foundation_params\n params.require(:foundation).permit(:name, :email, :password, :city, :address, :phone, :food, :hourEntry, :hourExit, :isActive)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7943618",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "f6060519cb0c56a439976f0c978690db",
"score": "0.69572574",
"text": "def permitted_params\n params.permit!\n end",
"title"... |
0ae2819906fc735461df1a8a585536df | GET /order_models/1 GET /order_models/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "83af6956c414f50112af04ef986216b8",
"score": "0.69376695",
"text": "def index\n @order_models = OrderModel.all\n end",
"title": ""
},
{
"docid": "df51e61b2a0d3729231476c904b7a558",
"score": "0.6462781",
"text": "def index\n @orders = Order.all\n render json: @ord... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "b4e7ba8e71ec2ba233905626de773c46",
"score": "0.0",
"text": "def gbp_usd_params\n params.require(:gbp_usd).permit(:date, :spot_exchange_rate)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7496716",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.6956598",
"text": "def strong_params\n params.require(:request).permit(param_white... |
2045dea69647750df3a193d1d875d051 | Brings all the product and brand data & adds it to the sales report | [
{
"docid": "052dc1612150e2ccb47f087555b4fe40",
"score": "0.6147945",
"text": "def create_report\n\ttitle_report(\"Sales Report\")\n\tprint_report \"********************\"\n\t# Displays the time when the salee report was generated.\n\ttime_date\n\tprint_report \"********************\"\n\t# Prints all the... | [
{
"docid": "f68093a1a59a4609ea1d865f625c903f",
"score": "0.7458506",
"text": "def brand_report(all)\n display_average_price(average_price(all))\n by_brand = count_by_brand(all)\n display_title(\"Brand wise Inventry Report\")\n display_header(\"Name to the Brand\", \"Quantity\")\n by_brand... |
a58a075d6d7de5fc8d5e2027ffc44749 | DELETE /panels/1 DELETE /panels/1.json | [
{
"docid": "b432f5c5df316456c35c4342886b9f9c",
"score": "0.71377844",
"text": "def destroy\n @panel = Panel.find(params[:id])\n Panel.where(:fed_from => @panel.panel_name).destroy(Panel.where(:fed_from => @panel.panel_name).pluck(:id))\n flash[:notice] = \"Panel '#{@panel.panel_name}' has been ... | [
{
"docid": "10348eb4e87c9ca2ff880d362b2dc61a",
"score": "0.76678497",
"text": "def destroy\n @panel = Panel.find(params[:id])\n @panel.destroy\n\n respond_to do |format|\n format.html { redirect_to panels_url }\n format.json { head :no_content }\n end\n end",
"title": ""
},
... |
bd0e7ba558fa2549e04b5cfc3fc2d78e | Override in subclasses with a method which returns a destination to poll. This is wrapped by next_destination which provides thread safety, so it it is not necessary to worry about concurrency in your implementation. Use pool for readonly access to the pool of destinations from which to choose. | [
{
"docid": "46abd7b4793927fed1532785e7818ed8",
"score": "0.0",
"text": "def select_next\n raise NotImplementedError.new \n end",
"title": ""
}
] | [
{
"docid": "c9e72f60f4d3dcc2c476df06f9d30992",
"score": "0.5784676",
"text": "def choose_read_pool\n if @secondary_pools.empty?\n @read_pool = @primary_pool\n elsif @secondary_pools.size == 1\n @read_pool = @secondary_pools[0]\n else\n ping_ranges = Array.new(3) { |i|... |
e0a5623b999ad32ca8db549d66eff45c | Totheminute updates from the floor of the House and Senate. | [
{
"docid": "d146c55302f1c8e7cecb607174d0ebe9",
"score": "0.0",
"text": "def floor_updates(options = {})\n get('/floor_updates', options)\n end",
"title": ""
}
] | [
{
"docid": "7b652e4fbaa5020d3bf456168dc4f2a9",
"score": "0.60827863",
"text": "def tock\n @minute += 1\n end",
"title": ""
},
{
"docid": "74a00dc631a4c2987d21459d24cde16e",
"score": "0.60440457",
"text": "def minutes; self * MINUTE; end",
"title": ""
},
{
"docid": "... |
949aec51d8511cfba5b3cc8e7ef96068 | Set all options to nil | [
{
"docid": "663541f02e5e50d33b057de280bfc0cc",
"score": "0.8290634",
"text": "def empty!\n self.class.options.each { |opt| send(\"#{opt}=\", nil) }\n end",
"title": ""
}
] | [
{
"docid": "9cdc8af27b3a7b1e77233c64f82f708d",
"score": "0.82169926",
"text": "def clear_options\n @options = nil\n end",
"title": ""
},
{
"docid": "9cdc8af27b3a7b1e77233c64f82f708d",
"score": "0.82169926",
"text": "def clear_options\n @options = nil\n end",
"titl... |
2c8641749642de4f4650d60a8bc97137 | Creates a filter object options is an array composed by conditions and other options arrays. | [
{
"docid": "6b07a2a55be1a9cddcfe4ba1c1dd2fd6",
"score": "0.0",
"text": "def initialize(options, columns, ns)\n @unescaped_options = options\n @options = escape_names(options, columns, ns)\n @affected_tables = get_affected_tables(options, columns)\n @columns = columns\n ... | [
{
"docid": "2b24b87fed9cbb231ab9f3b878743764",
"score": "0.7347908",
"text": "def filter_options\n @filter.options\n end",
"title": ""
},
{
"docid": "443c53a44544abdc3fae7f5e302ba387",
"score": "0.6968601",
"text": "def build_filters\n\n return unless configurable?\n... |
19945cb7d202ac26a38bd676db8f7361 | Routes either a mem_seg or an arithmetic command | [
{
"docid": "d77cf3edf16cf271389d3bf288db09be",
"score": "0.5487564",
"text": "def route(command)\n if command.count(\" \") == 2\n @code_writer.send(command.split(' ')[1], command.split(' '))\n else\n @code_writer.send(command)\n end\n end",
"title": ""
}
] | [
{
"docid": "41386dfc2758fda576842ce7a9f7fa9e",
"score": "0.53128946",
"text": "def term\n factor\n operations = ['*', '/']\n while (operations.any? { |op| @look == op })\n emit_ln 'MOVE D0, -(SP)'\n case @look\n when '*': multiply\n when '/': divide\n else expected('Mulop')\n end\n ... |
b6090e6f6e28463a3fc5f543a73c98c8 | IMG tag of options[:with] X options[:height] size with a point on it in the current value position (unless value is empty, of course). See Google/Yandex Maps Static API. | [
{
"docid": "3dfeeca469fe51f69685422f67a4a061",
"score": "0.7276588",
"text": "def img_tag(width, height, options = {})\n map_type = value['type']\n\n if value['latitude'].present? and value['longitude'].present?\n if map_type == MAP_TYPE_GOOGLE\n zoom_if_any = value['zoom'].present? ? ... | [
{
"docid": "8799b897a78984514b23e0322d815b9d",
"score": "0.6262954",
"text": "def to_diff_value(_options = {})\n demongoize_value!\n img_tag(64, 64, marker_size: :small)\n end",
"title": ""
},
{
"docid": "febe00413d0f78dff1d156cc9f6bc9a5",
"score": "0.62214226",
"text": "def i... |
a825219c100561426c7dc4cf6da2fc9b | Create or update a LBAppProfile If a LBAppProfile with the lbappprofileid is not already present, create a new LBAppProfile. If it already exists, update the LBAppProfile. This is a full replace. | [
{
"docid": "3cce22f07c734087a03127e90178398e",
"score": "0.6863476",
"text": "def update_lb_app_profile_0(lb_app_profile_id, lb_app_profile, opts = {})\n data, _status_code, _headers = update_lb_app_profile_0_with_http_info(lb_app_profile_id, lb_app_profile, opts)\n data\n end",
"title"... | [
{
"docid": "b1e87c976e0b5905144c5ad8180445e8",
"score": "0.7011015",
"text": "def update_lb_app_profile_with_http_info(lb_app_profile_id, lb_app_profile, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: PolicyNetworkingNetworkServicesLoadBalancingL... |
82f5b321468455cc42428e03c6acd0d9 | GET /refunds/1 GET /refunds/1.json | [
{
"docid": "eba8ef9faaaaae9174fd59bb962ff607",
"score": "0.7494874",
"text": "def show\n @refund = Refund.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @refund }\n end\n end",
"title": ""
}
] | [
{
"docid": "13d3bd8c917b43ada80e96ef7b17e43a",
"score": "0.7300918",
"text": "def refunds\n RefundRepository.new(api).all(token)\n end",
"title": ""
},
{
"docid": "6f688b4fdad7dd2096761817f440acac",
"score": "0.7189426",
"text": "def index\n\n respond_to do |format|\n ... |
d238dc9c3167fe5c237d4fc9500c5cca | Parse options, check arguments, then process the command | [
{
"docid": "0b79c100adb54a117d69bb0434e8c492",
"score": "0.73107946",
"text": "def run\n \n if parsed_options? && arguments_valid? \n \n puts \"Start at #{DateTime.now}\\n\\n\" if @options.verbose\n \n output_options if @options.verbose # [Optional]\n \n pro... | [
{
"docid": "0fccf662910376629e78056b56524246",
"score": "0.8012587",
"text": "def run\n if parsed_options? && arguments_valid? \n \n process_arguments \n process_command\n \n else\n output_usage\n end\n \n end",
"title": ""
},
{
"docid... |
f5cf704b6498fa2e5884eb46b27f13da | This is an undocumented API function. Refer to the 'xml_updatesubscriber.php' attachment on this page: | [
{
"docid": "b0fc559c9faf13f9db2e4fd14fa5c6ac",
"score": "0.6193558",
"text": "def update_subscriber_custom_field(subscriber_id, field_id, data)\n xml = %Q[\n <xmlrequest>\n <username>#{@user}</username>\n <usertoken>#{@token}</usertoken>\n <requesttype>subscribers<... | [
{
"docid": "ec29bab5d68b168838226d516686a4c5",
"score": "0.6178075",
"text": "def update_subscription(old_email, new_email, merge_vars={})\n # Update the existing member details.\n api.lists(@campaignable_list_id).members(subscriber_hash(old_email)).update(body: {\n ... |
f7521e55d55bbabd3d7e604c8093c30d | DELETE /rackprices/1 DELETE /rackprices/1.json | [
{
"docid": "c12d1ae42d08d3f8e2470a99060cd84c",
"score": "0.77345306",
"text": "def destroy\n @rackprice = Rackprice.find(params[:id])\n @rackprice.destroy\n\n respond_to do |format|\n format.html { redirect_to rackprices_url }\n format.json { head :no_content }\n end\n end",
"... | [
{
"docid": "b1a17c1ee1af05c79fe156622df44818",
"score": "0.71815133",
"text": "def delete(path)\n begin\n response = client[path].delete :accept => 'application/json'\n rescue Exception => e\n puts e.inspect\n end\n end",
"title": ""
},
{
"docid": ... |
ff111aa24581aad2aeeca60867349fe1 | To show thread messages and origin message | [
{
"docid": "664efc2d62eb87f20a237e9d8d556161",
"score": "0.0",
"text": "def new\n dirthread = TDirmessage.find_by(dirmsg_id: params[:dirthread_id])\n directthread dirthread\n @dirmsg_original = TDirmessage.select(\"m_users.user_name,t_dirmessages.count,t_dirmessages.dirmsg_id,t_dirmessages.dir_... | [
{
"docid": "64081916ebb9a72f339dc31f888eacf6",
"score": "0.6144304",
"text": "def show\n commontator_thread_show(@forum)\n end",
"title": ""
},
{
"docid": "e655dade82c625c8c0b80a8049b23f36",
"score": "0.6058604",
"text": "def info_display\n @queue << \"i d\"\n end",
"... |
48414a32de8befa76c5264f697be7494 | Return the first word of a phrase. Easily done by splitting phrase by spaces into an array and grabbing the first item of the array | [
{
"docid": "68967290b8c35f5681979c8612dff1f2",
"score": "0.90400153",
"text": "def first_word(phrase)\n\tphrase.split.first\nend",
"title": ""
}
] | [
{
"docid": "6206c130d58d3157f4ce87821f7f8a57",
"score": "0.9124635",
"text": "def first_word(phrase)\n\t\t\tphrase_array = phrase.split(' ')\n\t\t\tphrase_array[0]\n\t\tend",
"title": ""
},
{
"docid": "8478576f9ed7d4dfb3c45aeaf8d104f6",
"score": "0.9087459",
"text": "def first_word(p... |
56e5531d0f8d74628147783db67f048f | Direction, the direction from this vertex to param: v | [
{
"docid": "4e189bd53468a4a8d65916fdf3f6db04",
"score": "0.63619614",
"text": "def dir(v)\n if @x == v.x\n return 8 if v.y > @y # down\n return 2 # up\n elsif @y == v.y\n return 6 if v.x > @x # right\n return 4 # left\n end\n end",
"title": ""
... | [
{
"docid": "641f2f6e8194c431ba3d7402b82ac047",
"score": "0.7108339",
"text": "def direction\n self.vector.normalize\n end",
"title": ""
},
{
"docid": "93150d12df7ee9ac9004c01334a6c1ba",
"score": "0.7004698",
"text": "def direction\n @direction ||= Vector.new(p2.x - p1.x, p... |
8b9cc20cb5d4462a329e6fd6fabfc3ab | Deletes a Specific Item | [
{
"docid": "2cf1b629339e3a2407f5663c8f23d4a3",
"score": "0.73516256",
"text": "def destroy\n @item = Item.find(params[:id])\n @item.destroy\n redirect_to :action => 'index'\n end",
"title": ""
}
] | [
{
"docid": "d496e8714709f1e014ad13f7504c98c9",
"score": "0.8683296",
"text": "def delete(item); end",
"title": ""
},
{
"docid": "d496e8714709f1e014ad13f7504c98c9",
"score": "0.8683296",
"text": "def delete(item); end",
"title": ""
},
{
"docid": "ca372d4b88c569db9e73213d15... |
a290ce1c140872bee58962c346b8bd7c | GET couples/:id/edit get couple profile edit form | [
{
"docid": "42d039cd0e1156df051093a70a19f57c",
"score": "0.7747505",
"text": "def edit\n\t\t@id = (params[:id])\n\t\t@couple = Couple.find(params[:id])\n\tend",
"title": ""
}
] | [
{
"docid": "06b1ac54b422f9d09880c1363566ff4b",
"score": "0.7169971",
"text": "def edit\n @profile = Profile.find(params[:id])\n end",
"title": ""
},
{
"docid": "06b1ac54b422f9d09880c1363566ff4b",
"score": "0.7169971",
"text": "def edit\n @profile = Profile.find(params[:id])\n ... |
18dd876041cb66de18f2443dbbddb03c | Sets the party leader. | [
{
"docid": "5afeed2c0c7e4e7d7a1766b5b7cf2987",
"score": "0.67568165",
"text": "def leader=(character)\n unless character.is_a?(Character)\n raise ArgumentError, '`character` must be an instance of Character'\n end\n\n unless @characters.include?(character)\n raise CharacterNotFound, '... | [
{
"docid": "7aa004c0f59eeb92f7d581386980db54",
"score": "0.7196693",
"text": "def set_leader\n @leader = Leader.find(params[:id])\n end",
"title": ""
},
{
"docid": "7aa004c0f59eeb92f7d581386980db54",
"score": "0.7196693",
"text": "def set_leader\n @leader = Leader.find(p... |
0c9717b6f9c1cbdf4d22c5a4fa489acc | Get all planned course records | [
{
"docid": "d2daabb391b8f9a0bf6c75c860e5a3a7",
"score": "0.0",
"text": "def get_planned_courses_with_http_info(course_id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: PlannedCoursesApi.get_planned_courses ...'\n end\n # verify the req... | [
{
"docid": "afee35be3840f70da7b4a06f6001d25a",
"score": "0.65644133",
"text": "def list_course\n @courses = Course.all()\n end",
"title": ""
},
{
"docid": "2805a22bab3d94dcff5002150caf5241",
"score": "0.6561314",
"text": "def all_courses\n # Anyone can get data for nonpriv... |
48840fd074abf915e00771406d71cf50 | POST /user_ids POST /user_ids.json | [
{
"docid": "1c6a01c801aed53b104e818a0f8d8d5d",
"score": "0.5354177",
"text": "def create\n @user_id = UserId.new(user_id_params)\n\n respond_to do |format|\n if @user_id.save\n format.html { redirect_to @user_id, notice: 'User was successfully created.' }\n format.json { render ... | [
{
"docid": "7620672a36727012402ec0a6074a697a",
"score": "0.6710577",
"text": "def user_ids=(e) #setter\n write_attribute :user_ids, (e.collect {|f| f.to_i}).to_json\n end",
"title": ""
},
{
"docid": "f73e19b4b0cb672577eaf05b2f291fb1",
"score": "0.65220046",
"text": "def user_... |
91c082e858afb51cf2e27e82fff6c2b5 | GET /basic_publications/1 GET /basic_publications/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "33112e3208f59fc99338917c37f29c1e",
"score": "0.7405718",
"text": "def index\n @basic_publications = BasicPublication.all\n end",
"title": ""
},
{
"docid": "52a2875fc1d5d49e570b12f2ac7782aa",
"score": "0.73090917",
"text": "def index\n @publications = Publication.al... |
616e0e489cb18c689ff0de83c65fc1de | Matches any number of any character that is not in +value+. | [
{
"docid": "f6641cf936cd11ecb3908f8903cd8a0a",
"score": "0.7488155",
"text": "def anything_but(value)\n append \"(?:[^#{sanitize value}]*)\"\n end",
"title": ""
}
] | [
{
"docid": "764e4f05bef8542a23990abf021c58ba",
"score": "0.62060136",
"text": "def assertNotMatchTest pattern, value\n assertNotMatch pattern, value\n end",
"title": ""
},
{
"docid": "3510633af7d2549c5c79031a877387c2",
"score": "0.60086083",
"text": "def illegal(string)\n st... |
b001c44040c6c86fc43acca5e35f33e8 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Calculate Contents Height ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | [
{
"docid": "727b92a7c71c89d765cfeec4e9e7c6aa",
"score": "0.7592347",
"text": "def calc_contents_height\n @q_contents_height = 0\n @layout.each { |dt| @q_contents_height += data_height(dt) } if @quest\n end",
"title": ""
}
] | [
{
"docid": "2542b977fc23d567a77d8b3dba8fff10",
"score": "0.8067072",
"text": "def contents_height\n Graphics.height\n end",
"title": ""
},
{
"docid": "7ad91ded9133ebae3d1a6c5e9fb6caee",
"score": "0.80559254",
"text": "def contents_height\n height - standard_padding * 2\n end"... |
30e5e7a33da1a2287fbf1acf7a5c60c2 | Get customers for Company | [
{
"docid": "d07244ae385381689e48c40d03b208a0",
"score": "0.69982255",
"text": "def get_customers()\n customers = Customer.where(\"company_id =? and tipo <> ?\",\"1\",\"3\").order(:name)\n \n return customers\n end",
"title": ""
}
] | [
{
"docid": "b2078442eb6b43e2b62b97cb9ddef835",
"score": "0.81923497",
"text": "def get_customers()\n customers = Customer.find(:all, :conditions => {:company_id => self.id})\n\n return customers\n end",
"title": ""
},
{
"docid": "f2c2678caa4fbbb7202733ed8074c7ec",
"score": "0.8042... |
46b9307ca7d0f36332e4d5dfb07f1b85 | HPP redirect url builder | [
{
"docid": "b136b916a61dc24e1fd34232aa8f6ff3",
"score": "0.0",
"text": "def build_form_descriptor(account, invoice, brand_code, user, reason, comment, options)\n hpp = KillBillClient::Model::HostedPaymentPage.new\n hpp.form_fields = []\n\n {\n :amount => 10,\n :currency => 'USD',\n :br... | [
{
"docid": "bd32ccede5b0d0f4ea0406219ef37520",
"score": "0.68199867",
"text": "def url_redirect\n \turl = self.url\n \t(url.include?(\"http://\") || url.include?(\"https://\") ? url : \"http://\"+url)\n end",
"title": ""
},
{
"docid": "8224ffb21034f5589729e9b7479ab8df",
"score": "0.66... |
a2099a77c85e91272ae2f9e35b937953 | Only allow a trusted parameter "white list" through. | [
{
"docid": "ad04f13feb4948cfc6d72fc8281ff7c8",
"score": "0.0",
"text": "def helpdesk_params\n params.require(:helpdesk).permit(:name, :phone_number)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7943618",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "f6060519cb0c56a439976f0c978690db",
"score": "0.69572574",
"text": "def permitted_params\n params.permit!\n end",
"title"... |
d5f01443090872d18b56aa0614092f0f | Initializes the waiter thread used for replication pauses and processing the process TERM signal. | [
{
"docid": "25f0f7ad7c6e5a2ffc8722084b82387b",
"score": "0.7809368",
"text": "def init_waiter\n @termination_mutex = Monitor.new\n @termination_mutex.lock\n @waiter_thread ||= Thread.new {@termination_mutex.lock; self.termination_requested = true}\n %w(TERM INT).each do |signal|\n ... | [
{
"docid": "66fa92f258521d739542b675b3560f4a",
"score": "0.6101231",
"text": "def init_term_signal\n trap :TERM do\n puts 'Exiting process gracefully!'\n stop\n end\n end",
"title": ""
},
{
"docid": "5fb85b4981cd6b3c55e7b42639b5b59e",
"score": "0.5860... |
afe3d8ccf5e2856709333bc7786807c6 | return auth token once user is authenticated | [
{
"docid": "e19ac8913343a8920953d2807ee12a1d",
"score": "0.0",
"text": "def authenticate\n\t\tauth_token = AuthenticateUser.new(auth_params[:email], auth_params[:password]).call\n\t\tjson_response(auth_token: auth_token)\n\tend",
"title": ""
}
] | [
{
"docid": "be7f0848da811d8593cdd0df66f18b5a",
"score": "0.8222713",
"text": "def auth_token\n generate_auth_token if @auth_token.nil?\n return @auth_token\n end",
"title": ""
},
{
"docid": "be7f0848da811d8593cdd0df66f18b5a",
"score": "0.8222713",
"text": "def auth_token... |
f0cf39680adb86e34303ce21966769c9 | 3. Create a method to see if a particular item (string) is in the zombie_apocalypse_supplies. Do not use any special builtin methods. For instance: are boots in your list of supplies? | [
{
"docid": "b5a22fff6b2548b055690cd0cd34e581",
"score": "0.0",
"text": "def exist(string,array)\n array.each {|item|\n if string == item\n return true\n end\n}\n return false\nend",
"title": ""
}
] | [
{
"docid": "358edc845db0bb6d5bd8c721144ce6e2",
"score": "0.7966611",
"text": "def on_list(search_item)\n\n zombie_apocalypse_supplies = [\"hatchet\", \"rations\", \"water jug\", \"binoculars\",\n \"shotgun\", \"compass\", \"CB radio\", \"batteries\"]\n item_included = fals... |
d18c6e915c648849db2c34900dba6563 | Returns all four corners in this Rectangle. | [
{
"docid": "aed4c7648eab70e3df8135bbd321f5aa",
"score": "0.49015895",
"text": "def points\n [top_left, top_right, bottom_left, bottom_right]\n end",
"title": ""
}
] | [
{
"docid": "46b3e711ebecab492ca294f2eec71ac8",
"score": "0.7832631",
"text": "def corners\n [lower_left, lower_right, upper_right, upper_left]\n end",
"title": ""
},
{
"docid": "d368fad463ead3d68cddee35910ee0f3",
"score": "0.7140274",
"text": "def corners\n unless @c... |
bc22846f728d2a38093b362e47c3433f | Override in your host app models that don't need to bust this model's cache key | [
{
"docid": "68a202e778879f3ac1ed3b29f2fac3ea",
"score": "0.0",
"text": "def expire_cache_key?\n true\n end",
"title": ""
}
] | [
{
"docid": "3a59869e0be2e23e82ffce92a9930b7c",
"score": "0.7009611",
"text": "def cache_key\n case\n when !persisted?\n \"#{self.class.model_name.cache_key}/new\"\n else\n \"#{self.class.model_name.cache_key}/#{id}-#{self.cache_version_key}\"\n end\n end",
"title": ""
},
{... |
9d2d928672945e49acb79f9fb11cca97 | Returns true if this object hasn't been saved yet that is, a record for the object doesn't yet exist in the data store. | [
{
"docid": "93838a93455fda56783897105b49e1cb",
"score": "0.6641167",
"text": "def new_record?\n false\n end",
"title": ""
}
] | [
{
"docid": "cdf77c0080365a5e54ea3054e00cf867",
"score": "0.7433759",
"text": "def new_record?\n !_persisted_obj\n end",
"title": ""
},
{
"docid": "9c96774cfbf15b187fb22de933e5d743",
"score": "0.7268497",
"text": "def new_record?\n @data.nil?\n end",
"title": ""
... |