search for: people_control

Displaying 9 results from an estimated 9 matches for "people_control".

2009 Mar 31
3
Accept POST data from external source?
Ok, this is harder than I thought. I''ve got a hunk of XML coming in from an entirely external source that I do not control (but another department in my company does, so it''s not like a giant security hole). I was hoping to just have them POST their data to me, and then I''d read the raw stream and parse it. I''m sure folks know what I ran into -- Invalid
2006 May 26
3
Breakdowns in has_many abstraction
...dd("umbrellas", "must be uniquely named") unless no_duplicate_names? end def no_duplicate_names? names = umbrellas.collect {|u| u.name} names.length == names.uniq.length end end class Umbrella < ActiveRecord::Base belongs_to :person end In people_controller.rb (note the comment in the middle): def update @person = Person.find(params[:person][:id], :include=>:umbrellas) @person.attributes = params[:person] @umbrellas = params[:umbrellas].values.collect do |u| umbrella = u[:id] ? @person.umbrellas.find(u[:id]): @person.umbrell...
2012 Nov 03
0
ids writer fields for HABTM relationship.
...ny_id" = 1 AND "people"."id" = ? LIMIT 1 [["id", "1"]] (0.1ms) begin transaction (0.0ms) rollback transaction Completed 500 Internal Server Error in 2790ms NoMethodError (undefined method `type_cast'' for nil:NilClass): app/controllers/people_controller.rb:21:in `update'' [/code] I scratched my head for quite a long time before finding out that after restarting the rails server, the error would disappear and the Person would actually be updated... So with the help of pry and pry-debugger, i have pinpointed the exact source of the &quo...
2006 Mar 29
0
has_and_belongs_to_many and collections management
...h substitution of old values, if they exists, or creating new entries for new values). * During a knowledge view, a list with all people that has a value for that knowledge, displaying the experience for each one. And this is what I started to code: * For person creation, I have the following in people_controller.rb on method "new": class PeopleController < ApplicationController def new @person = Person.new(@params[:person]) @knowledges = Knowledge.find(:all, :order => ''name'').collect { |k| [ k.name, k.id ] } @experiences = Experience.find(:all, :order => ...
2008 Apr 16
12
how to accomplish pagination in RoR
Hi Folks, I am just trying to get started up in RoR, I have done a simple application of add, edit, delete.... I am now trying to accomplish pagination in RoR, I referred a few tutorials, however none of the examples that i tried from there, seemed to work error free..... I have heard that lots of things have deprecated in RoR, can someone please post me a detailed report of how i can
2011 Dec 05
9
jquery - word is not defined
Just starting out with a beginner book on jquery and the very first thing I am trying fails (has to be me) Rails 3.1 - other jquery things working including a poor example of drag & drop that is my ultimate target here but just simply trying to get every alternating row in a table to have a different css class So I''m using... app/assets/javascripts/people.js.coffee and put in...
2011 Oct 26
6
Add an index to a form
Hello, I''m having some trouble with forms, my app allows to enter data by using a multi-step form that has 7 steps. There are 3 steps that may let the user to add 1 form, for example there''s a step called "children" and that children has the following fields: * name * age * gender but one father may have more than 1 child and I''m adding another form with
2007 Jul 26
5
Coding standards and whitespace
...ex.page doc/src/documentation/tools/rake.page doc/src/documentation/tools/rcov.page doc/src/documentation/tools/spec.page doc/src/download.page doc/src/images/ducks1.png doc/src/index.page doc/src/upgrade.page example_rails_app/app/controllers/naughty_controller.rb example_rails_app/app/controllers/people_controller.rb example_rails_app/app/helpers/people_helper.rb example_rails_app/app/models/person.rb example_rails_app/config/boot.rb example_rails_app/config/environment.rb example_rails_app/config/environments/test.rb example_rails_app/config/routes.rb example_rails_app/db/migrate/004_create_things.rb exa...
2007 May 26
11
RSpec
Hi RSpec Mailing list, I''m new to RSpec and I am trying to get it running with the caboo.se sample rails app. I installed the current version of rspec with rspec_on_rails I tried to run rake spec but received: 330-07:~/desktop/restful_auth_rspec/vendor multimedia$ rake spec (in /Users/multimedia/Desktop/restful_auth_rspec)