query
stringlengths
7
9.55k
document
stringlengths
10
363k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Hovers over the root node of this component
def hover root_node.hover end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def node()\n self.root.node()\n end", "def hover_over_icon\n element = Element.new(locator_to_node_cover)\n $browser.execute_script(\"var evt = document.createEvent('MouseEvents');\" +\n \"evt.initMouseEvent('mouseover',true, true, window, 0, 0, 0, 0, 0, false, fal...
[ "0.58914125", "0.5780786", "0.57784784", "0.5769682", "0.55518365", "0.55017054", "0.5384258", "0.52494574", "0.5226938", "0.52255714", "0.51727283", "0.51727283", "0.51666695", "0.5150073", "0.51477796", "0.51234156", "0.5112593", "0.50968015", "0.50948507", "0.5072637", "0....
0.8299177
0
Clicks on the root node of this component
def click root_node.click end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def click\n p [ :app_click ]\n view.click\n end", "def click\n `#{@el}.click() || Opal.nil`\n end", "def click\n `#@native.click()`\n self\n end", "def click\n `#@native.click()`\n end", "def click\n @_node.click\n @_node.getPage.getWebClient.waitForBackgroundJavaS...
[ "0.65339684", "0.6475518", "0.64476633", "0.6336405", "0.6270497", "0.6203077", "0.6162897", "0.614566", "0.614566", "0.614566", "0.6068659", "0.603288", "0.6004124", "0.59897494", "0.5937472", "0.5865959", "0.5775268", "0.57642245", "0.5745403", "0.5736756", "0.57328063", ...
0.87454265
0
taken straight from rubydoc
def fetch(uri_str, limit = 10) # You should choose a better exception. raise ArgumentError, 'too many HTTP redirects' if limit == 0 response = Net::HTTP.get_response(URI(uri_str)) case response when Net::HTTPSuccess then response when Net::HTTPRedirection then location = response['location'] w...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def doc; end", "def doc; end", "def doc; end", "def doc; end", "def doc=(_arg0); end", "def doc=(_arg0); end", "def doc=(_arg0); end", "def docstring; end", "def docstring; end", "def base_docstring; end", "def docs=(_arg0); end", "def private; end", "def docs; end", "def docstring_range;...
[ "0.7545426", "0.7545426", "0.7545426", "0.7545426", "0.74701095", "0.74701095", "0.74701095", "0.72546357", "0.72546357", "0.7225203", "0.7115322", "0.7012877", "0.7002491", "0.6906967", "0.6810225", "0.67866164", "0.66325366", "0.6607621", "0.6523997", "0.6481427", "0.647370...
0.0
-1
GET /providers GET /providers.json
def index @q= Provider.ransack(params[:q]) @providers = @q.result.uniq @providers = @providers.order('id ASC') end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def providers(params = {})\n response = default_scope.get('providers/') do |request|\n request.params = params\n end\n JSON.parse(response.body)\n end", "def providers\n url = url_with_api_version(@base_url, 'providers')\n resp = rest_get(url)\n JSON.parse(resp.body)...
[ "0.7952771", "0.76017314", "0.72843695", "0.72677416", "0.7190118", "0.706321", "0.70238805", "0.6972535", "0.6780555", "0.6780555", "0.6702626", "0.6662831", "0.6654126", "0.66216713", "0.65760744", "0.6559313", "0.65415585", "0.6507612", "0.6411908", "0.6400059", "0.6364796...
0.0
-1
GET /providers/1 GET /providers/1.json
def show @provider_comment = ProviderComment.new @appointment = @provider.appointments.build @provider_comments = @provider.provider_comments.paginate(:page => params[:page], :per_page => 6) @provider_attachments = @provider.provider_attachments.all if @provider.provider_attachments.present? prepare_m...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def show\n @provider = current_company.providers.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @provider }\n end\n end", "def providers(params = {})\n response = default_scope.get('providers/') do |request|\n request.params...
[ "0.72965443", "0.7273558", "0.71894586", "0.7070725", "0.7070725", "0.7022506", "0.70051533", "0.698674", "0.6975213", "0.6815575", "0.68083537", "0.67294085", "0.66371596", "0.6534581", "0.65297204", "0.6496716", "0.6496716", "0.64661527", "0.6432134", "0.6404023", "0.639583...
0.0
-1
POST /providers POST /providers.json
def create @provider = Provider.new(provider_params) @provider.user_id = current_user.id if @provider.save if params[:images_p] params[:images_p].each do |image| @provider.provider_attachments.create(image2: image) end end @provider_attachments = @provider.provide...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @provider = Provider.new(provider_params)\n\n if @provider.save\n render json: @provider, status: :created, location: @provider\n else\n render json: @provider.errors, status: :unprocessable_entity\n end\n end", "def create\n @provider = current_company.providers.new(params...
[ "0.7196066", "0.69564795", "0.6896307", "0.6886106", "0.6805139", "0.67927444", "0.6713015", "0.6592217", "0.65495884", "0.64063054", "0.63403493", "0.6326314", "0.63182", "0.6274265", "0.62492526", "0.6234781", "0.6211055", "0.6205681", "0.618968", "0.61692774", "0.61692774"...
0.0
-1
PATCH/PUT /providers/1 PATCH/PUT /providers/1.json
def update if @provider.update(provider_params) if params[:images_p] params[:images_p].each do |image| @provider.provider_attachments.create(image2: image) end end redirect_to edit_provider_path(@provider), notice: "Updated..." else render :edit end e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n @provider = current_company.providers.find(params[:id])\n\n respond_to do |format|\n if @provider.update_attributes(params[:provider])\n format.html { redirect_to @provider, notice: 'Provider was successfully updated.' }\n format.json { head :no_content }\n else\n ...
[ "0.6792706", "0.67664903", "0.67031115", "0.669896", "0.65813845", "0.65813845", "0.6569561", "0.65396255", "0.6398032", "0.6386539", "0.63685614", "0.6304783", "0.6259819", "0.624312", "0.62329984", "0.61548024", "0.6141602", "0.6115065", "0.61029375", "0.6067501", "0.601036...
0.0
-1
DELETE /providers/1 DELETE /providers/1.json
def destroy @provider.destroy respond_to do |format| format.html { redirect_to providers_url, notice: 'Provider was successfully destroyed.' } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @provider = Provider.find(params[:id])\n @provider.destroy\n\n respond_to do |format|\n format.html { redirect_to providers_url }\n format.json { head :ok }\n end\n end", "def destroy\n @provider.destroy\n respond_to do |format|\n format.html { redirect_to provider...
[ "0.74725485", "0.74660164", "0.7450604", "0.7450604", "0.7450604", "0.7380406", "0.7334259", "0.72246766", "0.72170794", "0.7042022", "0.7010476", "0.6984374", "0.6981934", "0.6956845", "0.6934574", "0.69325364", "0.69148713", "0.6913966", "0.68956465", "0.68860155", "0.68409...
0.7276671
9
Use callbacks to share common setup or constraints between actions.
def set_provider @provider = Provider.friendly.find(params[:id]) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_required_actions\n # TODO: check what fields change to asign required fields\n end", "def action_hook; end", "def run_actions; end", "def define_action_hook; end", "def actions; end", "def define_action_helpers\n if super && action == :save\n @instance_helper_module.class_...
[ "0.6163754", "0.6045816", "0.5944853", "0.59169096", "0.58892167", "0.58342934", "0.5776148", "0.57057375", "0.57057375", "0.56534296", "0.56209534", "0.54244673", "0.54101455", "0.54101455", "0.54101455", "0.53951085", "0.5378493", "0.53563684", "0.53399915", "0.5338049", "0...
0.0
-1
Never trust parameters from the scary internet, only allow the white list through.
def provider_params params.require(:provider).permit(:user_id, :nombre, :foto, :productos, :anticipacion, :telefono, :correo, :info_general, :servicios, :domicilio, :tags, :color, :servicio_list, :icon, :domicilio_list, :cover_photo, provider_attachments_attributes: [:id, :provider_id, :image2]) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def strong_params\n params.require(:user).permit(param_whitelist)\n end", "def strong_params\n params.require(:listing_member).permit(param_whitelist)\n end", "def allow_params_authentication!; end", "def allowed_params\n ALLOWED_PARAMS\n end", "def default_param_whitelist\n [\"mode\"]\n...
[ "0.6979893", "0.6781746", "0.6746611", "0.6742344", "0.6735229", "0.6592651", "0.65027124", "0.6498011", "0.648163", "0.647716", "0.64556813", "0.64386255", "0.63784456", "0.63756156", "0.636574", "0.6319542", "0.63004524", "0.6299559", "0.62925464", "0.62923217", "0.6289894"...
0.0
-1
Split a single Word Document DOCX into Separate Documents by Page Split a Word DOCX Document, comprised of multiple pages into separate Word DOCX document files, with each containing exactly one page.
def split_document_docx(input_file, opts = {}) data, _status_code, _headers = split_document_docx_with_http_info(input_file, opts) data end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def split_document_docx_with_http_info(input_file, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: SplitDocumentApi.split_document_docx ...'\n end\n # verify the required parameter 'input_file' is set\n if @api_client.config.client_side_valida...
[ "0.6403937", "0.6311767", "0.6232354", "0.618562", "0.6179826", "0.60049707", "0.5933091", "0.5861447", "0.58426964", "0.57281595", "0.5675957", "0.54665613", "0.54488546", "0.54223347", "0.54197526", "0.53865266", "0.53805596", "0.5377153", "0.53422916", "0.5276399", "0.5259...
0.741576
0
Split a single Word Document DOCX into Separate Documents by Page Split a Word DOCX Document, comprised of multiple pages into separate Word DOCX document files, with each containing exactly one page.
def split_document_docx_with_http_info(input_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SplitDocumentApi.split_document_docx ...' end # verify the required parameter 'input_file' is set if @api_client.config.client_side_validation && in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def split_document_docx(input_file, opts = {})\n data, _status_code, _headers = split_document_docx_with_http_info(input_file, opts)\n data\n end", "def split_document_pdf_by_page(input_file, opts = {})\n data, _status_code, _headers = split_document_pdf_by_page_with_http_info(input_file, opts)...
[ "0.74159193", "0.6311019", "0.62319267", "0.61852354", "0.61797816", "0.6004403", "0.59332716", "0.586148", "0.58422595", "0.57273674", "0.56745964", "0.5465951", "0.54473245", "0.5422754", "0.5417846", "0.53856885", "0.5379796", "0.53763556", "0.5342178", "0.52765495", "0.52...
0.6404123
1
Split a PDF file into separate PDF files, one per page Split an input PDF file into separate pages, comprised of one PDF file per page.
def split_document_pdf_by_page(input_file, opts = {}) data, _status_code, _headers = split_document_pdf_by_page_with_http_info(input_file, opts) data end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def split_pdf(filename, density=300, format=:jpg)\n\n #If this isn't a PDF, return the unmodified filename.\n return filename unless File.extname(filename) == '.pdf'\n\n #Get the length of the PDF...\n length = Docsplit.extract_length(filename)\n\n #If we don't have a multi-page document, abort.\n return fil...
[ "0.788739", "0.75300854", "0.7017414", "0.68583333", "0.67638206", "0.65433407", "0.62857735", "0.6252112", "0.62151736", "0.61574835", "0.6143245", "0.6129502", "0.6037993", "0.5969004", "0.5731062", "0.56895936", "0.56883866", "0.56863034", "0.5678969", "0.56555164", "0.564...
0.7778202
1
Split a PDF file into separate PDF files, one per page Split an input PDF file into separate pages, comprised of one PDF file per page.
def split_document_pdf_by_page_with_http_info(input_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SplitDocumentApi.split_document_pdf_by_page ...' end # verify the required parameter 'input_file' is set if @api_client.config.client_side_va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def split_pdf(filename, density=300, format=:jpg)\n\n #If this isn't a PDF, return the unmodified filename.\n return filename unless File.extname(filename) == '.pdf'\n\n #Get the length of the PDF...\n length = Docsplit.extract_length(filename)\n\n #If we don't have a multi-page document, abort.\n return fil...
[ "0.78872854", "0.77788436", "0.7529757", "0.68576837", "0.6764816", "0.65441626", "0.6285876", "0.6252718", "0.6215222", "0.61573154", "0.6143851", "0.6129102", "0.60379726", "0.59701663", "0.57326555", "0.56899285", "0.5688731", "0.5686077", "0.5679771", "0.5655362", "0.5647...
0.7017737
3
Split a single PowerPoint Presentation PPTX into Separate Slides Split an PowerPoint PPTX Presentation, comprised of multiple slides into separate PowerPoint PPTX presentation files, with each containing exactly one slide.
def split_document_pptx(input_file, opts = {}) data, _status_code, _headers = split_document_pptx_with_http_info(input_file, opts) data end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n #@deck = Powerpoint::Presentation.new\n # Creating an introduction slide:\n # title = 'Bicycle Of the Mind'\n # subtitle = 'created by Steve Jobs'\n # @deck.add_intro title, subtitle\n\n # Creating a text-only slide:\n # Title must be a string.\n # Content must be an array of st...
[ "0.5962979", "0.58408177", "0.57963943", "0.57414794", "0.5691294", "0.5632848", "0.54809046", "0.540933", "0.5403437", "0.5388615", "0.5362579", "0.5349955", "0.5276812", "0.5187617", "0.51528823", "0.5140644", "0.51384455", "0.51155937", "0.5105541", "0.51019543", "0.506154...
0.6600121
0
Split a single PowerPoint Presentation PPTX into Separate Slides Split an PowerPoint PPTX Presentation, comprised of multiple slides into separate PowerPoint PPTX presentation files, with each containing exactly one slide.
def split_document_pptx_with_http_info(input_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SplitDocumentApi.split_document_pptx ...' end # verify the required parameter 'input_file' is set if @api_client.config.client_side_validation && in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def split_document_pptx(input_file, opts = {})\n data, _status_code, _headers = split_document_pptx_with_http_info(input_file, opts)\n data\n end", "def index\n #@deck = Powerpoint::Presentation.new\n # Creating an introduction slide:\n # title = 'Bicycle Of the Mind'\n # subtitle = 'cre...
[ "0.6599225", "0.5962227", "0.58409107", "0.57953876", "0.5740722", "0.5632709", "0.5481202", "0.5409764", "0.5403177", "0.5388539", "0.5362015", "0.5349756", "0.5276522", "0.51866394", "0.5151946", "0.5139387", "0.5138344", "0.51145023", "0.51052", "0.5100989", "0.5062371", ...
0.568991
5
Split a single Text file (txt) into lines Split a Text (txt) Document by line, returning each line separately in order. Supports multiple types of newlines.
def split_document_txt_by_line(input_file, opts = {}) data, _status_code, _headers = split_document_txt_by_line_with_http_info(input_file, opts) data end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def split_lines\n text.split(/\\n/)\n end", "def lines\n text.split(/(?<=[\\n\\f])/)\n end", "def splitLines(theText)\n\n\ttheLines = [];\n\t\n\ttheText.each_line do |theLine|\n\t\n\t\tif (theLine =~ /^(.*?)(\\/\\/.*)/)\n\t\t\tlineText = $1;\n\t\t\tlineComment = $2;\n\t\telse\n\t\t\tline...
[ "0.74395645", "0.71370643", "0.6921677", "0.6660389", "0.6639126", "0.6530778", "0.6456134", "0.6437156", "0.6424298", "0.6391522", "0.602035", "0.59680796", "0.5966486", "0.58889943", "0.5838148", "0.5823687", "0.58049786", "0.57671934", "0.57671154", "0.5758516", "0.5750764...
0.72253245
1
Split a single Text file (txt) into lines Split a Text (txt) Document by line, returning each line separately in order. Supports multiple types of newlines.
def split_document_txt_by_line_with_http_info(input_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SplitDocumentApi.split_document_txt_by_line ...' end # verify the required parameter 'input_file' is set if @api_client.config.client_side_va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def split_lines\n text.split(/\\n/)\n end", "def split_document_txt_by_line(input_file, opts = {})\n data, _status_code, _headers = split_document_txt_by_line_with_http_info(input_file, opts)\n data\n end", "def lines\n text.split(/(?<=[\\n\\f])/)\n end", "def splitLines(theT...
[ "0.74388164", "0.72243166", "0.7137244", "0.6921621", "0.66600424", "0.6637854", "0.6530771", "0.6454958", "0.64374423", "0.6424105", "0.6391205", "0.5968105", "0.59670335", "0.58875054", "0.58365405", "0.58237606", "0.5804647", "0.5768068", "0.5767824", "0.5758287", "0.57511...
0.60192966
11
Split a single Text file (txt) by a string delimiter Split a Text (txt) Document by a string delimiter, returning each component of the string as an array of strings.
def split_document_txt_by_string(input_file, split_delimiter, opts = {}) data, _status_code, _headers = split_document_txt_by_string_with_http_info(input_file, split_delimiter, opts) data end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def split_text( text )\n result =text.split(/[\\n,\\r]/)\n end", "def split_string(input_file)\n input_file.chars\n end", "def splitText text\n res = Array.new(text.count(\"\\n\") + 1) {LockString.new}\n i = 0\n text.each_char do |c|\n if c == \"\\n\"\n i += 1\n el...
[ "0.67440975", "0.6271518", "0.62425226", "0.621726", "0.60558844", "0.60431755", "0.6036433", "0.59125876", "0.59033406", "0.5833909", "0.5808385", "0.5764144", "0.57529247", "0.57231116", "0.5692483", "0.5681783", "0.56756526", "0.56744885", "0.5665048", "0.5664343", "0.5658...
0.77564996
0
Split a single Text file (txt) by a string delimiter Split a Text (txt) Document by a string delimiter, returning each component of the string as an array of strings.
def split_document_txt_by_string_with_http_info(input_file, split_delimiter, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SplitDocumentApi.split_document_txt_by_string ...' end # verify the required parameter 'input_file' is set if @api_client....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def split_document_txt_by_string(input_file, split_delimiter, opts = {})\n data, _status_code, _headers = split_document_txt_by_string_with_http_info(input_file, split_delimiter, opts)\n data\n end", "def split_text( text )\n result =text.split(/[\\n,\\r]/)\n end", "def split_string(input_file...
[ "0.7757278", "0.6743991", "0.62731576", "0.62429523", "0.6218072", "0.6055725", "0.60438585", "0.6037358", "0.59129536", "0.59036094", "0.5833984", "0.5809004", "0.5764323", "0.5753143", "0.5723533", "0.5694006", "0.5681936", "0.5676132", "0.5675118", "0.5665616", "0.56653464...
0.5616906
23
Split a single Excel XLSX into Separate Worksheets Split an Excel XLSX Spreadsheet, comprised of multiple Worksheets (or Tabs) into separate Excel XLSX spreadsheet files, with each containing exactly one Worksheet.
def split_document_xlsx(input_file, opts = {}) data, _status_code, _headers = split_document_xlsx_with_http_info(input_file, opts) data end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def split( header )\n wb = Workbook.new\n ch( header ).each_wh.to_a.uniq.each { |name| wb.add( name ).load( data.headers ) }\n rows( header_rows+1 ) do |row|\n wb.sheets( row.val( header ) ) << row\n end\n wb\n end", "def spreadsheet\n if contains_extractable_spreadsheet...
[ "0.6220047", "0.5768663", "0.57444495", "0.55294675", "0.54960877", "0.54221535", "0.533592", "0.5321358", "0.5315487", "0.52746004", "0.52053016", "0.5162855", "0.5159011", "0.514003", "0.510013", "0.5056347", "0.50497204", "0.49733293", "0.49134254", "0.48845914", "0.485921...
0.5951131
1
Split a single Excel XLSX into Separate Worksheets Split an Excel XLSX Spreadsheet, comprised of multiple Worksheets (or Tabs) into separate Excel XLSX spreadsheet files, with each containing exactly one Worksheet.
def split_document_xlsx_with_http_info(input_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SplitDocumentApi.split_document_xlsx ...' end # verify the required parameter 'input_file' is set if @api_client.config.client_side_validation && in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def split( header )\n wb = Workbook.new\n ch( header ).each_wh.to_a.uniq.each { |name| wb.add( name ).load( data.headers ) }\n rows( header_rows+1 ) do |row|\n wb.sheets( row.val( header ) ) << row\n end\n wb\n end", "def split_document_xlsx(input_file, opts = {})\n data, ...
[ "0.6220187", "0.595076", "0.5768299", "0.57434523", "0.55280715", "0.54958016", "0.54220414", "0.5335193", "0.5321173", "0.53164756", "0.5275221", "0.5205251", "0.5162459", "0.5159639", "0.5139777", "0.5100889", "0.5056387", "0.504966", "0.4973606", "0.49124748", "0.48846287"...
0.47765326
24
start by buliding array
def anna_3_5 annas_counter = 0 #variable used inside the function a = (1..100).to_a #building array of a hundred elements while annas_counter < 100 annas_counter += 1 if annas_counter % 3 == 0 && annas_counter % 5 == 0 #way to do both 3 and 5 together(15 a factor of both) a[annas_counter -1] = "minedminds" ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def array_start\n []\n end", "def consecutive(arr)\r\n\r\nend", "def make_modified_start_array(size)\n rem = @rows % size\n size += 1 unless rem.zero?\n start_array = []\n @rows.times do |idx|\n start_row = size * idx\n break if start_row == @rows && size != 1\n\n sta...
[ "0.7758628", "0.65358067", "0.64976907", "0.6373304", "0.637259", "0.63491756", "0.6316243", "0.62835675", "0.62311035", "0.6194984", "0.61317545", "0.6109252", "0.61060125", "0.60928565", "0.6091854", "0.6053269", "0.6030535", "0.60241246", "0.6006294", "0.6002364", "0.60014...
0.0
-1
GET /adresses/1 GET /adresses/1.json
def show @adress = Adresse.find(params[:id]) respond_to do |format| format.html # show.html.erb format.json { render json: @adress } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @adresses = Adress.all\n end", "def show_addresses(**params)\n get('addresses', params)\n end", "def addresses\n @client.request('getaddressesbyaccount', name)\n end", "def getaddressesbyaccount(account)\n request :getaddressesbyaccount, account\n end", "def get_addr...
[ "0.70358837", "0.6541532", "0.6498269", "0.649116", "0.64698344", "0.64093834", "0.6361881", "0.6301471", "0.62858456", "0.6252206", "0.6252206", "0.6252206", "0.6250358", "0.6232606", "0.6210534", "0.6202855", "0.6202402", "0.618323", "0.6138616", "0.6136007", "0.6108378", ...
0.6253751
9
GET /adresses/new GET /adresses/new.json
def new @adress = Adresse.new respond_to do |format| format.html # new.html.erb format.json { render json: @adress } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @address = Address.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @address }\n end\n end", "def new\n @address = Address.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @address }\n ...
[ "0.69748276", "0.69748276", "0.69748276", "0.6930183", "0.6882902", "0.67987746", "0.677485", "0.67327476", "0.67301714", "0.66535574", "0.6651868", "0.6595146", "0.654046", "0.6514945", "0.65000457", "0.6493159", "0.643214", "0.643214", "0.6427391", "0.64231557", "0.64106816...
0.6843001
5
POST /adresses POST /adresses.json
def create @adress = Adresse.new(params[:adresse]) respond_to do |format| if @adress.save format.html { redirect_to @adress, notice: 'Adresse was successfully created.' } format.json { render json: @adress, status: :created, location: @adress } else format.html { render ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @adresses = Adress.all\n end", "def add_address(params)\n ad = AnubisNetwork::Model::AddAddress.new\n ad_arr = Array.new\n ad.domain_id = params[:domain_id]\n params[:address].each do |address|\n add = AnubisNetwork::Model::Address.new\n add.address = address\n ...
[ "0.6362966", "0.5891902", "0.5887785", "0.5826308", "0.5798419", "0.5784933", "0.56596774", "0.5653587", "0.56505007", "0.5627041", "0.5608099", "0.55230296", "0.543984", "0.54367715", "0.5418346", "0.54083997", "0.53971344", "0.5351901", "0.53434587", "0.5340721", "0.5332487...
0.5508353
12
PUT /adresses/1 PUT /adresses/1.json
def update @adress = Adresse.find(params[:id]) respond_to do |format| if @adress.update_attributes(params[:adresse]) format.html { redirect_to @adress, notice: 'Adresse was successfully updated.' } format.json { head :no_content } else format.html { render action: "edit"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_address(id, params)\n put(\"addresses/#{id}\", address: params, change_case: false)\n end", "def update\n if @address.update(address_params)\n render json: @address\n else\n render json: @address.errors, status: :unprocessable_entity\n end\n end", "def update\n @ad...
[ "0.6465739", "0.6414923", "0.61675304", "0.60198087", "0.5983089", "0.59606105", "0.5949782", "0.59114236", "0.5849559", "0.5792501", "0.5779091", "0.57711875", "0.57711875", "0.57711875", "0.57711875", "0.5763932", "0.5756379", "0.5731047", "0.5726798", "0.5724072", "0.57005...
0.5710571
20
DELETE /adresses/1 DELETE /adresses/1.json
def destroy @adress = Adresse.find(params[:id]) @adress.destroy respond_to do |format| format.html { redirect_to adresses_url } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @adress.destroy\n respond_to do |format|\n format.html { redirect_to adresses_url, notice: 'Adress was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @tadress.destroy\n respond_to do |format|\n format.html { redirect_to tadr...
[ "0.68271005", "0.6819182", "0.6786946", "0.67746955", "0.67746955", "0.67746955", "0.67746955", "0.66636837", "0.6631573", "0.6610559", "0.6600648", "0.6600648", "0.65981555", "0.6583381", "0.6561219", "0.6534754", "0.65264165", "0.6505333", "0.6484048", "0.6466104", "0.64608...
0.6994285
0
conflicts_with "libharkio", :because => "hark is containing libharkio" conflicts_with "flowdesigner", :because => "hark is containing flowdesigner" conflicts_with "harkfd", :because => "hark is containing harkfd" conflicts_with "harkdesigner", :because => "hark is containing harkdesigner"
def install # nothing to do end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def message\n \"#{base} already defines #{conflicts}, also defined on #{owner}\"\n end", "def add_conflict(name, specifics)\n @conflicts << Requirement.parse(name, specifics)\n end", "def resolve_install_conflicts(graph, is_dependency = false)\n graph.each do |release|\n @en...
[ "0.6316815", "0.61961704", "0.6191089", "0.61436087", "0.61436087", "0.60375047", "0.5991489", "0.5959999", "0.5959999", "0.5944441", "0.5928914", "0.5917527", "0.5807498", "0.580711", "0.57860345", "0.57860345", "0.5747584", "0.5730294", "0.56447315", "0.55942506", "0.559119...
0.0
-1
Flush the contents of the input buffer, i.e. return the input buffer even though a token has not yet been encountered
def flush @input << @tail buffer = @input.join @input.clear @tail = "" # @tail.clear is slightly faster, but not supported on 1.8.7 buffer end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def flush\n buffer = @input\n reset\n buffer\n end", "def flush_next_in\n\t\t@in_pos = @input_buffer.length\n\t\t@finished = true\n\t\tret = @input_buffer.pack(\"c*\")\n\t\t@input_buffer = []\n\t\tret\n\tend", "def flush_next_in\n\t\t\t@in_pos = @input_buffer.length\n\t\...
[ "0.7359771", "0.69031227", "0.6884942", "0.6407633", "0.6315221", "0.63139856", "0.60206676", "0.60163707", "0.59484464", "0.59388727", "0.59315157", "0.59315157", "0.58082414", "0.58067816", "0.575631", "0.5737898", "0.5699563", "0.5686588", "0.5664577", "0.5594749", "0.5581...
0.639202
4
parent tree is the tree in which child/linked_components is defined child components are components dependent on the selected parent row linked components will update whenever the parent is updated
def initialize(args, kwargs = nil) super(args, kwargs) client_config[:child_components] = child_components || [] client_config[:linked_components] = linked_components || [] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def child_components()\n @child_components\n end", "def component\n @parent.component\n end", "def add_components\n #Checks if parent_id is a Product or Component based on a string value\n @parent = get_parent(params[:parent_id])\n\n #Components to Add\n if(!@parent.compo...
[ "0.64184403", "0.62966806", "0.6124568", "0.58138335", "0.576041", "0.5684949", "0.5628322", "0.56225383", "0.56225383", "0.5563017", "0.552356", "0.5496693", "0.5412006", "0.5383236", "0.53738785", "0.5369917", "0.5356024", "0.5342298", "0.53279823", "0.53001904", "0.5286619...
0.0
-1
def method that takes an arr as its argument arr.length = 5 upcase all 5 words 1st letter
def summon_captain_planet(arr) arr.map {|word| word.capitalize + "!"} end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def shout(words)\n words.upcase if words.length > 10\nend", "def yeller(array)\n array.join.upcase\nend", "def reverberate(sent)\n new_arr = []\n words_arr = sent.split(\" \")\n vowels = \"aeiouAEIOU\"\n words_arr.each do |word|\n capt = false\n if word.capitalize == word\n capt = true\n en...
[ "0.6980339", "0.6920066", "0.6849579", "0.6725075", "0.66402906", "0.66292995", "0.66116613", "0.6607455", "0.6605649", "0.6592218", "0.6561553", "0.6557071", "0.6553177", "0.65508485", "0.65505743", "0.65504175", "0.6541252", "0.6528198", "0.6520616", "0.65154314", "0.650549...
0.6254212
45
def method takes an arr as its argument if arr.length > 4 then
def long_planeteer_calls(arr) arr.any? { |word| word.length > 4} # <-- needed a space between "{" and pipe to pass test...??? end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def long_planeteer_calls(array)\n return array.any?{|item| item.length > 4}\n # code an argument here\n # Your code here\nend", "def long_planeteer_calls(arr)\n arr.any? {|call|call.length > 4}\nend", "def long_planeteer_calls(array)\n array.any?{|call| call.length > 4}\n #any?=>returns TRUE if ar least ...
[ "0.725801", "0.7150111", "0.7078699", "0.6897331", "0.6812739", "0.67678624", "0.6755229", "0.6639308", "0.65052944", "0.6490975", "0.6464042", "0.64163226", "0.63812995", "0.63766605", "0.6369898", "0.629206", "0.6279105", "0.624209", "0.6225961", "0.6222345", "0.6217241", ...
0.599177
28
def chz to accept arr of str arr.include?(cheese_types)
def find_the_cheese(arr) cheese_types = ["cheddar", "gouda", "camembert"] arr.find do |cheese| cheese_types.include?(cheese) end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_the_cheese(arr)\n # look through each string\n # return the first string that is a cheese with include?\n # the array below is here to help\n cheese_types = [\"cheddar\", \"gouda\", \"camembert\"]\n arr.find do |type|\n cheese_types.include?(type)\n end \nend", "def find_the_cheese(arr_of_str)\n ...
[ "0.74523264", "0.73594534", "0.7297445", "0.7292444", "0.72789735", "0.72059", "0.7084231", "0.699657", "0.69866484", "0.6947896", "0.68829024", "0.68688947", "0.6856165", "0.6844255", "0.68435884", "0.6832548", "0.670578", "0.6655369", "0.661294", "0.66079503", "0.655944", ...
0.71200424
6
given a sorted array of integers as method argument return a new array that includes all the missing integers in order between first argument and last. (only include missing integers) Requirements method that takes array of integers returns new array contains only the intergers that are not included in given array that...
def missing(array) full_array_set = (array.first..array.last).to_a missing_numbers = [] full_array_set.each do |number| if array.include?(number) next else missing_numbers << number end end missing_numbers end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def missing(sorted_array)\n range = (sorted_array.first...sorted_array.last)\n range.to_a.each_with_object([]) do |int, arr|\n arr << int unless sorted_array.include?(int)\n end\nend", "def missing(sorted_array)\n missing_elements = []\n (sorted_array.first..sorted_array.last).each do |num|\n missing_...
[ "0.7937893", "0.7778004", "0.77582425", "0.75795144", "0.753936", "0.74931866", "0.7480418", "0.7454445", "0.73944974", "0.7331069", "0.73295814", "0.7224918", "0.72182554", "0.7215845", "0.7214628", "0.7214628", "0.7207167", "0.7135477", "0.7108111", "0.70630044", "0.7018094...
0.8090604
0
Further exploration write without using a method that retuquires a block
def missing(array) result = [] num = array.first + 1 loop do result << num if !array.include?(num) num += 1 break if num == array.last end result end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def block; end", "def block; end", "def block; end", "def block; end", "def block; end", "def block; end", "def block; end", "def block; end", "def block; end", "def block; end", "def block; end", "def block; end", "def block; end", "def block; end", "def block; end", "def block; end"...
[ "0.7718606", "0.7718606", "0.7718606", "0.7718606", "0.7718606", "0.7718606", "0.7718606", "0.7718606", "0.7718606", "0.7718606", "0.7718606", "0.7718606", "0.7718606", "0.7718606", "0.7718606", "0.7718606", "0.7718606", "0.7718606", "0.7718606", "0.7718606", "0.76668656", ...
0.0
-1
Use callbacks to share common setup or constraints between actions.
def set_operating_system @operating_system = OperatingSystem.find(params[:id]) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_required_actions\n # TODO: check what fields change to asign required fields\n end", "def action_hook; end", "def run_actions; end", "def define_action_hook; end", "def actions; end", "def define_action_helpers\n if super && action == :save\n @instance_helper_module.class_...
[ "0.6163754", "0.6045816", "0.5944853", "0.59169096", "0.58892167", "0.58342934", "0.5776148", "0.57057375", "0.57057375", "0.56534296", "0.56209534", "0.54244673", "0.54101455", "0.54101455", "0.54101455", "0.53951085", "0.5378493", "0.53563684", "0.53399915", "0.5338049", "0...
0.0
-1
Never trust parameters from the scary internet, only allow the white list through.
def operating_system_params params.require(:operating_system).permit(:name) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def strong_params\n params.require(:user).permit(param_whitelist)\n end", "def strong_params\n params.require(:listing_member).permit(param_whitelist)\n end", "def allow_params_authentication!; end", "def allowed_params\n ALLOWED_PARAMS\n end", "def default_param_whitelist\n [\"mode\"]\n...
[ "0.6979893", "0.6781746", "0.6746611", "0.6742344", "0.6735229", "0.6592651", "0.65027124", "0.6498011", "0.648163", "0.647716", "0.64556813", "0.64386255", "0.63784456", "0.63756156", "0.636574", "0.6319542", "0.63004524", "0.6299559", "0.62925464", "0.62923217", "0.6289894"...
0.0
-1
Punctuation is not part of the word unless it is a contraction. In order to not have to write an actual language parser, there won't be any punctuation too complex. There will be no "'" that is not part of a contraction.
def alternate_words(sentence) #Not clear why failing test because exact same output array = sentence.split(' ') new_array = [] array.length.times {|index| new_array << array[index] if index.even?} new_array.map! {|element| element.gsub(/\p{P}(?<!')/, "")} return new_array end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_word?\n not is_punctuation?\n end", "def is_punctuation?(str)\n %w(. , ? ! ; :).include?(str)\n end", "def is_punctuation?\n %w(. ,).include?(wordform)\n end", "def strip_punctuation(word)\n punctuation_stripping_regexp = /(.+)([^.,?!-_+=@#$%^&*()])/\n word.match(punctuation_stripping_re...
[ "0.72316307", "0.69443905", "0.69001186", "0.6649458", "0.6599166", "0.65799224", "0.6518671", "0.6439343", "0.64186335", "0.6399754", "0.6366061", "0.6230127", "0.6226919", "0.6173443", "0.61196196", "0.6105636", "0.6044592", "0.60440993", "0.6040421", "0.6017324", "0.600613...
0.0
-1
Returns this organization's pricing setup that is effective on a given date.
def effective_pricing_setup_for_date(date=Date.today) if self.pricing_setups.blank? raise ArgumentError, "Organization has no pricing setups" if self.parent.nil? return self.parent.effective_pricing_setup_for_date(date) end current_setups = self.pricing_setups.select { |x| x.effective_date.to_d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def profit(start_date, end_date)\n price(end_date) - price(start_date)\n end", "def price(date)\n if self.show_prices().any? {|price| price[\"date\"] == date}\n selected_price = @prices.map {|price| return price[\"val\"] if price[\"date\"] == date}\n else\n return false\n end\n end", ...
[ "0.5811931", "0.57906604", "0.57102764", "0.5534548", "0.55311817", "0.54792494", "0.54588944", "0.5397136", "0.53532493", "0.5347942", "0.53359604", "0.53335863", "0.5316683", "0.52397287", "0.5216623", "0.5215676", "0.5201688", "0.5185811", "0.51738816", "0.5165138", "0.512...
0.8419405
0
NOT SURE WHAT THIS IS TRYING TO ACCOMPLISH
def all_child_organizations_with_non_process_ssrs [ non_process_ssrs_children, non_process_ssrs_children.map(&:all_child_organizations_with_non_process_ssrs) ].flatten end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def private; end", "def probers; end", "def schubert; end", "def refutal()\n end", "def specie; end", "def specie; end", "def specie; end", "def specie; end", "def implementation; end", "def implementation; end", "def weber; end", "def sitemaps; end", "def internal; end", "def custom; ...
[ "0.8021567", "0.70946926", "0.6988846", "0.66629684", "0.6595833", "0.6595833", "0.6595833", "0.6595833", "0.64604986", "0.64604986", "0.6409177", "0.640303", "0.6400958", "0.62742406", "0.62742406", "0.62413055", "0.62345177", "0.617216", "0.61653584", "0.61630756", "0.61624...
0.0
-1
mute this message for users so the message is not shown as unread in sidebar menue
def push MessagePublish.new(@message).push if params[:redirect] == 'index' return_url = admin_messages_path else return_url = admin_message_path(@message) end redirect_to return_url, notice: t(:message_push_successful) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mute()\n update(:mute => true)\n end", "def mutemessages\n self.has_message = false\n self.save\n end", "def mute\n MessagePublish.new(@message).mute\n if params[:redirect] == 'index'\n return_url = admin_messages_path\n else\n return_url = admin_message_path(@message)\n ...
[ "0.7288283", "0.7213155", "0.71361893", "0.6963732", "0.6941801", "0.6708265", "0.6701498", "0.6674173", "0.6667504", "0.6666716", "0.63640696", "0.62987655", "0.62793213", "0.6247253", "0.62293005", "0.6204381", "0.6186285", "0.61650497", "0.6148973", "0.60855824", "0.608022...
0.0
-1
mute this message for users so the message is not shown as unread in sidebar menue
def mute MessagePublish.new(@message).mute if params[:redirect] == 'index' return_url = admin_messages_path else return_url = admin_message_path(@message) end redirect_to return_url, notice: t(:message_mute_successful) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mute()\n update(:mute => true)\n end", "def mutemessages\n self.has_message = false\n self.save\n end", "def mute!\n redis(\"set\", \"chat:mute:#{@name}\", true)\n end", "def mute_command(message)\n muted_chats[message.chat.id] = Date.today\n api_send_message(chat_id: message...
[ "0.7288283", "0.7213155", "0.6963732", "0.6941801", "0.6708265", "0.6701498", "0.6674173", "0.6667504", "0.6666716", "0.63640696", "0.62987655", "0.62793213", "0.6247253", "0.62293005", "0.6204381", "0.6186285", "0.61650497", "0.6148973", "0.60855824", "0.6080223", "0.6077750...
0.71361893
2
publish this message to be displayed in user/messages
def publish MessagePublish.new(@message).publish if params[:redirect] == 'index' return_url = admin_messages_path else return_url = admin_message_path(@message) end redirect_to return_url, notice: t(:message_publishing_successful) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def publish( message )\n raise NotImplementedError, \"please implement 'publish'\"\n end", "def publish message, root\n puts \"message: #{message.inspect}\"\n puts \"text: #{message['text']}\"\n @messages.shift if @messages.size == @@MAX_MESSAGES \n @messages << { 'head' => '?...
[ "0.7529173", "0.7358063", "0.7226232", "0.70895445", "0.7033707", "0.7001068", "0.7000938", "0.6998392", "0.6998392", "0.69793254", "0.6970954", "0.6918436", "0.6894762", "0.68836606", "0.68836606", "0.68836606", "0.6824872", "0.68166506", "0.6767027", "0.6748612", "0.6702971...
0.72323734
2
unpublish this message so it is not displayed in user/messages
def unpublish MessagePublish.new(@message).unpublish if params[:redirect] == 'index' return_url = admin_messages_path else return_url = admin_message_path(@message) end redirect_to return_url, notice: t(:message_unpublishing_successful) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unpublish\r\n return unless published?\r\n self.unpublish_at = 1.minute.ago\r\n end", "def unpublish\n self.published = false\n end", "def unpublish!\r\n unpublish\r\n save!\r\n end", "def unpublish!\n self.is_published = false\n sav...
[ "0.76862735", "0.76458293", "0.75358635", "0.7457503", "0.740441", "0.73764247", "0.7299394", "0.72888106", "0.71825224", "0.71172076", "0.71172076", "0.71172076", "0.696728", "0.6842612", "0.67727107", "0.6749793", "0.66655785", "0.6513374", "0.6512478", "0.6451984", "0.6435...
0.802911
0
Use callbacks to share common setup or constraints between actions.
def set_submission @submission = Submission.find(params[:id]) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_required_actions\n # TODO: check what fields change to asign required fields\n end", "def action_hook; end", "def run_actions; end", "def define_action_hook; end", "def actions; end", "def define_action_helpers\n if super && action == :save\n @instance_helper_module.class_...
[ "0.6164095", "0.6046031", "0.5945298", "0.59179014", "0.58890367", "0.58341795", "0.5776118", "0.5700777", "0.5700777", "0.5656277", "0.56218207", "0.5423995", "0.5411516", "0.5411516", "0.5411516", "0.5395004", "0.53783494", "0.53593004", "0.53412604", "0.534078", "0.5332865...
0.0
-1
Only allow a trusted parameter "white list" through.
def submission_params params.require(:submission).permit(:survey_id, answers_attributes:[:id, :question_id, :submission_id, :answer_text]) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def allowed_params\n ALLOWED_PARAMS\n end", "def expected_permitted_parameter_names; end", "def param_whitelist\n [:role, :title]\n end", "def default_param_whitelist\n [\"mode\"]\n end", "def permitir_parametros\n \t\tparams.permit!\n \tend", "def permitted_params\n []\n end", ...
[ "0.71213365", "0.70527846", "0.6947171", "0.6901663", "0.67342883", "0.6717481", "0.668679", "0.667654", "0.6660948", "0.655484", "0.6525947", "0.64567953", "0.64502525", "0.6450165", "0.6446098", "0.6433068", "0.64118934", "0.64118934", "0.63903046", "0.6379847", "0.6379847"...
0.0
-1
gives you access to visit, etc.
def clear_all_in_database Tweet.destroy_all User.destroy_all Follow.destroy_all end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def visit_my_account\n\nend", "def access_control\n \n end", "def has_access?\n true\n end", "def has_access?\n true\n end", "def visits(*args)\n webrat_session.visits(*args)\n end", "def access\n render :access\n end", "def visit_page \n visit URL \n end", ...
[ "0.68012726", "0.6758096", "0.63966715", "0.63966715", "0.63702595", "0.62593085", "0.6259189", "0.6216931", "0.6216931", "0.61760205", "0.6169481", "0.6134821", "0.6097091", "0.6085528", "0.60217243", "0.60198987", "0.6009112", "0.60064226", "0.60064226", "0.60064226", "0.60...
0.0
-1
Decode the message body with URLsafe Base64.
def decode_body(body) body += '=' * (4 - body.length.modulo(4)) Base64.decode64(body.tr('-_','+/')) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def decode(b)\n Base64.decode64(b)\n end", "def decode_base64\n #self.unpack(\"m*\").first\n # This should be the above line but due to a bug in the ruby base64 decoder\n # it will only decode base64 where the lines are in multiples of 4, this is\n # contrary to RFC2045 which says that al...
[ "0.7582977", "0.7495309", "0.7464701", "0.7454587", "0.74107337", "0.7273368", "0.7273368", "0.72249246", "0.71549535", "0.70143086", "0.70143086", "0.69052976", "0.6755023", "0.6736345", "0.66945213", "0.65576434", "0.6500636", "0.6465399", "0.6430117", "0.6384971", "0.63413...
0.80409807
0
Convert recipients to array list
def parse_recipients(addresses) list_addresses = addresses.gsub(/[\r\n]+/, '').gsub(/(@((?:[-a-z0-9]+\.)+[a-z]{2,})(\>)?)\,/i, '\1'+"\n") list_addresses.split("\n").map{|full_address| {'name' => extract_name(full_address), 'email' => extract_email_address(full_address)} } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def recipients_list\n to.split(/\\s*,\\s*/)\n end", "def recipients\n return [] unless original_message\n Array original_message.recipients\n end", "def recipients\n return Array.wrap(@recipients) unless @recipients.blank?\n @recipients = receipts.map { |receipt| receipt.receiver }\n end"...
[ "0.8100382", "0.7897978", "0.7712709", "0.76107675", "0.7542433", "0.7465215", "0.7439932", "0.7400067", "0.7400067", "0.7362793", "0.73407066", "0.7332017", "0.7329481", "0.73208576", "0.7234816", "0.71353686", "0.71273386", "0.7114562", "0.7097829", "0.70906645", "0.7033816...
0.61800605
76
Sampled from griddler gem
def extract_name(full_address) full_address = full_address.strip name = full_address.split('<').first.strip if name.present? && name != full_address name end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def samples; end", "def samples; end", "def weber; end", "def sample\n img :src => $imgHostURL + \"/\" + $sampleImg\n end", "def download_sample_probe_list\n temp = [[\"Probes for calibration\"], [\"EukS_1209_25_dT\"], [\"EukS_328_25_dT\"], [\"DinoB_25_dT\"], [\"Test1 (EukS_1209_25dT)\"]]\n send_sample...
[ "0.6096354", "0.6096354", "0.57001215", "0.56658006", "0.5632151", "0.55022365", "0.53958446", "0.5347121", "0.5347121", "0.5306905", "0.5298734", "0.5277197", "0.5249278", "0.5242098", "0.5184376", "0.51812994", "0.51503956", "0.51255876", "0.5104989", "0.5095026", "0.509312...
0.0
-1
GET /comments GET /comments.json
def index @comments = Comment.order("created_at DESC") render json: @comments, status: :ok end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def comments\n client.get(\"/#{id}/comments\")\n end", "def comments\n @list.client.get(\"#{url}/comments\")\n end", "def comments\n @list.client.get(\"#{url}/comments\")\n end", "def comments\n render json: @post.comments\n end", "def list\n comments = Comment.where(post: @p...
[ "0.8573163", "0.7836431", "0.7836431", "0.7556213", "0.7529708", "0.7521586", "0.74967605", "0.73969424", "0.73019254", "0.7295428", "0.7285267", "0.72738194", "0.7270676", "0.7248517", "0.7243218", "0.7208613", "0.72051287", "0.7185529", "0.717827", "0.7158628", "0.7157112",...
0.6751654
78
GET /comments/1 GET /comments/1.json
def show if @comment.nil? render json: {error: "Not Found"}, status: :not_found else render json: @comment, status: :ok end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def comments\n client.get(\"/#{id}/comments\")\n end", "def comments\n @list.client.get(\"#{url}/comments\")\n end", "def comments\n @list.client.get(\"#{url}/comments\")\n end", "def comments\n @article = Article.find(params[:id])\n @comments = @article.comments\n\n respond_...
[ "0.82817644", "0.7442182", "0.7442182", "0.74355227", "0.7405664", "0.7305381", "0.72841007", "0.72580236", "0.72554684", "0.72480613", "0.72426623", "0.72193956", "0.72187996", "0.72187996", "0.71744055", "0.715919", "0.7158581", "0.7119482", "0.7115376", "0.7101109", "0.710...
0.66821516
90
POST /comments POST /comments.json
def create @comment = @noticia.comments.create(comment_params) if @comment.save render json: @comment, status: :created else render json: @comment.errors, status: :unprocessable_entity end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @comment = @post.comments.new(comment_params)\n if @comment.save\n render json: @comment, status: :created\n else\n render json: @comment.errors, status: :unprocessable_entity\n end\n\n end", "def comment options={}\n client.post(\"/#{id}/comments\", options)\n end", ...
[ "0.75120175", "0.74212646", "0.7374645", "0.72364116", "0.7205224", "0.7086658", "0.7069151", "0.70549524", "0.7049054", "0.6989455", "0.69825", "0.69578165", "0.6910411", "0.6909373", "0.68731725", "0.6871654", "0.6822542", "0.6810818", "0.6787486", "0.6785412", "0.6761798",...
0.69657713
11
PATCH/PUT /comments/1 PATCH/PUT /comments/1.json
def update if @comment.update_attributes(comment_params) render json: @comment, status: :ok else render json: {error: "Not found"}, status: :not_found end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n json_update_and_sanitize(comment, comment_params, Comment)\n end", "def update\n @comment = Comment.find(params[:comment_id])\n @comment.update(comment_params)\n render json: @comment\n end", "def update\n user = User.find_by({token: env['HTTP_TOKEN']})\n comment = user.com...
[ "0.7227979", "0.7067638", "0.7065807", "0.70278615", "0.6885747", "0.67793745", "0.6738173", "0.6733159", "0.6725644", "0.6725644", "0.66961336", "0.66686445", "0.66627324", "0.664087", "0.66357386", "0.6606313", "0.66006386", "0.65986896", "0.65986896", "0.6597794", "0.65936...
0.66298985
15
DELETE /comments/1 DELETE /comments/1.json
def destroy if @comment.nil? render json: {error: "Not found"}, status: :not_found else @comment.destroy render json: @comment, status: :ok end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @comment.destroy\n respond_to do |format|\n format.json { head :no_content }\n end\n end", "def destroy\n\n @comment.destroy\n render json: @comment, status: :ok\n\n end", "def destroy\n @comment1 = Comment1.find(params[:id])\n @comment1.destroy\n\n respond_to do |f...
[ "0.75611866", "0.74358994", "0.73740494", "0.73681736", "0.7359092", "0.7355231", "0.7294599", "0.7294599", "0.727844", "0.7270565", "0.72603524", "0.72603524", "0.72603524", "0.72558737", "0.72558737", "0.72558737", "0.7241665", "0.7240772", "0.7240202", "0.7240202", "0.7240...
0.7109058
40
Use callbacks to share common setup or constraints between actions.
def set_comment @comment = Comment.where(:id => params[:id]).first end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_required_actions\n # TODO: check what fields change to asign required fields\n end", "def action_hook; end", "def run_actions; end", "def define_action_hook; end", "def actions; end", "def define_action_helpers\n if super && action == :save\n @instance_helper_module.class_...
[ "0.6163754", "0.6045816", "0.5944853", "0.59169096", "0.58892167", "0.58342934", "0.5776148", "0.57057375", "0.57057375", "0.56534296", "0.56209534", "0.54244673", "0.54101455", "0.54101455", "0.54101455", "0.53951085", "0.5378493", "0.53563684", "0.53399915", "0.5338049", "0...
0.0
-1
Never trust parameters from the scary internet, only allow the white list through.
def comment_params params.permit(:author, :comment) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def strong_params\n params.require(:user).permit(param_whitelist)\n end", "def strong_params\n params.require(:listing_member).permit(param_whitelist)\n end", "def allow_params_authentication!; end", "def allowed_params\n ALLOWED_PARAMS\n end", "def default_param_whitelist\n [\"mode\"]\n...
[ "0.6979893", "0.6781746", "0.6746611", "0.6742344", "0.6735229", "0.6592651", "0.65027124", "0.6498011", "0.648163", "0.647716", "0.64556813", "0.64386255", "0.63784456", "0.63756156", "0.636574", "0.6319542", "0.63004524", "0.6299559", "0.62925464", "0.62923217", "0.6289894"...
0.0
-1
GET /cache_flags GET /cache_flags.json
def index @cache_flags = CacheFlag.all end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def flags\n response[\"flags\"]\n end", "def refresh_feature_cache \n get(\"/globalsettings.json/cache/refresh\")\nend", "def cache_flag_params\n params.require(:cache_flag).permit(:flagtype, :name, :timemodified, :value, :expiry)\n end", "def index\n @flags = Flag.search(params[:searc...
[ "0.66757345", "0.6608292", "0.63022625", "0.62431526", "0.6181671", "0.6151518", "0.61337775", "0.60902214", "0.6068397", "0.60361505", "0.60361505", "0.602256", "0.5995062", "0.5946573", "0.5946573", "0.5942139", "0.59215033", "0.5902419", "0.5893842", "0.58429873", "0.57916...
0.762038
0
GET /cache_flags/1 GET /cache_flags/1.json
def show end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @cache_flags = CacheFlag.all\n end", "def refresh_feature_cache \n get(\"/globalsettings.json/cache/refresh\")\nend", "def flags\n response[\"flags\"]\n end", "def index\n @flags = Flag.search(params[:search]).order(\"id\").page(params[:page]).per(10)\n respond_to do |format...
[ "0.7448469", "0.65656435", "0.6528744", "0.63220507", "0.61950696", "0.6188898", "0.6158469", "0.606698", "0.6051429", "0.6051414", "0.58804196", "0.585027", "0.58284074", "0.58241194", "0.58241194", "0.5791693", "0.5789772", "0.57849604", "0.57759935", "0.57639456", "0.57350...
0.0
-1
POST /cache_flags POST /cache_flags.json
def create @cache_flag = CacheFlag.new(cache_flag_params) respond_to do |format| if @cache_flag.save format.html { redirect_to @cache_flag, notice: 'Cache flag was successfully created.' } format.json { render :show, status: :created, location: @cache_flag } else format.html...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cache_flag_params\n params.require(:cache_flag).permit(:flagtype, :name, :timemodified, :value, :expiry)\n end", "def update\n respond_to do |format|\n if @cache_flag.update(cache_flag_params)\n format.html { redirect_to @cache_flag, notice: 'Cache flag was successfully updated.' }\n ...
[ "0.717748", "0.6272535", "0.62639195", "0.59311074", "0.5717695", "0.56032974", "0.56022555", "0.55645955", "0.5553682", "0.55441767", "0.55244315", "0.55212486", "0.5515079", "0.5512354", "0.5461473", "0.5448828", "0.54267985", "0.5415192", "0.5413402", "0.5400397", "0.54003...
0.71008873
1
PATCH/PUT /cache_flags/1 PATCH/PUT /cache_flags/1.json
def update respond_to do |format| if @cache_flag.update(cache_flag_params) format.html { redirect_to @cache_flag, notice: 'Cache flag was successfully updated.' } format.json { render :show, status: :ok, location: @cache_flag } else format.html { render :edit } format.jso...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cache_flag_params\n params.require(:cache_flag).permit(:flagtype, :name, :timemodified, :value, :expiry)\n end", "def set_cache_flag\n @cache_flag = CacheFlag.find(params[:id])\n end", "def update\n @flag = Flag.find(params[:id])\n\n respond_to do |format|\n if @flag.update_attri...
[ "0.6381122", "0.61686176", "0.61662704", "0.609784", "0.60806817", "0.5912304", "0.57958215", "0.57958215", "0.57732767", "0.56985295", "0.5696266", "0.56908494", "0.56908494", "0.56908494", "0.56908494", "0.5663767", "0.564975", "0.56400704", "0.5634978", "0.562246", "0.5606...
0.7425345
0
DELETE /cache_flags/1 DELETE /cache_flags/1.json
def destroy @cache_flag.destroy respond_to do |format| format.html { redirect_to cache_flags_url, notice: 'Cache flag was successfully destroyed.' } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete(*args)\n args.each do |arg|\n @cache.delete(\"#{@cache_name}:#{arg}\")\n end\n end", "def destroy\n @flag = Flag.find(params[:id])\n @flag.destroy\n\n respond_to do |format|\n format.html { redirect_to flags_url }\n format.json { head :no_content }\n end\n en...
[ "0.6828546", "0.6570845", "0.65011466", "0.6464702", "0.6464702", "0.63967526", "0.63652015", "0.6348739", "0.6287922", "0.6287922", "0.62492347", "0.62189436", "0.6200307", "0.61336094", "0.6083811", "0.60236335", "0.60222137", "0.6015606", "0.6015055", "0.60119617", "0.6011...
0.7554216
0
Use callbacks to share common setup or constraints between actions.
def set_cache_flag @cache_flag = CacheFlag.find(params[:id]) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_required_actions\n # TODO: check what fields change to asign required fields\n end", "def action_hook; end", "def run_actions; end", "def define_action_hook; end", "def actions; end", "def define_action_helpers\n if super && action == :save\n @instance_helper_module.class_...
[ "0.6165152", "0.60463154", "0.59467196", "0.5917112", "0.5890387", "0.58345735", "0.57773316", "0.56991524", "0.56991524", "0.565454", "0.5622282", "0.54232633", "0.54119074", "0.54119074", "0.54119074", "0.53937256", "0.53801376", "0.5358599", "0.53412294", "0.5340814", "0.5...
0.0
-1
Never trust parameters from the scary internet, only allow the white list through.
def cache_flag_params params.require(:cache_flag).permit(:flagtype, :name, :timemodified, :value, :expiry) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def strong_params\n params.require(:user).permit(param_whitelist)\n end", "def strong_params\n params.require(:listing_member).permit(param_whitelist)\n end", "def allow_params_authentication!; end", "def allowed_params\n ALLOWED_PARAMS\n end", "def default_param_whitelist\n [\"mode\"]\n...
[ "0.6980629", "0.67819995", "0.67467666", "0.67419875", "0.67347664", "0.65928614", "0.6504013", "0.6498014", "0.64819515", "0.64797956", "0.64562726", "0.64400834", "0.6380117", "0.6377456", "0.63656694", "0.6320543", "0.63002014", "0.62997127", "0.629425", "0.6293866", "0.62...
0.0
-1
Create's a new PomodoroTimer with a count of Time.secsIn25Mins
def initialize @count = Time.secsIn25Mins end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def start\n invalidate if ns_timer\n self.ns_timer = NSTimer.timerWithTimeInterval(1, target: self, selector: 'decrement', userInfo: nil, repeats: true)\n NSRunLoop.currentRunLoop.addTimer(ns_timer, forMode: NSDefaultRunLoopMode)\n delegate.pomodoro_timer_did_start(self) if delegate\n end", "def cre...
[ "0.6067646", "0.605049", "0.5835125", "0.5716334", "0.5716334", "0.5562913", "0.55390686", "0.54999566", "0.54291254", "0.54098624", "0.53828824", "0.5366659", "0.5362981", "0.5361074", "0.53525394", "0.53101", "0.5288341", "0.5271943", "0.52687097", "0.5266926", "0.5241933",...
0.6215977
0
Set's the delegate property as a weak reference object The Object to act as this PomodoroTimer's delegate
def delegate=(object) @delegate = WeakRef.new(object) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delegate=(delegate)\n @delegate = WeakRef.new(delegate)\n end", "def invalidate\n ns_timer.invalidate\n delegate.pomodoro_timer_did_invalidate(self) if delegate\n end", "def delegate=(delegate)\n @delegate = delegate\n end", "def reset!\n @delegate_instance = nil\n end", "def __d...
[ "0.6687044", "0.6196762", "0.6013976", "0.5892132", "0.5845433", "0.5736292", "0.5665629", "0.55678815", "0.5562759", "0.5554083", "0.5490783", "0.5276289", "0.51659364", "0.5134865", "0.5099456", "0.50798553", "0.4993815", "0.49932063", "0.491331", "0.48551223", "0.48551223"...
0.718416
0
Is this PomodoroTimer's ns_timer still vaild?
def valid? ns_timer && ns_timer.valid? end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dead? \n if (timer <= 0.0) \n return true\n else \n return false\n end\n end", "def start\n invalidate if ns_timer\n self.ns_timer = NSTimer.timerWithTimeInterval(1, target: self, selector: 'decrement', userInfo: nil, repeats: true)\n NSRunLoop.currentRunLoop.addTimer(ns_timer, f...
[ "0.6663446", "0.66312695", "0.64951545", "0.6357692", "0.6229695", "0.6076778", "0.59782267", "0.5972151", "0.5906688", "0.59002894", "0.58851844", "0.5874719", "0.5863711", "0.5854683", "0.58372897", "0.58103585", "0.5803327", "0.57998854", "0.57982284", "0.5786774", "0.5765...
0.64873946
3
Start this PomodoroTimer counting down to zero
def start invalidate if ns_timer self.ns_timer = NSTimer.timerWithTimeInterval(1, target: self, selector: 'decrement', userInfo: nil, repeats: true) NSRunLoop.currentRunLoop.addTimer(ns_timer, forMode: NSDefaultRunLoopMode) delegate.pomodoro_timer_did_start(self) if delegate end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def start(&block)\n begin\n yield(current_pomodoro) if block_given?\n\n display_countdown\n\n @pomodoros -= 1\n\n start(&block) unless stop?\n rescue SystemExit, Interrupt\n puts quit_message\n end\n end", "def start\n until clock.all? { |val| val == 0 }\n ...
[ "0.6653881", "0.65106475", "0.64978224", "0.6368685", "0.6299397", "0.6278864", "0.614628", "0.6117446", "0.6078743", "0.6048326", "0.59874403", "0.5948347", "0.5948347", "0.58877397", "0.5839856", "0.57941514", "0.5736708", "0.5736708", "0.57309306", "0.5682709", "0.56580204...
0.7963768
0
Invalidate this PomodoroTimer (via ns_timer) and stop the countdown
def invalidate ns_timer.invalidate delegate.pomodoro_timer_did_invalidate(self) if delegate end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def start\n invalidate if ns_timer\n self.ns_timer = NSTimer.timerWithTimeInterval(1, target: self, selector: 'decrement', userInfo: nil, repeats: true)\n NSRunLoop.currentRunLoop.addTimer(ns_timer, forMode: NSDefaultRunLoopMode)\n delegate.pomodoro_timer_did_start(self) if delegate\n end", "def res...
[ "0.6961056", "0.6445076", "0.6445076", "0.64192176", "0.6231768", "0.6231768", "0.6141916", "0.61125195", "0.6020638", "0.5962526", "0.5919548", "0.5874319", "0.5781118", "0.5748568", "0.57326496", "0.5723741", "0.5715068", "0.5617722", "0.5593175", "0.5583437", "0.5556013", ...
0.7707482
0
Decrement count by 1 second
def decrement self.count -= 1 return if delegate.nil? if count > 0 delegate.pomodoro_timer_did_decrement(self) else delegate.pomodoro_timer_did_finish(self) end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def decrement(stat, sample_rate=1); count stat, -1, sample_rate end", "def decrement_count(current_count)\n current_count.to_i - 1\n end", "def decrement(stat, sample_rate=1)\n count stat, -1, sample_rate\n end", "def countdown_with_sleep(count)\n while count > 0\n count -=1\n sleep(1)\n end\...
[ "0.7075576", "0.7042863", "0.6756292", "0.6707458", "0.66667515", "0.65659714", "0.65319455", "0.65249324", "0.64398766", "0.64398766", "0.6410151", "0.635217", "0.6346846", "0.6329177", "0.62669164", "0.62538296", "0.62226826", "0.6202109", "0.61346537", "0.61346537", "0.613...
0.64822954
8
Use callbacks to share common setup or constraints between actions.
def set_tag @tag = Tag.find(params[:id]) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_required_actions\n # TODO: check what fields change to asign required fields\n end", "def action_hook; end", "def run_actions; end", "def define_action_hook; end", "def actions; end", "def define_action_helpers\n if super && action == :save\n @instance_helper_module.class_...
[ "0.6165152", "0.60463154", "0.59467196", "0.5917112", "0.5890387", "0.58345735", "0.57773316", "0.56991524", "0.56991524", "0.565454", "0.5622282", "0.54232633", "0.54119074", "0.54119074", "0.54119074", "0.53937256", "0.53801376", "0.5358599", "0.53412294", "0.5340814", "0.5...
0.0
-1
Only allow a trusted parameter "white list" through.
def tag_params params[:tag] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def allowed_params\n ALLOWED_PARAMS\n end", "def expected_permitted_parameter_names; end", "def param_whitelist\n [:role, :title]\n end", "def default_param_whitelist\n [\"mode\"]\n end", "def permitir_parametros\n \t\tparams.permit!\n \tend", "def permitted_params\n []\n end", ...
[ "0.71207976", "0.705222", "0.69488335", "0.69021654", "0.67362636", "0.6717561", "0.6689192", "0.6678948", "0.66622657", "0.6555007", "0.6527569", "0.64588845", "0.64522904", "0.6450812", "0.6448551", "0.6434285", "0.6412147", "0.6412147", "0.6393719", "0.6381976", "0.6381976...
0.0
-1
Renders templates with layout. First tries to render a userdefined template, otherwise falls back to Rodauth's template.
def view(page, *) rails_render(action: page.tr("-", "_"), layout: true) || rails_render(html: super.html_safe, layout: true) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def render_template(view, template, layout_name, locals); end", "def render(template, types, context)\n unless templates.exist_for_types?(layout, types)\n return render_partial(template, types, context)\n end\n load_layout_template(types).render(context) do\n render_partial(template,...
[ "0.76591337", "0.7623559", "0.7219566", "0.70464903", "0.68714565", "0.6866927", "0.67953455", "0.67018455", "0.6699966", "0.669577", "0.666848", "0.6641403", "0.66206115", "0.6599051", "0.65762746", "0.6541071", "0.6541071", "0.646072", "0.644176", "0.6429065", "0.64191604",...
0.0
-1
Renders templates without layout. First tries to render a userdefined template or partial, otherwise falls back to Rodauth's template.
def render(page) rails_render(partial: page.tr("-", "_"), layout: false) || rails_render(action: page.tr("-", "_"), layout: false) || super.html_safe end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def render(template, types, context)\n unless templates.exist_for_types?(layout, types)\n return render_partial(template, types, context)\n end\n load_layout_template(types).render(context) do\n render_partial(template, types, context)\n end\n end", "def render_with_defaults(...
[ "0.7068256", "0.69338745", "0.69335824", "0.6694009", "0.66214937", "0.6609265", "0.660668", "0.65860844", "0.6485336", "0.6485336", "0.64088106", "0.6406509", "0.6398022", "0.63609123", "0.6350564", "0.6286745", "0.6283986", "0.6279071", "0.62642854", "0.6261245", "0.6248042...
0.0
-1
Render Rails CSRF tags in Rodauth templates.
def csrf_tag(*) rails_csrf_tag end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rails_csrf_tag\n %(<input type=\"hidden\" name=\"#{rails_csrf_param}\" value=\"#{rails_csrf_token}\">)\n end", "def rails_csrf_tag\n %(<input type=\"hidden\" name=\"#{rails_csrf_param}\" value=\"#{rails_csrf_token}\">)\n end", "def csrf_tag(*)\n rails_csrf_tag\n end"...
[ "0.7524031", "0.74612266", "0.70622754", "0.70382243", "0.6846415", "0.6836054", "0.66609204", "0.6345635", "0.63099617", "0.6276518", "0.62104887", "0.6111631", "0.6059707", "0.5988903", "0.59504277", "0.5864729", "0.5829861", "0.5788222", "0.57697165", "0.5754669", "0.57487...
0.6987211
4
Verify Rails' authenticity token.
def check_csrf rails_check_csrf! end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_authenticity_token\n verified_request? || raise(ActionController::InvalidAuthenticityToken)\n end", "def verify_authenticity_token; end", "def rails_verify_authenticity_token\n controller = rails_controller.new\n controller.set_request! ActionDispatch::Request.new(scope.env)\n ...
[ "0.84728485", "0.8292411", "0.81200266", "0.7819604", "0.77997434", "0.7525767", "0.75178486", "0.71033734", "0.7097845", "0.7085797", "0.708547", "0.70336735", "0.70336735", "0.70336735", "0.70336735", "0.70336735", "0.70336735", "0.70336735", "0.70336735", "0.70336735", "0....
0.64181703
86
Have Rodauth call check_csrf automatically.
def check_csrf? true end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_csrf\n rails_check_csrf!\n end", "def check_csrf\n rails_check_csrf!\n end", "def clean_up_csrf?; end", "def clean_up_csrf?; end", "def rails_check_csrf!\n rails_controller_instance.send(:verify_authenticity_token)\n end", "def rails_check_csrf!\n ra...
[ "0.8266495", "0.82566154", "0.815769", "0.815769", "0.8006207", "0.79952085", "0.7982423", "0.7632003", "0.7632003", "0.75704294", "0.75566506", "0.742359", "0.7421971", "0.728075", "0.7041554", "0.70264155", "0.7016819", "0.6929974", "0.6810023", "0.6788593", "0.675971", "...
0.79990447
5
Reset Rails session to protect from session fixation attacks.
def clear_session rails_controller_instance.reset_session end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset_session!\n request.reset_session\n end", "def reset_session!\n request.reset_session\n end", "def reset_session!\n raw_session.clear\n end", "def reset\n reset_session\n redirect_to root_path\n end", "def reset_session\r\nif session && session.respond_to?(:destroy)\r\ns...
[ "0.8700612", "0.8700612", "0.8635494", "0.8188956", "0.8051109", "0.78783756", "0.77861756", "0.77167976", "0.7628861", "0.7554986", "0.748623", "0.7465986", "0.74317557", "0.74268943", "0.74160653", "0.74138594", "0.73454756", "0.73278624", "0.7320868", "0.73145133", "0.7314...
0.8083405
4
Default the flash error key to Rails' default :alert.
def flash_error_key :alert end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unobtrusive_flash_keys\n [:notice, :alert, :error, :success, :warning]\n end", "def flash_error(message_key,*strs)\r\n flash[:error] = sprintf(I18n.t(message_key),*strs)\r\n end", "def set_flash_message(key, kind, options={}) #:nodoc:\n options[:scope] = \"devise.#{controller_name}\"\n option...
[ "0.7240729", "0.7203491", "0.69580424", "0.684491", "0.68407595", "0.6830096", "0.6790129", "0.6780347", "0.6749936", "0.6702187", "0.6677592", "0.66608036", "0.66457164", "0.66138774", "0.661138", "0.65987", "0.6597088", "0.6564878", "0.65607923", "0.65210164", "0.6462251", ...
0.874128
0
Evaluates the block in context of a Rodauth controller instance.
def rails_controller_eval(&block) rails_controller_instance.instance_exec(&block) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def run(block)\n case block\n when Proc\n controller.instance_eval(&block)\n else\n controller.send(block)\n end\n end", "def run_builder_block(block, controller, *args)\n controller.instance_exec(*args, &block)\n end", "def run_block\n @_block_content = ni...
[ "0.633976", "0.5817966", "0.5799694", "0.57281923", "0.5549274", "0.5538638", "0.5506737", "0.5429363", "0.53625864", "0.53386426", "0.53386426", "0.53154254", "0.53097767", "0.5262774", "0.52521986", "0.5247913", "0.52430737", "0.5220344", "0.51998866", "0.51823854", "0.5180...
0.6665781
0
Runs controller callbacks and rescue handlers around Rodauth actions.
def _around_rodauth(&block) result = nil rails_controller_rescue do rails_controller_callbacks do result = catch(:halt) { super(&block) } end end if rails_controller_instance.performed? rails_controller_response elsif result result[1].merge!(rail...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rails_controller_rescue\n yield\n rescue Exception => exception\n rails_controller_instance.rescue_with_handler(exception) || raise\n\n unless rails_controller_instance.performed?\n raise Rodauth::Rails::Error, \"rescue_from handler didn't write any response\"\n end\n end", "...
[ "0.6582751", "0.62247217", "0.60939294", "0.5745392", "0.5745392", "0.5745392", "0.5745392", "0.5745392", "0.5745392", "0.5745392", "0.5745392", "0.5745392", "0.5745392", "0.57434136", "0.55501014", "0.5541846", "0.55071145", "0.54189754", "0.5418317", "0.54001284", "0.535333...
0.6146229
2
Runs any (before|around|after)_action controller callbacks.
def rails_controller_callbacks # don't verify CSRF token as part of callbacks, Rodauth will do that rails_controller_forgery_protection { false } rails_controller_instance.run_callbacks(:process_action) do # turn the setting back to default so that form tags generate CSRF tags rails_c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def run_actions; end", "def after_actions(*logic)\n self.after_actions = logic\n end", "def _dispatch(action)\n _run_filters(:before, action)\n response = send(action)\n _run_filters(:after, action)\n response\n end", "def track_action(*actions)\n around_filter Actio...
[ "0.6321528", "0.6255805", "0.6253241", "0.6204771", "0.6123564", "0.6097684", "0.5973946", "0.59732455", "0.5947871", "0.59382546", "0.59244436", "0.59244436", "0.5873782", "0.5858127", "0.5833213", "0.5833213", "0.5833213", "0.58298177", "0.5816855", "0.58139205", "0.5801268...
0.65786064
0
Runs any registered rescue_from controller handlers.
def rails_controller_rescue yield rescue Exception => exception rails_controller_instance.rescue_with_handler(exception) || raise unless rails_controller_instance.performed? raise Rodauth::Rails::Error, "rescue_from handler didn't write any response" end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bypass_rescue\n @controller.extend(BypassRescue)\n end", "def bypass_rescue\n if ::Rails::VERSION::STRING >= '2.2'\n def controller.rescue_action(exception)\n raise exception\n end\n else\n def controller.rescue_action_with_handler(exception...
[ "0.68127817", "0.6395907", "0.6330412", "0.61000544", "0.5915456", "0.58854145", "0.58773756", "0.58536184", "0.57778937", "0.57778937", "0.5707144", "0.5707144", "0.5707144", "0.5707144", "0.56738603", "0.56569725", "0.56557024", "0.5647588", "0.5621525", "0.55204576", "0.55...
0.72240925
0
Returns Roda response from controller response if set.
def rails_controller_response controller_response = rails_controller_instance.response response.status = controller_response.status response.headers.merge! controller_response.headers response.write controller_response.body request.halt end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def response\n @response ||= request!(true)\n end", "def response\n _options.fetch(:response)\n end", "def get_response()\n if has_errors?\n return get_error_response()\n end\n @values[\"RESPONSE\"]\n end", "def response\n @response || perfo...
[ "0.6691878", "0.65851474", "0.65594345", "0.64526194", "0.64059573", "0.6353609", "0.6353609", "0.6330889", "0.631203", "0.631056", "0.6267136", "0.6199541", "0.61767113", "0.61172116", "0.6049223", "0.6035259", "0.6016057", "0.6009469", "0.60050154", "0.60050154", "0.6005015...
0.0
-1
Create emails with ActionMailer which uses configured delivery method.
def create_email_to(to, subject, body) Mailer.create_email(to: to, from: email_from, subject: "#{email_subject_prefix}#{subject}", body: body) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rails_create_email(action)\n rails_mailer.public_send(action, self)\n end", "def setup_delivery\n method = @config.delivery['method'] || :smtp\n options = @config.delivery['options'] || {}\n\n options.keys.each do |key|\n options[(key.to_sym rescue key) || key] = options.delete(...
[ "0.7210269", "0.7073815", "0.67670023", "0.67078006", "0.6385766", "0.6325666", "0.6307641", "0.6227301", "0.62263846", "0.62072736", "0.61954296", "0.61869085", "0.617349", "0.6171119", "0.6147645", "0.6147474", "0.6141621", "0.611114", "0.6109694", "0.6100816", "0.60883415"...
0.58660936
41
Delivers the given email.
def send_email(email) email.deliver_now end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def deliver!(mail)\n attributes = email_attributes(mail)\n mail.destinations.each do |destination|\n ArMailerRevised.email_class.create!(attributes.merge({:to => destination}))\n end\n end", "def deliver_email(mail)\n if mail.respond_to?(:deliver_later)\n mail.deliver_later\n ...
[ "0.644515", "0.6242855", "0.6131845", "0.6070026", "0.60515314", "0.60515314", "0.60509217", "0.6026974", "0.598997", "0.598997", "0.5969697", "0.59696627", "0.59696627", "0.59696627", "0.59696627", "0.5952583", "0.5952268", "0.59516484", "0.59516484", "0.59516484", "0.595164...
0.5806186
72
Calls the Rails renderer, returning nil if a template is missing.
def rails_render(*args) return if rails_api_controller? rails_controller_instance.render_to_string(*args) rescue ActionView::MissingTemplate nil end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def renderer\n Cms::RenderTemplate.new\n end", "def render_template(path)\n render(path)\n exit\n end", "def render(template = nil)\n template = self.get_default_tpl if template.nil?\n @template = self.normalize_tpl(template)\n @layout = self.get_layout(@template)\n __tpl...
[ "0.67576224", "0.66982555", "0.6693728", "0.66330725", "0.6597373", "0.65546256", "0.65237445", "0.6512844", "0.6512844", "0.6500079", "0.6487228", "0.64832014", "0.64713055", "0.64449334", "0.64327234", "0.6419113", "0.64069843", "0.64002395", "0.6333519", "0.63322824", "0.6...
0.75371784
0
Calls the controller to verify the authenticity token.
def rails_check_csrf! rails_controller_instance.send(:verify_authenticity_token) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_authenticity_token\n verified_request? || raise(ActionController::InvalidAuthenticityToken)\n end", "def rails_verify_authenticity_token\n controller = rails_controller.new\n controller.set_request! ActionDispatch::Request.new(scope.env)\n controller.send(:verify_authenticit...
[ "0.7570936", "0.74625796", "0.731156", "0.6923747", "0.6739174", "0.66895515", "0.6683139", "0.659359", "0.6558998", "0.65360737", "0.64317095", "0.6396102", "0.6363567", "0.6356605", "0.6353616", "0.63193893", "0.6302659", "0.62949425", "0.62547576", "0.624894", "0.62435544"...
0.6450139
10
Hidden tag with Rails CSRF token inserted into Rodauth templates.
def rails_csrf_tag %(<input type="hidden" name="#{rails_csrf_param}" value="#{rails_csrf_token}">) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rails_csrf_tag\n %(<input type=\"hidden\" name=\"#{rails_csrf_param}\" value=\"#{rails_csrf_token}\">)\n end", "def csrf_metatag\n \"<meta name=\\\"#{csrf_field}\\\" content=\\\"#{csrf_token}\\\" \\/>\"\n end", "def csrf_tag(*args)\n \"<input type=\\\"hidden\\\" nam...
[ "0.8390619", "0.76716036", "0.7598775", "0.74856454", "0.73914325", "0.7377826", "0.70058686", "0.6880085", "0.6840855", "0.6791522", "0.67870027", "0.6694591", "0.66752136", "0.66303766", "0.6598304", "0.65947443", "0.6583592", "0.65458214", "0.6487252", "0.64869326", "0.647...
0.8350136
1
The request parameter under which to send the Rails CSRF token.
def rails_csrf_param rails_controller.request_forgery_protection_token end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rails_csrf_param\n rails_controller.request_forgery_protection_token\n end", "def submitted_csrf_token\n request.env['HTTP_X_CSRF_TOKEN'] || params['csrf_token']\n end", "def auth_csrf_token\n request.env['HTTP_X_AUTH_CSRF']\n end", "def csrf_field\n csrf_options[:field]\...
[ "0.818229", "0.8121132", "0.7840078", "0.7684255", "0.73948926", "0.7282277", "0.7270284", "0.72315717", "0.721189", "0.71528715", "0.7125648", "0.7068452", "0.70647204", "0.7063851", "0.7037207", "0.7019099", "0.6900549", "0.6826982", "0.6784257", "0.67631", "0.6742541", "...
0.82072264
0
The Rails CSRF token value inserted into Rodauth templates.
def rails_csrf_token rails_controller_instance.send(:form_authenticity_token) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rails_csrf_tag\n %(<input type=\"hidden\" name=\"#{rails_csrf_param}\" value=\"#{rails_csrf_token}\">)\n end", "def rails_csrf_tag\n %(<input type=\"hidden\" name=\"#{rails_csrf_param}\" value=\"#{rails_csrf_token}\">)\n end", "def csrf_field\n csrf_options[:field]\n ...
[ "0.7970623", "0.7938288", "0.7925293", "0.7865236", "0.7791966", "0.7739136", "0.76561576", "0.7627418", "0.7565979", "0.7390346", "0.7355975", "0.7315697", "0.7234382", "0.7170913", "0.71550554", "0.70890844", "0.7042199", "0.70280576", "0.70105654", "0.69369465", "0.6915839...
0.74136275
9
Instances of the configured controller with current request's env hash.
def _rails_controller_instance controller = rails_controller.new rails_request = ActionDispatch::Request.new(scope.env) prepare_rails_controller(controller, rails_request) controller end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new(env = {})\n self.class.new controller, env, defaults\n end", "def setup_controller(controller, env, vars)\n controller.env = env\n controller.headers = {}\n\n setup_controller_params(controller, env, vars)\n\n controller.cookies = Fastr::HTTP.parse_cookies(env)\n controll...
[ "0.6563216", "0.6554626", "0.6188857", "0.60970086", "0.60767794", "0.607208", "0.59948725", "0.5976443", "0.5934479", "0.5849908", "0.58229274", "0.57891256", "0.57836854", "0.57825714", "0.5690219", "0.566553", "0.56645375", "0.56630546", "0.5651205", "0.5651205", "0.565120...
0.63408214
2
GET /work_flow_transition_conditions GET /work_flow_transition_conditions.json
def index @work_flow_transition_conditions = WorkFlowTransitionCondition.all end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @work_flow_transition_condition = WorkFlowTransitionCondition.new(work_flow_transition_condition_params)\n\n respond_to do |format|\n if @work_flow_transition_condition.save\n format.html { redirect_to @work_flow_transition_condition, notice: 'Work flow transition condition was succe...
[ "0.668268", "0.66146487", "0.62466544", "0.62409407", "0.5637412", "0.5454362", "0.53380036", "0.5320945", "0.53141654", "0.52413154", "0.52366847", "0.52184963", "0.51042265", "0.5090945", "0.5065989", "0.50535876", "0.49860132", "0.4985855", "0.49652264", "0.4952411", "0.49...
0.7734572
0
GET /work_flow_transition_conditions/1 GET /work_flow_transition_conditions/1.json
def show end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @work_flow_transition_conditions = WorkFlowTransitionCondition.all\n end", "def create\n @work_flow_transition_condition = WorkFlowTransitionCondition.new(work_flow_transition_condition_params)\n\n respond_to do |format|\n if @work_flow_transition_condition.save\n format.html { ...
[ "0.7658239", "0.6785021", "0.67817795", "0.6363227", "0.61339927", "0.57616085", "0.5747724", "0.5594431", "0.54639447", "0.5460796", "0.54249793", "0.5303783", "0.52219415", "0.5184015", "0.5160994", "0.5150357", "0.51385015", "0.5126942", "0.5111869", "0.50551456", "0.50478...
0.0
-1
POST /work_flow_transition_conditions POST /work_flow_transition_conditions.json
def create @work_flow_transition_condition = WorkFlowTransitionCondition.new(work_flow_transition_condition_params) respond_to do |format| if @work_flow_transition_condition.save format.html { redirect_to @work_flow_transition_condition, notice: 'Work flow transition condition was successfully cr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def work_flow_transition_condition_params\n params.require(:work_flow_transition_condition).permit(:transitionCode, :cpkfk_predecessor_id, :cpkfk_successor_id, :is_active, :name)\n end", "def set_work_flow_transition_condition\n @work_flow_transition_condition = WorkFlowTransitionCondition.find(para...
[ "0.70532686", "0.67488295", "0.656585", "0.63954467", "0.60678405", "0.6037293", "0.5988933", "0.59774345", "0.57615304", "0.5731601", "0.56372935", "0.55180377", "0.530509", "0.5303718", "0.52767575", "0.5276057", "0.5260683", "0.5259223", "0.5221211", "0.5220263", "0.520696...
0.77260983
0
PATCH/PUT /work_flow_transition_conditions/1 PATCH/PUT /work_flow_transition_conditions/1.json
def update respond_to do |format| if @work_flow_transition_condition.update(work_flow_transition_condition_params) format.html { redirect_to @work_flow_transition_condition, notice: 'Work flow transition condition was successfully updated.' } format.json { render :show, status: :ok, location: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_work_flow_transition_condition\n @work_flow_transition_condition = WorkFlowTransitionCondition.find(params[:id])\n end", "def update\n respond_to do |format|\n if @workflow_transition.update(workflow_transition_params)\n format.html { redirect_to @workflow_transition, notice: 'Work...
[ "0.6563629", "0.6470363", "0.6317885", "0.6277611", "0.6211991", "0.62027025", "0.6168582", "0.6104876", "0.6070593", "0.6055684", "0.6054302", "0.6022107", "0.5973805", "0.59704864", "0.5958716", "0.59467745", "0.5937506", "0.5930922", "0.5930922", "0.5930922", "0.5930922", ...
0.74809235
0
DELETE /work_flow_transition_conditions/1 DELETE /work_flow_transition_conditions/1.json
def destroy @work_flow_transition_condition.destroy respond_to do |format| format.html { redirect_to work_flow_transition_conditions_url, notice: 'Work flow transition condition was successfully destroyed.' } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @workflow_transition.destroy\n respond_to do |format|\n format.html { redirect_to workflow_transitions_url, notice: 'Workflow transition was successfully destroyed.' }\n format.json { head :no_content }\n end\n end", "def destroy\n @task_transition = TaskTransition.find(param...
[ "0.67989206", "0.66241074", "0.6581205", "0.65766054", "0.65480494", "0.64920694", "0.6475749", "0.6429657", "0.6428626", "0.6369727", "0.63616997", "0.63457114", "0.6312823", "0.6310341", "0.6298068", "0.6298068", "0.6298068", "0.6298068", "0.6293228", "0.62929696", "0.62914...
0.76316255
0
Use callbacks to share common setup or constraints between actions.
def set_work_flow_transition_condition @work_flow_transition_condition = WorkFlowTransitionCondition.find(params[:id]) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_required_actions\n # TODO: check what fields change to asign required fields\n end", "def action_hook; end", "def run_actions; end", "def define_action_hook; end", "def actions; end", "def define_action_helpers\n if super && action == :save\n @instance_helper_module.class_...
[ "0.6164095", "0.6046031", "0.5945298", "0.59179014", "0.58890367", "0.58341795", "0.5776118", "0.5700777", "0.5700777", "0.5656277", "0.56218207", "0.5423995", "0.5411516", "0.5411516", "0.5411516", "0.5395004", "0.53783494", "0.53593004", "0.53412604", "0.534078", "0.5332865...
0.0
-1
Never trust parameters from the scary internet, only allow the white list through.
def work_flow_transition_condition_params params.require(:work_flow_transition_condition).permit(:transitionCode, :cpkfk_predecessor_id, :cpkfk_successor_id, :is_active, :name) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def strong_params\n params.require(:user).permit(param_whitelist)\n end", "def strong_params\n params.require(:listing_member).permit(param_whitelist)\n end", "def allow_params_authentication!; end", "def allowed_params\n ALLOWED_PARAMS\n end", "def default_param_whitelist\n [\"mode\"]\n...
[ "0.6981273", "0.6783789", "0.67460483", "0.6742222", "0.67354137", "0.65934366", "0.65028495", "0.6497783", "0.64826745", "0.6479415", "0.6456823", "0.6440081", "0.63800216", "0.6376521", "0.636652", "0.6319898", "0.6300256", "0.62994003", "0.6293621", "0.6292629", "0.6291586...
0.0
-1