Configure your Provisioning settings for the Namely/Okta SCIM Integration as follows:
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
module Queries | |
class EventsFilter | |
FILTER_METHOD_MAP = { | |
"type" => :filter_type, | |
} | |
def self.filtered_relation(filters, events) | |
relation = events.includes(:mentions, :related) | |
return relation unless filters.is_a?(Hash) | |
filters.inject(relation) do |r, (filter, value)| |
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
require 'spec_helper' | |
describe Queries::EventsFilter do | |
describe '.filtered_relation' do | |
let!(:company) { create(:company, | |
use_at_mentions: true, enable_at_mentions_in_feed: true, | |
use_appreciations: true, enable_appreciations_in_feed: true) | |
} | |
let!(:user) { create(:user, :with_profile, :as_super, company: company) } | |
let!(:profile) { create(:profile, user: user, company: company) } |
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
{ | |
"profiles": [ | |
{ | |
"schema": "[urn:ietf:params:scim:schemas:core:2.0:User]", | |
"id": "afdb3344-84dd-409a-a013-834269be1312", | |
"userName": "[email protected]", | |
"name": { | |
"formatted": "Edward Burnett", | |
"familyName": "Burnett", | |
"givenName": "Edward", |
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
#app/controllers/my_controller.rb | |
module UnitCheck | |
def unit_check(number, time) | |
if number = 1 | |
number + time.chop! | |
else | |
number + time | |
end | |
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
# app/views/data.html.erb | |
# if @number = 1 | |
Requested time off: <%= unit_check(@number, @time) %> # => 1 day |
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
# app/views/data.html.erb | |
Requested time off: <%= unit_check(@number, @time) %> # => 1 day |
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
# app/helpers/unit_check_helper.rb | |
module UnitCheck | |
def unit_check(@number, @time) | |
if @number = 1 | |
@time.chop! | |
else if | |
@time | |
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
swagger: '2.0' | |
info: | |
title: Namely API | |
description: Move your app forward with the Namely API | |
version: "1.0" | |
host: <<company>>.namely.com | |
schemes: | |
- https | |
basePath: /api/v1 | |
paths: |