similar to: Creating multiple objects at a time, the RESTful way?

Displaying 20 results from an estimated 30000 matches similar to: "Creating multiple objects at a time, the RESTful way?"

2007 Oct 29
9
Problems with mongrel on NetBSD
I seem to have a (recent) problem with mongrel on NetBSD. I''m running a development release of NetBSD (called NetBSD-current 4.99.34). When I start mongrel, it listens on the IPv6 wildcard address, but not on the IPv4 wildcard: => Booting Mongrel (use ''script/server webrick'' to force WEBrick) => Rails application starting on http://0.0.0.0:3000 => Call with
2006 Jul 25
8
Creating records in two models in a RESTful way.
Hey everyone, I have a philosophical question here. Say I have a website that uses two models for accounts: Person and Company. Normally I would just have /accounts/new for user signup. However, the RESTful way to do it is to have /people and /companies. Unfortunately, this doesn''t account for a situation where you''d have a one-page signup form. I wouldn''t want
2013 Mar 05
4
searching model and has_one association
Howdy. I have these models: User, field "mundane_name" user has_one :instructor_profile (may or may not exist) instructor_profile, field "sca_name" belongs_to :user I would like to craft a search on these fields, which is effectively this, but in one go: matching_users = User.where("mundane_name ILIKE ?", "%#{target}%") matching_profiles =
2007 Jul 28
0
Nested RESTful Routes and creating a object from XML
I am trying to create a new model from XML that contains has a has_many relationship. Is this possible without having to write code to parse the XML or to doing multiple POSTS? I can do a post with XML that doesn''t contain any of the has_many elements and it works fine. It is when I add the items from the has_many relationship that I get a bunch of errors. Here are the examples I am
2007 Oct 23
11
validates_confirmation_of not working?
I just can''t get validates_confirmation_of working for the life of me!... It''s not the first time I''m having problems with it but I just never understand why!... This time I pretty much followed *exactly* the example in Agile Rails Development and still...it just won''t work! I put 2 different passwords in the form and it doesn''t trigger an error,
2007 Nov 10
1
Upgrade on windows to 1.1
Attempting remote update of mongrel Select which gem to install for your platform (i386-mswin32) 1. mongrel 1.1 (java) 2. mongrel 1.1 (mswin32) 3. mongrel 1.1 (ruby) 4. mongrel 1.0.4 (ruby) 5. mongrel 1.0.4 (mswin32) 6. Skip this gem 7. Cancel installation 2 > ERROR: While executing gem ... (OpenURI::HTTPError) 404 Not Found This is using the NetBean IDE''s ''ruby
2008 Jul 18
2
disabled save button when pdf generated
Hi I m new in Ireport, I want to dasabled the save button for generated PDF file and also not allowed to copy past. can any body help me. Thanks and Regards Kundan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2006 Mar 13
2
Rails : Objects, Patterns and Practice
I''m currently learning Rails and reading PHP5 Objects, Patterns, and Practice. Its a great intoduction to Singletons, Factories etc but can anyone recommend a similar resource for Rails or failing that Ruby. ? thanks Tony -- Posted via http://www.ruby-forum.com/.
2009 Mar 15
3
Capistrano deploy errors
Hi, when I do cap deploy:cold I get this error: rake aborted! undefined local variable or method `acts_as_commentable'' for #<Class: 0x7fa1c34a2f10> /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/ base.rb:1833:in `method_missing_without_paginate'' /usr/local/lib/ruby/gems/1.8/gems/mislav-will_paginate-2.3.8/lib/ will_paginate/finder.rb:170:in
2007 Oct 15
6
SQL injection with :order, :limit, :group
I know how to avoid SQL injection attacks when you use :conditions User.find :first, :conditions => ["login=?", params[:username]] but how about with :order, :limit or :group? # uh-oh...spaghetti-oh User.find :first, :order => "login; delete from users; select * from users" Pat --~--~---------~--~----~------------~-------~--~----~ You received this message because you
2010 Nov 01
2
Creating RESTful helpers on the fly
If I have a resource called ''assets'' then I get for free a bunch of helpers, like assets_path new_asset_path and so forth, right? I would like to be able to create a call to one of these on the fly when I only find out the name of the resource at run time. For example I would like to do this: resource_name = "assets" resource_path(resource_name, method => :new)
2006 Jul 21
0
Marshal.dump not dumping entire object?
Greetings, I first want to say that this problem is happening with the Runt gem. This may is likely an implementation issue between Marshal and Runt. While I''ve simultaneously filed this problem with Matt Lipper, I''m also hoping someone here can can guide me a little - either in implementation (usage of Marshal), or to aid me to fix Runt to support Marshal.
2006 Jul 21
0
[RESOLVED] Marshal.dump not dumping entire object?
After sending this I realized that this was a Ruby not Rails issue - but the answer may be interesting for those who choose Marshal over Serialize. So, to close this off I don''t know why marshal.dump wasn''t ''dumping'' all attributes, but adding custom marshaling to PDate did the trick. ala, + def marshal_dump + dumped_obj = [date_precision, ajd,
2006 Aug 24
2
Design questions on creating digg.com-like URLs (are they considered RESTful?)
Hi everyone, I''m working on creating a site that functions similar to digg.com (please no "no more digg clones" remarks please! :) ). One thing I really like about digg is there URLs are very nice to read and I would like to emulate that without having a lot of actions spread out all over my application. So in my app I have three main resources: Users, Tags, and Items
2006 Oct 16
0
Restful routes, not repeating yourself and non-standard rest actions best practices
So I''ve recently started playing with the restful routes support in edge rails, converting a few of my controllers to support all the standard operations.. One thing that''s been bothering me, however, is the following: Before using restul routes, I would define an edit method in my controller which would be responsible for both creating new objects as well as editing
2007 Sep 22
1
Testing RESTful routes
Hi all, The app I am making right now uses restful routing entirely. I want to prevent people from accessing my actions without the proper HTTP verb so I commented out the :controller/:action/:id catch all routes that were used in pre-RESTful Rails apps. Like so: #map.connect '':controller/:action/:id.:format'' #map.connect '':controller/:action/:id''
2007 Oct 05
1
RESTful Thinking
Okay, so I am trying to embrace the RESTful approach to web application design and wanted to get some feedback from others. I understand that it can be done different ways, I''m just interested to see what real RESTful theorists think. Lets say that you have an application that has lists and items on that list. I can see how both lists and items can be set up as resources. Now, lets
2006 Aug 01
2
restful controllers - howto nest with link_to?
Hi List, I''m trying to get my grip on the restful methods that are now part of edge rails. Making the first steps was impressive as well as easy because there are already great resources on the blogs of early adopters: http://www.ryandaigle.com/articles/2006/08/01/whats-new-in-edge-rails-simply-restful-support-and-how-to-use-itand
2006 Aug 11
0
Resotolog-1.2 - RESTful blog example (was Community request - can someone show me REST? )
On 8/2/06, Alisdair McDiarmid <alisdair@...> wrote: > Here you go: > http://randomoracle.com/stuff/RestBlog.tar.gz Hi guys, i modified a little the original Alisdair McDiarmid''s sources and created very simple blog system. So the announce follows: Restolog - RESTful blog example ========================= Very simple blog system based on REST/CRUD ideas. Sources (all
2008 Jun 01
2
Is Ezra''s RESTful recipe needed anymore?
Hi all, In the recent Advanced Rails Recipes book, Ezra states that Rails needs a little bit of adjustment for its restful routing to work with Facebook. He suggests created an initializer named facebook_overrides.rb and adding this code: http://pastie.caboo.se/206696 But I was just testing restful routing without that code, and Rails seemed to be working fine with Facebook.