Questions tagged [thoughtbot]

16 questions
28
votes
4 answers

Postgres errors on ARM-based M1 Mac w/ Big Sur

Ever since I got a new ARM-based M1 MacBook Pro, I've been experiencing severe and consistent PostgreSQL issues (psql 13.1). Whether I use a Rails server or Foreman, I receive errors in both my browser and terminal like PG::InternalError: ERROR:…
Carl
  • 401
  • 1
  • 8
  • 12
12
votes
1 answer

undefined method `execute_prepared' Rails Paperclip to ActiveStorage migration

I'm trying to convert a Rails app over from using Paperclip to ActiveStorage and I'm running into an issue with the ConvertToActiveStorage migration script provided in the migration guide. …
5
votes
0 answers

Scope dropdown options to current_user in Rails Administrate

When editing a form with Thoughtbot's Administrate gem, the dropdown options for a select field or HasMany relationship always display all possible records for a given Model/Association. However I would only like to display records that are…
Branksy
  • 101
  • 6
5
votes
1 answer

Customizing fields with the administrate gem for rails

I cannot seem to find any documentation on how to modify the administrate gem's default dashboards in order to customize what gets displayed in the index and show pages. Here's my specific goal: Given that an Article belongs_to an Author When I…
Giuseppe
  • 5,188
  • 4
  • 40
  • 37
3
votes
1 answer

Administrate with custom devise controllers

I'm using Administrate for the first time with Devise and have just generated some devise controllers in order to customize them and now Administrate throws an error. For each of the controllers i generated, it throws this error: NameError -…
Robbo
  • 1,292
  • 2
  • 18
  • 41
2
votes
1 answer

thoughtbot recyclerview expandable groups not expdaning

im using thoughtbot expandable recyclerview (https://github.com/thoughtbot/expandable-recycler-view) and i can't get to expand groups on clicks. also i know that the child items are not even binded (not sure if they were supposed to bind or only on…
2
votes
1 answer

Extending Clearance gem controllers

I am trying to extend clearances controllers to pass through some other form elements I have currently done the following but it doesn't appear to be working and is returning ActiveModel::ForbiddenAttributesError class UsersController <…
Boss Nass
  • 3,384
  • 9
  • 48
  • 90
1
vote
1 answer

How does Paperclip Gem use _updated_at and what is its significance?

PaperClip Gem adds a default attribute called -> _updated_at. What is the use of _updated_at related to paperclip. Use of _updated_at in paperclip gem (ROR, ruby) References:…
Derial_31
  • 19
  • 1
1
vote
1 answer

Using Administrate gem, how to render edit page via custom update action?

I'm trying to have my custom update action for my user controller render the edit page if they fail to validate, like so: def update user = User.find(params[:id]) user.update(user_params) # zero because checkbox user_params[:banned] == "0" ?…
PandyZhao
  • 137
  • 1
  • 11
1
vote
0 answers

Gem installing an old version of Neat

Trying to install bourbon neat 2.0 and cannot get current version to install. Running the commands to install to directory gem install neat followed by neat install and all appears normal. Messages even says "fetching 2.0.0" etc, however once…
thatryan
  • 1,551
  • 6
  • 21
  • 39
1
vote
0 answers

Compiling gitsh for windows

gitsh is an interesting tool from Thoughtbot. Unfortunately, their package is not available for Windows. I am trying to compile it on Windows with great difficulties. After resolving many dependency related errors, I'm facing the following…
Kartikey Tanna
  • 1,423
  • 10
  • 24
0
votes
1 answer

Overwrote thoughtbot/clearance user.rb not working

I wanted to add a new Boolean attribute to my user: is_student My project has 2 types of users: students & faculty. If is was a student is_student should be true and if it is faculty is_student would be false. To add this new param I wrote this code…
Joey O'Neill
  • 124
  • 1
  • 6
0
votes
1 answer

Gem Capybara-webkit On macOS High Sierra 10.13 Webkit gem

Appologies if this appears like a duplicate question but "Stumped" is the word. Thank the Lord for this place. (And the contributors) I have followed all instructions from the Stackoverflow questions relating to this. I have spent countless hours…
0
votes
1 answer

Shoulda use shoulda?

We are currently using thoughtbots shoulda gem mostly to spec functionality of our rails models. It appears that a lot of the matchers that shoulda provides are actually testing rails behaviour. E.g. describe Blog do it { should have_many(:posts)…
Alexander Presber
  • 6,429
  • 2
  • 37
  • 66
0
votes
0 answers

unable to use CustomValidators with Clearance gem

We have recently started to use the Clearance gem, but are running into a few issues whereby my custom validations are no longer working Validations validates :first_name, presence: true, if: :registered_user?, format: { with:…
Boss Nass
  • 3,384
  • 9
  • 48
  • 90
1
2