Add dependency on strong_parameters and remove attr_accessible from models and move them to controllers
Require rails 4.0.0.rc1 and get bundle to work

ransack and deface were commented out for now because they require rails
3 versions

Also there's no need to require strong_parameteres gem now since it's
built in rails 4. At this point core test suite run but a bunch of specs
fail and zillions warnings are displayed
More tweaks down to 7 failures on core

  * Fix shipping method zones association
  * Update envinroment test.rb template
  * Fixes failing specs
  * require ransack rails4 branch

[Fixes #3094]
Serialize value attribute on Preference

Rails 4 doesn't type-cast unknown types to YAML so the build were
getting errors like "can't cast type array to string"
see https://github.com/rails/rails/pull/4558
Fix another use of AS::Callbacks#run_callbacks

Rails 4 implementation doesn't have a key as second argument anymore
see https://github.com/rails/rails/pull/6241
Fix conflict between product available and search scopes

Search::Base#retrieve_products would add another scope regarding
spree_prices currency to the query. While in Rails < 4 the last scope
would override the first now it just combines all of them with "AND"

see https://github.com/rails/rails/issues/7365 for lots of discussion on
the subject

I let the `currency` argument on the `available` scope for now just so
that we don't need to change too much code at this point
Add lambdas to associations and scopes

Helps to get rid of deprecation warnings

[Fixes #3126]
Bundle and build dummy app on backend with Rails 4

  * Remove deface dependency for now
  * Require ransack from github rails4 branch
  * Set HTTP method on match in routes.rb
  * Remove Rails dependency as it's already required on spree_core
Bump versioncake to ~> 1.2.0

All controller specs were failing with:

    NoMethodError:
           undefined method `has_key?' for #<ActionDispatch::Http::Headers:0xc6551c4>

Current README of that lib points that version as Rails 4 compatible
Remove `return` from rescue_from block in Auth helper

Specs were failing due to a change on AS::Rescuable. See following rails
ref for details:

    https://github.com/rails/rails/commit/9c857db75788c21f6184279c130e79f21c750f9f
    https://github.com/rails/rails/commit/d1887d384a4038d67bcad50a46a6dc67abfebe04

This is the error you get, as of Rails 4, when calling `return` from
within a `rescue_from` block:

    LocalJumpError: unexpected return

According to ruby-doc the error raises when Ruby can't yield as
requested. e.g. you can't return inside a proc and then call it

    def get_me_a_return
      Proc.new { return 42 }
    end
    get_me_a_return.call
Permit attributes to fix some controller specs

At this point backend build is down to 1 controller spec failure which
is probably related to a ransack bug.

ps. I haven't run the request specs yet

[Fixes #3141]
Build dummy app successfully on api and frontend

  * Move ransack to common spree dependencies for now as we're depending
    on a rails4 branch and all spree components require it
  * Remove deface dependency
  * Rails dependency is redundant since spree_core already requires it
  * HTTP method should explictly set in routes `match`
Update action_controller `process` method signature

As of Rails 4 we should pass the HTTP method as second argument
Remove `caches_page` from Spree::ContentController

That method has been removed from Rails 4 and put into another gem. I
tried adding that gem but it still kept preventing the app from starting
up. I figured we could just go without that then
Remove coupled routes

Rails 4 doesn't allow that anymore, e.g. `root` was defined in both
backend and frontend gems

[Fixes #3146]
Check if `image` is defined on product image partial

Rails no longer generates local vars for partials without passing them
explicitly. See https://github.com/rails/rails/commit/c67005f
Replace PUT for PATCH

As PATCH is the new default HTTP method for updates in Rails 4. At this
point frontend build looks all green \o\o/\o/\o/
Fix backend / dash admin_path conflict

The named route `admin` has been renamed to `admin_overview` on the dash
gem and the the admin_path put back into backend gem. Because the
backend gem depends heavily on the `admin_path` helper and I don't think
it should depend on the dash gem I figured it just safer to rename the
named route on the dash gem instead.

See https://github.com/rails/rails/pull/9704 for details on why (?!) the
app now breaks when the same named route is defined twice
Add params `permit` to backend controllers

backend specs pass except the ones that make assertions against
page content and do not use js driver. Navigating through backend and
creating / updating records should be fine at this point though
Remove `spree.root_path` reference from backend

Since root_path is no longer defined on the backend gem

[Fixes #3157]