similar to: RESTful routes and verify :method

Displaying 20 results from an estimated 50000 matches similar to: "RESTful routes and verify :method"

2012 Feb 05
4
Rspec and restful routes
Hi all, I''m trying to test that my users show page renders. The resource has the route /users/:id How would I code that for an Rspec test? So far I''ve tried these four ways: it "should have a users show path" do get user_path(:action => ''show'') end it "should have a users show path" do get user_show_path end it "should have
2010 Apr 27
4
Translated (language-aware) routes in Rails application
Hi, I''d like to have translated languate-aware routes in my application, like: /projects/5/permissions => locale "PL" /projekty/5/pozwolenia => locale "PL" Is there any way to achieve it with RESTful routes? I have done it manually with named routes, but it''s overwhelming with over 300 routes :D Also tried namespace (yeah, didn''t work) and
2010 Feb 18
1
restful route paths... has something changed?
So I have this resources :forums do resources :topics end But when I try to do this: <%= forum_topics_path(1, 2) %> I get: /forums/1/topics.2 Why the dot? Expecting a slash This is rails3.. so maybe I am doing it wrong to what I''m used to cheers for any info! -- You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2011 May 07
11
changing routes.rb
Hi, I''m a complete beginner and I just have a simple question: How do I change lines in a file like routes.rb? I know the command type (i.e type config\routes.rb) but that just shows it and doesn''t allow me to change anything. Thanks in advance -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby
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)
2009 Dec 23
0
Migration from the "Restful Authentication" to "Authlogic"
Hi, I am using Authlogic for authentication. Previously our application having a "Restful Authentication". We have users who are created by using the "Restful Authentication". My problem is these users will not able to login with Authlogic as the password encryption methods are different for both and I am getting "Password not valid" error. So I searched for that and
2011 Sep 07
3
Method get of ActionController::TestCase ignores routes.rb?
Hi! I''m running into issue which seems to indicate that ActionController::TestCase.get() method ignores what I have in routes.rb. Happens in 3.0.10 and 3.1.0 too. I have the following RSpec2 test of my XmlRpcController#index action: it "should get nothing in response to GET request" do get :index response.response_code.should == 400 #bad_request end And the only line
2014 Apr 16
0
Configure restful web service in rails
Hi, I am trying to create a Rest web service in my rails application. I need to configure urls for it as below. localhost:3000/book/book_id/new/param1/param2/param3/param4/... localhost:3000/book/book_id/next localhost:3000/book/book_id/delete I dont have a view pages for it since it returns in json format.Please help.So what is the best way to configure these urls via
2010 Nov 10
1
rails "path_prefix" produces no correct verb route evaluation
Hi guys! ;) If you set "routes.rb" as: map.resources :pocoyo You have RESTful rails routes facilites. Ok, let''s focus on these two maps: "http://domain.com/pocoyo" [GET] is mapped to "pocoyo" controller and "index" action. "http://domain.com/pocoyo" [POST] is mapped to "pocoyo" controller and "create"
2010 Jun 02
5
user routing versus admin routing strategies?
In an app where ordinary users are limited to viewing and editing their own "stuff", but someone with admin privs can view and edit anybody''s stuff, what''s the right strategy for routing? At first blush, I''d think that an ordinary user (e.g. with id 565) should see something like: http://example.com/mystuff.html ... where the controller assumes
2011 Feb 22
2
Problem installing restfull authentication
hi trying to use restfull authentication, but getting the folloing error script/plugin install http://github.com/technoweenie/restful-authentication.gitrestful_authentication Plugin not found: [" http://github.com/technoweenie/restful-authentication.git", "restful_authentication"] can someone help please thanks -- You received this message because you are subscribed to
2010 Oct 13
2
Routing Error
my register.html.erb file is : <% form_for :user do |form| %> <p><br /> <fieldset> <legend>Enter Your Detail</legend> Screen Name <input type="text" name="screen_name" id="screen_name" size="20" maxlength="40"/> </p> <p> Email <input type="text"
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''
2011 Feb 28
3
[JOBS] Technical writer familiar with Rails and documenting a RESTful API
I have a short-term contract position opening for a technical writer. The position is telecommute and is probably a week to 2 weeks worth of work at full time. Part-time can be accommodated. Pay rate is negotiable. If you''re experienced and interested, please contact me at bill at shopkeep dot com. Thanks, Bill -- You received this message because you are subscribed to the Google
2012 Sep 18
4
"best practices" for Rails serving RESTful JSON services for use by AngularJS, Ember.js, etc.
I''ve been writing a gem to implement and extend common controller functionality so that Rails can be used with Javascript frameworks like AngularJS (which we are using), Ember.js, etc. in such a way that the user doesn''t have to tweak a a bunch of rails g controller boilerplate code to provide services for use in these frameworks that in turn would require various changes to
2011 Apr 07
5
Routing Error : No route matches "/" (for "Hello World!" action)
My routes.rb reads at the top: Hello::Application.routes.draw do match '':controller(/:action(/:id(.:format)))'' and then all the commented material it comes with and an "end" at the end of the file. But when I type http://localhost:3000 into my browser I get the following error message: Routing Error No route matches "/" I''m stumped. Bruce --
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,
2011 Jan 19
2
Routes not working
Hello everyone, I''ve been using RoR for awhile now, but I''m new to Rails 3... I''m trying to follow a tutorial that creates a registration page that creates a user. Simple enough, right? When I go to server:3000/user/register, it comes up with my registration page fine. However, when I submit it (form_for :user) it complains that my route (user/register) does not
2010 May 07
1
Change default routing
Hi, I would like to change the default routing system. I have a city model and instead of have :model/:controller/:id I would like to change it to :model/:controller/:name. How do I do this in the routes.rb? I have this message "Couldn''t find City without an ID" Greg -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the
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