Questions tagged [padrino]

Padrino is a ruby framework built upon the excellent Sinatra Microframework. Sinatra is a DSL for quickly creating simple web applications in Ruby. Padrino was created to make it fun and easy to code more advanced web applications while still adhering to the spirit that makes Sinatra great!

Overview

Padrino is a Ruby framework built upon the excellent Sinatra microframework. This framework makes it as fun and easy as possible to code increasingly advanced web applications by expanding upon Sinatra while maintaining the spirit that made it great.

For more overview, please see the Wikipedia article.

Features

Here is a list of major functionality Padrino provides on top of Sinatra:

  • Agnostic: Full support for many popular testing, templating, mocking, and database libraries.
  • Generators: Create Padrino applications, models, controllers i.e: padrino g project.
  • Mountable: Unlike other ruby frameworks, principally designed for mounting multiple apps.
  • Routing: Full url named routes, named params, respond_to support, before/after filter support.
  • Tag Helpers: View helpers such as: tag, content_tag, input_tag.
  • Asset Helpers: View helpers such as: link_to, image_tag, javascript_include_tag.
  • Form Helpers: Builder support such as: form_tag, form_for, field_set_tag, text_field.
  • Text Helpers: Useful formatting like: relative_time_ago, js_escape_html, sanitize_html.
  • Mailer: Fast and simple delivery support for sending emails (akin to ActionMailer).
  • Admin: Builtin Admin interface (like Django).
  • Logging: Provide a unified logger that can interact with your ORM or any library.
  • Reloading: Automatically reloads server code during development.
  • Localization: Full support of I18n.

Note that as a user of Padrino, each of the major components can be pulled in separately to an existing Sinatra application or they can be used altogether for a comprehensive upgrade to Sinatra (a full-stack Padrino application).

To read more about registering certain Padrino functionality into your Sinatra application, check out the Standalone Usage in Sinatra guide.

378 questions
0
votes
1 answer

Padrino app with REST API

Within a Padrino application I have a posts controller with the conventional routes: Blog::App.controllers :posts do get :index do ... end get :show, :with => :id do ... end end This gives me therefore the normal URL access…
SystematicFrank
  • 16,555
  • 7
  • 56
  • 102
0
votes
1 answer

.rvm/gems/ruby-2.0.0-p353/gems/configatron-2.9.1/lib/configatron/store.rb:328:in `': uninitialized constant Psych::Syck (NameError)

I am getting error while I am doing padrino start. I uninstalled and installed many times gems, rvm and ruby even bundler and then installed , but every time getting error uninitialized constant Psych::Syck…
Bharat
  • 13
  • 4
0
votes
2 answers

Shoulda not working in Padrino, fails with undefined method `delegate'

I've recently set up a couple of Padrino projects and each time I generated the project, I used Shoulda as the test option. But when I try to run 'padrino rake test,' it fails with the following error: Sonnys-MacBook-Pro:sample_blog sonnyjitsu$…
Sonny Parlin
  • 931
  • 2
  • 13
  • 28
0
votes
1 answer

Need to define an alias for a DataMapper property

I am working on a Padrino/Sinatra app that is using the jQuery UI Autocomplete in a certain section. To populate the autocomplete, I have defined the following: get '/autocompletedata' do content_type :json Foo.all.to_json(:only =>…
CyberFerret
  • 275
  • 3
  • 8
0
votes
1 answer

Upgrade an existing Padrino project

I have a project that I created using Padrino 11.2 a few months ago. Since then, Padrino 11.4 has been released, and I did a 'gem install padrino' to pull down the latest version. However, when I go to an old project folder and type in 'padrino v'…
CyberFerret
  • 275
  • 3
  • 8
0
votes
1 answer

padrino 0.11.4 and mongoid 3.0.23 blog - posts not showing in front-end

After successfully following this tutorial, I tried creating a similar blog using mongoid as a stepping stone for a later project. Admin setup and model+controller creation went well, but posts don't show up in the front-end. The admin is creating…
bcsantos
  • 2,635
  • 5
  • 21
  • 22
0
votes
1 answer

How can I create a new layout and have it show up only in certain situations using ruby padrino?

I'm using padrino with my website, and need to override the default layout to use a different layout in certain situations i.e. when a user clicks on a certain thing.
0
votes
2 answers

Rendering a partial with different content blocks on the same page: i need a partial helper that accepts a content block

I really like how Sass mixins let you wrap a block of code with a customizable wrapper: =container($class) .#{$class}.container .container-inner @content +container(header) foo: bar +container(main) baz: quux Resulting…
Andrey Mikhaylov - lolmaus
  • 23,107
  • 6
  • 84
  • 133
0
votes
1 answer

Datamapper [ruby] on Legacy Schemas

I'm working with a legacy schema which has 3 particular tables backing a single class, listed below: table_1_month # All items that are < 1 month old. table_1_year # All items that are between 1 month and 1 year old. table # All items that are…
0
votes
1 answer

Print XML with Nokogiri (in Padrino) with good indentation

I want to print out on XML file on HTML Page. I'm using Nokogiri with: Nokogiri::XML::DocumentFragment.parse("ToveJaniReminderDon't forget me this weekend!").to_xml(:indent =>…
0
votes
1 answer

Frontmatter in Padrino

In Middleman, there is a feature called frontmatter. Basically, you can put some YAML in front of your view and access it in the view and the layout like this: --- my_list: - one - two - three ---

List

    <%…
iblue
  • 29,609
  • 19
  • 89
  • 128
0
votes
1 answer

How to test for exceptions in shoulda along with TestUnit?

I have an application based on padrinorb and I am using the shoulda testing library for the same. There is a method that I need to test throws exception. I tried finding the documentation for the same, but couldn't find anything. Here's the sample…
Ankit Dhingra
  • 6,534
  • 6
  • 31
  • 34
0
votes
1 answer

Padrino Admi - Omniauth - Can't Access Restricted Space after Successful Login

I primarily come from a PHP and ASP.NET background. Recently I got involved with Ruby and am starting an interesting relationship with Padrino. Not too much like Rails and not too less like Sinatra. I am making first serious application using…
Ziyan Junaideen
  • 3,270
  • 7
  • 46
  • 71
0
votes
2 answers

Padrino send errors automatically via email

Can anyone suggest a way to have any application errors in a Padrino app send these errors via email? I already have the Padrino Mailer configured properly and can send test emails, I just have no idea how to configure the app to send me a report…
kakubei
  • 5,321
  • 4
  • 44
  • 66
0
votes
1 answer

Cannot Get Counter_Cache to update properly in Padrino (Rails)

I have a Padrino app I am building where I want to use counter_cache. I am using ActiveRecord as my ORM. In my Repository model, I want to keep a count of the number of contributions that are associated with a given repository. Here are the relevant…
John K. Ferguson
  • 641
  • 2
  • 8
  • 15