similar to: Restful routes

Displaying 20 results from an estimated 9000 matches similar to: "Restful routes"

2008 Sep 19
7
Non-Ruby REST client for Ruby REST server
Hi, I have a Rails 2 app and I wand to provide an API for 3rd party applications written on any language the customer uses. My thoughts are that the best way of providing it is by taking advantage of rails RESTfulness and let them perform CRUD actions on my data through it. But I don''t seem to find many information on how to achieve this. I first want to develop .NET clients (or web
2008 May 14
3
New blog application post slugs
Hello. I''m creating my own RESTful blog app. I am wondering about creating post slugs. I think Wordpress creates a slug at post creation time and stores the string in the database, then uses that for URLs. I read about the acts_as_sluggable strategy (http:// agilewebdevelopment.com/plugins/acts_as_sluggable) but I don''t like having a number (the ID) in the URL. Any
2008 Sep 19
1
Freezing Rails to 2.0.2
Hi, I am using Rails 2.1.1 to stay in touch with the latest. I need to freeze the rails to version 2.0.2 for a project. But... The command in Rake tasks for Freeze allows only to freeze for the latest version I am using Netbeans 6.1 and familiar with tools only... Not much familiar with Console currently. Is there any facility in that allows me to freeze to older versions. Thanks -- Posted
2008 Jan 21
2
multiple ids on restful action
Hi, I know this question has come up before, but I couldn''t find a satisfying answer. Maybe I didn''t look well enough, so any pointers to old messages regarding this subject would be welcome too. I need some way to pass multiple ids to a resource. Something like /posts/13,14 If I do this I have to manually split the id on ","s in the action, and use post_path([post1,
2009 Sep 01
13
Function Testing Reloading Fixtures before assertion
Hey Everyone, I have a function test the is failing (despite the fact the function actually works in the application). I was looking for some debug advice on how to find my problem. Here is the test: def test_should_delete_word assert_equal ''published'', words(:one).status debugger delete :destroy, :id => words(:one).to_param assert_equal
2007 May 14
3
pxe password protect option
Hi, I have tried several different line options, but I cannot seem to get the pxe master password option to work? I have basically tried all combinations of: DEFAULT local PROMPT 0 ALLOWOPTIONS 1 TIMEOUT 500 MENU TITLE sometitle MENU MASTER PASSWD somepassword But just can't seem to get the menu to prompt for a password. version I have is pxe 3.31 Thanks for any help
2008 Mar 12
2
nested routes with a 2-way has_many using join table?
I have two classes, InstructionalObject and Assets. They both have_many of the other, implemented through a join table (so it''s like a habtm without the habtm). For the next version of our app, we''re refactoring to RESTful, and i''m having trouble with my nested resources/routes. I tried this, in routes.rb: map.resources :assets do |assets| assets.resources
2007 Sep 10
6
RSpec view spec writing problem (unable to generate url_for in RESTful resource link_to)
Thanks, first, to everyone who''s asked and answered questions on this list, and to the creators of RSpec - it is all very helpful. I''ve searched the mailing list, and had a couple 2hr googling sessions that didn''t help me find an answer. I''ve run into a problem getting my first non-trivial view spec to run. I get an error when trying to generate a link_to()
2010 Jan 04
2
to_parm and how it can be used in a helper
is there a way to pass the data returned by the to_parm function in a helper? i followed the info provided at http://www.jroller.com/obie/entry/seo_optimization_of_urls_in and am able to successfully get the correct urls, now i want to be able to get the same (id-whatever) text and pass it to a helper function for further processing. Any ideas as to how this can be achieved? -- Posted via
2012 Mar 14
5
Does Ruby 1.9 support Unicode normalization yet?
In the process of upgrading from 1.8 to 1.9 we are getting a lot of warnings about "Ruby 1.9 doesn''t support Unicode normalization yet". However the commit that added those lines is from 2008 and just mentions "Ruby 1.9 compat: no Unicode normalization support yet" without any references. Does anyone know whether this is still true for ruby 1.9 and for which minor
2007 Sep 18
2
rSpec / Nested Routes / Mocks
I''m having a terrible time trying to test a nested route with rSpec. I can''t seem to tell rSpec to expect the call @item.user. The following error message plagues me not matter how I try to fuss with the mock: Spec::Mocks::MockExpectationError in ''ItemsController handling POST / items should redirect to the new course on successful save'' Mock
2008 Nov 18
3
Code changes are ignored due to code minor ver. were cached
Hi there! I study Ruby on Rails and met a problem. I placed a class definition code for class which is NOT a Model into separate file, assume MyToolClass.rb Then I started working on controller code and required ''MyToolClass'' While working on controller code I also corrected some code in MyToolClass.rb, but it seemed, that changes in MyTooolClass.rb were ignored by Rails until
2007 Feb 09
2
Re: customizing map.resources for REST
Yeah... I''m totally struggling to grok resource routes too... seems like they''ve totally blown the beautiful simplicity of the old url pattern stuff out of the water. Would love to hear an answer to this question!!! b Andy Triboletti wrote: > I want to customize map.resources so it uses a uid in the URL instead > of the database id. The uid is a field on my object.
2008 May 19
4
REST urls and Authenticity Token
Hi, I have a few questions regarding REST and the Authenticity Token. I''m using a RESTful aproach for my small project and everything worked fine untill I wanted to destroy a record. Lets say we have a listing of folder (a folder is just a record) and I want to destroy one by using this link: <%= link_to image_tag(''icons/folder_delete.png''), {:url =>
2008 Nov 04
3
Nester Resources, Routes and Class Inheritance
Ok here''s a quicky... but a goody :) We have models Company, Reference and Applicant... and References and Applicants just inherit from Company, and are basically companies with the type field set to reference... All companies can have a phone number associated with them, and phone number is a different model... I''m having trouble using the form_for method with a company that
2007 Sep 04
2
specing helpers fails on restful routes
Hi, I am trying to spec helper methods in a Rails project, but it seems the specs fail with the error: You might have expected an instance of Array. The error occurred while evaluating nil.<< if the restful routes helper are used either in spec files, or the helper file. What can I be doing wrong? Or how can I fix this. Thanks! -- Surendra Singhi http://ssinghi.kreeti.com,
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''
2009 Mar 11
3
[rspec, rails] Restful Routes in controller specs
Hi, how is it possible that I can use the restful routes helpers (e.g. new_user_path) in controller specs? I browsed the source code but I couldn''t find the magic. I''m just curious and would appreciate any hint... thanks Andi
2009 Apr 06
2
Converting Number into Integer in ruby
I am working with a legacy oracle database. The primary key is not defined as an integer but as a number. This results in a url with an id as a number, such as 1234.0 instead of 1234. It works fine, but I would prefer 1234 to be displayed in the url. I have attempted to redefine the model id method to convert to an integer using to_i method, but no luck. Any ideas? Thanks, Vaibhav -- Posted via
2006 Nov 17
6
RESTful routes and resulting urls
if I have the following in my routes.rb: map.resources :product_categories it provides urls such as: /product_categories /product_categories/1 /product_categories/1;edit etc. and uses the ProductCategories controller. how can I keep the same controller (and model) but set up the resources so that I can have any abitrary url point to the existing controller, much like specifying the controller