技術記事

カミナリジェム

カミナリジェム

What is Kaminari? Kaminari is a pagination gem for Ruby on Rails that provides a simple and flexible way to paginate records in your application. With Kaminari, you can easily add pagination to your views and controllers, and customize the pagination options to fit your specific needs. Installing Kaminari To use Kaminari in your Rails application, you first need to install the gem. You can do this by adding the following line to your Gemfile: gem ‘kaminari’ After adding the gem to your Gemfile, run bundle install to install the gem and its dependencies. Using Kaminari in Your Controllers Once you’ve installed Kaminari, you can start using it in your …

カミナリジェム 続きを読む "

CSV処理によるRailsでのデータスクレイピング

The ruby on rails Application to scrape the link uploaded from CSV file and find the occurance of link in particular page. In the application user need to pass a csv and list of users email to whom the parsed CSV will be sent. In the csv there will be three 2 column: refferal_link home_link and there values like below First of all we will create the rails application $ rails new scrape_data $ cd scrape_data Then we will genrate the UploadCsv module, run the below command $ rails g scaffold UploadCsv generated_csv:string csv_file:string That will create All the required model, controller and migrations for csv_file Then we will start …

CSV処理によるRailsでのデータスクレイピング 続きを読む "

GitHub からコミットを元に戻す方法

If you want to revert the last commit, you can do it by single command. First make sure what you really want to do, simply remove commit from repo or vanish all the last committed code. So choose one of the below command as per requirement: git reset HEAD~1 This will return your repository to its state before the git add commands that staged the files. Your changes will be in your workingdirectory. HEAD~1 refers to the commit below the current tip of the branch. If you want to remove N commits but keep the code changes in your working directory, then run below command: git reset HEAD~N If you …

GitHub からコミットを元に戻す方法 続きを読む "

Ruby on Rails Web アプリケーションを介して音声通話を行う

In today’s life everyone is busy with there work, no one wants to recieve unwanted or spam calls to their phones. So, if you want to filter out the spam calls or unpriority calls you can do so using Plivo. Plivo provides Ruby SDK as well as well-maintained documentation to integrate Plivo for voice calls in application. Here, I am demonstrating how to create your first voice call using Plivo in Ruby on Rails Web Application First of all you should have rails application. I am creating new here, $ rails new plivo_demo Add $ gem ‘plivo’, ‘>= 4.8.1’ to Gemfile and run $ bundle command Get Plivo credentials: – Goto: https://console.plivo.com/accounts/login/  …

Ruby on Rails Web アプリケーションを介して音声通話を行う 続きを読む "

Rails で MySQL データベースをインポート/エクスポートするには?

Here’s How you can Import and Export MySQL Database – To Export DB mysqldump -u [username] -p [db_name] > [sql_file_name.sql] – Make its tar(compress) for easily share with other system: tar -czvf [any_name.tar.gz] [sql_file_name.sql]   – Share it to the other system where you want to import it. – Untar the compressed file:tar -xzf [any_name.tar.gz] – To Import database mysql -u [username] -p [db_name] < [sql_file_name.sql] Thanks! Whether you are up for developing a small or large application, you need to be sure of the development process should takes place smoothly and seamlessly all the while having clear and organized codes. Even for experienced developers, it is not possible to …

Rails で MySQL データベースをインポート/エクスポートするには? 続きを読む "

Ruby on Rails のプリロード、イーガーロード、インクルードと結合

Let’s take an example for understand the difference between them. One company has many employees, and one to many connection is there between company and employees. Preload: Preload loads the data in two queries. Includes also loads associate data in two queries in default case. We can’t use preload to add condition for associate table. Like in our case we can’t add where query for employees. It generates error on adding where and order by with associated table. eager_load: Eager load loads all associated data in single query. Eagrload uses left outer join to combine data. We can use where query also with eager load for filtering the data from …

Ruby on Rails のプリロード、イーガーロード、インクルードと結合 続きを読む "

Ruby on Rails がビジネスの MVP の開発に最適な理由は何ですか?

The great efficiency of building an MVP is one of the important aspects which make Ruby on Rails perfect choice of technology for the start-ups. Let’s dig a bit deeper to understand what makes Ruby on Rails great for MVP development. Here are some of the reasons why Ruby on Rails is perfect for developing the MVP for your business: Speed of the processThe process of MVP development can be accomplished rather quickly using Ruby on Rails as compared to most other technologies which are mainly, owing to its ready-to-use modules and the built-in development tools. This gives way to a far more efficient development process for the application. Ruby …

Ruby on Rails がビジネスの MVP の開発に最適な理由は何ですか? 続きを読む "

Ruby on Rails コンサルティングでバグのないコスト効率の高いアプリ開発を実現する方法

As a startup looking to develop its business application, you are likely faced with a few understandable challenges that might seem to be major roadblocks in the path of your business realising its digital transformation objectives. With the limited resources, your business has access to, these challenges may include a budget too small to be able to launch an MVP, the compulsion of achieving high speed-to-market to keep pace with competition and finally, the challenge of not being able to afford a buggy system and hence, the pressure of building a system backed by top-notch code quality. Surrounded by these constraints, you finally decide to undertake application development choosing Ruby …

Ruby on Rails コンサルティングでバグのないコスト効率の高いアプリ開発を実現する方法 続きを読む "

2018 年の Web およびモバイル アプリケーション開発に Ruby on Rails を選択する理由は何ですか?

In the changing technological landscape, it can be a challenge to predict as to how long will the current trends last. So, the big question is that with the advent of new technologies, whether Rails will continue to remain relevant for full-stack web application development in 2018 and beyond. From our perspective, there is no doubt about it. Here are some of the reasons why we think Ruby on Rails is all the more relevant for your upcoming website project: Because it has now earned the status of a proven and matured technology that has been around for an entire decade. Because by now, we know that it is more …

2018 年の Web およびモバイル アプリケーション開発に Ruby on Rails を選択する理由は何ですか? 続きを読む "

Metamagic 101 – Introduction, Installation & Usage

Metamagic gem is a RoR plugin for creating and managing meta tags. It auto-generates the meta tags dynamically throughout and cuts down the need for writing it every time. In addition to the regular meta tags, metamagic also supports custom tags, OpenGraph (Facebook) and Twitter Cards. It is a critical factor to consider while developing web applications. Let’s Begin With Understanding Meta Tags Meta tags are pieces of data that provide details – also known as meta-information or metadata – about a particular HTML document. This includes page description, the keywords, details of last modifications and so on. Meta tags are not displayed on the web page. They appear in …

Metamagic 101 – Introduction, Installation & Usage 続きを読む "

Japanese
English
English
Japanese
German
French
Spanish

WhatsApp

モバイル版を終了する