All Questions
Tagged with strong-parameters simple-form
21 questions
-1
votes
1
answer
332
views
Ruby on Rails 5: Can't Save Record, Unpermitted Parameter for Has Many Through Record
Ruby on Rails 5, Simple Form
Product has many Specifications through ProductSpecs
in Product#Edit, I want to add new Specifications.
if Specifications.save successful, rerender Product. It ...
0
votes
3
answers
1k
views
Rails 5: Parameter Missing and Fail to Render Edit OR Unsaved Update / Unpermitted Parameters
Using Devise , Rails 5.0.6, Sqlite 3, Simple Form, Active Record 5.0.
Bouncing between two parameter problems since looking up many similar problems/solutions throughout Stack Overflow. In both ...
1
vote
1
answer
958
views
Unpermitted parameters on belong_to association
I have an association as follows:
class Membership < ApplicationRecord
belongs_to :user
end
and
class User < ApplicationRecord
has_many :memberships
end
Now I have a form to create a ...
6
votes
2
answers
408
views
Unknown parameter in Rails 5.1 strong parameters issue
So my reconciliation model looks like this:
class Reconciliation < ApplicationRecord
belongs_to :location
belongs_to :company
has_and_belongs_to_many :inventory_items
...
1
vote
3
answers
1k
views
Rails 4 | Unpermitted parameter: images when using Paperclip to upload multiple images using Paperclip form
Struggling with strong parameters when using simple-form to upload multiple images from paperclip in my form. I'm constantly getting an error popping up on the server
"Unpermitted parameters: images"
...
0
votes
3
answers
349
views
Issue with param not pushing data to database in Rails
Quick one. I'm trying to push a parameter into the database when i'm creating an object. I have it working if I force the integer as with the commented code below however for whatever reason I cannot ...
0
votes
1
answer
89
views
Strong params not saved in nested form
In my app I want to create events that have nameand price
In these events I want to be able to add participants they have a first_nameand a salary
I am using the gem Cocoon for the nested forms
From ...
0
votes
3
answers
2k
views
Rails Save Hash in Model Attribute Submitted by Simple Form
I am building a Rails5 app where I have a model Training with an attribute participant_ratings, a hash which should hold the ratings of all participants assigned to the training in the way participant....
1
vote
1
answer
202
views
Checkboxes values not saving with has_many through associations
For my Room edit form, I'm trying to associate 2 has_many through relationships with the same models (Color and Room)
where is my join model migration :
color_preferences
class ...
2
votes
2
answers
682
views
Strong parameters not whitelisting attributes with simple_form
I'm having some issues understanding how to nest 3 models. I'm trying to, at the deepest point of the relations, add a Video to the WorkoutSteps (not creating a new video but select an existing one ...
1
vote
0
answers
439
views
Multi-uploads with Carrierwave on Rails 4.2 using nested attributes JSON/Array type
I'm trying to figure out multi-uploads with CarrierWave and being able to save it from a different Controller and Model through accepts_nested_attributes_for :car_images, reject_if: :all_blank, ...
1
vote
2
answers
1k
views
ActionController::ParameterMissing - param is missing or the value is empty:
I am getting the following error when submitting a rails 4 form:
ActionController::ParameterMissing - param is missing or the value is empty: player:
The form is correct. The problem is that it is ...
0
votes
1
answer
203
views
Using Simple Form to update to-do list task on click
I'm trying to use simple form to update a nested object on the click of a button. I'm making a to do list, with individual tasks/items nested within the overall list. The button click should update ...
0
votes
0
answers
108
views
rails: form not showing checkboxes (not able to parse them?)
Rails 3.2.12
using strong parameters gem.
I have a form, with checkboxes, after I create. I go to edit, all data is shown Except the checkboxes- which are empty, even though I selected some when ...
1
vote
1
answer
2k
views
Rails Strong Parameters ActiveModel::ForbiddenAttributesError NOT showing up
I am using Rails 4.0.2, Ruby 2.0.0p353
I am trying to use strong parameters in my Rails project but I can't get the ActiveModel::ForbiddenAttributesError to appear.
If there are params that are not ...
9
votes
2
answers
4k
views
Deep Nested Rails 4 Form
I have 3 models Item which accepts nested attributes for questions and questions accept nested attributes for answers. I'm trying to create an item which has a question and an answer in the same form.
...
0
votes
1
answer
462
views
Rails 4 form with namespace generates undesired params
I have this on my form
= simple_form_for polymorphic_path([:admin, @place]), :url => admin_places_path(@place), :method => 'post' ...
Parameters: {"utf8"=>"✓","authenticity_token"=>"...
4
votes
2
answers
3k
views
Rails 4, double-nested models and strong parameters
I am fairly new to Ruby on Rails and began with rails 4 right away.
I have sucessfully nested a Recipe and a Ingredient model so that they can be added in the same form. Next I want to nest quantity ...
1
vote
2
answers
3k
views
Nested attributes - Unpermitted parameters Rails 4
There is a lot of resources on SO about issues on Nested attributes in Rails 4 regarding strong parameters but I don't find any solution on this: (so sorry if it's a duplicate)
I have a 1-1 relation ...
22
votes
2
answers
28k
views
How should I use rails and simple_form for nested resources?
I'm trying to create one resource with another nested resource at the same time. I'm using Rails4 and simple_form 3.0.0rc. Here is my code.
Models:
class User < ActiveRecord::Base
has_one :...
0
votes
1
answer
564
views
Rails submit button for boolean attribbute
I wanted to know how to go about have a submit button that will change a boolean attribute, instead of using radio buttons.
As a example if I display a list of 'published' and unpublished' article ...