TinyMCE 4 text editor + elFinder file manager in Rails 4 app

February 21, 2015 · Posted in Development · Comment 

This post shows how to use WYSIWYG text editor TinyMCE 4.1 in a Rails 4 application.

TinyMCE WYSIWYG text editor comes with a MoxieManager file manager  which is not free.

File manager is needed to insert an image by selecting from images on server or uploading a new image to server.

elFinder is an open-source file manager. In order to use file manager with a Rails application, we need a backend (connector) – phallstrom/el_finder gem.

 

Read all details on  github:

Install TinyMCE editor 4 with Elfinder file manager in Rails 4 app.

 

 

LiveReload for Rails app on Windows

January 24, 2015 · Posted in Development · Comment 

LiveReload allows you to reload your application in browser automatically after code files are changed.

Using LiveReload with your Rails application is very easy.

Follow these easy steps.

Deploy a Rails application with Capistrano 3

January 11, 2015 · Posted in Development · Comment 

This Github repository contains an example of deploying Rails application with Capistrano 3 including features:

- copy config files to shared folder

- linked files and dirs

- precompile assets locally

- precompile assets only if files were changed

- restart app in Passenger

- show a maintenance page on site while the site is updating

 

Find it on Github: https://github.com/maxivak/deploy-rails-capistrano3. Download the files from the repository and use the tasks according to your requirements.

 

Custom submit button in simple_form and bootstrap 3

December 18, 2014 · Posted in Development · Comment 

simple_form is very powerful gem allowing to customize almost everything while rendering form elements. In this post we will add a new custom component to simple_form for better rendering of submit buttons.

Read more

Running Selenium tests with Ruby on Centos

October 19, 2014 · Posted in Development · Comment 

This posts shows how to run Selenium tests on Centos. Tests written on Ruby will use Selenium WebDriver API to run the browser directly. We don’t need to install Selenium Server because selenium tests will be executed locally against Firefox browser on the same server (Centos).

Read more

Ruby on Rails code architecture tips

October 8, 2014 · Posted in Development · Comment 

A collection of tips about designing Rails application and making a better architecture.

Read more

Custom controller actions in ActiveAdmin (Ruby on Rails)

August 7, 2014 · Posted in Development · Comment 

ActiveAdmin is a popular Ruby on Rails plugin for creating admin area. It helps developers solve many common problems to view/edit data as administrator. There are several other similar plugins, but I prefer ActiveAdmin because it allows developers to customize almost everything.

This post shows how to to add a custom action to an ActiveAdmin controller.

Read more

Custom slugs in Rails using gem Slugged

August 2, 2014 · Posted in Development · Comment 

There are several gems to have slug in a model in Rails application: friendly_id, slugged and some others.

Read more

Loading “Seed” Data in Rails

July 12, 2014 · Posted in Development · Comment 

A Rails application needs some data to exist in database before the application can be run. It is called ‘seed’ data.
This post shows how to create a rake task that loads ‘seed’ data. Data is stored in *.yml files.

Read more

Rails: clear old sessions stored in database

December 14, 2013 · Posted in Development · Comment 

Sessions in Rails application can be stored in a database (as well as in cookies). I used to store session data in a table in database.

Sessions table may grow very large because Rails doesn’t have a built-in mechanism to clear old session data.

So you need to remove old sessions rows from database manually.

Read more

Next Page »