profile
viewpoint

heartcombo/devise 21103

Flexible authentication solution for Rails with Warden.

heartcombo/simple_form 7654

Forms made easy for Rails! It's tied to a simple DSL, with no opinion on markup.

heartcombo/responders 1829

A set of Rails responders to dry up your application

heartcombo/has_scope 1430

Map incoming controller parameters to named scopes in your resources

github/view_component 1072

View components for Rails

heartcombo/mail_form 808

Send e-mail straight from forms in Rails with I18n, validations, attachments and request information.

heartcombo/show_for 458

Wrap your objects with a helper to easily show them

EDMC/api-versions 127

A simple gem to manage your Rails API routing endpoints.

doorkeeper-gem/doorkeeper-openid_connect 113

OpenID Connect extension for Doorkeeper

heartcombo/devise-encryptable 111

Devise encryptable behavior since v2.1

issue closedbrainspec/enumerize

[Documentation] Expand documentations for `only` and `except`

Hi, I think that we can expand the docs with use cases for only and expand filters.

Currently, is not so much clear in the docs, and in my own case, I needed to dig into the code to understand how we can use it.

If it is ok, I can provide some examples to add to the README.md :)

closed time in a day

martinGerez

issue commentbrainspec/enumerize

[Documentation] Expand documentations for `only` and `except`

Hey @martinGerez! Sorry for late response! Yeah, feel free to send us a PR with these examples, we'll take a look, thanks!

martinGerez

comment created time in a day

issue closedbrainspec/enumerize

Using an ActiveRecord pluck to get values

I've tried to use pluck on the enumerized value, but instead of returning the databased stored value, it gets casted into a string. Making it impossible for me to do an upsert as it needs the value itself.

