Author: admin

  • Padrino Admin

    Padrino comes shipped with a slick and beautiful Admin Interface, with the following features: Feature Description Orm Agnostic Adapters for datamapper, sequel, activerecord, mongomapper, mongoid, couchrest Authentication User Authentication Support, User Authorization Management Template Agnostic Erb and Haml Rendering Support Scaffold You can create a new “admin interface” by providing a single Model MultiLanguage English,…

  • Padrino Mailer

    This component creates an easy and intuitive interface for delivering email within a Sinatra application. The mail library is utilized to do the bulk of the work. There is full support for rendering email templates, using a html content type and for file attachments. The Padrino Mailer uses a familiar Sinatra syntax similar to that of defining…

  • Mounting Applications

    Padrino applications are all automatically mountable into other Padrino projects. This means that a given Padrino project directory can easily mount multiple applications. This allows for better organization of complex applications, re-usable applications that can be applied (i.e admin, auth, blog) and even more flexibility. You can think of mountable applications as a “full-featured” Merb slice or…

  • Development Commands

    Padrino also supports robust logging capabilities. By default, logging information will go to the STDOUT in development (for use in a console) and in an environment-specific log file log/development.log in test and production environments. You can modify the logging behavior or disable logging altogether (more docs here): To use the logger within a Padrino application, simply refer to the logger method accessible…

  • Installation

    Ruby & RubyGems First, you need to have a ruby interpreter installed. You can verify if you have the interpreter installed by typing which ruby into the terminal and ensuring a result. If not, we recommend installing RVM on most platforms which manages your ruby interpreter installation and configuration. Once RVM is installed, be sure to install Ruby 2.3.0…

  • Why Learn Padrino?

    This guide will give an overview of the various other guides, resources and steps towards becoming a Sinatra + Padrino aficionado. Advantages Let’s take a second to briefly enumerate three major advantages of learning Padrino: Easy to Learn The most interesting aspect of the Padrino stack (Rack, Sinatra, et. al.) in comparison to other web…

  • Overview

    Padrino provides generator support for quickly creating new Padrino applications. This provides many benefits such as constructing the recommended Padrino application structure, auto-generating a Gemfile listing all starting dependencies and guidelines provided within the generated files to help orient a new user to using Padrino. One important feature of the generators is that they were…

  • Wrapping Up

    Now that you have an overview of what Hanami 2 is all about and even created a simple app from routes all the way to the view template, we challenge you to take your learning a bit further. You will notice that we created a show route but not it’s action or the subsequent view and template…

  • Viewing the Data

    Since ours is a very simple blog app, we’ll only use the view and template bits for now. Let’s start by passing the data from the relevant action into a “view”. For the blog index view, create an index.rb file under …/slices/main/lib/main/views/blog/ Here, we are telling the view that data will be passed into it via…

  • Working With Data in Hanami

    As mentioned earlier, in Hanami, entities, repositories, and relations make up what we call the data layer. “Relations” define how data is fetched from the database. You would also define scopes and other database-specific queries in relations. “Repositories”, however, are database-agnostic. They mediate between entities and relations. An “entity” is where you define domain-specific logic.…