Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'active_resource'
- class User < ActiveResource::Base
- self.site = 'http://localhost:3000/api/v2'
- self.include_format_in_path = false
- schema do
- attribute :id, :integer
- attribute :name, :string
- attribute :password, :string
- attribute :email, :string
- attribute :email_confirmation, :string
- end
- validates :email, confirmation: true
- end
- user = User.new(
- name: 'My name',
- email: 'an@email.com',
- email_confirmation: 'another@email.com',
- password: 'some_password'
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement