Questions tagged [wicked-gem]

a Ruby gem for building step-by-step wizards in Rails apps

wicked is a Ruby gem for building step-by-step wizards in Rails applications.

Resources

107 questions
0
votes
1 answer

ActionController::UrlGenerationError in ModelController#create

Working in a Rails app with a model called Shootings. It has several fields in it, so I'm using the Wicked gem to collect them in several steps. I'm able to create Shooting records correctly, and I'm able to start the Wicked wizard correctly if I…
malditojavi
  • 1,074
  • 2
  • 14
  • 28
0
votes
1 answer

rails wicked gem has_one association and nested form

On my form on has_one association the fields do not appear for a singular form. <%= f.fields_for :pack_social_media_sur_mesure, @commande.pack_social_media_sur_mesure do |ff| %> remains empty i think i missed something... My Models : Commande model…
0
votes
1 answer

Rails controller isn't getting specific params

I'm trying to follow wicked tutorial for creating an object partially ( https://github.com/zombocom/wicked/wiki/Building-Partial-Objects-Step-by-Step ) The problem is, I am having trouble creating the object itself. I've tried with and without…
Juanse Cora
  • 755
  • 9
  • 19
0
votes
1 answer

How to add practitioners to clinic

I have this setup. A user has many clinics, and a clinic has many practitioners. Clinics belongs to user and practitioners belongs to clinic. I’m using wicked wizard for the sign up. These are the steps: user info, clinic info, practitioner…
kvnirvana
  • 71
  • 1
  • 8
0
votes
1 answer

Validation of multiple models in one, using Nested Atrributes

So i tried to build a form consisted of fields from two models. Unfortunately, validation only works for one of them, despite they are the same. If there is a white sign in first field, console shows red "rollback" and view shows the error. If…
0
votes
2 answers

Multistep Validations with Wicked: Validation failed: Street can't be blank

I have a multistep form. It's a bit complicated, cause basically first the user gets created through registrations controller, then get's redirected to a form. Speaking precisely, it's not a multistep form, but more of a two-step registration. To do…
Katharina Schreiber
  • 1,187
  • 2
  • 11
  • 38
0
votes
2 answers

Rails partial validations depending on conrtoller

I am using devise for user registrations, meaning, that by default new user is registered through registrations_controller. So by clicking button "Register" user is redirected to a new_user_registration path. My registration form however has two…
Katharina Schreiber
  • 1,187
  • 2
  • 11
  • 38
0
votes
0 answers

Partial validations with Wicked is not fuctioning on the defined step

I am handling a multistep form and this is why I need partial validations. Here is my model. class User < ApplicationRecord devise :database_authenticatable, :registerable, :recoverable, :rememberable, :validatable, …
Katharina Schreiber
  • 1,187
  • 2
  • 11
  • 38
0
votes
1 answer

Rails update_attributes causing object to be duplicated every time it hits update controller action

I'm using Rails and the Wicked Gem to create a multi-step form. I have a Parent and a Child model. Parents have many children, and the parents form accepts_nested_attributes_for :children. I'm building a nested object on the SHOW action of the…
Tony M
  • 241
  • 1
  • 4
  • 14
0
votes
2 answers

Making field validate only if user specified a certain value, otherwise optional

There is a form that a user submits which then gets validated by the model. I only want the field "Province / State" to validate if the "Country" is either "CA" (Canada) or "US" (USA) The form is set up a little differently because we are doing a…
Victor
  • 63
  • 5
0
votes
1 answer

How to clean code and eliminate the NoMethodError exception

When a user creates an accounts, the code should allow that user to register a user account through Devise and then create an account, plus a company. The code should redirect to a wizard setup using the wicked gem. Users have roles (rolify) and are…
Thierry
  • 111
  • 2
  • 14
0
votes
1 answer

Is there a better way to create a dynamic rails path?

Is there a better way to do this in Rails using the wicked gem? def finish_wizard_path public_send("#{controller_name}_path", current_user.try(controller_name.intern).id) end
user2012677
  • 5,465
  • 6
  • 51
  • 113
0
votes
1 answer

Download multiple pdf using Wicked pdf

How do I download multiple pdf using Wicked-pdf Below is the line of code i am using here, @awb_orders = Spree::Order.where('created_at >= ? AND created_at <= ?', DateTime.now-1.month, DateTime.now).where(:state => 'complete').order("created_at…
0
votes
1 answer

Update many_to_many association in nested form

I have three models for the context of this question. And using the wicked gem for multi-step signup. User class User < ApplicationRecord has_one :profile has_many :specialties, through: :profile accepts_nested_attributes_for :profile,…
jordan
  • 9,570
  • 9
  • 43
  • 78
0
votes
1 answer

Ruby on Rails SystemStackError stack level too deep validate Wicked gem

Calling validate :method_name causes an infinite loop SystemStackError. Doing the validation directly inline allows the validation to pass without error. There must be something I'm overlooking or doing wrong... The validations worked fine when…
b2tech
  • 75
  • 1
  • 7