2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2020

02/08/2010: Another Fix for EMAIL not authorized to access APP

I wanted to change the primary email associated with my Heroku account. So I removed the email from the authorization list. The next time I pulled from git, I got the following error:

heroku@david-medinets.otherinbox.com not authorized to access crisiscamp-translation
The email address is pulled from your public/private keys which can be recreated using the following command:
ssh-keygen -t rsa -C EMAIL

02/07/2010: Using Formtastic Without ActiveRecord

Using Formtastic Without ActiveRecord Let's start with a model:
class PrimaryLanguage
  attr_accessor :name
  def initialize(name)
    @name = name
  end
end
Then create an object in a controller:
class AbcController < ActionController::Base
  def aaa
    @primary_language = PrimaryLanguage.new('English')
  end
end
Design a form:
<% semantic_form_for @primary_language, :url => select_primary_language_path, :html => { :id => 'primary_language'} do |form| %>
  <%= form.input :name, :as => :select, :collection => @languages, :required => false, :label => "Primary Language:<br/>", :include_blank => false %>
<% end %>
And finally handle the user's input;
class XyzController < ActionController::Base
  def bbb
    primary_language_name = params[:primary_language][:name]
    # do something
  end
end