How to upload file using Ajax and Rails

Javascript, jQuery, Ruby, Ruby on Rails, 2016-02-12 10:58:00 UTC
In this case, we need a plugin    <form id="the_form" action="/page/gambars/form_upload" method="post" enctype="multipart/form-data"> <div> File<br /> <input name="gambar[gambar_name]" /> </div> <div> <button type="submi
Share:     

Send Notification via Email when The Application is Error

Ruby on Rails, 2016-01-17 01:15:00 UTC
Checking log and see the error message is good. But, in my opinion, the best way to know an error in the application is send the error message via email.  To implement this, you need to install exception_notification GEM from http://smartinez87.github.io/exception_notification/#email-
Share:     

Rails subdomain and namespace route

Ruby on Rails, Web Development, 2015-10-24 03:44:07 UTC
Currently, I am creating an API for one of my application. Instead of using a URL like https://domain.com/api/v1/path_names, I choose https://api.domain.com/v1/path_names. And today, I want to share my experience with you. The first thing that needs to do is to group all the controlle
Share:     

Rails Debug via Console

Ruby, Ruby on Rails, 2015-06-17 08:18:56 UTC
One thing that is important when we make an application is how we keep tracing the error. Rails framework package by default using Webrick webserver. In the development process, we can see what is happening behind the scenes through a console. We can make the console gives a message that the applic
Share:     

Basic Authentication using BCrypt

Ruby on Rails, 2015-06-17 00:11:17 UTC
1. Include BCrypt in Gemfile gem 'bcrypt', '~> 3.1.7' 2. Model $ rails g model Member email:string password:string 3. Route get 'auth/sign_up', to: 'auth#sign_up' post 'auth/sign_up/post', to: 'auth#sign_up_post' get 'auth/sign_in', to: 'auth#sign_in' post 'auth/sign_in/post', to: 'a
Share:     

How to create ajax-signup in Ruby-on-Rails and Devise

Ruby on Rails, 2015-06-17 00:10:48 UTC
This is a continuation of the previous tutorial in Ruby on Rails about signing-in a user with ajax. http://www.develbook.com/2015/03/how-to-create-ajax-login-in-ruby-on.html Now, I want to show you how to create the devise signing-up in Ruby-on-Rails in the very short tutorial. 1. In the devise-aja
Share:     

How to create ajax-login in Ruby-on-Rails and Devise

Ruby on Rails, 2015-06-17 00:10:23 UTC
Before I begin with this tutorial, you must know about basic devise installation and usage. If you don't, you can go to this very simple step-by-step tutorial. Just follow these steps; 1. Main page route, controller and view config/route.rb get '/main_page', to: 'main#index' app/controllers/ma
Share: