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

amazing-activist

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amazing-activist

  • 0.5.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

= AmazingActivist :ci-url: https://github.com/ixti/amazing-activist/actions/workflows/ci.yml?query=branch%3Amain :ci-img: https://github.com/ixti/amazing-activist/actions/workflows/ci.yml/badge.svg?branch=main :codecov-url: https://codecov.io/gh/ixti/amazing-activist/tree/main :codecov-img: https://codecov.io/gh/ixti/amazing-activist/graph/badge.svg?token=LXaGWwv5xl

ifdef::env-github[] {ci-url}[image:{ci-img}[CI]] {codecov-url}[image:{codecov-img}[codecov]] endif::[]

== Installation

Add this line to your application's Gemfile:

$ bundle add amazing-activist

Or install it yourself as:

$ gem install amazing-activist

== Usage

[source,ruby]

class ApplicationActivity < AmazingActivist::Base end

class OnboardingActivity < ApplicationActivity def call user = User.new(params)

return failure(:invalid_params, user: user) unless user.save

success(user)

end end

class UsersController < ApplicationController def create case OnboardingActivity.call(**params.require(:user).permit(:password)) in success: user redirect_to user_bashboard_url(user) in failure: :invalid_params, context: { user: user } @user = user render :new else head :bad_request end end end

== Compatibility

This library aims to support and is tested against:

If something doesn't work on one of these versions, it's a bug.

This library may inadvertently work (or seem to work) on other Ruby versions, however support will only be provided for the versions listed above.

== Development

bundle install bundle exec rake

== Contributing

  • Fork amazing-activist
  • Make your changes
  • Ensure all tests pass (bundle exec rake)
  • Send a merge request
  • If we like them we'll merge them
  • If we've accepted a patch, feel free to ask for commit access!

FAQs

Package last updated on 29 Aug 2024

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