# app/models/booking.rb
class Booking
include RailsAdmin::Booking
end
# app/models/concerns/rails_admin/booking.rb
module RailsAdmin::Booking
This file contains hidden or 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
These are steps to setup a new project in ROR. | |
You must configure and install your Gems individually instead of copying the Gemfile from a previous project. | |
Refer to Heroku setup if you want to push your project to Heroku. | |
## Setup directory | |
```sh | |
# Create directory in ~/workspace | |
mkdir ./testproject | |
cd ./testproject |
Offical documentation: https://github.com/thoughtbot/factory_girl/blob/master/GETTING_STARTED.md
gem 'factory_girl_rails'
- Add the following to
spec/spec_helper.rb
for easier calling of FactoryGirl methods
This gem makes creating cron jobs very easy!
- Source: https://github.com/javan/whenever
- After defining your crons, you need to run
whenever -w
to write out the crontab - Use
crontab -l
to see the list of cron jobs you have
set :output, {:standard => 'log/cron.log'} #logs to your log file to view
Setup a WYSIWYG editor with CKEditor. Includes instruction for Rails_Admin
- Add
gem 'ckeditor'
to your Gemfile and bundle - Checkout https://github.com/galetahub/ckeditor for instruction to generate the correct model to generate for uploading of files (eg. ActiveRecord + Paperclip)
- Run
rake db:migrate
- Add
//= require ckeditor/override
in your application.js (before require_tree .)
To configure the editor to be used in Rails_Admin, follow this https://github.com/sferik/rails_admin/wiki/CKEditor
This guide setup Apache2/Passenger/Ruby/Rails on a CentOS 6.4 LiveCD.
You can test it yourself using VirtualBox to run all the scripts - read VirtualBox.md for more info.
# install the necessary libraries
yum clean all
yum -y update
yum -y install curl-devel git sqlite-devel libxml2-devel
yum -y install libxml2 libxml2-devel libxslt libxslt-devel
yum -y install gcc-c++ readline-devel libyaml-devel libffi-devel openssl-devel libtool bison
NewerOlder