Is there a way to make the pluck to return the values themselves (using _value doesn't work, as I get an SQL error saying there is no such column) or looking the value up in some other way, just from a string?

closed time in a day

doutatsu

issue commentbrainspec/enumerize

Using an ActiveRecord pluck to get values

Hey @doutatsu! Apparently there was a bug in Rails and insert_all/upsert_all wasn't using typecasting. It was fixed here rails/rails#38763. So if you upgrade to Rails 6.0.3 everything will work with string

doutatsu

comment created time in a day

PR closed brainspec/enumerize

Support enumerize with insert_all and upsert_all features in Rails 6

Rails 6 ships with a nice set of 'bulk insert' features, while these are not working properly with enumerized attributes (inserting nils)...

This PR attempts to add a support for these features into enumerize

+120 -38

2 comments

2 changed files

serggl

pr closed time in a day

pull request commentbrainspec/enumerize

Support enumerize with insert_all and upsert_all features in Rails 6

Hey @serggl! Thanks for PR! Apparently there was a bug in Rails and insert_all wasn't using typecasting. It was fixed here https://github.com/rails/rails/pull/38763. So if you upgrade to Rails 6.0.3 everything will work. I added tests to make sure it works https://github.com/brainspec/enumerize/pull/362.

serggl

comment created time in a day

delete branch brainspec/enumerize

delete branch : upsert-all-tests

delete time in a day

push eventbrainspec/enumerize

Vasiliy Ermolovich

commit sha 386416ea0f7e87d4892df6eeff7df61e81680a3b

Add AR#upsert_all! tests

view details

Vasiliy Ermolovich

commit sha 11b6358278ee8fcc8823bf567001926f954c9eec

Update Travis's dist to have newer SQlite version.

view details

Vasiliy Ermolovich

commit sha 0b88ef7e9fa0114fd749d5071eee287293351afc

Update PG gem.

view details

Vasiliy Ermolovich

commit sha 73aba8aa0b3ee404f67b7df7e6f2ad72e910ebc3

Merge pull request #362 from brainspec/upsert-all-tests Add AR#upsert_all! tests

view details

push time in a day

PR merged brainspec/enumerize

Add AR#upsert_all! tests
+29 -3

0 comment

3 changed files

nashby

pr closed time in a day

push eventbrainspec/enumerize

Vasiliy Ermolovich

commit sha 0b88ef7e9fa0114fd749d5071eee287293351afc

Update PG gem.

view details

push time in a day

push eventbrainspec/enumerize

Vasiliy Ermolovich

commit sha ab9e18320cb4ced34e5eaa0af2a783b57fe22dbc

Update PG gem.

view details

push time in a day

push eventbrainspec/enumerize

Vasiliy Ermolovich

commit sha dd180fa10ac1e90cd58a5ceaa50c1333f53b5137

Update PG gem.

view details

push time in a day

push eventbrainspec/enumerize

Vasiliy Ermolovich

commit sha 11b6358278ee8fcc8823bf567001926f954c9eec

Update Travis's dist to have newer SQlite version.

view details

push time in a day

push eventbrainspec/enumerize

Vasiliy Ermolovich

commit sha 386416ea0f7e87d4892df6eeff7df61e81680a3b

Add AR#upsert_all! tests

view details

push time in a day

push eventbrainspec/enumerize

Vasiliy Ermolovich

commit sha 8fbfce0c101a4600148d7ff04a3859fdcac04b51

Drop EOL Ruby and Rails versions.

view details

Vasiliy Ermolovich

commit sha 9bdd9c5de8b13de10c83bc76a8a24e582f8e4c8b

Merge pull request #361 from brainspec/drop-old-ruby-rails Drop EOL Ruby and Rails versions.

view details

Vasiliy Ermolovich

commit sha e8418a9bcbbe2dc1330f887929583b4278e959eb

Add AR#upsert_all! tests

view details

push time in a day

delete branch brainspec/enumerize

delete branch : drop-old-ruby-rails

delete time in a day

push eventbrainspec/enumerize

Vasiliy Ermolovich

commit sha 8fbfce0c101a4600148d7ff04a3859fdcac04b51

Drop EOL Ruby and Rails versions.

view details

Vasiliy Ermolovich

commit sha 9bdd9c5de8b13de10c83bc76a8a24e582f8e4c8b

Merge pull request #361 from brainspec/drop-old-ruby-rails Drop EOL Ruby and Rails versions.

view details

push time in a day

PR opened brainspec/enumerize

Add AR#upsert_all! tests
+26 -0

0 comment

1 changed file

pr created time in a day

create barnchbrainspec/enumerize

branch : upsert-all-tests

created branch time in a day

push eventbrainspec/enumerize

Vasiliy Ermolovich

commit sha 8fbfce0c101a4600148d7ff04a3859fdcac04b51

Drop EOL Ruby and Rails versions.

view details

push time in a day

push eventbrainspec/enumerize

Vasiliy Ermolovich

commit sha 96a5e0789d17cddcb040f18a09c7ca64f47f26b4

Drop EOL Ruby and Rails versions.

view details

push time in a day

push eventbrainspec/enumerize

Vasiliy Ermolovich

commit sha c15fba37594c48ffc840fda6b53d9a3a6065a95b

Drop EOL Ruby and Rails versions.

view details

push time in a day

push eventbrainspec/enumerize

Vasiliy Ermolovich

commit sha e935c9923af2e28fcc0bbaa80f6d1c5799c003ad

Drop EOL Ruby and Rails versions.

view details

push time in a day

PR opened brainspec/enumerize

Drop EOL Ruby and Rails versions.
+7 -45

0 comment

6 changed files

pr created time in a day

create barnchbrainspec/enumerize

branch : drop-old-ruby-rails

created branch time in a day

issue commentbrainspec/enumerize

Enumerize multiple option in mongoid 7

@valentinbotog Hey, sorry for late response. Right now we test enumerize against mongoid 7.0.6 and tests pass https://travis-ci.org/github/brainspec/enumerize/jobs/666485871. Could you please provide a sample application that reproduces you issue?

I'll reopen this issue when we have a way to reproduce it. Thanks!

valentinbotog

comment created time in a day

issue closedbrainspec/enumerize

Enumerize multiple option in mongoid 7

Hey guys, I have a question related to enumerize gem, We upgraded all app stacks and we are using mongoid 7, and we had to change from mongoid-enum to enumerize, and we have a problem related to multiple option. The problem is no matter how I use the field + enumerize syntax I do not have the old values which are in the DB, even after I do a mongorestore the values are not saved in field. Enumerize: field :_permissions, type: Array enumerize :_permissions, in: [:no_view, :view_only, :view_and_update, :full_access], multiple: true, default: [:no_view], predicates: true alias_method :permissions, :_permissions Field : "_permissions"=>#<Mongoid::Fields::Standard:0x0000561f018ba8a0 @name="_permissions", @options={:default=>[:no_view], :type=>Array, :klass=>AccountPermission}, @label=nil, @default_val=[:no_view], @pre_processed=true, @type=Array> Value: _permissions: [] Mongoid-enum: enum :permissions, [:no_view, :view_only, :view_and_update, :full_access], multiple: true, default: [:no_view] Field: "_permissions"=>#<Mongoid::Fields::Standard:0x0055e0c6324fe0 @name="_permissions", @options={:type=>Array, :default=>[:no_view], :klass=>AccountPermission}, @label=nil, @default_val=[:no_view], @pre_processed=true> Value: _permissions: :full_access

Is there something that I missed when I changed the model field attributes from enum to enumerize? Thank you in advance.

closed time in a day

valentinbotog

issue commentrubycdp/cuprite

any way to track redirects?

@dreyks since Cuprite is a driver for Capybara and Capybara doesn't provide such functionality I think Cuprite shouldn't implement something like this. You can check this Capybara's maintainer answer about similar issues https://github.com/teamcapybara/capybara/issues/1149#issuecomment-23050206

dreyks

comment created time in a day

issue closedryanb/letter_opener

Does not open an email in browser

MacOs Catalina 10.15.5

#Gemfile.lock
  rails (~> 5.2.3)
  letter_opener (1.7.0)
  launchy (~> 2.2)
#config/environments/development.rb
  config.action_mailer.delivery_method = :letter_opener
  config.action_mailer.perform_deliveries = true
  config.action_mailer.default_url_options = { host: "localhost:3000" }
  config.action_mailer.raise_delivery_errors = false
#app/mailers/user_report_mailer.rb

class UserReportMailer < ApplicationMailer
  layout "mailer"

  def index
    @users = User.active

    mail(to: "aa@test.to", subject: "Test")
  end
end

In one console I run Rails server:

> bundle exec rails server -p 3000

In another, I open the Rails console and try to send an email:

> bundle exec rails c
dev> UserReportMailer.index.deliver_now

  Rendering user_report_mailer/index.html.erb within layouts/mailer
   (0.6ms)  SELECT COUNT(*) FROM "users" WHERE "users"."active" = $1 [["active", true]]
  Rendered user_report_mailer/index.html.erb within layouts/mailer (2.5ms)
UserReportMailer#index: processed outbound mail in 178.8ms
Sent mail to  (5.6ms)
Date: Mon, 17 Aug 2020 21:06:13 -0700
From: from@test.to
Message-ID: <5f3b53b57d676_84783fcaf882ffd452640@Alexs-MacBook-Pro.local.mail>
Subject: ["aa@test.to"] Test
Mime-Version: 1.0
Content-Type: text/html;
 charset=UTF-8
Content-Transfer-Encoding: 7bit

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <style>
      /* Email styles need to be inline */
    </style>
  </head>

  <body>
    Active users: 9
  </body>
</html>

=> #<Mail::Message:70140853342340, Multipart: false, Headers: <Date: Mon, 17 Aug 2020 21:06:13 -0700>, <From: from@test.to>, <Bcc: >, <Message-ID: <5f3b53b57d676_84783fcaf882ffd452640@Alexs-MacBook-Pro.local.mail>>, <Subject: ["aa@test.to"] Test>, <Mime-Version: 1.0>, <Content-Type: text/html>, <Content-Transfer-Encoding: 7bit>>

But nothing opens in browser

closed time in 22 days

palexvs

issue commentryanb/letter_opener

Does not open an email in browser

thanks @bjer! Closing this for now. @palexvs feel free to ping me if you still have an issue and have sample app that reproduces it.

palexvs

comment created time in 22 days

startedrubycdp/cuprite

started time in a month

startedrubycdp/ferrum

started time in a month

issue commentryanb/letter_opener

Does not open an email in browser

Can you please provide a sample application that reproduces the error?

palexvs

comment created time in a month

startedhwayne/awesome-cold-showers

started time in 2 months

issue closedryanb/letter_opener

May you need change in development.rb

I lost all the morning with this problem in Rails 6.0.* In config/environments/development.rb you should have:

config.action_mailer.default_url_options = { protocol: 'http', host: 'localhost:3000' }
config.action_mailer.delivery_method = :letter_opener
config.action_mailer.perform_deliveries = true

The first line is very important.

Thanks for the gem

closed time in 2 months

marcosmartingm

issue commentryanb/letter_opener

May you need change in development.rb

Hey @marcosmartingm! That's weird, it works for me without that line in a new Rails 6.0 app. Could you please try it in a new app as well and see if it's something your app related?

Gonna close it for now. Feel free to ping me to reopen it if you have a way to reproduce this issue.

marcosmartingm

comment created time in 2 months

more