background preloader

Rails API

Facebook Twitter

#270 Authentication in Rails 3.1. Here I show off three new features in Rails 3.1 that will help with authentication: easier HTTP Basic, SecurePassword in the database, and forcing SSL.

#270 Authentication in Rails 3.1

Download: source codeProject Files in Zip (185 KB)mp4Full Size H.264 Video (8.86 MB)m4vSmaller H.264 Video (6.56 MB)webmFull Size VP8 Video (7.63 MB)ogvFull Size Theora Video (13.2 MB) Testing - Making functional tests in Rails with Devise. Can I get the Ruby on Rails console to remember my command history, umm, better. Session - Rails 3 - How can you get access to Devise's current_user in the IRB console. Working with Rails – ActiveRecord, Migrations, Models, Scaffolding, and Database Completion. Exclusive offer: get 50% off this eBook here Ruby on Rails Enterprise Application Development: Plan, Program, Extend — Save 50% Building a complete Ruby on Rails business application from start to finish by Elliot Smith Rob Nichols | November 2007 | Open Source In the previous article, we covered setting up a new Rails application and connecting it to a database.

Working with Rails – ActiveRecord, Migrations, Models, Scaffolding, and Database Completion

In this article, we take this a little further and deal with ActiveRecord, Migrations, Models, the Scaffold, and demonstrate how to complete the Database with the required tables using migrations ActiveRecord is the ORM layer (see the section Connecting Rails to a Database in the previous article) used in Rails. Model == Table The base concept in ActiveRecord is the model. Cyu/rack-cors. Ruby on rails - integrating R with Rsruby. Jayshepherd/devise_example. Ruby on Rails and Android Authentication Part One. The Rails Web Application Intro In this two-three-part tutorial you’ll learn first how to build an authentication API that can allow external users to register, login and logout through JSON requests.

Ruby on Rails and Android Authentication Part One

After having successfully logged in, a user will receive an authentication token that could be used in following API requests to authorize the user, securing the access to your application’s resources. In the second part, you will build an Android application that will be able to consume this API, allowing the user to register and login directly from the app. Using CORS. Introduction APIs are the threads that let you stitch together a rich web experience.

Using CORS

But this experience has a hard time translating to the browser, where the options for cross-domain requests are limited to techniques like JSON-P (which has limited use due to security concerns) or setting up a custom proxy (which can be a pain to set up and maintain). Enable cross-origin resource sharing.

Search

♥ Rails Girls Tutorial - Seus primeiros passos em Ruby on Rails ♥ Criado por Daniel Kehoe, @danielkehoeURL do original: Nesse tutorial mostraremos como configurar uma aplicação Rails 3.2 para usar o framework Twitter Bootstrap como ferramenta de desenvolvimento CSS para criar o layout de uma aplicação HTML5 e estilizar mensagens de alerta e notificações Rails.

♥ Rails Girls Tutorial - Seus primeiros passos em Ruby on Rails ♥

O uso do Twitter Bootstrap proporciona uma estilização ágil e atrativa para sua aplicação. Twitter Bootstrap e outros frameworks CSS, tal como Zurb Foundation, são ferramentas que proporcionam uma estrutura e princípios ideais para desenvolvimento Rails server-side ("back-end"). Twitter Bootstrap é o mais popular entre os diversos frameworks CSS existentes. Esse tutorial destina-se aos desenvolvedores Rails utilizando os exemplos de aplicações constantes do repositório Rails Apps, contudo todos poderão se beneficiar dele.

Ruby on rails - Devise + CanCan just prevent other users from editing objects.

Cancan

Scopes · hassox/warden Wiki. Warden allows for multiple users to be logged in at the same time.

Scopes · hassox/warden Wiki

This should be used very cautiously. Sudo access, or a publisher checking what viewing it as another user will look like, or a secured authentication step for checkout. You could also use scopes to authenticate a users access to a particular account. By default the scope is :default. The :default scope is used whenever no scope is stated. Using Scopes A scope is identified by an object. Authenticating env['warden'].authenticated? Scoped User Access env['warden'].user(:sudo) Logout env['warden'].logout # Clear the session. Keeping Each Users Data Separate You can keep each users data separate by using the Authenticated Session Data feature.

DB

How to manage front-end packages in Rails with Bower - Blog - Shelly Cloud. Bower is an open source software created by Twitter, which simplifies dependencies management and updating of front-end packages (like gridism or normalize).

How to manage front-end packages in Rails with Bower - Blog - Shelly Cloud

In general it is the same thing for HTML/CSS/JS what Bundler is for Ruby. Not so long time ago version 1.0 has been released and the current stable version is 1.2. Let's take a look at how to use it and integrate with a Rails app. Workflow The easiest way to install Bower on your local machine is to use the NPM manager distributed with Node.js.

Basic workflow is really simple. Run bower install. By default Bower downloads all packages to bower_components in the main directory. The second most used command is bower update, which updates all packages to versions specified in the bower.json (or to the newest available if you use * as a version indicator). Last but not least, a command worth mentioning is bower search. Plataformatec/devise.

Maps

Rails Routing from the Outside In. 1 The Purpose of the Rails Router The Rails router recognizes URLs and dispatches them to a controller's action.

Rails Routing from the Outside In

It can also generate paths and URLs, avoiding the need to hardcode strings in your views. Albertopq/jquery_datepicker. #213 Calendars. How do I connect jQuery Datepicker to my Ruby on Rails form. RESTful API authentication - Cocoa Hunter. In a couple of our past posts we saw how to build a private API (Part 1 - Part 2 ) that could be used as the backend for an iOS app.

RESTful API authentication - Cocoa Hunter

Let’s take it a step further. Today I will show you how to use that backend to actually let users log in and out (on the mobile device) from the system by providing a RESTful API for the authentication process. We’ll create a basic app from scratch step by step. Bear with me.