This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Spree | |
CheckoutController.class_eval do | |
def update | |
if @order.update_attributes(object_params) | |
fire_event('spree.checkout.update') | |
return if after_update_attributes | |
unless @order.next | |
flash[:error] = @order.errors[:base].join("\n") | |
redirect_to checkout_state_path(@order.state) and return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Spree.config do |config| | |
config.logo = "logo.png" | |
config.use_s3 = true | |
config.s3_bucket = "asdasd" | |
config.s3_access_key = "asdasd" | |
config.s3_secret = "asdasd" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Spree | |
CheckoutController.class_eval do | |
def update | |
if @order.update_attributes(object_params) | |
fire_event('spree.checkout.update') | |
return if after_update_attributes | |
unless @order.next | |
flash[:error] = @order.errors[:base].join("\n") | |
redirect_to checkout_state_path(@order.state) and return | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Indentificadores, classes, css inline</title> | |
</head> | |
<body> | |
<style type="text/css"> | |
/* GENERICAS */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
number = ARGV[0].to_i | |
size = number.to_s.size | |
square = (number**2).to_s | |
first_half = square.size.even? ? square[0..size-1] : square[0..size-2] | |
second_half = square[-size..-1] | |
if number == first_half.to_i + second_half.to_i || square.size == 1 && number == square.to_i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= simple_form_for @user do |f| %> | |
<%= f.input :name, label: I18n.t('users.name') %> | |
<%= f.input :email, label: I18n.t('users.email') %> | |
<%= f.input :password, label: I18n.t('users.password') %> | |
<%= f.input :password_confirmation, label: I18n.t('users.password_confirmation') %> | |
<%= f.input :status, label: I18n.t('users.status') %> | |
<%= f.button :submit %> | |
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use this setup block to configure all options available in SimpleForm. | |
SimpleForm.setup do |config| | |
# Wrappers are used by the form builder to generate a | |
# complete input. You can remove any component from the | |
# wrapper, change the order or even add your own to the | |
# stack. The options given below are used to wrap the | |
# whole input. | |
config.wrappers :default, :class => :input, | |
:hint_class => :field_with_hint, :error_class => :error do |b| | |
## Extensions enabled by default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* font-face */ | |
@font-face { | |
font-family: "GeneralFoundicons"; | |
src: url("../fonts/general_foundicons.eot"); | |
src: url("../fonts/general_foundicons.eot?#iefix") format("embedded-opentype"), url("../fonts/general_foundicons.woff") format("woff"), url("../fonts/general_foundicons.ttf") format("truetype"), url("../fonts/general_foundicons.svg#GeneralFoundicons") format("svg"); | |
font-weight: normal; | |
font-style: normal; | |
} | |
/* global foundicon styles */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
For General Icons: <i class="general foundicon-[icon-name]"></i> | |
For Social Icons: <i class="social foundicon-[icon-name]"></i> | |
For Accessibility Icons: <i class="accessibility foundicon-[icon-name]"></i> | |
For General Enclosed Icons: <i class="enclosed foundicon-[icon-name]"></i> | |
*/ | |
/* global foundicon styles */ | |
[class*="foundicon-"] { |
NewerOlder