I hereby claim:
- I am simonedamico on github.
- I am sim (https://keybase.io/sim) on keybase.
- I have a public key whose fingerprint is FBE1 0386 AE8F 8156 5B83 1C5D ED47 1256 CA40 BAEB
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
require 'mechanize' | |
TP_USERNAME = ARGV[0] || 'yourusername' | |
TP_PASSWORD = ARGV[1] || 'yourpassword' | |
loop do | |
agent = Mechanize.new | |
agent.verify_mode = OpenSSL::SSL::VERIFY_NONE | |
auth_page = agent.get('https://1.1.1.1/login.html') | |
auth_form = auth_page.form |
= form_for @comment do |f| | |
- if @comment.errors.any? | |
#error_explanation | |
%h2= "#{pluralize(@comment.errors.count, "error")} prohibited this comment from being saved:" | |
%ul | |
- @comment.errors.full_messages.each do |msg| | |
%li= msg | |
.field | |
= f.label :author |
= render @post | |
= render partial: 'comments/form', object: Comment.new |
class User < ActiveRecord::Base | |
# Include default devise modules. Others available are: | |
# :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable | |
devise :database_authenticatable, :registerable, | |
:recoverable, :rememberable, :trackable, :validatable | |
# Setup accessible (or protected) attributes for your model | |
attr_accessible :name, :email, :password, :password_confirmation, :remember_me | |
end |