Create droplet of your liking (ubuntu 12.10 x32)
ssh to root in terminal with your server ip
ssh [email protected]
Add ssh fingerprint and enter password provided in email
| // The model for the gallery images allowing multi file uploads | |
| <?php | |
| class GalleryImage extends Eloquent { | |
| // protected $guarded = array(); | |
| // public static $rules = array(); | |
| public function __construct(array $attributes = array()) { |
| <!-- Not the FULL view --> | |
| <link rel="stylesheet" href="{{ url('css/sir-trevor-icons.css')}}" type="text/css"> | |
| <link rel="stylesheet" href="{{ url('css/sir-trevor.css')}}" type="text/css"> | |
| <!-- Using some Bootstrap here --> | |
| <div class="container"> | |
| <div class="row" id="post-form-container"> | |
| <h3>Create A Post</h3> | |
| <form method="post" action="form" id="post-form" role="form"> | |
| <div class="form-group"> |
Create droplet of your liking (ubuntu 12.10 x32)
ssh to root in terminal with your server ip
ssh [email protected]
Add ssh fingerprint and enter password provided in email
These editors try to give good UX for WYSIWYG :
| // Capfile | |
| # Load DSL and Setup Up Stages | |
| require 'capistrano/setup' | |
| # Includes default deployment tasks | |
| require 'capistrano/deploy' | |
| # Includes tasks from other gems included in your Gemfile |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
| <script src="jquery.ketchup.all.min.js" type="text/javascript"></script> | |
| </head> | |
| <body> | |
| <div id="email"> | |
| <span>Enter your email to sign up</span> | |
| <form action="/subscribe.php" id="invite" method="POST"> |
| # http://stackoverflow.com/a/8936202 | |
| # | |
| # ActiveAdmin already includes the necessary jquery in active_admin/base, | |
| # so just add this to javascripts/active_admin.js after //= require active_admin/base | |
| # | |
| # | |
| # Serialize and Sort | |
| # | |
| # model_name - you guessed it, the name of the model we are calling sort on. | |
| # This is the actual variable name, no need to change it. |
| // Show view | |
| <p id="notice"><%= notice %></p> | |
| <p> | |
| <strong>Title:</strong> | |
| <%= @book.title %> | |
| </p> | |
| <p> | |
| <strong>Synopsis:</strong> |
| class BooksController < ApplicationController | |
| before_action :set_book, only: [:show, :edit, :update, :destroy] | |
| before_filter :authenticate_user!, only: [:new, :edit, :update, :destroy] | |
| def index | |
| @books = Book.order('created_at DESC').all | |
| end | |
| def show | |
| @book = Book.friendly.find(params[:id]) |
| #controllers for the gallery and image | |
| #images_controller.rb that creates the image | |
| class ImagesController < ApplicationController | |
| before_action :set_image, only: [:show, :edit, :update, :destroy] | |
| def show | |
| @image = Image.find(params[:id]) | |
| end |