技術記事

Urlify Functions & Its Implementation

URLify is a simple gem that refines the conversion of UTF-8 strings to ASCII-safe URI strings and enables it to be used as readable URL-segments. After the gem is installed, you can call the URLify function for any UTF-8 string and it will be automatically converted into an ASCII-safe URI string. URLify also has the additional functionality of being able to remove the subtitles in a given input. ACCENTMAP ‘À’ => ‘A’, ‘Á’ => ‘A’, ‘Â’ => ‘A’, ‘Ã’ => ‘A’, ‘Ä’ => ‘A’, ‘Å’ => ‘AA’, ‘Æ’ => ‘AE’, ‘Ç’ => ‘C’, ‘È’ => ‘E’, ‘É’ => ‘E’, ‘Ê’ => ‘E’, ‘Ë’ => ‘E’, ‘Ì’ => ‘I’, ‘Í’ => …

Urlify Functions & Its Implementation 続きを読む "

Paperclip と Dropzone.js を使用してファイルを S3 に直接アップロードする

It’s usually the small time-consuming tasks that frustrate us the most. Such as uploading a file to S3; the requirement is pretty simple but the method chosen to upload the file will decide the efficiency of the task. As uploading files is a feature that most applications require, RailsCarma has compiled a brief tutorial on one of the best methods of getting this task done efficiently: using Paperclip and Dropzone.js. Paperclip is a popular choice for uploading images and files as it offers great features to handle the attachments; ‘paperclip’ gem is the go-to option. Paperclip allows you to upload multiple images and files, generate thumbnails and even automatically resize …

Paperclip と Dropzone.js を使用してファイルを S3 に直接アップロードする 続きを読む "

RAILS で長い URL を短縮する簡単な方法

URL shortener solves the problem of sharing the long website URLs by shortening them into more portable size.As we know most of the websites use services like Twitter(Tweet character limit 140), SMS to reach out to their users and also at the time of sending promotional SMS, it is a bit difficult to send long web URLs.To generate the shortened URLS, we have so many link shortening services as well, such as Goo.gl and Bitly and more. The solution consists of two major parts: An activerecord model called shortened_url for storing the details of the shortened link including the click counter to store how many times a user visited the …

RAILS で長い URL を短縮する簡単な方法 続きを読む "

Rails でのセキュリティ問題の防止

Security is a major concern for any developer aspiring for successful and sustainable development of web applications. Every developer wants to code in such a manner that their applications are as secure as possible from any attacks, however, no code can be 100% bug-free or secured. So, the developers are aware that they need to do their best to make their applications with minimum vulnerability to attacks. Detecting vulnerabilities is easy but security breaches and hacks might result in losses. This is the reason why it is always better to check for security issues right from the start of the application development process along with conducting regular quality checks to …

Rails でのセキュリティ問題の防止 続きを読む "

ActiveRuby を使い始める方法

Ruby は、非常に動的であるオブジェクト指向プログラミング言語です。その動的な性質のため、幅広い分野で使用されていますが、Ruby on Rails フレームワークのため、Web アプリケーションの開発で最もよく知られています。 ActiveRuby は現在 Ruby v2.3.4 であり、現時点で 40 以上の人気のある gem とフレームワークが含まれています。そのため、Windows に Ruby をシームレスにインストールして管理できるようになり、構成時間の短縮と生産性の向上に役立ちます。開発者は、最新の Ruby ディストリビューション リリースを社内で簡単に採用して、あらゆる Web アプリケーションをホストできます。セキュリティを強化するために、この言語のベータ版には…

ActiveRuby を使い始める方法 続きを読む "

BRAKEMAN: Rails セキュリティ スキャナー

