Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

xHire-activerecord-tableless

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xHire-activerecord-tableless

  • 0.1.1
  • Rubygems
  • Socket score

Version published
Maintainers
2
Created
Source

ActiveRecord Tableless

A single implementation of the ActiveRecord Tableless pattern for any Rails project or other Ruby project that uses ActiveRecord.

Define a model like this:

class ContactMessage < ActiveRecord::Base has_no_table column :name, :string column :email, :string validates_presence_of :name, :email end

You can now use the model in a view like this:

<%= form_for :message, @message do |f| %> Your name: <%= f.text_field :name %> Your email: <%= f.text_field :email %> <% end %>

And in the controller:

def message @message = ContactMessage.new if request.post? @message.attributes = params[:message] if @message.valid? # Process the message... end end end

Credits

Michal Zima xhire@tuxportal.cz Kenneth Kalmer kenneth.kalmer@gmail.com (original author)

FAQs

Package last updated on 10 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc