Code Monkey home page Code Monkey logo

spree_address_book's People

Contributors

artplan1 avatar bbonislawski avatar buddhi-desilva avatar clemens avatar damianlegawiec avatar dougbradbury avatar felixbuenemann avatar iloveitaly avatar jdutil avatar jtapia avatar jumph4x avatar krzysiek1507 avatar kushniryb avatar lani13 avatar liangjingyang avatar mafi88 avatar mareklipka avatar matthewkennedy avatar matzipan avatar mauazua avatar mbajur avatar pigoz avatar redglory avatar romul avatar sc0ttman avatar senjai avatar tauil avatar vfonic avatar vygovskysergey avatar witekl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spree_address_book's Issues

rake test_app fail

Generating dummy Rails application...
Setting up dummy database...
rake aborted!
uninitialized constant Devise::Models::Encryptable
/home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/gems/devise-2.1.2/lib/devise/models.rb:97:in const_get' /home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/gems/devise-2.1.2/lib/devise/models.rb:97:inblock (2 levels) in devise'
/home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/gems/devise-2.1.2/lib/devise/models.rb:92:in each' /home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/gems/devise-2.1.2/lib/devise/models.rb:92:inblock in devise'
/home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/gems/devise-2.1.2/lib/devise/models.rb:123:in devise_modules_hook!' /home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/gems/devise-2.1.2/lib/devise/models.rb:90:indevise'
/home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/bundler/gems/spree_auth_devise-f05a575d0f28/app/models/spree/user.rb:5:in <class:User>' /home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/bundler/gems/spree_auth_devise-f05a575d0f28/app/models/spree/user.rb:2:inmodule:Spree'
/home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/bundler/gems/spree_auth_devise-f05a575d0f28/app/models/spree/user.rb:1:in <top (required)>' /home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/gems/activesupport-3.2.9/lib/active_support/inflector/methods.rb:230:inblock in constantize'
/home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/gems/activesupport-3.2.9/lib/active_support/inflector/methods.rb:229:in each' /home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/gems/activesupport-3.2.9/lib/active_support/inflector/methods.rb:229:inconstantize'
/home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/gems/activesupport-3.2.9/lib/active_support/core_ext/string/inflections.rb:54:in constantize' /home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/gems/spree_core-1.2.2/lib/spree/core.rb:53:inuser_class'
/home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/gems/spree_promo-1.2.2/app/models/spree/promotion/rules/user.rb:7:in <class:User>' /home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/gems/spree_promo-1.2.2/app/models/spree/promotion/rules/user.rb:4:inmodule:Rules'
/home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/gems/spree_promo-1.2.2/app/models/spree/promotion/rules/user.rb:3:in <class:Promotion>' /home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/gems/spree_promo-1.2.2/app/models/spree/promotion/rules/user.rb:2:inmodule:Spree'
/home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/gems/spree_promo-1.2.2/app/models/spree/promotion/rules/user.rb:1:in <top (required)>' /home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/gems/spree_promo-1.2.2/lib/spree/promo/engine.rb:45:inblock in class:Engine'
/home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/gems/railties-3.2.9/lib/rails/initializable.rb:30:in instance_exec' /home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/gems/railties-3.2.9/lib/rails/initializable.rb:30:inrun'
/home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/gems/railties-3.2.9/lib/rails/initializable.rb:55:in block in run_initializers' /home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/gems/railties-3.2.9/lib/rails/initializable.rb:54:ineach'
/home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/gems/railties-3.2.9/lib/rails/initializable.rb:54:in run_initializers' /home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/gems/railties-3.2.9/lib/rails/application.rb:136:ininitialize!'
/home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/gems/railties-3.2.9/lib/rails/railtie/configurable.rb:30:in method_missing' /home/ror/projects/spree_address_book/spec/dummy/config/environment.rb:5:in<top (required)>'
/home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/gems/polyglot-0.3.3/lib/polyglot.rb:63:in require' /home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/gems/polyglot-0.3.3/lib/polyglot.rb:63:inrequire'
/home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/gems/railties-3.2.9/lib/rails/application.rb:103:in require_environment!' /home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/gems/railties-3.2.9/lib/rails/application.rb:297:inblock (2 levels) in initialize_tasks'
/home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/bin/ruby_noexec_wrapper:14:in `eval'
/home/ror/.rvm/gems/ruby-1.9.3-p327-perf@spr12/bin/ruby_noexec_wrapper:14:in

Disable bill address

Where can disable bill address? I don't see any options in admin/configuration or should be created some file?

Undefined method 'permit' for Hash

Using Spree 3.1.0

Looking at https://github.com/spree-contrib/spree_address_book/blob/master/app/models/spree/order_decorator.rb#L76

when this method is getting passed attributes for an address, it is just a simple Hash of attributes, not a Parameters object from the controller. Wrapping the hash in ActionController::Parameters.new fixes this, but not sure if that is the fix.

    attributes = ActionController::Parameters.new(attributes.select{|k,v| v.present?}).permit(permitted_address_attributes)

Gem incompatible with spree 1.0

I think this gem is really useful, however this version does not work with the latest Spree version 1.0.0.beta.
The problem is related to Template overriding using Deface.

Spree 2.3

Create a branch for spree 2.3 and add spree 2.3 support

A 'States' combo should depend on a selected 'Country'

Hello,
I am using spree_core-0.60.0. A clean install of the Spree framework has a following functionality:

When a user selects a country in an address form, the combobox for a selection of States instantly respects a new situation and fills itself with state names valid for a given country (if there are no states configured for a given country, a plain editfield appers instead of a combo).

This functionality is lost after an installation of the spree_address_book plugin -- US States remain fixed in the combo, ignoring the country selection -- which yields a "Bill address state is invalid" validation message after posting a form data w/ non-US country.

Anyway, your spree_address_book gem is very useful-
Thank you!
Pavel Suchmann

Move to spree_contrib?

We would like to see this gem actively maintained and therefore ask, if you'd be willing to move the repo to spree_contrib? That would be very much appreciated.
What do you think @tvdeyen , wouldn't that be a good idea?

Address creation

I don't see any kind of address creation in the address book on the administration panel. Is this some kind of design decision? If not I'd be interested in contributing a patch to add this this functionality.

Let me know please :)

Attempting to delete Address from My Acount - stack level too deep error

Hello - After the update to 0.60.0 users are unable to delete saved address. Here is the log information

AddressesController# (SystemStackError) "stack level too deep"

/var/www/store/vendor/bundle/ruby/1.8/gems/arel-2.0.10/lib/arel/visitors/visitor.rb:15:in `visit'
/var/www/store/vendor/bundle/ruby/1.8/gems/arel-2.0.10/lib/arel/visitors/to_sql.rb:132:in `visit_Arel_Nodes_Count' /var/www/store/vendor/bundle/ruby/1.8/gems/arel-2.0.10/lib/arel/visitors/to_sql.rb:131:in `map' /var/www/store/vendor/bundle/ruby/1.8/gems/arel-2.0.10/lib/arel/visitors/to_sql.rb:131:in `visit_Arel_Nodes_Count' /var/www/store/vendor/bundle/ruby/1.8/gems/arel-2.0.10/lib/arel/visitors/visitor.rb:15:in `send' /var/www/store/vendor/bundle/ruby/1.8/gems/arel-2.0.10/lib/arel/visitors/visitor.rb:15:in `visit' /var/www/store/vendor/bundle/ruby/1.8/gems/arel-2.0.10/lib/arel/visitors/to_sql.rb:88:in `visit_Arel_Nodes_SelectCore' /var/www/store/vendor/bundle/ruby/1.8/gems/arel-2.0.10/lib/arel/visitors/to_sql.rb:88:in `map'

State selection not working if non-US country is selected

Hello,

I am experiencing a very nasty "country" bug when doing some test with this great addon.

If I am proceeding from my cart to the checkout flow I have to insert my adress details on the following screen (if its the first order).
Now the country "United States" is preselected in this screen. If I change to any other country the combo for the states does not get refreshed (the list of US states stays in there).

Validations cant be passed then because the states are invalid for the selected country but I have to select one (seems like the store means I haven`t changed the country).

