Initial attempt to migrate to rails3

NOT DONE YET!
new gemfile.lock
Migrated configuration to rails3.
Plugin mgration, routes (unfinished).

rake now works as well.
not needed.
Some cleanup of the routes.

… insignificant.
Routes migrated to rails 3 syntax.

(momentous occasion, Matthew contrubtes first lines of code).
Upgraded paperclipt to 3.1.
Making it work ....
Renamed views to .html.erb
Moved assets into app/assets
<% --> <%=
Bcrypt.
Making the Airlines Controller work

Fixing  some bugs and making the form and table render properly
Fixed "programs" form and <% error

<% form_for... to <%= form_for… in each
app/views/model_name/edit.html.erb file to make sure that the edit form
is actually rendered. Also, method for getting forms to work (so far
airlines and programs):

Getting the forms to work:

We will  use form_for() in the _form.html.erb partial:

<%= form_for @airline, remote: true, html: { id:  "airline_form" } do
|f| %>

and then get variables from instance "f" as

   <table>

      <tr>
         <td>Airline Name</td>
         <td>
            <%= f.text_field :name %>
         </td>
         <td>Airline Code</td>
         <td>
            <%= f.text_field :code %>
         </td>
         <td colspan="2">
            <%= f.submit "Add New Airline" %>
         </td>
      </tr>
   </table>

<% end %>

In the controller:

 - need to make sure that the variable is defined in the controller for
all pages that require it:

before_filter only: [:index, :new] do

    @program = Program.new

end

 - fix the deprecated:

    @programs = Program.find(:all, :order=>"name asc")

is now

    @programs = Program.all.order("name asc")

 - Need to do jquery on ajax:success in the controller with reference
to json as well as js (for example a create method):

def create

    @airline = Airline.new params[:airline]

   respond_to do |format|
      if @airline.save
         format.html { redirect_to @airline, notice: 'Airline was
successfully created.' }
         format.json { render json: @airline, status: :created,
location: @airline }
         format.js
      else
         format.html { render action: "new" }
         format.json { render json: @airline.errors, status:
:unprocessable_entity }
         format.js
      end
   end
end

In an associated create.js.erb (in the same Views sub-folder):

var $ = jQuery; #make sure we're using jQuery

var newRow = " <%= escape_javascript(render(partial: "airline", object:
@airline)) %> "; #a new row is defined as in, for example,
_airline.html.erb

$("#airline_form")
.find("input[type=text]").val(""); #clear the form-fields

$("#airlines>tbody").append(newRow); #append the new row

NOTE:

 - render(partial: "airline", object: @airline) will pull in the
partial from _airline.html.erb.

 - Every partial also has a local variable with the same name as the
partial (minus the underscore). You can pass an object in to this local
variable via the :object option:

    render(partial: "airline", object: @airline)

Within the airline partial, the airline variable will refer to @airline
from the parent view.

To allow particular attributes to be editable via a form (i.e. edit
some part of the database on a form submit you have some security so
need to specifically allow some fields to be editable):

 - under the class (in, for example, app/models/airline.rb) do

       attr_accessible :field_name #for example, :field_name could be
:name or :code for airline object

NOTE: go to db/schema.rb to see all field names

Airlines table: make sure that the edit and remove links work (this
will be true for other tables). They should work since we now just push
in the new row with:

    var newRow = " <%= escape_javascript(render(partial: "airline",
object: @airline)) %> ";

    $("#airlines>tbody").append(newRow);

(see above)
Ransack to GemFile
Allowed "programmer" access and beginning swapover from SearchLogic to Ransack
Tried fixing some errors in changing SearchLogic to Ransack
Ognen's visit

 - added roles to seeds
 - added routes to enable and disable users
 - example of pagination (users_controller and users/index.html)
 - fixed form error (render partial form in index and then buid form in
partial)
 - added error handling
 - fixed audio playlists form
Fixed most Audio Playlist Settings