save_and_open_page
have_button(locator)| [1] pry(#<Merchant>)> stripe_customer = Stripe::Customer.retrieve(stripe_customer_id) | |
| => #<Stripe::Customer:0x3ffdb902b8bc id=cus_7i3TMi5sqH78iY> JSON: { | |
| "id" : "cus_7i3TMi5sqH78iY", | |
| "object" : "customer", | |
| "account_balance" : 0, | |
| "bank_accounts" : { | |
| "object" : "list", | |
| "data" : [ | |
| { | |
| "id" : "ba_82xZOcvz6SNFx9", |
| pry(#<Merchant>)> stripe_customer.sources.all | |
| => #<Stripe::ListObject:0x3fe9f4977f34> JSON: { | |
| "object" : "list", | |
| "data" : [], | |
| "has_more" : false, | |
| "url" : "/v1/customers/cus_7i3TMi5sqH78iY/sources" | |
| } | |
| [2] pry(#<Merchant>)> stripe_customer.sources.all | |
| => #<Stripe::ListObject:0x3fe9f47c0218> JSON: { | |
| "object" : "list", |
| [ | |
| { "keys": ["super+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} }, | |
| { "keys": ["super+b"], "command": "toggle_side_bar" }, | |
| { "keys": ["super+v"], "command": "paste_and_indent" }, | |
| { "keys": ["super+shift+v"], "command": "paste" }, | |
| { "keys": ["super+."], "command": "gitx_open" }, | |
| { "keys": ["ctrl+shift+."], "command": "erb" }, | |
| {"keys": ["super+shift+t"], "command": "reopen_last_file"}, | |
| { | |
| "args": { |
| { | |
| "auto_complete_commit_on_tab": true, | |
| "bold_folder_labels": true, | |
| "caret_style": "phase", | |
| "color_scheme": "Packages/Theme - Flatland/Flatland Dark.tmTheme", | |
| "fade_fold_buttons": false, | |
| "file_exclude_patterns": | |
| [ | |
| "*.tmTheme.cache", | |
| "*.tmPreferences.cache", |
| class User | |
| has_many :parameter_values, as: :valuable | |
| has_many :parameters,-> { uniq }, :through => :parameter_values | |
| end | |
| class ParameterValue | |
| belongs_to :parameter | |
| belongs_to :valuable, :polymorphic => true | |
| end |
| # include routing and URL helpers | |
| include ActionDispatch::Routing | |
| include Rails.application.routes.url_helpers | |
| # use routes normally | |
| users_path #=> "/users" |
| class CheckinServer < Sinatra::Base | |
| include Paperclip::Glue | |
| set :server, :thin | |
| set :views, settings.root + '/../app/views/sinatra' | |
| connections = [] | |
| window.variable = "foo" | |
| en vez de | |
| variable = "foo" | |
| y asi lo puedes llamar desde donde sea como | |
| window.variable |
| class User | |
| after_initialize :init | |
| def init | |
| self.number ||= 0.0 #will set the default value only if it's nil | |
| end | |
| end |