similar to: Rails 3 routing using referrer

Displaying 20 results from an estimated 70000 matches similar to: "Rails 3 routing using referrer"

2011 Jan 16
1
Before and After Filters/Functions for Rails Routes
Hi I have an idea and I am not sure if is is already done.Right now to make url search engine friendly developers use to_param function of model class. Then they call to_s function to get the id of the elmenet. What if I want to create url for not model but for string. Lets say I create link for post controller''s search action. The only variable in the url is search_string. Si how
2010 Dec 21
3
Request for comment on post on SEO QuickStart for Rails
Hi, http://programmers-blog.com/2010/12/21/quick-start-to-seo-for-ruby-on-rails What do you think about this guys? I looked through the whole Internet ;) and found nothing simple that would suit my simple needs. So I did these things on my own and wrote about the process. Thanks for any comments! Regards, M&W. -- Posted via http://www.ruby-forum.com/. -- You received this message
2011 Jul 28
2
rails 3 routing error
Here''s the error: 1) SessionsController GET ''new'' should be successful Failure/Error: get :new ActionController::RoutingError: No route matches {:controller=>"sessions", :action=>"new"} # ./spec/controllers/sessions_controller_spec.rb:8:in `block (3 levels) in <top (required)>'' 2) SessionsController GET
2011 Nov 10
2
Rails nested Routing
Hi there! I experienced an issue with routing. Basically, I''m trying to follow step-by-step the Rails'' official guides process for what concerns the nested routing. So, I have Newspapers that has_many :ads , and :ads belongs to :newspaper . What I did was simply trying to obtain an URL like this: http://localhost/newspapers/1/ads/1 but when I set routes.rb in this way:
2012 Feb 12
3
Rails routes - destroy
Can''t figure out how duplicate routes are differentiated by rails ... Read routing from inside out and API as well as a few tutorials but still don''t get it!!! For example... routes.rb resources :minisections do resources :questions end rake routes: minisection_question GET /minisections/:minisection_id/questions/:id(.:format) questions#show
2011 Apr 07
3
[Rails 3] No route matches error using RSpec even though route DOES match
I''ve recently run into a really weird situation that I''m just not sure what''s going on here. I''m trying to write a route that will allow searches to be done via GET requests (generally a good idea since it''s just retrieving information, helps for links and SEO, etc.), and I have the route properly set up and can access it in development mode just fine,
2012 Oct 18
1
routing issue with mounted engine - Rails 3.2.8
I mounted the Forem::Engine in my app MyApp::Application.routes.draw do scope "/:locale" do ... resources :sites, :only => [:none] do get ''home'', :on => :collection get ''events'', :on => :collection end .. mount Forem::Engine, :at => "/forums", :as => :forums, constraints: lambda { |r|
2011 Mar 09
2
which rails ready-made solution for a small simple online shop?
I''m looking for a ready-made solution for a small simple online shop. The requirements are the following: * It works out of the box * User-friendly UI: business owner can add, edit, delete products for sale, their prices, their pictures and their descriptions * Product categories * Filtering by category, product name and etc * Pre-built themes/templates (I''m not good at web
2010 Mar 27
2
Shorter Rails 3 routes
Hi, I have a small blog application, and I would like to shorten its routes. Here they are: Blog::Application.routes.draw do resources :categories do resources :articles do resources :comments end end A rake routes command produce the following lines: GET /categories/:category_id/articles/:article_id/comments(.:format)
2010 Nov 04
0
Rails routing issue
Within a rails app I''ve got a special url (/profile) that I''m mapping to the user controller to allow a user to view and edit their profile. I made the following entries into my route file so that the "get" for profile will route me to the profile action in the user controller and the "post" for profile will route to the update_profile action in the user
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
2010 Sep 04
4
Store a single variable / row in database
What would be the best way in rails to store a single variable and have it persist. Like a have a variable that says "total_visits" that counts the total number of page loads. The only solution I can think of is having a table with a single row. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2011 Feb 23
5
Routing problem
In my app i have word model, words_controller and want create new action for word model. I create new method ''test'' in words_controller, and adds: resources :words do member do put ''test'' end end in routes.rb my rake routes output: test_word PUT /words/:id/test(.:format) {:action=>"test", :controller=>"words"}
2012 Oct 26
0
Routing error in rails
In my controller I have def update_project_dates p "It is end date....." @user=User.find(params[:user]) @projects=Project.find_all_by_user_id(@user) end In the view page (only some part of the code is copied and pasted) eventDrop: function() { $.ajax({ url:''/update_project_dates/'',
2010 Dec 29
5
Beginer: Question about routing on Rails 3
I bought this book about rails for beginers (head first Rails) and its quite simple and good for someone who has no clue about Rails (or any other language) On chapter two it talks about routing but unfortunately the book is for rails 2 and i have rails 3 installed on my mac. The line i have to enter in the config/routes.rb of my application is: map.connect ''/ads/:id'',
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 Oct 05
3
Rails 3 routes with same name, different param name based on constraint
Hello there fellow RoR enthusiasts, I have been wrestling with rails 3 routes for hours trying to accomplish the following: I want to use the *same url helper* (photo_url) in my views but have a different route match made depending on the format of the parameter I pass. Seems simple enough, right?? If the parameter looks like nn.nn.nnnnnn.whatever, I want the param passed to
2011 May 06
3
Rails 3 Routing problems
I have an UploadsController and UsersController where Users'' has_many :uploads'' via polymorphic attachment in uploads.rb. Now we i navigate to http://localhost:3000/users/1/uploads I get re-routed to Uploads#index and rendered is called multiple times as shown below: Started GET "/users/1/uploads" for 127.0.0.1 at 2011-05-06 22:00:38 +0100 Processing by
2011 Jun 21
0
Status of Rails.application.routes.recognize_path()
This might be more a question for the guys in the "Ruby on Rails: Core" group, but I''ll try it out here first... So, while writing a gem (engine) for rails, I found that I needed to have my app (in a pre-filter) directly query the router. In the "old" days, this was done using ActionController::Routing::Routes.recognize_path(). My 2nd edition of "Agile Web
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