mass-assignment Questions
3
Solved
I have a Rails 3 app which JSON encodes objects in order to store them in a Redis key/value store.
When I retrieve the objects, I'm trying to decode the JSON and instantiate them from the data lik...
Soybean asked 14/4, 2011 at 7:17
1
Solved
I have heard couple of people complaining and posting questions about mass-assignment in Rails. I have got same error couple of times and all I did was attr_accessible. But what exactly is mass ass...
Thermoscope asked 3/8, 2012 at 18:20
2
Solved
I have a Rails app with a user model that contains an admin attribute. It's locked down using attr_accessible. My model looks like this:
attr_accessible :name, :email, :other_email, :plant_id, :pa...
Thermosiphon asked 15/3, 2012 at 19:21
2
Solved
I would like to save query result into redis using JSON serialization and query it back.
Getting query results to json is pretty easy:
JSON.generate(Model.all.collect {|item| item.attributes})
...
Leitao asked 24/10, 2011 at 17:49
4
Solved
As the title says,i need to mass-assign products to a category and from the admin i can only edit one product at a time; i dont know why it just doesnt work to mass add them from the "category prod...
Sacramentalism asked 9/5, 2012 at 20:0
2
Solved
Edit:
After receiving more information from DCoder, the phrase I was searching for here is a "mass assignment vulnerability." That is to say, taking advantage of the convenience of methods that w...
Willdon asked 5/5, 2012 at 3:3
2
Solved
In rails 3.2.1, I have a model:
class Player < ActiveRecord::Base
attr_accessor :password
attr_accessible :email, :password
attr_accessible :email, :password, :confirmed, :as => :admin
en...
Material asked 16/3, 2012 at 19:15
4
Solved
I wanted to start using attr_accessible with my models to stop the problem with mass assignment. I understand how it works and have researched as much as I could.
What I don't understand is the di...
Cupping asked 21/6, 2011 at 3:15
1
Solved
I've got a multi layer nested form
User->Tasks->Prerequisites
and in the same form
User->Tasks->Location
The location form works fine, now I'm trying to specify prerequisites ...
Elurd asked 18/2, 2011 at 3:5
1
Solved
Say you have this structure:
class House < ActiveRecord::Base
has_many :rooms
accepts_nested_attributes_for :rooms
attr_accessible :rooms_attributes
end
class Room < ActiveRecord::Base
...
Pantechnicon asked 14/8, 2009 at 1:22
© 2022 - 2024 — McMap. All rights reserved.