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…
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…
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…
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…
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…
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…
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…
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,
…
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…
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…
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…
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
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…
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,…
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…