This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def items_with_joins | |
@items_with_joins ||= items.joins("LEFT JOIN services ON services.id = communication_operator_diff_file_items.service_id") | |
.joins("LEFT JOIN offers_products ON offers_products.id = services.offers_product_id") | |
.joins("LEFT JOIN broadband_products ON broadband_products.id = offers_products.product_id") | |
.preload(service: { offers_product: :product, customer: nil }) | |
.where([search_clause, {query: "%#{@params[:search]}%"}]) | |
end | |
def items_scope | |
items_with_joins.order(order_params) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"schema_version": 1, | |
"name": "Trello to Notion", | |
"description": "No description provided", | |
"source_url": false, | |
"guid": "e460cd75f07b134f913d503328a3a9f3", | |
"tag_fg_color": "#ffffff", | |
"tag_bg_color": "#5bc0de", | |
"icon": "gear", | |
"exported_at": "2021-06-01T17:53:04Z", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"schema_version": 1, | |
"name": "Metacritic New Music", | |
"description": "No description provided", | |
"source_url": false, | |
"guid": "d8a2c221016d8a3bd805b1d8fd44bf67", | |
"tag_fg_color": "#ffffff", | |
"tag_bg_color": "#5bc0de", | |
"icon": "gear", | |
"exported_at": "2021-03-13T12:50:08Z", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useEffect, useState } from "react"; | |
import Product from "./shop/product"; | |
import "./shop.css"; | |
const Shop = () => { | |
const url = "http://localhost:3000/graphql"; | |
const data = { | |
query: `query { | |
broadbandProducts(first: 4) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/business_logic/services/broadband_provider_actions/backends/task.rb b/app/business_logic/services/broadband_provider_actions/backends/task.rb | |
index c6968d9..726e40e 100644 | |
--- a/app/business_logic/services/broadband_provider_actions/backends/task.rb | |
+++ b/app/business_logic/services/broadband_provider_actions/backends/task.rb | |
@@ -26,7 +26,7 @@ module Services | |
def undo | |
original_command = track_back_object.command.sub('Undo', '') | |
original_action = track_back_object.event.actions.find_by(command: original_command) | |
- task = original_action.result | |
+ task = original_action.try(:result) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/business_logic/services/broadband_provider_actions/backends/task.rb b/app/business_logic/services/broadband_provider_actions/backends/task.rb | |
index c6968d9..726e40e 100644 | |
--- a/app/business_logic/services/broadband_provider_actions/backends/task.rb | |
+++ b/app/business_logic/services/broadband_provider_actions/backends/task.rb | |
@@ -26,7 +26,7 @@ module Services | |
def undo | |
original_command = track_back_object.command.sub('Undo', '') | |
original_action = track_back_object.event.actions.find_by(command: original_command) | |
- task = original_action.result | |
+ task = original_action.try(:result) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo | |
def bar | |
puts 'hello, world' | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
:provider => "steam", | |
:uid => "1234567890", | |
:info => { | |
:nickname => "Foo", | |
:name => "Foo bar", | |
:location => "BR", | |
:image => "http://media.steampowered.com/steamcommunity/public/images/avatars/3c/sdafdasf.jpg", | |
:urls => { | |
:Profile => "http://steamcommunity.com/id/asdfadsfdasf/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def self.create | |
new(:foobar) | |
end |