If you are a UNIX lover and fan of Nano text editor then while writing C / C++ code, you would like to put comments using Short-Cut key i.e.
Alt+3. But the problem is, Nano puts the char
# as comment literal instead of
//. This happened because the default literal is
# unless it is defined in configurations.
How to fix?
These days developers go for heavy text-editors and IDEs like InteliJ, PyCharm, RubyMine, Sublime Text with much more extensions, Vim, Emacs, etc. However, in case of the later two they are not memory and processor heavy however they have very steep learning curves.
On the other hand, GNU Nano come as a life saver. It requires a few MB of RAM(say 3-4 MB) and uses very less CPU resource. Nano is a much powerful tool with much more features.
Its not quite easily graspable to sort your search results by Ratings if you have separate
Ratings table and there is an intermediate table called
Similar. Example Model schema is below for reference.
If you need the shipping address to be set any how, and want to skip the validations as set in the spree’s address model, you can do it easily
class Address < Spree::Base
belongs_to :country, class_name: "Spree::Country"
belongs_to :state, class_name: "Spree::State"
has_many :shipments, inverse_of: :address
validates :firstname, :lastname, :address1, :city, :country, presence: true
validates :zipcode, presence: true, if: :require_zipcode?
validates :phone, presence: true, if: :require_phone?
validate :state_validate, :postal_code_validate
And you are done