query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
e5c11a4216ab3d27ae92bdf0ff9d92a6 | helper method for course_table | [
{
"docid": "b6043e4fe104e8adfd3fcc121ccfc698",
"score": "0.0",
"text": "def update_max(max_effort, person_result)\n max_effort.each_index {|i| max_effort[i] = person_result[i] if person_result[i] > max_effort[i]}\n end",
"title": ""
}
] | [
{
"docid": "bedefbf18c04856e1aee84754aaf40d7",
"score": "0.66554946",
"text": "def set_course_table\n @course_table = CourseTable.find(params[:id])\n end",
"title": ""
},
{
"docid": "390e0d2ec0f2bb589f7e5f42525a38f7",
"score": "0.637087",
"text": "def index\n @courses = []... |
44c470cafddcf9a9cfd30bcd23458e81 | Check if the coordinates are within Tabletop bounds. | [
{
"docid": "2d80f660d1096eb4dab3743acb468972",
"score": "0.66026884",
"text": "def outside_of_bounds(coordinates)\n return true if coordinates.x_coordinate >= @width\n\n return true if coordinates.y_coordinate >= @height\n\n false\n end",
"title": ""
}
] | [
{
"docid": "19788b3447e6eec63d72e7bd7f8a35ae",
"score": "0.7430768",
"text": "def xy_within_table?(x_pos, y_pos)\n (0...@table_width).include?(x_pos) && (0...@table_height).include?(y_pos)\n end",
"title": ""
},
{
"docid": "2ba6b375cf0ee6c91f05c06ff8c5feae",
"score": "0.7295152",
... |
ebe6b4829bb6c575b3968c1deeaf26b8 | DELETE /stages/1 DELETE /stages/1.json | [
{
"docid": "9894a4ccc4d9a29dbb7a2a793d11e0d5",
"score": "0.71910405",
"text": "def destroy\n @stage.destroy\n render json: {message: 'Etapa Excluida'}, status: :ok\n end",
"title": ""
}
] | [
{
"docid": "8d850d26060e6459940dc259c3f113bd",
"score": "0.7768929",
"text": "def destroy\n @stage.destroy\n respond_to do |format|\n format.html { redirect_to stages_url }\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
"docid": "8102fb31b4fdb663665ff46... |
02d8bb686731d7195facd7ef080802d4 | Create Event Create an event. | [
{
"docid": "91211853f2bf7b39d7a4079dfe736396",
"score": "0.0",
"text": "def create_event_0(id, organizer_contact_id, start_time, end_time, title, attendees, opts = {})\n data, _status_code, _headers = create_event_0_with_http_info(id, organizer_contact_id, start_time, end_time, title, attendees, op... | [
{
"docid": "f29ca913531c4fff96594a2be64c2524",
"score": "0.8410341",
"text": "def create_event\n ev = Event.new\n ev.srv = @srv\n ev.feed = @feed\n ev\n end",
"title": ""
},
{
"docid": "1fe94d417cbe03a32df57ca964323ebc",
"score": "0.8143701",
"text": "def creat... |
dcfd59df98e427e6c4bea4268189efb1 | PATCH/PUT /tablets/1 PATCH/PUT /tablets/1.json | [
{
"docid": "9e3acaecee516598573a8c489e584c11",
"score": "0.0",
"text": "def update\n respond_to do |format|\n if @tablet.update(tablet_params)\n format.html { redirect_to @tablet, notice: 'Tablet was successfully updated.' }\n format.json { render :show, status: :ok, location: @tab... | [
{
"docid": "931858758893fcf8bcb0cb8313ff4ea5",
"score": "0.6631525",
"text": "def update\n @table = Table.find(params[:id])\n\n respond_to do |format|\n if @table.update_attributes(params[:table].permit(:name, :notes, :x, :y, :table_type, :guest_ids => []))\n format.html { redirect_to ... |
2070af402c75406b795c43fa97f0a419 | GET /transacciones GET /transacciones.json | [
{
"docid": "d35c708c15b788f36383a8b7ce83089c",
"score": "0.0",
"text": "def index\n end",
"title": ""
}
] | [
{
"docid": "c583eca54bfe3dbffb6cd770b82cf79d",
"score": "0.735012",
"text": "def index\n @transacciones = Transaccion.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @transacciones }\n end\n end",
"title": ""
},
{
"docid": "f973f... |
dee24557a499d80b67001973f6751dea | save time for item page | [
{
"docid": "50614354d96af947eb327dde41a9764e",
"score": "0.5446673",
"text": "def acknowledge_item_properties!\n self.open_item_page_time = Time.now\n end",
"title": ""
}
] | [
{
"docid": "36d563b4461798385d703d4773e7c97e",
"score": "0.62111086",
"text": "def initialize(item_description)\n @description = item_description\n @completed_status = false\n @created_time = Time.now.strftime(\"%H:%M\") #Time now\n @due_time = (Time.now + 18000).strftime(\"%H:%M... |
bf4cdb5679a7d8da602409bc83326cf3 | Funcion que muestra una sede | [
{
"docid": "7eb1b852ab1a91800f7336661dc26626",
"score": "0.0",
"text": "def show\n json_response(@project_state)\n end",
"title": ""
}
] | [
{
"docid": "ad244bd0c45d5d9274f7612fa6fee986",
"score": "0.7052367",
"text": "def suivre; end",
"title": ""
},
{
"docid": "65ffca17e416f77c52ce148aeafbd826",
"score": "0.647699",
"text": "def schubert; end",
"title": ""
},
{
"docid": "07f4aba74008200310213b63a5f3de3f",
... |
0f8884739ad56afb813a6dd18b6482e3 | Account Deletion Allows for the deletion of an account. The account will marked for deletion and subsequent purging. No further transactions will be alowed to be processed or actioned against this account. | [
{
"docid": "8b72c780ac862bc06888e700e3964f6d",
"score": "0.0",
"text": "def account_delete_request_with_http_info(accountid, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: CardHolderAccountApi.account_delete_request ...'\n end\n # verif... | [
{
"docid": "85f75fa87a735d6adea643b100ac7d02",
"score": "0.7669972",
"text": "def delete_account\n @connection.request({\n :method => 'DELETE'\n })\n end",
"title": ""
},
{
"docid": "3673f5b4865916f6278654b20718ce9e",
"score": "0.74902374",
"text":... |
408774a675a2ede23db800b93f596920 | Construct a class declaration. | [
{
"docid": "b7299bef68a066613bbd4edc0cb5d86c",
"score": "0.77882767",
"text": "def classDeclaration\n c = ClassDeclarationT.new\n expect(Tokens::CLASS)\n nextToken\n expect(Tokens::IDENT)\n c.name = getTokenData\n nextToken\n\n if accept(Tokens::LPAREN)\n... | [
{
"docid": "c593cdf8eea0a8ed20657d0c96ff0728",
"score": "0.7684596",
"text": "def class_declaration\n%(Ext.define('#{class_name}', #{properties_as_string});)\n end",
"title": ""
},
{
"docid": "c593cdf8eea0a8ed20657d0c96ff0728",
"score": "0.7684596",
"text": "def class_declaratio... |
0ef2f179bff210f3952e87e71b1af8cd | Initialize a verification_detail resource instance | [
{
"docid": "9089648d29ad78f3fd7193b3548419fa",
"score": "0.0",
"text": "def initialize(object, response = nil)\n @object = object\n\n @address_line1 = object['address_line1']\n @address_line2 = object['address_line2']\n @address_line3 = object['address_line3']\n @city ... | [
{
"docid": "ff3240f3cd6929ae01c9a207dc216568",
"score": "0.6778035",
"text": "def verification_details\n @verification_details ||= Services::VerificationDetailsService.new(@api_service)\n end",
"title": ""
},
{
"docid": "cfb2717be0f0374f6b6bd7d54fac83c8",
"score": "0.6447598",
... |
7ee44fdca0b04c2e5e01e422470afcbe | set_character Sets a single character at a particular position on the display. Note that the display uses a Japanese display driver, so the following quirks / features are present: "\" is displayed as the yen character "~" is displayed as a right arrow delete (or rubout) is displayed as a left arrow Row 0 is the top ro... | [
{
"docid": "327fded32647edd83ace79a8e962d9b0",
"score": "0.79328585",
"text": "def set_character(row:, column:, character:)\n begin\n # It's a Japanese display, seemingly using Windows-31J\n #\n # Note that \\ displays as a yen sign, ~ displays as a right arrow, DEL displays as... | [
{
"docid": "96963a389eb7f759a5c2801fd9dd3104",
"score": "0.65111685",
"text": "def set_char at , char\n raise \"char not fixnum #{char}\" unless char.kind_of? Fixnum\n index = range_correct_index(at)\n internal_object_set( index + 1 , char )\n end",
"title": ""
},
{
"docid... |
73550ea8910a6a6549f12e93c6532142 | GET /stories GET /stories.json | [
{
"docid": "7a3611b496a516447dbc17ffc7f6d15e",
"score": "0.0",
"text": "def index\n @stories = Story.where(book_id: @book.id).order(:position)\n end",
"title": ""
}
] | [
{
"docid": "d630364f3ee942ebb865792b16d07ae9",
"score": "0.7912268",
"text": "def index\n @stories = Story.all\n render json: @stories, root: false\n end",
"title": ""
},
{
"docid": "97b9e7f293464b35723e23ddbba0fbaf",
"score": "0.7652356",
"text": "def index\n @stories = St... |
7bd5c908bbc26ebf8d7bac8dd63b085f | check if a user is logged in; if not, save the controller and action they were trying to reach an redirect to the login page | [
{
"docid": "d5a7f7472c6c31c47cd50dcf85c15653",
"score": "0.0",
"text": "def check_authentication\n # try to authenticate with basic auth first\n begin\n if user = authenticate_with_http_basic { |user, pass| if user && pass ; User.authenticate(user, pass) || :bad_password ; else nil ; end }\n ... | [
{
"docid": "d57856989d86182f874ca68a58142ee9",
"score": "0.7626366",
"text": "def check_authentication\n unless session[:user]\n session[:intended_action] = action_name\n session[:intended_controller] = controller_name \n redirect_to :action => \"signin\"\n end\n end",
"ti... |
3b8ec23bfc0e9afbc369eae03748c647 | Return a sorted list of all command names (as strings). | [
{
"docid": "4c172033e969c0d8bd3385039e18dac0",
"score": "0.88914603",
"text": "def command_names\n @commands.keys.collect {|key| key.to_s}.sort\n end",
"title": ""
}
] | [
{
"docid": "2aba3733efd0ca7aac697b4728b76ac2",
"score": "0.8873526",
"text": "def command_names\n @commands.keys.collect {|key| key.to_s}.sort\n end",
"title": ""
},
{
"docid": "2aba3733efd0ca7aac697b4728b76ac2",
"score": "0.8873526",
"text": "def command_names\n @comman... |
bdf8bc0feb7913502f4575eb6d65171e | Returns all repos as pythonlike generators | [
{
"docid": "a508e71ce06c71e80f9c61a96701df7f",
"score": "0.81309724",
"text": "def all_repos_as_generator\n Enumerator.new do |enum|\n each do |repo|\n enum.yield repo\n end\n end\n end",
"title": ""
}
] | [
{
"docid": "a32da4f8cb26848728146969316a45e2",
"score": "0.6886352",
"text": "def repos\n pry(Git::Multi.repositories)\nend",
"title": ""
},
{
"docid": "46f062254bb962e2ca9bef565414e1eb",
"score": "0.6706091",
"text": "def all\n return @raw_repos unless @raw_repos.empty?\n ... |
e8297cfa7a8b1fae22546635097fefcb | Delete Group Ends Show Group Startss n | [
{
"docid": "8c71facfc57a76ee70d0df07347b65cb",
"score": "0.0",
"text": "def showgroup\n if (params[:group][:id]==\"\" and params[:group][:GRP_GroupName]==\"\")\n session[:msg]=\"true\"\n end\n if params[:group][:id]==\"\"\n session[:gid]=nil\n else\n session[:gid... | [
{
"docid": "7b1343f35a335e6903c0ac5236bece40",
"score": "0.6438477",
"text": "def delete_group\n super\n end",
"title": ""
},
{
"docid": "428add096f58d417461a2461fbd6519a",
"score": "0.6072154",
"text": "def remove_from_start\n end",
"title": ""
},
{
"docid": "1e... |
6d365ecaa918846d31e102da1133b442 | I am not sure if I am generating UID or UUID, or is there even a difference between the two? | [
{
"docid": "f54c068a71c82dd8249fe1a2f19452a1",
"score": "0.80149996",
"text": "def generate_uid\n begin\n # .uuid or .hex? both seem to do the same job\n self.uid = SecureRandom.uuid.gsub(/[-]/, '')\n end while self.class.exists?(uid: self.uid)\n end",
"title": ""
}
] | [
{
"docid": "1934fcadd1554c34cb9c94bb4470b426",
"score": "0.77182746",
"text": "def random_uid\n SecureRandom.hex 5\n end",
"title": ""
},
{
"docid": "f349e96e8f70945e1abaac13afacd79d",
"score": "0.76392674",
"text": "def gen_uid\n \"#{rand(100000)}-#{Time.now.to_i}-#{rand(10... |
6c67f935b062ff14abcb6773061ec847 | Devuelve una lista con todos los posibles movimientos de la pieza. | [
{
"docid": "4bfd0fecec8492fb13bfb0b2c169a354",
"score": "0.6533075",
"text": "def posiblesMovimientos\n raise \"Método sin implementación; las clases \" +\n \"hijas deben implementarlo.\"\n end",
"title": ""
}
] | [
{
"docid": "9dd1b38af8c48b78ed569b4d617d95f5",
"score": "0.679849",
"text": "def potential_moves\n pos_x = @position.first\n pos_y = @position.last\n positions = []\n (0...pos_x).each do |x|\n positions << [x, pos_y]\n end\n (pos_x...8).each do |x|\n ... |
8b862fe0d89ca5151f9b0030bbe27bb1 | PUT req to lh:3/ shows user details page | [
{
"docid": "997c84f0529e93010df93e2398d0a4e3",
"score": "0.0",
"text": "def create\n p params\n @user = User.create(user_params)\n redirect_to @user\n end",
"title": ""
}
] | [
{
"docid": "9c75e4ef7a4705121a31af8edb03f298",
"score": "0.692226",
"text": "def edit\n @page_title = 'Edit user'\n @user = User.find(params[:id])\n end",
"title": ""
},
{
"docid": "a6c01447e46fcfe930cb4df3211c5677",
"score": "0.68883044",
"text": "def updateUser\n option... |
e8dc82e30c9f54436c218018dcf70b03 | Sets the given comment on the given index | [
{
"docid": "adec8cc67414b9a7bf18b947a337dced",
"score": "0.79244083",
"text": "def set_index_comment(index_name, comment)\n sql = \"COMMENT ON INDEX #{quote_string(index_name)} IS $$#{comment}$$;\"\n execute sql\n end",
"title": ""
}
] | [
{
"docid": "bc78d4db8f30fcc9b53cb069ad8f54de",
"score": "0.7969748",
"text": "def set_index_comment(index_name, comment)\n sql = \"COMMENT ON INDEX #{quote_string(index_name)} IS $$#{comment}$$;\"\n execute sql\n end",
"title": ""
},
{
"docid": "b7dfd078d862f7c36d9d23ea202... |
c132a214de378d11947c4eed37a5847b | set jsonified value to redis and raise alerts | [
{
"docid": "7106a8a712ab7468f786cd2bcbda363b",
"score": "0.68652284",
"text": "def jsonified_set(key, value, options={}, custom_options={strict_key_check: true})\n value.select!{|k,v| PERMITTED_KEYS.include? k.to_s} if custom_options[:strict_key_check]\n\n # set jsonified value to redis\n ... | [
{
"docid": "ec3229ac4f7d7cae9f3c5d6197abd2a4",
"score": "0.6850045",
"text": "def json_set(key, value)\n return false unless value.is_a?Hash\n redis.set(key, value.to_json)\n end",
"title": ""
},
{
"docid": "7977e14fa6c638f1b3dc9b842c7b944e",
"score": "0.67245424",
"text... |
2ce38d98698039fd7dee7ef3ffe23947 | Copy of the scaffold layout and css file. | [
{
"docid": "c2aad8ca599662a3c39945820ed671fa",
"score": "0.79506934",
"text": "def copy_layout_and_stylesheet_files\n template File.join(File.dirname(LocalizedDeviseViewsGenerator.generator_path),\n 'erb', 'scaffold', filename_with_extensions(:layout)),\n File.join('app', 'views', 'layouts'... | [
{
"docid": "15e4b77b027e3666cf938b7d7e81bcbc",
"score": "0.82795143",
"text": "def copy_stylesheet\n copy_file \"scaffold.css\", \"app/assets/stylesheets/scaffold.css\"\n end",
"title": ""
},
{
"docid": "72d37f937b3f42f1edcf63f7351eb4d3",
"score": "0.7720993",
"text": "de... |
4ceb7e4f3efc44e7e82e35441cb7a416 | PUT /steppies/1 PUT /steppies/1.json | [
{
"docid": "498bf8e347a5699a7eee594960cf653b",
"score": "0.5477012",
"text": "def update\n @steppy = Steppy.find(params[:id])\n\n respond_to do |format|\n if @steppy.update_attributes(params[:steppy])\n format.html { redirect_to @steppy, notice: 'Steppy Was Successfully Updated.' }\n ... | [
{
"docid": "b2d5fc83a907f25e5176864fa6beb3d0",
"score": "0.6294051",
"text": "def put_rest(path, json) \n run_request(:PUT, create_url(path), json)\n end",
"title": ""
},
{
"docid": "2572fb900123dab962d92dfd5cd31505",
"score": "0.6283438",
"text": "def update\n s... |
6c0d24b233ddfcded5159872fc6aff91 | DELETE /equipment_groups/1 DELETE /equipment_groups/1.json | [
{
"docid": "074f1124303eba879f8f60053c87514e",
"score": "0.790859",
"text": "def destroy\n the_name = @equipment_group.name\n @equipment_group.destroy\n respond_to do |format|\n format.html { redirect_to equipment_groups_url, status: 303, notice: t('.delete_ok', item: the_name) }\n fo... | [
{
"docid": "1494c2929fb5e62935f15abbfc9f0ff6",
"score": "0.73823303",
"text": "def destroy\n @item_group = ItemGroup.find(params[:id])\n @item_group.destroy\n\n respond_to do |format|\n format.html { redirect_to item_groups_url }\n format.json { head :no_content }\n end\n end",
... |
e8c8d63acee3160006bc8f8f1b8108d2 | Sets a global parameter which is kept in memory until the server is restarted. | [
{
"docid": "6c47cba958fe4e1024807f816eeae1e0",
"score": "0.65556145",
"text": "def putGlobal(key, value)\n if !@@INITIALIZED\n init(false)\n end\n @@SETTINGS[key] = value\n end",
"title": ""
}
] | [
{
"docid": "47fe2781280769be2240cfda30306520",
"score": "0.7282441",
"text": "def global_var=(var)\n $global_var = var\n end",
"title": ""
},
{
"docid": "ed6af97b47d44c8a498682f2409e4fe9",
"score": "0.7260582",
"text": "def global_var=(var)\n $global_var = var\nend",
"title"... |
147209bfb477ee263477597af861ac76 | Dump info of method symbol | [
{
"docid": "dc06965ba8923eb6350400e09d816b03",
"score": "0.77832055",
"text": "def dump_method(method_symbol, clz = nil, is_class_method = false)\n if clz.nil?\n method_variable = method(method_symbol)\n else\n if is_class_method\n method_variable = clz.method(method_symbol)\n else\n ... | [
{
"docid": "a2799db06a4f64c02ec56f775699c0a8",
"score": "0.7222803",
"text": "def inspect\r\n @symbol.inspect\r\n end",
"title": ""
},
{
"docid": "251c45fdc731d4a4731cfd648226acf7",
"score": "0.71284205",
"text": "def display_method_info\n end",
"title": ""
},
{
... |
8aafd416d3fc7f73ce1b139f5f78bceb | DELETE /admins/news/1 DELETE /admins/news/1.json | [
{
"docid": "2edf97f25c5766aba30a3bf1b58f56fb",
"score": "0.7794584",
"text": "def destroy\n @admins_news.destroy\n respond_to do |format|\n format.html { redirect_to admins_news_index_url }\n format.json { head :no_content }\n end\n end",
"title": ""
}
] | [
{
"docid": "67ff4e47c2f7f70e4e554f0b8a7318f0",
"score": "0.7708378",
"text": "def destroy\n @news.destroy\n respond_to do |format|\n format.html { redirect_to admin_news_index_path }\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
"docid": "dea234732cfbf... |
7ac04ebb6cd413dc69a8f1a01f7a5a41 | setup_connection: Setup a new Net::HTTP connection and assigns it to the | [
{
"docid": "1f3ceca9db63db0e7b92e4a93f4aba8a",
"score": "0.7098572",
"text": "def setup_connection\n # Incase a proxy is desired.\n connection = Net::HTTP::Proxy @config[:proxy_addess], @config[:proxy_port],\n @config[:proxy_user], @config[:proxy_address]\n\n # Create a new connect... | [
{
"docid": "66b55d2545de1167668b22170231f61d",
"score": "0.79777336",
"text": "def setup_conn\n\n ## Setup connection through the @conn instance variable and proxy if\n ## if given.\n @conn = Net::HTTP.new(@params[:addr], @params[:port],\n @params[:proxy_addr], @params[:pro... |
d75aff20578551887dcbbeaf25b07c65 | TODO: write two methods: borrower_rating and loaner_rating, which averages the overall ratings received by an user Write tests for said methods | [
{
"docid": "cb5f214f4b440df52782b664d555e68a",
"score": "0.0",
"text": "def name\n \"#{first_name} #{last_name}\"\n end",
"title": ""
}
] | [
{
"docid": "fd25686ec1bbfe673b464845e491c212",
"score": "0.7694639",
"text": "def overall_rating\n # When it is a review of a Worker\n if communication && skills && work_ethic && recommended\n return ((communication + skills + work_ethic + recommended)/4.0).round\n # When it is a reivew of... |
eaed1e6770d108cfd6532ba4a200ec99 | PATCH/PUT /logincms/1 PATCH/PUT /logincms/1.json | [
{
"docid": "a94786d67694c13ee602953cb7c91ab1",
"score": "0.6159547",
"text": "def update\n respond_to do |format|\n if @logincm.update(logincm_params)\n format.html { redirect_to @logincm, notice: 'Logincm was successfully updated.' }\n format.json { render :show, status: :ok, loca... | [
{
"docid": "121a35e079a78a4c5ef08f767681a19d",
"score": "0.6281074",
"text": "def update_current_logged_in_users_password(args = {}) \n put(\"/users.json/current/password\", args)\nend",
"title": ""
},
{
"docid": "a97d38d716108993404fbebd0ee23755",
"score": "0.6264895",
"text": "def ... |
24b0ec5c0664dee0f10f2250d44aad3f | Capture screenshot on device | [
{
"docid": "5d1f2e389ff1ef8f3da122cd3f6de652",
"score": "0.77572834",
"text": "def screenshot(args = {})\n args[:device_id] = serial\n IDeviceScreenshot.capture(args)\n end",
"title": ""
}
] | [
{
"docid": "ad0ccc9c6cc1741e29ba0501add60caf",
"score": "0.8224464",
"text": "def capture_screen\n create_screenshot\n end",
"title": ""
},
{
"docid": "6b74417e187a62d223438b500193fa82",
"score": "0.81204355",
"text": "def screenshot(); RawImage.new(@device.getScreenshot()) e... |
61b2cede787e5dcabee9d06165f8b428 | Creates a new rank. | [
{
"docid": "3f5149185d3e0cc95273e51591b5f46d",
"score": "0.7124099",
"text": "def create\n\t @rank = Rank.new(params[:rank])\n if @rank.save\n flash[:notice] = t(:created, :thing => \"rank\")\n redirect_to admin_ranks_path\n else\n flash[:notice] = t(:not_created, :thing => \"rank\... | [
{
"docid": "fc77ae764ab9be7dbc8be04d870e60e5",
"score": "0.8031801",
"text": "def new\n\t @rank = Rank.new\n end",
"title": ""
},
{
"docid": "5d0408e1e20143f74ea30f959ffcfed4",
"score": "0.7580149",
"text": "def raw_create_rank(name)\n id = raw_create('ranks', name: name)\n ... |
4ac1bc2d128d33fba2c86b0d2e7beab2 | End of POLICY_ELEMENT_TYPES iteration | [
{
"docid": "3bac868d0db973f4d809631ea305185f",
"score": "0.0",
"text": "def pluck(type:, fields: [], options: {})\n pe_class = class_for_type(type.to_s)\n options ||= {}\n pe_class.where(options).pluck(*fields)\n end",
"title": ""
}
] | [
{
"docid": "816f981d17157cd1184ad4419ad37844",
"score": "0.58133256",
"text": "def on_element_end\n return if @elements.empty?\n\n add_token(:T_ELEM_END)\n\n @elements.pop\n end",
"title": ""
},
{
"docid": "80cb4309120c63e38d85c1e1019eb692",
"score": "0.5711997"... |
915b1204d15a0a75135816139eaeece4 | Logic for taking a guess and returning the result | [
{
"docid": "862ed8256e98bc1ce1360868c97c4aa3",
"score": "0.6982792",
"text": "def make_guess\n guess = input_guess\n check_guess(guess)\n render_code(guess)\n render_pegs(@black_pegs, @white_pegs)\n end",
"title": ""
}
] | [
{
"docid": "22c5f756ddadf5599424bdc088332c88",
"score": "0.81369936",
"text": "def correct_guess(guess)\n end",
"title": ""
},
{
"docid": "24220ecbc07f707d23d3d7dd8ccb4a82",
"score": "0.80089396",
"text": "def incorrect_guess(guess)\n end",
"title": ""
},
{
"docid":... |
be34ebe673b8081f767e8eb42d39349d | Returns a boolean indicating whether or not the route should be triggered. | [
{
"docid": "72dee1ebc64859b9f454c462e3a35ce0",
"score": "0.6378886",
"text": "def call\n return unless command_satisfied?(route, message)\n return if from_self?(message, robot)\n return unless matches_pattern?(route, message)\n unless authorized?(robot, message.user, route.required_g... | [
{
"docid": "e96d526b96f5fc192e852a72efc01e16",
"score": "0.70532894",
"text": "def go_on? route\n\t\troute.rest.size==1 or (estimateLow(route) <= @upperbound and not route.rest.empty?)\n\tend",
"title": ""
},
{
"docid": "c31fdcd5315816f02803cae116faafac",
"score": "0.68717515",
"text... |
6741fd216d7d5f3b3b9dd77b0af33f83 | Public: Searches for all paragraphs with an exact area_name area_name the area_name to search for Returns the matching paragraphs | [
{
"docid": "4c37e6e23184bfa48a00ea329184725d",
"score": "0.6963188",
"text": "def paragraphs_for_area(area_name, inherit: true)\n paragraphs = self.paragraphs.where(area_name: area_name).includes(:page).order('position asc')\n if paragraphs.none? && page_in_default_language.present? && inherit... | [
{
"docid": "0a1ec4fb1bf53f981ad27d968466fbcb",
"score": "0.7851223",
"text": "def paragraphs_for_area(area_name)\n self.paragraphs.where(area_name: area_name).order(\"position asc\")\n end",
"title": ""
},
{
"docid": "b33d9544e8c8718057cbf1044bfc2052",
"score": "0.73000145",
... |
bcd0b56a94d9e99d4860a6a7b2d54a27 | Returns whether this resource (or rather, it's parent) is unsaved | [
{
"docid": "058d4e14e00d02eab28e00c866ffb739",
"score": "0.0",
"text": "def new?\n !parent? || parent.new?\n end",
"title": ""
}
] | [
{
"docid": "d03fcb82a450ddd7bb803a4238aabe87",
"score": "0.81026983",
"text": "def unsaved?\n @unsaved\n end",
"title": ""
},
{
"docid": "d03fcb82a450ddd7bb803a4238aabe87",
"score": "0.81026983",
"text": "def unsaved?\n @unsaved\n end",
"title": ""
},
{
"docid": "... |
d039679f9cf82e7f02965bcad04e913d | Private: initialize Initializes the class (invoked when new is called) | [
{
"docid": "d38d1ed4999407f53e3506a393395625",
"score": "0.0",
"text": "def initialize(num_attendees, amt, perc_tip)\n @num_attendees = num_attendees\n @amt = amt\n @perc_tip = perc_tip * 0.01\n end",
"title": ""
}
] | [
{
"docid": "7b2a9c01c879a0b2fdf74f0f38b03e4e",
"score": "0.8813294",
"text": "def initialize\n initialize!\n end",
"title": ""
},
{
"docid": "7b2a9c01c879a0b2fdf74f0f38b03e4e",
"score": "0.8813294",
"text": "def initialize\n initialize!\n end",
"title": ""
},
... |
ba2a21dea77693caa04f8fbee077b803 | Dynamically add a new site variable at the highest priority. | [
{
"docid": "0f4fbcfcf422e688a9ee0aacae3093ca",
"score": "0.7668804",
"text": "def add_as_highest(var, value)\n # Don't want to override anything, so just shift in a dummy site config instance at the highest level and\n # set the value there.\n configs.prepend(var.to_s => value)\n end",... | [
{
"docid": "6f5e6a3a289d227796398195be4766b3",
"score": "0.72370386",
"text": "def add_as_lowest(var, value)\n # Don't want to override anything, so just shift in a dummy site config at the lowest level and\n # set the value there.\n configs.append(var.to_s => value)\n end",
"title... |
a01a9bdbb49c85ede17f0bb888e2a1f5 | Lista de tags para el campo de autocomplete | [
{
"docid": "158b506086dd2330b682bd84dd595ae2",
"score": "0.71410024",
"text": "def auto_complete_for_photo_tag_list\n auto_complete_for_tag_list_first_beginning_then_the_rest(params[:photo][:tag_list])\n if @tags.length > 0\n render :inline => \"<%= content_tag(:ul, @tags.map {|t| content_tag... | [
{
"docid": "d811103aada095add4b5ef12ee1da6c5",
"score": "0.7598367",
"text": "def auto_complete_for_area_tag_list_es\n auto_complete_for_tag_list(params[:area][:tag_list_es])\n if @tags.length > 0\n render :inline => \"<%= content_tag(:ul, @tags.map {|t| content_tag(:li, t.nombre)}) %>\"\n ... |
0e90cd5c00deb8c8abc9d79509fa3f75 | Calls an object's original method | [
{
"docid": "a2778a6d0ebf493b6ec2e2db74087287",
"score": "0.7732464",
"text": "def original_method(obj, meth, klass=Object)\n klass.instance_method(meth).bind(obj).call\n end",
"title": ""
}
] | [
{
"docid": "3dcc18e4f5b39cab9ba4dea317e3a1d7",
"score": "0.786161",
"text": "def original_method; end",
"title": ""
},
{
"docid": "11721651bcbbc63b4d63fc06d9997982",
"score": "0.7527195",
"text": "def method_missing(method, *args, &block)\n super unless original_self\n orig... |
c66aa810b1ea713bf1aff09f26c73491 | Resolve an item from the container | [
{
"docid": "fe0d209691345c72e4702cf75947b684",
"score": "0.61501867",
"text": "def resolve(key, &block)\n config.resolver.call(_container, key, &block)\n end",
"title": ""
}
] | [
{
"docid": "0eb0a2cdafff498bf98bc41c37bc7e77",
"score": "0.65297633",
"text": "def resolve\n @items.collect { |item| item.resolve }.freeze\n end",
"title": ""
},
{
"docid": "f8b7caa9a09fe9215573042b5740c2a9",
"score": "0.6468976",
"text": "def resolve(name, *args, **opts)... |
008bcc2bac942b80fe3e8d503d47dcd5 | Returns 401 response. To handle malformed / invalid requests. | [
{
"docid": "629f7817e4cdd260c59bf27c3ff050fc",
"score": "0.74525934",
"text": "def invalid_authentication\n render json: { error: 'Invalid Request' }, status: :unauthorized\n end",
"title": ""
}
] | [
{
"docid": "6d794fac15314a8a3e05d880695be6a1",
"score": "0.78841305",
"text": "def unauthorized\n custom!(Rack::Response.new([config.fail_message], 401, { 'WWW-Authenticate' => %Q{Bearer realm=\"#{config.realm}\"} }))\n end",
"title": ""
},
{
"docid": "84334c68575b7197c52099fd03e2ce8... |
397e75069fa8dcdc0c83ee816ee61c8b | PATCH/PUT /admin/projetos/1 PATCH/PUT /admin/projetos/1.json | [
{
"docid": "c1e0356fb4f2911e72d6b82a2eb6e149",
"score": "0.7090454",
"text": "def update\n respond_to do |format|\n if @admin_projeto.update(admin_projeto_params)\n format.html { redirect_to @admin_projeto, notice: 'Projeto was successfully updated.' }\n format.json { render :show,... | [
{
"docid": "0d1686fa8b0229c591b4b09a1daf607d",
"score": "0.69382083",
"text": "def update\n @projeto = Projeto.find(params[:id])\n\t\t@projeto.usuario_id = current_usuario.id\n\n respond_to do |format|\n if @projeto.update_attributes(params[:projeto])\n format.html { redirect_to @proje... |
7eb2c8e4f6fdd80b253de6ce2f6fa8ab | Deletes the current token from the database and creates a new one in place. Sets the user cookies to match the new values | [
{
"docid": "122fe2cfc8d0c25dcaf7dec0e3a99220",
"score": "0.72397625",
"text": "def generate_new_token\n delete_from_database\n composite = generate_and_save_token(cookies[:uid])\n cookie_manager.persistent_login(cookies[:uid], composite)\n end",
"title": ""
}
] | [
{
"docid": "7a2056d9e80e072161fd168aa25e3769",
"score": "0.7341113",
"text": "def create\n super\n current_user.update(recent_login: Time.zone.now)\n current_user.generate_token.reload\n cookies[:token] = current_user.authentication_token\n end",
"title": ""
},
{
"doci... |
c143c663579db9f238b45070f7eb8088 | PATCH/PUT /speaks/1 PATCH/PUT /speaks/1.json | [
{
"docid": "43b6141ecb161f213dc226e22bd56972",
"score": "0.6019369",
"text": "def update\n respond_to do |format|\n if @speak.update(speak_params)\n format.html { }\n format.json { render :show, status: :ok, location: @speak }\n else\n format.html { render :edit }\n ... | [
{
"docid": "f3726630682ab3fdd59970bb3ffdda5d",
"score": "0.68200797",
"text": "def update\n @specoffer = Specoffer.find(params[:id])\n\n respond_to do |format|\n if @specoffer.update_attributes(params[:specoffer])\n format.html { redirect_to @specoffer, notice: 'Specoffer was successfu... |
3ce5ba4d47dd7d83887764de21f2b9ee | Is the string a MiGAcompliant name? | [
{
"docid": "fea92ea96c3c780492ca7f52eee4fd42",
"score": "0.7678895",
"text": "def miga_name?\n !(self !~ /^[A-Za-z0-9_]+$/)\n end",
"title": ""
}
] | [
{
"docid": "86813fee29309cd41094a6305a3ca928",
"score": "0.7589465",
"text": "def name?(name)\n name = name&.strip\n !(name.blank? || name.match?(%r{(N[/\\\\]+A|UNKNOWN)}i))\n end",
"title": ""
},
{
"docid": "0260d6711550aa14bbf50efa263f02bb",
"score": "0.7516989",
"text": "de... |
af630984682f1a0b5a68e6092af0d102 | Update properties of this object | [
{
"docid": "6dabee5583ef94409204b45c789cd6f3",
"score": "0.0",
"text": "def update!(**args)\n @policy = args[:policy] if args.key?(:policy)\n @update_mask = args[:update_mask] if args.key?(:update_mask)\n end",
"title": ""
}
] | [
{
"docid": "184b1b1ed771473d3eb9f338c0734c38",
"score": "0.73066413",
"text": "def update *args\n opts = args.extract_options!\n fill_properties opts\n self.save\n end",
"title": ""
},
{
"docid": "5076c5a88404ae72986f958710f5687a",
"score": "0.72631145",
"text": "def update... |
d3451599cadd09dd928092b62dea3486 | Convert list of causes into payload format. causes Array of Cause instances. Returns the Array of causes in Hash payload format. source://honeybadger//lib/honeybadger/notice.rb529 | [
{
"docid": "f3169d51c6a1759bf0cf13c74140820b",
"score": "0.5753854",
"text": "def prepare_causes(causes); end",
"title": ""
}
] | [
{
"docid": "2665546a354d449ef44dfc9eff4ea95b",
"score": "0.67875314",
"text": "def prepare_causes(causes)\n causes.map {|c|\n {\n class: c.error_class,\n message: c.error_message,\n backtrace: parse_backtrace(c.backtrace)\n }\n }\n end",
"title":... |
3ae595763de74b2d266e8520b2a797df | Return a String with this Node's ID [Return] a String with this Node's ID | [
{
"docid": "0d8c426ee4bfa92eb5771eeb18f5631b",
"score": "0.86942726",
"text": "def to_s()\n return \"#{@nodeID}\"\n end",
"title": ""
}
] | [
{
"docid": "0d8891a71a8ea99a7216b6572c734733",
"score": "0.80108714",
"text": "def id(node)\n \"node#{node.object_id}\"\n end",
"title": ""
},
{
"docid": "5c5d44cb14c5661f719cfd3c0af8baed",
"score": "0.7984406",
"text": "def node_id\n return @node_id\n end",
... |
1f56cc445d85b21ba040159a970886f4 | Returns the weapons that the player is carrying as a set of symbols | [
{
"docid": "3fa630d7f53c3ce3db2af79fa535b370",
"score": "0.6836344",
"text": "def weapons\n self.items[:weapons]\n end",
"title": ""
}
] | [
{
"docid": "e7c16fffea8b40fc6b12503f72c16e41",
"score": "0.75917083",
"text": "def weapons\r\n items = equipped(Weapon)\r\n if items.empty?\r\n items = [self.hand_to_hand_weapon]\r\n end\r\n return items\r\n end",
"title": ""
},
{
"docid": "77336c4ec... |
76d846226e84118210c9cda6bd86655d | DELETE /service_demands/1 DELETE /service_demands/1.json | [
{
"docid": "d4ad5fbf729f2981a13797a387e843be",
"score": "0.0",
"text": "def destroy\n\n @service_demand.destroy\n flash.keep\n\n respond_to do |format|\n format.html { redirect_to @service_demand.nil? ? (params[:guided_workflow].blank? ? service_service_demands_path(@service) : service_ser... | [
{
"docid": "9206c12be0e9315e9442367f39e0b53d",
"score": "0.7526157",
"text": "def destroy\n @demand.destroy\n respond_to do |format|\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
"docid": "126e8532cacc440a9fc239a2495f9196",
"score": "0.73248214",
"t... |
d899126f31e43589af702b8677dc6fac | GET /work/:work_id/chapters/:id GET /work/:work_id/chapters/:id.xml | [
{
"docid": "14944096c16e0eb0de56db4679e3b5a4",
"score": "0.59208876",
"text": "def show\n if params[:view_adult]\n session[:adult] = true\n elsif @work.adult? && !see_adult?\n render \"works/_adult\", :layout => \"application\" and return\n end\n\n if params[:selected_id]\n re... | [
{
"docid": "a22f7a2460861455c37ac4df6427200f",
"score": "0.658675",
"text": "def show\n @chapters_examination = ChaptersExamination.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @chapters_examination }\n end\n end",
"tit... |
5876c185ecdc45b6dbdfa6246c973f1c | Pop an item off the stack. Remove the last item that was pushed onto the stack and return the value to the user | [
{
"docid": "64b0e958453f56595048d0cd11d24692",
"score": "0.0",
"text": "def pop\n pull_top = @data.value\n @data = @data.next_node #reassigns @data with the node\n return pull_top\n end",
"title": ""
}
] | [
{
"docid": "c44af16153ce4402dc9051697d0c0827",
"score": "0.83987814",
"text": "def pop()\n\n # if the stack is empty, return nil\n # (it would also be reasonable to throw an exception)\n return nil if @items.empty?\n\n return @items.pop()\n \n end",
"title": ""
},
{
"docid": ... |
c21ba3cc3869d4317fa959315c8393c2 | Return the next record in the order defined when the cursor was created. | [
{
"docid": "d2dc3b6e78623be41a1a6dd713d4c782",
"score": "0.5874023",
"text": "def record\n if @initial\n @initial = false\n return @record\n end\n\n case @direction\n when :forward\n next_record\n when :backward\n p... | [
{
"docid": "efe660795805b6379201e07d7ac731a0",
"score": "0.73070306",
"text": "def next\n @opened && @cur_record_index < @num_records ? _read_next_record : nil\n end",
"title": ""
},
{
"docid": "11190a0498aeae5f96873e1cb1916ba8",
"score": "0.71709836",
"text": "def next_r... |
f864123b0d69cbf27fa50dcc91fbb7a0 | make it more Globalize2 like Returns true if the currently set locale is the default_locale this is analogous to Globalize Locale.base? | [
{
"docid": "828312d3ae6e22de70a9d06556a67c6d",
"score": "0.82915866",
"text": "def default_locale?\n I18n.default_locale == I18n.locale\n end",
"title": ""
}
] | [
{
"docid": "53390ac07a39e9e3c27ce2e3e46b8e7c",
"score": "0.83112067",
"text": "def default_locale?\n I18n.default_locale == I18n.locale\n end",
"title": ""
},
{
"docid": "e6f9afbb522bfbb9269ba34fa2aa89b3",
"score": "0.79454315",
"text": "def not_the_default_current_locale?\n ... |
ed0fda7d995d9e3dbe5c9a2a1933fc2a | Generate all of the possible moves for a Rook Piece from the current position, given that the new position must be valid and no other Piece is in the way | [
{
"docid": "457c8b0b2adba25cdc3f760ab3a253d3",
"score": "0.0",
"text": "def grow_unblocked_moves_in_dir(dx, dy)\n moves = []\n current_pos = [self.position.first + dx, self.position.last + dy]\n\n while self.board.valid_position?(current_pos)\n\n # Move is valid if the current position is ... | [
{
"docid": "683a4d9130df0b23d7d910f2152f68e9",
"score": "0.77945507",
"text": "def generate_moves\n pick_delta.each do |step|\n #regular move opening for pawn\n if step == [1,0] || step == [-1,0]\n new_pos = [@pos[0] + step[0], @pos[1] + step[1]]\n if valid_coord?(new_pos) && ... |
56027cd2129b23cd97202ce54e60c080 | issue: corrigir, pois nao esta recebendo sigla | [
{
"docid": "8e2de9c89aaeb8be85b21adf49cf9978",
"score": "0.0",
"text": "def sigla; @nome; end",
"title": ""
}
] | [
{
"docid": "ef1e4c0cc26e4eec8642a7d74e09c9d1",
"score": "0.69557303",
"text": "def private; end",
"title": ""
},
{
"docid": "2cc9969eb7789e4fe75844b6f57cb6b4",
"score": "0.62618035",
"text": "def refutal()\n end",
"title": ""
},
{
"docid": "0b8b7b9666e4ed32bfd448198778... |
b926d09a1f7098598c81a0cebbbebce6 | Returns true or false depending on whether the user has participated (using the action above) | [
{
"docid": "7db4c06fbdeb6d1b336d7a78cd656c2c",
"score": "0.6373967",
"text": "def participated_to?(project)\n \t!participation(project).nil?\n end",
"title": ""
}
] | [
{
"docid": "beb93835f8ac0004ace496cf4482e533",
"score": "0.7946983",
"text": "def participate?\n !user.nil? && show?\n end",
"title": ""
},
{
"docid": "4effb6996aeac50d22fe0d9af99fb435",
"score": "0.72428566",
"text": "def participating?\n target.notification_level == N_PARTIC... |
5fcf56745efe2062f299185dc2fa4f3e | Importar dados do CSV | [
{
"docid": "35dd8c7b9b6cf6aaa6905466aa54c703",
"score": "0.6771643",
"text": "def csv_import\n #n = 0\n CSV.foreach(params[:dump][:file].tempfile,:col_sep => ';', :encoding => 'ISO-8859-1') do |row|\n c = Ticket.new( :ano => row[0],\n :mes ... | [
{
"docid": "65c897e15e95f5c0a1919afbe5530f80",
"score": "0.79534835",
"text": "def import_csv_full\n \n end",
"title": ""
},
{
"docid": "a8cbeda40ecafae56e9239168cc516a1",
"score": "0.7664673",
"text": "def import_csv_smart\n \n end",
"title": ""
},
{
"docid": "808c... |
68c1b216d5e249f4c29e7f47b1713fe4 | returns taggings of this instance's tags that relate to the given tags e.g. | [
{
"docid": "ef99ec4da908ecffd38f232aae565b4a",
"score": "0.7357325",
"text": "def taggings_tagged_with(tags, context=nil, options={})\r\n tags = Tag.parse(tags,\r\n :delimiter => options.delete(:delimiter) || acts_as_taggable_options[:delimiter]) if tags.is_a?(String)\r\n ta... | [
{
"docid": "57344819fca20b47fa0e9d8e82187101",
"score": "0.77740055",
"text": "def tagged\n taggings.map {|t| t.tagged}\n end",
"title": ""
},
{
"docid": "57344819fca20b47fa0e9d8e82187101",
"score": "0.77740055",
"text": "def tagged\n taggings.map {|t| t.tagged}\n end",
"... |
52f8361afc3d2913a21c6c1c023e095d | Determines if this vertex is on the interior of a curve. A vertex is on the interior of a curve if it is not at the curve's ends, so it has two edges that ar epart of the same curve. | [
{
"docid": "7212904b7deb5243281599592f7538a5",
"score": "0.7719586",
"text": "def curve_interior?\n end",
"title": ""
}
] | [
{
"docid": "58a2f9de8b6ecf5a0be49fb5ec6fd793",
"score": "0.6826303",
"text": "def has_interior_point?(p)\n counter = 0\n \n @segments.each do |segment|\n p1, p2 = segment.point1, segment.point2\n # Talk about conditions ... surely there is a better way\n if (p.y > [p1... |
e332e9f2529014a4c53d85ac4a9138c4 | fixnum index if there is a variable that doesn't satisfy restrictions, nil otherwise | [
{
"docid": "4f6d5c851991d1f0d84148f996cca470",
"score": "0.6267192",
"text": "def first_noninteger_index(current_plan)\n first_noninteger_var_with_index(current_plan).last\n end",
"title": ""
}
] | [
{
"docid": "38ab60fddefc22e5048e494084c7ec37",
"score": "0.724996",
"text": "def variable_index( name )\n has = super_index(name)\n return nil unless has\n raise \"internal error #{name}:#{has}\" if has < 1\n (1 + has / 2).to_i # to_i for opal\n end",
"title": ""
},
{
... |
392aa15c217efd7a755ad5b7c693d425 | rubocop:enable Metrics/CyclomaticComplexity rubocop:enable Metrics/PerceivedComplexity | [
{
"docid": "72315531c035928f450a37817e2c4023",
"score": "0.0",
"text": "def has_resource_type?(type)\n flat_forms_for('resource type').any? { |form| form.value == type }\n end",
"title": ""
}
] | [
{
"docid": "33e1db3c06643dd523dcc31fccf3a005",
"score": "0.66381735",
"text": "def used; end",
"title": ""
},
{
"docid": "33e1db3c06643dd523dcc31fccf3a005",
"score": "0.66381735",
"text": "def used; end",
"title": ""
},
{
"docid": "b6b2bcc0062aeb115edab7b10cbe6930",
"... |
19129e2d7be2966c3b83dec61ae983f4 | PUT /products/1 PUT /products/1.xml | [
{
"docid": "c770642e682ca7dbd4209b2e3d4be0f7",
"score": "0.0",
"text": "def update\n @pagetitle = \"Edit product\"\n \n @product = Product.find(params[:id])\n @company = @product.company\n @suppliers = @company.get_suppliers()\n @marcas = @company.get_marcas()\n @modelos = @company.... | [
{
"docid": "e631b376ae2ccb776680432bf94b01cc",
"score": "0.6657229",
"text": "def put(uri, xml)\r\n req = Net::HTTP::Put.new(uri)\r\n req[\"content-type\"] = \"application/xml\"\r\n req.body = xml\r\n request(req)\r\n end",
"title": ""
},
{
"docid": "fa2eeaa45445dd7614... |
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": "fb42a2f967a1571585dcf3cb36af8ac8",
"score": "0.0",
"text": "def execute(input_set = nil)\n resp = super(input_set)\n results = GetContactsResultSet.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... |
5b141c0e39eb28ee67d7c5dc54b536c8 | return whether pixi is asked | [
{
"docid": "e0e1fc4e84d2e73c030228e9a62686e5",
"score": "0.0",
"text": "def is_asked?\n asked_count > 0 rescue nil\n end",
"title": ""
}
] | [
{
"docid": "355e56a137e1425cdf4dba3f8ce2fde9",
"score": "0.780649",
"text": "def has_pixis?\r\n pixi_count > 0 rescue nil\r\n end",
"title": ""
},
{
"docid": "3f0cd45c3b41fbf798ead568412ec557",
"score": "0.7025296",
"text": "def any_pixi?\r\n InvoiceProcessor.new(self).must_ha... |
0a46145adb870723ab25568ec1039a96 | Generate a random string of noncontrol character ASCII text of a specified length. | [
{
"docid": "d54e42eac5948104d760c6df9ae600b4",
"score": "0.81527025",
"text": "def random_ascii( len )\n\tlen = rand(64) + 1 if len == 0\n\t(0x21..126).to_a.sample(len).collect {|i|i.chr}.join(\"\")\nend",
"title": ""
}
] | [
{
"docid": "665e80b3d9ac7ecf9dad782a94b85ba7",
"score": "0.84154844",
"text": "def random_text(length)\n chars = 'abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ23456789' \n text = '' \n length.times { text << chars[rand(chars.size)] } \n text\n end",
"title": ""
},
{
"docid"... |
e803e09ec3acf820ed3b07020e8b6271 | Generate shipping class. if its at least 16oz its priority if its less than that its first class | [
{
"docid": "f2b7930a8e16d8db503f67c872b5619b",
"score": "0.62874824",
"text": "def print_shipping\n # Item weights in onces\n brush = 9\n brush_head = 1\n paste_kit = 7.6\n shipping_string = 'Shipping:' + ' '\n if @is_starter\n # 9oz + 1oz + 7.6oz = 17.... | [
{
"docid": "51e4652024f2f2c8f0184d925d846d03",
"score": "0.6108913",
"text": "def first_class_shipping_method\n @@first_class ||= available_shipping_methods.detect do |sm|\n sm.calculator.is_a?(Calculator::EzpShipping) &&\n sm.calculator.preferred_ezp_shipping_type == Calculator::EzpShi... |
976472f5b3e94724e580ddaa7dd3ffd0 | edit the diagnostic test object | [
{
"docid": "7965180fc20d3e3de9d56e8cc6819cae",
"score": "0.67792964",
"text": "def edit\n @test_obj = ExtractionFormDiagnosticTest.find(params[:id])\n @extraction_form_id = @test_obj.extraction_form_id\n @test_type = get_table_title(@test_obj)[0]\n @editing=true\n rend... | [
{
"docid": "98172e105710b85bf1a9f0954450e7da",
"score": "0.7071554",
"text": "def edit\n @test_obj = DiagnosticTest.find(params[:id])\n @thresholds = @test_obj.diagnostic_test_thresholds\n @test_type = @test_obj.test_type\n @ef_id = @test_obj.extraction_form_id\n @stud... |
9ddd628c9054687e30594a707b94965b | Method to transform ERB templates in the work directory. | [
{
"docid": "7fffcc850a3922310f86b1c9edd0a822",
"score": "0.6646237",
"text": "def process_templates(wixworkdir, binding)\n files = Dir.glob(File.join(wixworkdir, \"**/*.erb\"))\n files.each do |file|\n erb_file(file, File.join(File.dirname(file), File.basename(file, \".erb\")), fa... | [
{
"docid": "b85b52cea5732ef941fda1fe20e79f13",
"score": "0.7183508",
"text": "def parse_templates(bindings)\n template_dirs(File.join(dest_dir)).each do |dir|\n dest = file_destination(dir, bindings)\n parent_dir = File.expand_path(\"..\", dest)\n fileutils.mkdir_p(parent_dir) ... |
5c9463a7727aaa7e720d8bbeb88b1e25 | Returns the image currently assigned to this Sprite. | [
{
"docid": "1f779561090ae4a5da3dcba12830beaf",
"score": "0.65092",
"text": "def get_image\n @image\n end",
"title": ""
}
] | [
{
"docid": "4572d3624c7b8cd02228f2f9eb7194db",
"score": "0.67699134",
"text": "def sprite\n return $spriteset.unit_sprites[@sprite_id]\n end",
"title": ""
},
{
"docid": "3a4112afc76821dda61b00af90a1ae67",
"score": "0.6622857",
"text": "def image(ident)\n @images[ident]\n ... |
3727e7f902079b56bde182f421e1d064 | DELETE /saved_searches/1 DELETE /saved_searches/1.json | [
{
"docid": "50fd8d2242dfab274ea00f508e68044b",
"score": "0.7443748",
"text": "def destroy\n @saved_search.destroy\n respond_to do |format|\n format.html { redirect_to saved_searches_url, notice: 'Saved search was successfully destroyed.' }\n format.json { head :no_content }\n end\n e... | [
{
"docid": "0ea32bf90af4b452f42910bf873f5a67",
"score": "0.746398",
"text": "def destroy\n @saved_search = SavedSearch.find(params[:id])\n @saved_search.destroy\n\n respond_to do |format|\n format.html { redirect_to(saved_searches_url) }\n format.xml { head :ok }\n end\n end",
... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "faa83ddc064b2e365b8729855bffddc2",
"score": "0.0",
"text": "def set_educational_detail\n @educational_detail = EducationalDetail.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "bd89022716e537628dd314fd23858181",
"score": "0.6163163",
"text": "def set_required_actions\n # TODO: check what fields change to asign required fields\n end",
"title": ""
},
{
"docid": "3db61e749c16d53a52f73ba0492108e9",
"score": "0.6045976",
"text": "def action_hook;... |
5c4623bd5fd4c8bf8a86002aaead3d23 | Fetch several pages of questions seamlessly | [
{
"docid": "9265ea0fa8197e04669dd8393a21db03",
"score": "0.7231002",
"text": "def fetch_questions_batch(params = {})\n page = 1\n resp = fetch_questions(params.merge(page: page))\n while resp[:items].length.positive? && page < MAX_PAGES\n resp[:items].each { |question| yiel... | [
{
"docid": "651fc6af6d8e5f9c9082787af34007dc",
"score": "0.6595355",
"text": "def fetch(length, disposition)\n response = RestClient::Request.execute(method: 'get',\n url: \"#{url}/getAllQuizQuestions\",\n headers: {params: {limit: length,... |
61eba9ee8a4986022dc856528d454919 | Join _player_ to this channel. If _dispatch_to_self_ is false then event is not dispatched for _player_. This is useful when using Chat::Hubregister. | [
{
"docid": "812a0471149451397afcc7a440c30c53",
"score": "0.77636814",
"text": "def join(player, dispatch_to_self=true)\n synchronize do\n @players[player.id] = player\n\n params = {'channel' => @name, 'player' => player}\n @players.each do |target_id, target|\n # Dispatch other ... | [
{
"docid": "38fdc5c263aaf8bbfd2d6f55de75cec6",
"score": "0.7221214",
"text": "def join(channel_name, player, dispatch_to_self=true)\n @channels[channel_name] ||= Chat::Channel.new(\n channel_name, @dispatcher_actor_name\n )\n @channels[channel_name].join(player, dispatch_to_self)\n @cha... |
2508438f9db7db19dc63b1e0e5dd26ac | Locate user via the three known FU user logins | [
{
"docid": "9e085944eb91fbd6b422b94f129a94e2",
"score": "0.0",
"text": "def create\n account = params[:email]\n user = User.locate(account)\n\n if user && user.valid_password?(params[:password])\n session[:user_id] = user.id\n redirect_to root_url, notice: \... | [
{
"docid": "51d43ca9db18e6a160c61ff0ddcc7f11",
"score": "0.61433166",
"text": "def get_user\n\t\tif starting_location_dl.present?\n\t\t\tstarting_location_dl.user\n\t\telsif ending_location_dl.present?\n\t\t\tending_location_dl.user\n\t\telsif starting_location_meeting.present?\n\t\t\tstarting_location_... |
390cf23d0178debca5ffefdae1fcc8e7 | Basically, in this polymorphic model, has_one and belongs_to are the same because no model holds the id of another model to reference to. We can select whatever marco that describes the logic best class Note [:person, :project, :company] has_one :owner, :from => [:person, :project, :company] end end .container .owner | [
{
"docid": "43075d1a27aa079af7914402dc386ba8",
"score": "0.55109686",
"text": "def polymorphically_has_one(association_name, options)\n reflection = create_polymorphic_reflection(:has_one, association_name, options, self)\n verify_association(reflection)\n create_methods_for_h... | [
{
"docid": "edbb9ce4aedecf03d2ed8d56c1096596",
"score": "0.6811744",
"text": "def get_object_through_has_one_association(owner, reflection)\n #TODO cached\n \n association = get_associations_for_object(owner, reflection)[0]\n \n return [] if association.nil?\... |
901021291613171534dde82463d93ea3 | support previous API Push a binding for the given object onto the stack. If this instance is currently stopped, mark it as usable again. | [
{
"docid": "aa7739dba189fcc9f5b9bfa0f0997b4b",
"score": "0.84429127",
"text": "def push_binding(object)\n @stopped = false\n binding_stack << Pry.binding_for(object)\n end",
"title": ""
}
] | [
{
"docid": "7fe39bf5d64be9bee66af8f88e047f78",
"score": "0.65707827",
"text": "def push_binding(value)\n create unless @environment.has?(name)\n @environment.push_binding(name, value)\n end",
"title": ""
},
{
"docid": "eaf6752cc02b6bd887e134eca97e1136",
"score": "0.6386164",... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "68119fc2a863691d0877e2ba69eaaee8",
"score": "0.0",
"text": "def organisme_params\n params.require(:organisme).permit(:name, :mail, :web_site, :telephone, :adresse)\n end",
"title": ""
}
] | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.69792545",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.6781151",
"text": "def strong_params\n params.requ... |
8e0dca8670f70d72f77ecc5458a6d671 | DELETE /contests/1 DELETE /contests/1.json | [
{
"docid": "c097cd38d4205dac5aba3602f07e4d24",
"score": "0.743788",
"text": "def destroy\n\n @contest.user_id = current_user.id\n\n @contest.destroy\n respond_to do |format|\n format.html { redirect_to contests_url, notice: 'Contest was successfully destroyed.' }\n format.json { head ... | [
{
"docid": "68bfe7c4ef50ab8224114c7d07fe3f29",
"score": "0.81164575",
"text": "def destroy\n @contest.destroy\n\n respond_to do |format|\n format.html { redirect_to contests_url }\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
"docid": "f99fd8a09a3cf891... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "a3ce1b8a32c208f25847f7345648e3cd",
"score": "0.0",
"text": "def set_image\n @image = Admin::Image.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... |
7c705a91d7056b9a185176e80d60562f | Block the given address for the given multicast address on the given network interface and notifies the once the operation completes. | [
{
"docid": "a92b7df289790d519ac9f18e15159d7e",
"score": "0.58134854",
"text": "def block_multicast_group(multicastAddress=nil,networkInterface=nil,sourceToBlock=nil)\n if multicastAddress.class == String && networkInterface.class == String && block_given? && sourceToBlock == nil\n @j_del.jav... | [
{
"docid": "985b1bbf46fa2f32a041b052adc2eff6",
"score": "0.60537696",
"text": "def multicast\n Ionian::Extension::Socket.multicast self.remote_address.ip_address\n end",
"title": ""
},
{
"docid": "f23034522e70f329f6554e09c066e6af",
"score": "0.6043412",
"text": "def send_... |
f0084755312fcba76a3158a11819a4fc | Zamiana CamelCase na underline | [
{
"docid": "7941c9565d3230eb1e44b692c9e1f131",
"score": "0.658349",
"text": "def underlinize\n self.split(/(?=[A-Z])/).join('_').downcase.gsub(\"::_\", \"/\")\n end",
"title": ""
}
] | [
{
"docid": "761853fe1026dde0e48a3e6ec5fadd97",
"score": "0.7373698",
"text": "def underline(text)\n enclose_with('_', text)\n end",
"title": ""
},
{
"docid": "97baefe69a654c16fbc01d1d7d6b4cbe",
"score": "0.7227328",
"text": "def underline\n wrap_with_code(TERM_EFFECTS[:und... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "8889cbd2007b20a8ffda14047763ac18",
"score": "0.0",
"text": "def ballot_params\n params.require(:ballot).permit(:name, topic_ids: [])\n end",
"title": ""
}
] | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.69792545",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.6781151",
"text": "def strong_params\n params.requ... |
73c8fd3ef5a8be048e529933685a6bf7 | sort by most liked | [
{
"docid": "d0f1eaf486776ea11ee1150d8634904c",
"score": "0.0",
"text": "def sort \n @listings = Listing.where(:sold_date => 3.hours.from_now.to_date).order(:cached_votes_up => :desc).page(params[:page])\n end",
"title": ""
}
] | [
{
"docid": "9b367afcd411d97cba36a375ab0d5c33",
"score": "0.70755804",
"text": "def get_highest_liked_comics\n Comic.sort_by_highest_liked_comics self \n end",
"title": ""
},
{
"docid": "6f196cfb5ebbc2e33ffaebf52c575a8a",
"score": "0.7057327",
"text": "def get_highest_liked_books\... |
e0f1fd9a01e69eab4bb9ea0b6dc1d99b | Dynamically generating a board of any size is tricky. Especially since we want to show the numbers inside the empty spaces, which throws off the alignment of the board. The solution is to calculate the length of the highest showable number and to then pad all the spaces equal to that width. Iterate over every row, buil... | [
{
"docid": "e6e2ec09fb529a001ed460a494046d74",
"score": "0.0",
"text": "def display_board\n board = @board.grid.inject([]) do |board_rows, row| \n board_rows + board_row(row)\n end\n\n board.pop \n board.join(\"\\n\")\n end",
"title": ""
}
] | [
{
"docid": "df61bf0a4d1030b4271bdfd5e0a4805c",
"score": "0.78138316",
"text": "def generate_board(size)\n row = Array.new(size) {|i| ''}\n (1..3).reduce([]) { |acc, _|\n acc.push(row)\n }\n end",
"title": ""
},
{
"docid": "de9ce69cdbd1f6e39f9028699f42b427",
... |
aee2818f5e8d2fd79bcdede46ce03f28 | Return nothing but needed to prevent any error | [
{
"docid": "2891c8de9bb485ceed1c53efa732e2c4",
"score": "0.0",
"text": "def header article; end",
"title": ""
}
] | [
{
"docid": "2cf0d21d091dc500e47132971754a41a",
"score": "0.7114069",
"text": "def broken?; end",
"title": ""
},
{
"docid": "2cf0d21d091dc500e47132971754a41a",
"score": "0.7114069",
"text": "def broken?; end",
"title": ""
},
{
"docid": "5928f8efe9c6c2d408ea21a4cdce83ad",
... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "2f49a19b4069a0c4bf9502f0aad7b0ce",
"score": "0.0",
"text": "def order_params\n params.require(:order).permit(:comment, :email, :name, :country, :state, :city, :address_line_1, :address_line_2, :postal_code, :phone)\n end",
"title": ""
}
] | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.69792545",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.6781151",
"text": "def strong_params\n params.requ... |
28043ed8bf03eba32167afb6993526a1 | Create database user with specified name on the server | [
{
"docid": "9b90b3f14ded31d07a7cddafccde2ac5",
"score": "0.67996633",
"text": "def create_user(user, password)\n \n sql = \"CREATE USER #{full_name(user)} IDENTIFIED BY '#{password}'\"\n \n display_command(sql) if @show\n \n begin\n @dbh.query(sql) if @run\n f... | [
{
"docid": "c1b50058545ae163b2e33e5c741f39af",
"score": "0.77250814",
"text": "def dscl_create_user\n run_dscl(\"create\", \"/Users/#{new_resource.username}\")\n end",
"title": ""
},
{
"docid": "3836f874d2db388b9833ed3f0a842ef8",
"score": "0.7665558",
"text": "def cre... |
7be9cb406d867261667265d4a639e13c | Returns the columns the builder will serialize. | [
{
"docid": "82cba9ce86ba9695d1b42294b5cc4588",
"score": "0.0",
"text": "def columns\n # execute each update from @column_updates\n # set @columns_loaded = true\n load_columns unless @columns_loaded\n @columns\n end",
"title": ""
}
] | [
{
"docid": "db52febce9084ba6b07a1e9382e82e5c",
"score": "0.80473167",
"text": "def columns\n defined_columns\n end",
"title": ""
},
{
"docid": "143276308ef6936d23ef9a175899f416",
"score": "0.78986984",
"text": "def columns\n _columns || columns!\n end",
"title... |
fce2cb1fb59d89812be41102880594dd | DELETE /comits/1 DELETE /comits/1.json | [
{
"docid": "5d5d8e15c96b6ee2b13ac8497cf2f4db",
"score": "0.7341766",
"text": "def destroy\n @comit = Comit.find(params[:id])\n @comit.destroy\n\n respond_to do |format|\n format.html { redirect_to comits_url }\n format.json { head :no_content }\n end\n end",
"title": ""
}
] | [
{
"docid": "ec1ab23fdcb4565490bef719f07c1599",
"score": "0.7294832",
"text": "def destroy\n @comake_it.destroy\n respond_to do |format|\n format.html { redirect_to comake_its_url }\n format.json { head :no_content }\n end\n end",
"title": ""
},
{
"docid": "4630800dcc05783... |
bfbcddcc918ef40f76e5014276919dbc | Preview this email at | [
{
"docid": "dc8ebfa3b0f4912f20804002627943b8",
"score": "0.0",
"text": "def request_rejection\n reservation = Reservation.first\n ReservationMailer.request_rejection(reservation)\n end",
"title": ""
}
] | [
{
"docid": "947d18f31928dcf9761bdcbda7f18565",
"score": "0.71475905",
"text": "def preview\n @email = Email.find(params[:id])\n render :text => @email.body\n end",
"title": ""
},
{
"docid": "f9cb02c07e98bbf5e69bcea1540cfe24",
"score": "0.71186084",
"text": "def preview\n @e... |
1971dc3935fa3a880fb6d6191c8b9d8e | PATCH/PUT /socio_cultural_factors/1 PATCH/PUT /socio_cultural_factors/1.json | [
{
"docid": "d401c40ae9136bde058416dd5d737d84",
"score": "0.7643079",
"text": "def update\n respond_to do |format|\n if @socio_cultural_factor.update(socio_cultural_factor_params)\n format.html { redirect_to @socio_cultural_factor, notice: 'Socio cultural factor was successfully updated.' ... | [
{
"docid": "13b150fe26ab437d1da64647f907c382",
"score": "0.686786",
"text": "def set_socio_cultural_factor\n @socio_cultural_factor = SocioCulturalFactor.find(params[:id])\n end",
"title": ""
},
{
"docid": "443ff92b27ec47eb29683cab1c400919",
"score": "0.644242",
"text": "def ... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "f57ab33bf0249d1c47c665285289583f",
"score": "0.0",
"text": "def daily_params\n\t params.require(:daily).permit(:time, :comments, :daily_time_id, :date)\n\t 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... |
80d1199b07cc2d3c7be45851c526950c | %w creates array of strings same as above | [
{
"docid": "05ebb56af4931d08b003d814ed44a48f",
"score": "0.0",
"text": "def sort_direction\n %w[asc desc].include?(params[:direction]) ? params[:direction] : \"desc\"\n end",
"title": ""
}
] | [
{
"docid": "ad3cc0a615770d5a462a3b5d2bdf8909",
"score": "0.6646688",
"text": "def str2warray(value)\n unquote_string(value).gsub(/ /, '\\\\ ')\n end",
"title": ""
},
{
"docid": "8aa3e423758b48d24f995beec6b5632c",
"score": "0.65283257",
"text": "def test_W\n ruby = 'ruby'\n ... |
56c24ff7a332750cb5aa515e3ff5e218 | For now this follows v5.4 syntax... We have not yet finalised an OML syntax inside OEDL for v6 | [
{
"docid": "98793366f6e3ffc083144bc1b6998846",
"score": "0.0",
"text": "def measure(mp,filters)\n collection = {:url => OmfEc.exp.oml_uri, :streams => [] }\n stream = { :mp => mp , :filters => [] }.merge(filters)\n collection[:streams] << stream\n @oml_collections << collection\n ... | [
{
"docid": "2655bafc32a8a55d90ed76d5356208d0",
"score": "0.598983",
"text": "def owl_inverse_functional_property\n end",
"title": ""
},
{
"docid": "64ff558e5d17153b7149c389c1e17193",
"score": "0.57362425",
"text": "def owl_functional_property\n end",
"title": ""
},
{
... |
ce9be83747f773757a2947b79889fd5a | determining whether it should uppercase or lowercase each letter. The nonalphabetic character should still be included in the return value; they just don't count when toggling the desired case. | [
{
"docid": "9627f4c9e75170ebcaaa83121b691a4a",
"score": "0.0",
"text": "def staggered(string)\n result = ''\n need_upcase = true\n string.chars.each do |char|\n if need_upcase\n result += char.upcase\n else\n result += char.downcase\n end\n need_upcase = !need_upcase\n end\n r... | [
{
"docid": "a30036676ec9e526aa04dd027b6dd8fc",
"score": "0.7334477",
"text": "def is_lower?(letter)\r\n letter != letter.upcase #if letter is not uppercase return true, else return false\r\nend",
"title": ""
},
{
"docid": "0e6366fc03d9d477a00c16a6858b5b31",
"score": "0.7315325",
"... |
0037711f5af1e96eae70c94c1589458e | validates_presence_of :email, :message=>"Email Errata!" validates_presence_of :password, :message=>"Password Errata!" | [
{
"docid": "b0824faf93cb23d75c08baded84b63be",
"score": "0.0",
"text": "def Elimina_Utente()\n Category.delete_all(user_id: self.id)\n Dish.delete_all(user_id: self.id)\n Ingredient.delete_all(user_id: self.id)\n Medium.destroy_all(user_id: self.id)\n Menu.delete_all(user_id: self.id)\n ... | [
{
"docid": "31ee768c2a2e2cd0c7e7f8a16213bf82",
"score": "0.7358669",
"text": "def password_not_blank\n errors.add(:password, \" Missing password\") if password.blank?\n end",
"title": ""
},
{
"docid": "e152c84f05a3cfe9ecd18e49ef09f7c6",
"score": "0.7299596",
"text": "def validate... |