rails new ror-app-name --api
This step is for creating a very basic level of model for us to work in. If you know already, or wish to apply your own custom models with relationships you can skip this step.
$.rails.allowAction = (link) -> | |
if link.data('confirm') | |
$.rails.showConfirmationDialog(link) | |
false | |
else | |
true | |
# User click confirm button | |
$.rails.confirmed = (link) -> | |
link.data('confirm', null) |
# config/routes.rb | |
%w( 404 422 500 ).each do |code| | |
get code, :to => "errors#show", :code => code | |
end | |
# app/views/errors/404.html.haml | |
%h1 404 - Not Found | |
class ErrorsController < ApplicationController | |
# config/initializers/compression.rb | |
Rails.application.configure do | |
# Use environment names or environment variables: | |
# break unless Rails.env.production? | |
break unless ENV['ENABLE_COMPRESSION'] == '1' | |
# Strip all comments from JavaScript files, even copyright notices. | |
# By doing so, you are legally required to acknowledge | |
# the use of the software somewhere in your Web site or app: |
rails new ror-app-name --api
This step is for creating a very basic level of model for us to work in. If you know already, or wish to apply your own custom models with relationships you can skip this step.