Displaying 20 results from an estimated 80000 matches similar to: "Dynamic Routes"
2011 Feb 28
1
Problem with render_component and rails 3
I have a application that it use view/layout/application.rhtml, in
this file I have:
<%= render_component :controller => ''car'', :action =>''index''%>
But there is one problem, it display this problem: undefined method
`render_component'' for #<#<Class:0xb67e6e48>:0xb67e5f34>
How can I resolve this problem?
--
You received this
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
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 Dec 12
0
<%= render_component %> Tag cloud issue for rails version 2.3.11
hi all,
in my application there is tag''s cloud in old code which is load using
following code
<%= render_component :controller => "controller_name", :action =>
"tag_cloud_homepage"%>
now i upgrade the ruby,gem and rails version to
Ruby :1.8.7
Rails :2.3.11
gem :1.6.2
and i am using Windows XP as O.S
my question, now in Rails 2.3.11 "<%=
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)
2013 Jul 08
4
Devise routes
hi...
i am using two devises in rails 4 application,i need the routes for
those devises.
rails 4 is new feature for routes
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
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
2011 Oct 05
0
Optional Dynamic Prepended Route via scope
Hello,
Say I have the following in my routes file:
scope "(/:organization)" do
resources :systems, :except => [:destroy] do
member do
get :packages
end
end
end
resources :dashboard do
collection do
get :notices
end
The organization can be changed by the user and various resources such
as systems are scoped off of the organization. So, the
2012 Feb 01
0
Rails 3.1 form & routes.rb [newbie]
Hi all,
maybe is a newbie question anyway
1. I create de rails app with
# rails new {my app}
2. after I add some gem to my Gemfile
source ''http://rubygems.org''
gem ''rails'', ''3.1.1''
gem ''sqlite3''
gem ''simple_form''
gem ''execjs''
gem ''therubyracer''
# Gems used only
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 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 Jul 08
0
Rails3 -- Replacement for ActionController::Base.relative_url_root?
I have a post on stackoverflow which outlines the problem I am having:
http://stackoverflow.com/questions/3181746/what-is-the-replacement-for-actioncontrollerbase-relative-url-root
In short, I ported a rails 2.x to rails3 and started getting a
deprecation warning for using
ActionController::Base.relative_url_root. I switched to using
config.action_controller.relative_url_root and while any
2012 Sep 04
0
dynamic route generation
In polymorphic_routes.rb, line 131, a name route that has been built
(e.g. post_users_path) gets invoked on self (assuming there was not
RoutesProxy instance appended as the first element of the array passed
as the first argument to form_for, then send() would be invoked on
self, which is PolymorphicRoutes module, which belongs to
ActionDispatch::Routing):
(proxy || self).send(named_route, *args)
2010 Sep 01
4
deprecation warning in Rails 3 about Base.named_scope
I recently upgraded to Rails 3, and this error has come up
ubiquitously:
DEPRECATION WARNING: Base.named_scope has been deprecated, please use
Base.scope instead.
Any ideas on how to get rid of it? Or should I just wait for
something?
There''s actually no place in my application where the code
"Base.named_scope" exists, so I assume the problem is inherent in gems
that
2011 Nov 30
4
How to use a local copy of rails in a rails application
Sorry for a primitive question, but how can i use a local copy of rails
with my rails 3 application (locally)?
Quick googling didn''t help, and on StackOverflow there is something
about putting local rails to the "vendor" directory, but it does not
seem to work for me.
Thanks.
Alexey.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are
2010 Feb 05
7
I'm having trouble with Routes II
I have narrowed my problem in a prior topic (I''m having trouble with
Routes) to the fact that I get the problem, below only when I reload my
page. Clicking on links to go to the pages I want ... I seem not to
have problems.
Given that it seems to be a reload that is generating an "/undefined"
path somewhere ... can anyone suggest what I should be looking for to
fix the
2013 Jul 09
3
routes for devise in rails4
hi all,
i am using 3 devises for 3 models in rails4.
i need routes to my devise models.the devises are client,admin,employee.
when i login into client then it will go to clients dashboard, when i
login into admin then it will go to admins dashboard, the employee also
has the employee dashboard.
if i do not enter any login then the common dashboard body message is
please signin.
please let me
2012 Sep 16
1
“Routing Error No route matches {}” when omniauth failed on registration
(Original question was asked here:
http://stackoverflow.com/questions/11506734/routing-error-no-route-matches-when-omniauth-failed-on-registration
)
I am using omniauth-identity and configure its "fail on registration".
My files:
config/initializers/omniauth.rb
OmniAuth.config.logger = Rails.logger
Rails.application.config.middleware.use OmniAuth::Builder do
#...
provider
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 Jul 04
2
DRYing Routes
I have a series of ''static'' pages for a site that need named routes in
Rails 3. I''m trying to DRY the routes file, but can''t seem to find the
proper code.
The desired output/code is:
match ''/about'' => ''info#about'', :as => :about
for each page. My attempt to dry this:
%w(about services articles marketing clients).each