- X should be removed (from UI)
- should be passed between stories and states
- should be rendered when creating
- X should rerender when updating
- should have story_id
- should bind to dragstop
This file contains 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
<%= pjax_content_for :head_scripts_and_styles do %> | |
<%= lazy_load :js, javascript_path("myplugin.js"), jammit_path(:jammt_package) do %> | |
(function($){ | |
var a = new Abc(); | |
a.init(); | |
})($); | |
<% end %> | |
<% end %> |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<style> | |
#my-carousel { border: 1px solid #000; padding: 10px; } | |
.carousel-item { display: none; position: relative; padding: 0 30px;} | |
.carousel-item .carousel-prev { position: absolute; left: 0; } | |
.carousel-item .carousel-next { position: absolute; right: 0; } | |
</style> | |
</head> |
Este projeto consiste na criação do encapsulador para a API REST do Mural do Redu.
Encapsularoes (para APIs REST), também conhecidos como wrappers, são bibliotecas que abstraem detalhes de rede na comunicação com serviços terceiros.
This file contains 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
# sessions_controller.rb | |
class SessionsController < ApplicationController | |
def create | |
@login_form = LoginForm.new(params) | |
if @user = @login_form.submit | |
sign_in @user | |
redirect_to @user, notice: "Welcome!" | |
else | |
render action: :new |
This file contains 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
# login_form.rb | |
class LoginForm < BaseForm | |
attr_accessor :email, :password, :incognia_installation_id | |
validates :email, :password, presence: true | |
validate :device_risk | |
# Other validations... | |
def submit | |
return nil if invalid? |
This file contains 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 'faraday' | |
require 'json' | |
module Incognia | |
class Api | |
include Singleton | |
API_HOST = 'https://api.us.incognia.com/api/'.freeze | |
def register_login(installation_id:, account_id:) |
This file contains 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
{ | |
"evidence": { | |
"account_integrity": {...}, | |
"addresses": [...], | |
"device_behavior_reputation": "allowed", | |
"device_fraud_reputation": "allowed", | |
"device_integrity": { | |
"emulator": false, | |
"from_official_store": true, | |
"gps_spoofing": false, |