はじめに Brakeman はセキュリティ スキャナであり、静的分析を利用して Rails アプリケーションのセキュリティ脆弱性を検出します。アプリケーションのソース コードを直接スキャンするため、この便利なセキュリティ ツールを使用するためにアプリケーション スタック全体をセットアップする必要がなくなります。スキャン後、特定されたすべてのセキュリティ問題のレポートが作成されます。利点 いつでも実行できる Brakeman に必要なのはソース コードだけであり、それ (Brakeman) は開発のどの段階でも実行できるため、Rails で新しいアプリケーションを生成し、Brakeman を使用してすぐにスキャンできます。カバレッジの向上 アプリケーションにさらに多くのカバレッジを提供します。それ …

BRAKEMAN: Rails セキュリティ スキャナー 続きを読む "

Rails ベースの電子商取引プラットフォーム Shoppe と連携する方法

Shoppe は、Rails ベースの e コマース プラットフォームです。そのおかげで、Rails アプリケーションにカタログベースのストアを簡単に導入できます。このコア フレームワークである Shoppe を使用してストアを簡単に作成できます。そして私たちが責任を負うのは、顧客が製品を購入するために使用するストアフロント (UI) の作成のみです。 UI とは別に、私たちは好みの支払いゲートウェイと統合する責任もあります。ショッペに関する興味深い事実:

Rails でのファイルアップロード用の Carrierwave Gem

Web アプリケーションを構築する場合、必ず必要になる機能の 1 つは画像のアップロード機能です。実際、画像のアップロードは、現代のアプリケーションなしでは考えられない重要な機能の 1 つです。それだけではなく、画像のアップロードが検索エンジンの最適化にも役割を果たしているという事実を考慮すると、さらに重要になります。 CarrierWave gem は Rails アプリケーションと統合でき、ファイルをアップロードするためのシンプルかつ非常に柔軟な方法を提供します。 Rails アプリケーションのセットアップ: Rails アプリケーションでこれをセットアップするには、新しいプロジェクトを作成した後、gem ファイルに 2 つの gem を追加する必要があります。最初 …

Rails でのファイルアップロード用の Carrierwave Gem 続きを読む "

Ruby on Railsを利用したチャットボットの統合

チャットボットの定義 特にインターネット上で、人間のユーザーとの会話をシミュレートするように設計されたコンピューター プログラム。このようなプログラムは、人間が会話の相手としてどのように行動するかを説得力のある形でシミュレートするように設計されていることがよくあります。チャットボットは通常、顧客サービスや情報取得などのさまざまな実用的な目的で対話システムで使用されます。仕組み システムは、ユーザーが指定した入力内のキーワードをスキャンし、最も一致するキーワード、または最も類似した表現パターンを含む応答をデータベースから取得します。自然言語処理 (別名 NLP エンジン) を使用すると、人間が尋ねるのと同じ方法で質問を入力し、処理することができます。ここ …

Ruby on Railsを利用したチャットボットの統合 続きを読む "

Salesforce API と Rails アプリの統合

Salesforce は顧客関係管理 (CRM) プラットフォームとして知られており、販売、サービス、マーケティング向けのクラウドベースのアプリケーションを提供します。この記事は、Salesforce API と、Salesforce と Rails アプリケーションの間でデータを同期する方法についてより明確に理解することを目的としています。 Salesforce API を Rails アプリケーションと統合するには、次の手順に従う必要があります。 Rails gem「restforce」を使用する – https://github.com/ejholmes/restforce インストール gem 'restforce', '~> 2.5.3' を追加します。 Gemfile 'bundle install' または 'gem installrestforce' を実行します。 設定 application.yml で、次の環境変数を設定します – SALESFORCE_USERNAME: “username” SALESFORCE_PASSWORD: “password” SALESFORCE_SECURITY_TOKEN: “security token” SALESFORCE_CLIENT_ID: “client id” SALESFORCE_CLIENT_SECRET: 「クライアントシークレット」 SALESFORCE_HOST: 「ホストドメイン名」 …

Salesforce API と Rails アプリの統合 続きを読む "

Japanese
English
English
Japanese
German
French
Spanish

WhatsApp

モバイル版を終了する