Before I installed the gem it worked perfectly with spree address details itself (states were refreshed correctly).

Here is a screenie:
Country bug

My setup:

  • Rails 3 / Ruby 1.9
  • Spree 1.1.2 branch
  • Latest master branch from here
  • Tested with Chrome & Opera (latest)

Would be nice if it can be fixed otherwise proceeding to checkout is impossible.

Thank you very much for this great piece of gem !

EDIT: Oh sorry, caused by image hoster, should be fixed now

spree_core <= 0.40.3 has no helper method `available_countries`

With spree_core 0.40.3 this extension invokes error:

ActionView::Template::Error (undefined local variable or method `available_countries' for #<#<Class:0x7fe3f284bec0>:0x7fe3f2843518>):
    2:   <p id="<%= [address_name, field].join('_') %>" class="field">
    3:     <% if field == "country" %>
    4:       <%= address_form.label :country_id, t(field, :scope => [:activerecord, :attributes, :address]) %>
    5:       <span><%= address_form.collection_select :country_id, available_countries, :id, :name, {}, {:class => 'required'} %></span>
    6:       <span class="req">*</span>
    7:     <% elsif field == "state" && Spree::Config[:address_requires_state] %>
    8:       <%= address_form.label :state_id, t(field, :scope => [:activerecord, :attributes, :address]) %>

[vulnerability] The ability to grab any address in the database through the checkout process

In the checkouts controller, there is a before_filter called "set_addresses" which decides whether to use the id on a selected address from the address book, or a new address hash from the form. However, there is no check to make sure that the current_user actually owns that address_id.

def set_addresses
    return unless params[:order] && params[:state] == "address"

    if params[:order][:ship_address_id].to_i > 0
      params[:order].delete(:ship_address_attributes)
    else
      params[:order].delete(:ship_address_id)
    end

    if params[:order][:bill_address_id].to_i > 0
      params[:order].delete(:bill_address_attributes)
    else
      params[:order].delete(:bill_address_id)
    end

  end

one could tamper with the radio buttons and permutate through the possible address ids in the selected radio button in the form and continue to payment, which would allow them to be able to grab all the addresses from the database. In the process, all the addresses will now link to that users account, instead of the original users account.

This is a pretty big security risk and should be patched as soon as possible. . My project is heavily modified so i unfortunately don't have a fix for this gem that i can merge. Something like the following should be a good lead to fixing the issue:

def set_addresses
    return unless params[:order] && params[:state] == "address"

    if params[:order][:ship_address_id].to_i > 0
      params[:order].delete(:ship_address_attributes)
      if Spree::Address.find(params[:order][:ship_address_id]).user != spree_current_user
          #raise some error
      end
    else
      params[:order].delete(:ship_address_id)
    end

    if params[:order][:bill_address_id].to_i > 0
      params[:order].delete(:bill_address_attributes)
      if Spree::Address.find(params[:order][:bill_address_id]).user != spree_current_user
          #raise some error
      end
    else
      params[:order].delete(:bill_address_id)
    end

  end

Addresses are duplicated

When ordering, addresses are periodically duplicated. And always specify the already existing address. In what place is the creation of a new address? Is it possible to prevent duplicate creation there?
default

  • spree 3.6.4
  • spree_address_book 3.2.0.alpha

ActiveModel::ForbiddenAttributesError on address saving

When I save a new address it results in this error ActiveModel::ForbiddenAttributesError

stack:

ActiveModel::ForbiddenAttributesError - ActiveModel::ForbiddenAttributesError: activemodel (4.0.4) lib/active_model/forbidden_attributes_protection.rb:21:in 'sanitize_for_mass_assignment' activerecord (4.0.4) lib/active_record/attribute_assignment.rb:21:in 'assign_attributes' activerecord (4.0.4) lib/active_record/core.rb:468:in 'init_attributes' activerecord (4.0.4) lib/active_record/core.rb:185:in 'initialize' activerecord (4.0.4) lib/active_record/inheritance.rb:30:in 'new' activerecord (4.0.4) lib/active_record/reflection.rb:189:in 'build_association' activerecord (4.0.4) lib/active_record/associations/association.rb:255:in 'build_record' activerecord (4.0.4) lib/active_record/associations/collection_association.rb:114:in 'build' activerecord (4.0.4) lib/active_record/associations/collection_proxy.rb:229:in 'build' () home/coorasse/.rvm/gems/ruby-2.0.0-p353/bundler/gems/spree_address_book-8551503c185c/app/controllers/spree/addresses_controller.rb:11:in 'create'

Create new address

spree_address_book branch master, spree 1.2.2

On create new adress for user.

Unknown action

The action 'create' could not be found for Spree::AddressesController

Move ADDRESS_FIELDS global constant to Spree Preference

I think it's a really bad idea to have a global constant ADDRESS_FIELDS. Not only willy it raise constant redefined warning if you need to change it, it also could override another constant, because it isn't namespaced into a class.

I think it would be a much better idea to store this as a spree addressbook preference:

class Spree::AddressBookConfiguration
  # ...
  preference :address_fields, :string, :default => "firstname lastname company address1 address2 city state zipcode country phone"
end

Then in the form code:

Spree::AddressBook::Config.address_fields.split.each do |field|

If you agree, I'd be happy to make a PR.

undefined method `address_state' in _form.html.erb

Showing /usr/local/rvm/gems/ruby-2.1.0/bundler/gems/spree_address_book-b2ba6f5a96d9/app/views/spree/addresses/_form.html.erb where line #12 raised:

undefined method `address_state' for #<#Class:0x00000002413730:0x000000023a8fe8>

Extracted source (around line #12):

   <%= address_field(address_form, :state, address_id) { address_state(address_form, address.country, address_id) } %>

NoMethodError in Spree/checkout#edit

When I follow to billing address page.
I get the following error:

NoMethodError in Spree/checkout#edit

Showing /home/me/.rvm/gems/ruby-1.9.3-p194@rails3/bundler/gems/spree_address_book-5012ee34b188/app/views/spree/addresses/_form.html.erb where line #8 raised:

undefined method `required_fields' for #<Class:0x9a4221c>

Extracted source (around line #8):

5:   <% elsif field == "state" && Spree::Config[:address_requires_state] %>
6:     <%= address_field(address_form, :state, address_name) { address_state(address_form, address.country) } %>
7:   <% else %>
8:     <%= address_field(address_form, field.to_sym, address_name) %>
9:   <% end %>
10: <% end %>
11: <% if Spree::AddressBook::Config["alternative_#{address_name}_phone"] %>

My Gemfile https://gist.github.com/3023211
I run
$> bundle install && rails g spree_address_book:install

Image with the error.
http://imageshack.us/photo/my-images/411/adressbook.jpg/

How to fix this 'required_fields" ?

Rails 4 & Spree 2.1+ compatibility

Hello,
installing it in the latest spree version I get this error:

⇒ rails g spree_address_book:install
/Users/.../.rvm/gems/ruby-2.0.0-p247/gems/activemodel-4.0.0/lib/active_model/deprecated_mass_assignment_security.rb:14:in `attr_accessible': `attr_accessible` is extracted out of Rails into a gem. Please use new recommended protection model for params(strong_parameters) or add `protected_attributes` to your Gemfile to use old one. (RuntimeError)

Release new version?

Are there any thoughts of releasing new version?

Adding a gem like this:

gem 'spree_address_book', github: 'spree-contrib/spree_address_book'

...in the extension makes it required to add the same line of code to the application.

For example:
My extension's (spree_awesome_everything) Gemfile:

gem 'spree_address_book', github: 'spree-contrib/spree_address_book'

My extension's (spree_awesome_everything) Readme.md:

Installation

Add these lines to your application's Gemfile:

gem 'spree_address_book', github: 'spree-contrib/spree_address_book' # ??? :'(
gem 'spree_awesome_everything'

User's app's Gemfile:

gem 'spree_address_book', github: 'spree-contrib/spree_address_book' # ??? :'(
gem 'spree_awesome_everything'

Is there some ownership issue with the gem on rubygems?

Exception undefined local variable or method `address_type'

Hi,

after I upgrade my spree to 1.2.3 I get an exception:
app/views/spree/addresses/_form.html.erb where line #1 raised:

undefined local variable or method `address_type' for #<#Class:0x007ff32fc3a030:0x007ff323997410>

Extracted source (around line #1):

1: <% country_id = address_type == 'billing' ? 'bcountry' : 'scountry' %>
2: <% ADDRESS_FIELDS.each do |field| %>
3: <% if field == "country" %>
4:

I already have spree_address_book version 1.2.0. Is that the reason why it crashs? Can I update the version to 1.2.3?

ActiveRecord::RecordNotFound Exception: Couldn't find Spree::Address without an ID

I just installed the extension and am facing a small issue in checkout_controller_decorator.rb line 28:

(rdb:2) @order.bill_address.reload
ActiveRecord::RecordNotFound Exception: Couldn't find Spree::Address without an ID

(rdb:2) @order.bill_address
#<Spree::Address id: nil, firstname: "Cristian", lastname: "Livadaru", address1: "foo", address2: "", city: "Wien", zipcode: "1110", phone: "+4311111", state_name: nil, alternative_phone: nil, state_id: nil, country_id: 13, created_at: "2012-07-04 17:24:29", updated_at: "2012-07-04 17:24:29", company: nil, user_id: nil, deleted_at: nil>

I'm not sure why I got to normalize address since this should be done only during update

  after_filter :normalize_addresses, :only => :update

and I'm not updating the address, this is a new address and this seems to happen every time I add a new address. If I would do a @order.bill_address.save before the reload it works, but this clearly isn't what was intended.

These are the Versions I'm using:

Using spree_core (1.1.2.beta) from git://github.com/spree/spree.git (at 1-1-stable)
Using spree_auth (1.1.2.beta) from git://github.com/spree/spree.git (at 1-1-stable)
Using spree_api (1.1.2.beta) from git://github.com/spree/spree.git (at 1-1-stable)
Using spree_cmd (1.1.2.beta) from git://github.com/spree/spree.git (at 1-1-stable)
Using spree_dash (1.1.2.beta) from git://github.com/spree/spree.git (at 1-1-stable)
Using spree_promo (1.1.2.beta) from git://github.com/spree/spree.git (at 1-1-stable)
Using spree_sample (1.1.2.beta) from git://github.com/spree/spree.git (at 1-1-stable)
Using spree (1.1.2.beta) from git://github.com/spree/spree.git (at 1-1-stable)
Using spree_address_book (1.1.0) from git://github.com/romul/spree_address_book.git (at master)

Missing bootstrap form classes on state and country select

On the 3-0stable branch it seems only the country and state select boxes are missing .form-control classes which are required by bootstrap.

I don't know if this is intentional as I'm new to both Spree and this extension.

I forked the repo and made tiny adjustments and both the selects render correctly.

My adjustments can be seen here: adamakhtar@095166f

If you like I can merge this into 3-0stable and make a pull request.

Error after re-installing

After re-installing the extension, I got this error message:
C:\Sites\demo-store>rake db:migrate
(in C:/Sites/demo-store)
DEPRECATION WARNING: railtie_name is deprecated and has no effect. (called from class:Engine at C:/Ruby192/lib/ruby/gems/1.9.1/bundler/gems/spree_address_book-b62bebac3a84/lib/spree_address_book.rb:5)
rake aborted!
uninitialized constant Deface

I'm using spree 0.60.4 and it looks like it got updated to use 0.70.

Spree 3

After installing - messes up flash error on checkout page where you enter address, example if no shipping methods set up and you press next after entering address empty flash box appears at top. Worked before install

Does not work with 1.1.1

This gem depends on spree_auth 1.0.0 but spree 1.1.1 uses 1.1.1

I can get the full error if you need it. Just don't have it in front of me ATM.

New address not saved

On Spree 1.3.1 -

  1. Sign in, go to My Account
  2. Click New to create a new address
  3. Fill in address, click save

For some reason, the address isn't saved...I don't have time to dig into this one right now, but I thought I'd at least mention it in case someone else was looking there...

A problem in the editable? method of address model

Hey, I find the

def editable?
    new_record? || (shipments.empty? && (Spree::Order.where("bill_address_id = ?", self.id).count + Spree::Order.where("bill_address_id = ?", self.id).count <= 1) && Spree::Order.complete.where("bill_address_id = ? OR ship_address_id = ?", self.id, self.id).count == 0)
  end

I think this line (Spree::Order.where("bill_address_id = ?", self.id).count + Spree::Order.where("bill_address_id = ?", self.id).count <= 1) is strange. Even if one order has the same bill adress, it will be false, then the address is not ediable

using address book without frontend

The addresses controller inherits from StoreController, but without spree_frontend, this doesn't let the app start!

Ideally AddressesController is also only needed if we have a Spree::Frontend

Options to select addresses do not show up

Hi Romul,

I installed the gem and ran the migration etc but now I'm at the Address page and I don't see any options for me to select previously entered addresses. Can you help? I'm using spree '0-60-stable'. If you need more information, please let me know. Thanks.

Installation task error

I am running spree 3-1-0 (have to)
in Gemfile:
gem 'spree_address_book', github: 'spree-contrib/spree_address_book', branch: 'master'

Running:
bundle exec rails g spree_address_book:install
I get the following error:

/Users/pantoniotti/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/inject_into_file.rb:98:in binread': No such file or directory @ rb_sysopen - /Users/pantoniotti/O2Web/Sources/skedio_site/vendor/assets/javascripts/spree/frontend/all.js (Errno::ENOENT) from /Users/pantoniotti/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/actions/inject_into_file.rb:98:inreplace!'

Future Improvements List

Cherry picking comments, old issues, etc to create a master wish list that we can tackle. Feel free to submit PRs for any of these.

  • Stop using the ADDRESS_FIELDS global constant and move to a Spree preference #49
  • Write a test for the address vulnerability #53 (comment)
  • fix I18n labels in checkout form to match default spree form

State field does not pass validation on checkout

The state field is not passing validation on checkout when if you are trying to use a different address from the billing address.

Step 1
uncheck "Use Billing Address"
screen shot 2013-05-22 at 23 40 01

Step 2
Notice State is empty
screen shot 2013-05-22 at 23 40 14

Step 3
Select your State
screen shot 2013-05-22 at 23 40 24

Step 4
Click save and continue
screen shot 2013-05-22 at 23 40 38

This only works after you change the country to another then back to US
Choosing UK
screen shot 2013-05-22 at 23 40 48

Changed back to US
screen shot 2013-05-22 at 23 40 58

I'm using the latest version this gem
revision: 1e15645
and Spree 1.3
revision: 05a275f7161c5c2a921629471e1623b97b6d4c94

undefined method `addresses' for #<Spree::User:0x007fff08e7b210>

After updating to 1.0.1 I get this message.

undefined methodaddresses' for #Spree::User:0x007fff08e7b210`

activemodel (3.1.6) lib/active_model/attribute_methods.rb:385:in `method_missing'
activerecord (3.1.6) lib/active_record/attribute_methods.rb:60:in `method_missing'
app/views/spree/users/show.html.erb:54:in `_6965e791224c7a92a42ad654e628387d'
actionpack (3.1.6) lib/action_view/template.rb:144:in `block in render'
activesupport (3.1.6) lib/active_support/notifications.rb:55:in `instrument'
actionpack (3.1.6) lib/action_view/template.rb:142:in `render'
deface (0.9.1) lib/deface/action_view_extensions.rb:37:in `render'
actionpack (3.1.6) lib/action_view/renderer/template_renderer.rb:40:in `block (2 levels) in render_template'
actionpack (3.1.6) lib/action_view/renderer/abstract_renderer.rb:33:in `block in instrument'
activesupport (3.1.6) lib/active_support/notifications.rb:53:in `block in instrument'
activesupport (3.1.6) lib/active_support/notifications/instrumenter.rb:21:in `instrument'
activesupport (3.1.6) lib/active_support/notifications.rb:53:in `instrument'
actionpack (3.1.6) lib/action_view/renderer/abstract_renderer.rb:33:in `instrument'
actionpack (3.1.6) lib/action_view/renderer/template_renderer.rb:39:in `block in render_template'
actionpack (3.1.6) lib/action_view/renderer/template_renderer.rb:47:in `render_with_layout'
actionpack (3.1.6) lib/action_view/renderer/template_renderer.rb:38:in `render_template'
actionpack (3.1.6) lib/action_view/renderer/template_renderer.rb:12:in `block in render'
actionpack (3.1.6) lib/action_view/renderer/abstract_renderer.rb:22:in `wrap_formats'
actionpack (3.1.6) lib/action_view/renderer/template_renderer.rb:9:in `render'
actionpack (3.1.6) lib/action_view/renderer/renderer.rb:36:in `render_template'
actionpack (3.1.6) lib/action_view/renderer/renderer.rb:17:in `render'
actionpack (3.1.6) lib/abstract_controller/rendering.rb:120:in `_render_template'
actionpack (3.1.6) lib/action_controller/metal/streaming.rb:250:in `_render_template'
actionpack (3.1.6) lib/abstract_controller/rendering.rb:114:in `render_to_body'
actionpack (3.1.6) lib/action_controller/metal/renderers.rb:30:in `render_to_body'
actionpack (3.1.6) lib/action_controller/metal/compatibility.rb:43:in `render_to_body'
actionpack (3.1.6) lib/abstract_controller/rendering.rb:99:in `render'
actionpack (3.1.6) lib/action_controller/metal/rendering.rb:16:in `render'
actionpack (3.1.6) lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
activesupport (3.1.6) lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
/Users/tvd/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
activesupport (3.1.6) lib/active_support/core_ext/benchmark.rb:5:in `ms'
actionpack (3.1.6) lib/action_controller/metal/instrumentation.rb:40:in `block in render'
actionpack (3.1.6) lib/action_controller/metal/instrumentation.rb:78:in `cleanup_view_runtime'
activerecord (3.1.6) lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
actionpack (3.1.6) lib/action_controller/metal/instrumentation.rb:39:in `render'
actionpack (3.1.6) lib/action_controller/metal/implicit_render.rb:10:in `default_render'
actionpack (3.1.6) lib/action_controller/metal/implicit_render.rb:5:in `send_action'
actionpack (3.1.6) lib/abstract_controller/base.rb:167:in `process_action'
actionpack (3.1.6) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (3.1.6) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
activesupport (3.1.6) lib/active_support/callbacks.rb:479:in `_run__1366725006079183838__process_action__3689800999998951312__callbacks'
activesupport (3.1.6) lib/active_support/callbacks.rb:386:in `_run_process_action_callbacks'
activesupport (3.1.6) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.1.6) lib/abstract_controller/callbacks.rb:17:in `process_action'
actionpack (3.1.6) lib/action_controller/metal/rescue.rb:17:in `process_action'
actionpack (3.1.6) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
activesupport (3.1.6) lib/active_support/notifications.rb:53:in `block in instrument'
activesupport (3.1.6) lib/active_support/notifications/instrumenter.rb:21:in `instrument'
activesupport (3.1.6) lib/active_support/notifications.rb:53:in `instrument'
actionpack (3.1.6) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
actionpack (3.1.6) lib/action_controller/metal/params_wrapper.rb:201:in `process_action'
activerecord (3.1.6) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (3.1.6) lib/abstract_controller/base.rb:121:in `process'
actionpack (3.1.6) lib/abstract_controller/rendering.rb:45:in `process'
actionpack (3.1.6) lib/action_controller/metal.rb:193:in `dispatch'
actionpack (3.1.6) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
actionpack (3.1.6) lib/action_controller/metal.rb:236:in `block in action'
actionpack (3.1.6) lib/action_dispatch/routing/route_set.rb:71:in `call'
actionpack (3.1.6) lib/action_dispatch/routing/route_set.rb:71:in `dispatch'
actionpack (3.1.6) lib/action_dispatch/routing/route_set.rb:35:in `call'
rack-mount (0.8.3) lib/rack/mount/route_set.rb:152:in `block in call'
rack-mount (0.8.3) lib/rack/mount/code_generation.rb:96:in `block in recognize'
rack-mount (0.8.3) lib/rack/mount/code_generation.rb:68:in `optimized_each'
rack-mount (0.8.3) lib/rack/mount/code_generation.rb:95:in `recognize'
rack-mount (0.8.3) lib/rack/mount/route_set.rb:141:in `call'
actionpack (3.1.6) lib/action_dispatch/routing/route_set.rb:538:in `call'
/Users/tvd/.rvm/gems/ruby-1.9.3-p194/bundler/gems/spree-5886b55cbf8d/core/lib/spree/core/middleware/redirect_legacy_product_url.rb:13:in `call'
/Users/tvd/.rvm/gems/ruby-1.9.3-p194/bundler/gems/spree-5886b55cbf8d/core/lib/spree/core/middleware/seo_assist.rb:27:in `call'
railties (3.1.6) lib/rails/engine.rb:456:in `call'
railties (3.1.6) lib/rails/railtie/configurable.rb:30:in `method_missing'
rack-mount (0.8.3) lib/rack/mount/prefix.rb:26:in `call'
rack-mount (0.8.3) lib/rack/mount/route_set.rb:152:in `block in call'
rack-mount (0.8.3) lib/rack/mount/code_generation.rb:96:in `block in recognize'
rack-mount (0.8.3) lib/rack/mount/code_generation.rb:89:in `optimized_each'
rack-mount (0.8.3) lib/rack/mount/code_generation.rb:95:in `recognize'
rack-mount (0.8.3) lib/rack/mount/route_set.rb:141:in `call'
actionpack (3.1.6) lib/action_dispatch/routing/route_set.rb:538:in `call'
warden (1.0.6) lib/warden/manager.rb:35:in `block in call'
warden (1.0.6) lib/warden/manager.rb:34:in `catch'
warden (1.0.6) lib/warden/manager.rb:34:in `call'
actionpack (3.1.6) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
rack (1.3.6) lib/rack/etag.rb:23:in `call'
rack (1.3.6) lib/rack/conditionalget.rb:25:in `call'
actionpack (3.1.6) lib/action_dispatch/middleware/head.rb:14:in `call'
actionpack (3.1.6) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
actionpack (3.1.6) lib/action_dispatch/middleware/flash.rb:243:in `call'
rack (1.3.6) lib/rack/session/abstract/id.rb:195:in `context'
rack (1.3.6) lib/rack/session/abstract/id.rb:190:in `call'
/Users/tvd/.rvm/gems/ruby-1.9.3-p194/bundler/gems/alchemy_cms-735bdd7f5b4d/lib/middleware/flash_session_cookie.rb:17:in `call'
actionpack (3.1.6) lib/action_dispatch/middleware/cookies.rb:331:in `call'
activerecord (3.1.6) lib/active_record/query_cache.rb:64:in `call'
activerecord (3.1.6) lib/active_record/connection_adapters/abstract/connection_pool.rb:477:in `call'
actionpack (3.1.6) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (3.1.6) lib/active_support/callbacks.rb:392:in `_run_call_callbacks'
activesupport (3.1.6) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.1.6) lib/action_dispatch/middleware/callbacks.rb:28:in `call'
rails-dev-tweaks (0.6.1) lib/rails_dev_tweaks/granular_autoload/middleware.rb:34:in `call'
rack (1.3.6) lib/rack/sendfile.rb:101:in `call'
actionpack (3.1.6) lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
actionpack (3.1.6) lib/action_dispatch/middleware/show_exceptions.rb:47:in `call'
railties (3.1.6) lib/rails/rack/logger.rb:13:in `call'
rack (1.3.6) lib/rack/methodoverride.rb:24:in `call'
rack (1.3.6) lib/rack/runtime.rb:17:in `call'
activesupport (3.1.6) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.3.6) lib/rack/lock.rb:15:in `call'
actionpack (3.1.6) lib/action_dispatch/middleware/static.rb:61:in `call'
rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward'
rack-cache (1.2) lib/rack/cache/context.rb:245:in `fetch'
rack-cache (1.2) lib/rack/cache/context.rb:185:in `lookup'
rack-cache (1.2) lib/rack/cache/context.rb:66:in `call!'
rack-cache (1.2) lib/rack/cache/context.rb:51:in `call'
railties (3.1.6) lib/rails/engine.rb:456:in `call'
railties (3.1.6) lib/rails/application.rb:143:in `call'
rack (1.3.6) lib/rack/content_length.rb:14:in `call'
railties (3.1.6) lib/rails/rack/log_tailer.rb:14:in `call'
rack (1.3.6) lib/rack/handler/webrick.rb:59:in `service'
/Users/tvd/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
/Users/tvd/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
/Users/tvd/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'

Spree 1.0-stable

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.