similar to: (Beginner) ActionController::UrlGenerationError - No route matches

Displaying 20 results from an estimated 1000 matches similar to: "(Beginner) ActionController::UrlGenerationError - No route matches"

2014 Mar 31
0
Rails Engine ActionController::UrlGenerationError on functional tests
Hi, I'm looking for a way to solve an error I get each times I run my functional tests. I have a Rails Engine gem (isolated), I have a JSON action with a route declared. But each times I use the method get in a test I get an ActionController::UrlGenerationError exception. Here an example of code with the problem: # config/routes.rbMyEngine::Engine.routes.draw do resources :cats, only:
2008 Jul 01
8
Scaffolding: Create, Edit, Destroy in admin area
Hi Community, I''m currently trying to create a blog software in rails, but I''ve got a problem: I generated scaffolding for my articles and only want administrators to write, edit or delete articles. So I wanted to move this parts to another, secured controller. The one controller to display articles is called articles :), the other is also called articles, but is located in a
2007 Jul 19
3
Merb::Controller#url Usage
I have a question about the usage of Merb::Controller#url. When I have nested resources, requesting the new action works differently than I expected. I was wondering what the intended usage is. For example: Say I have r.resources :articles do |article| article.resources :article_attachments end irb(main):002:0> show_routes [:articles, "/articles"] [:article_attachments,
2006 Jan 03
1
RequireResourceHelper for JS and CSS
The following was posted on my blog at http://blog.inquirylabs.com. A friend of mine recently expressed interest in this code snippet, so I thought I''d send it out to anyone else who''s interested. This module makes it a lot easier to ''require'' javascript and cascading stylesheet dependencies inside your views or controllers. By
2006 Dec 11
0
auth_generator 2.0.1 undefined method `login_required' for ... ArticlesController
I am a relative RubNub and attempting to implement auth_generator v.2.0.1. I am getting an "undefined method `login_required'' for #<ArticlesController:0xb732c0b4>" error when I attempt... http://localhost:3000/articles/new Help would be appreciated. My app/controllers/application.rb reads... ------------------------------------------------------------------------
2010 Feb 16
0
Strange routing(?) Issue
I have a Model event and the following two lines in routes.rb 1 - map.connect "events/:action", :controller => ''events'', :action => / [a-z_]+/i 2 - map.resources :events, :has_many => :comments, :has_one => :address #, :collection => {:mapit => :get} I have #1 so that I can call custom actions from a link_to_remote link from my index page t0 update a
2006 Apr 27
2
problematic admin/views
ok, i have a pretty almost finished (frontend) blog, i have defined an admin zone with authentication to add content, now im getting trouble with the views for the controllers in the admin zone, here you can see my file structure: http://img284.imageshack.us/my.php?image=tmpviews6oq.gif and my admin controllers like this: controllers/admin/admin_controller.rb class Admin::AdminController
2007 Oct 01
1
form urls and activeresource object
I have an update form that looks like this: <% form_for @article do |f| %> <p> <b>Title</b><br /> <%= f.text_field :title %> </p> <p> <%= f.submit "Update" %> </p> and when I try to update it doesn''t work because it prints this in the html form: <form
2010 Oct 05
0
Ruby with apache ActionController::RoutingError (No route matches "/"):
Hi! I an trying to setup ruby on rails with apache server on ubuntu server 10.04. I have followed toe guid on the ubuntu page. My main app is located in: /home/jonas/ruby/apps/rtest1/public and I created a symlink to /var/www/app using the following command: sudo ln -s /home/jonas/ruby/apps/rtest1/public /var/www/app I have also reconfigured the owner of the /home/jonas/ruby/apps/rtest1/
2011 Nov 26
1
ActionController::RoutingError (No route matches [GET] "/image.jpg"):
I am using rails 3.1.3. Inside config/ application -> config.assets.enabled = true Inside development.rb -> config.assets.compress = false Inside production.rb -> config.serve_static_assets = false; config.assets.compile = false I have images placed in assets/images. If i do localhost:3000/assets/ image I get the image in the browser, but unfortunately, on the browser i am
2010 Dec 15
5
Having trouble testing :( "superclass mismatch" and can't load "test_helper"
I''m having trouble testing my Rails 3 application. Unit testing doesn''t work. If I try ruby article_test.rb directly, I get a "no such file to load" error, and if I try rake test:units or ruby unit/ article_test.rb I get this odd "superclass mismatch for class ArticlesController" error! I''m hoping I can get this settled... My test files were
2009 Jul 31
2
ActionController::RoutingError (No route matches "/say/hello" with {:method=>:get}):
Hello: I have found a whole lot of posts on this, however, none of them offer any sort of solution other than restarting the web server, which I can''t imagine everyone out there developing on Rails is doing. I am on page 40 of Agile Development with Rails 3rd edition and trying to get the missing template error to show but until I restart webrick I only get the following: Processing
2014 Jun 09
0
How can I test my controller via rspec for something other than response.should be_success?
1) Right now this is just testing a successful response. However, since I've gone and created a Post via FactoryGirl... how can I test the @post.id equals one of the id's being returned by the get: index json? describe Api::V1::PostsController do context 'Post' do before(:each) do @post = FactoryGirl.create(:post) end context '#index' do
2010 Oct 07
5
ActionController::RoutingError (No route matches "")
ActionController::RoutingError (No route matches "/atweet"): Unsure on why routing to my view isn''t working. controller appears to be functioning, however the view isn''t work, when I attempt to go to it, this happens... sniff... sniff.... help??? I don''t get routes.rb in rails... -- Posted via http://www.ruby-forum.com/. -- You received this message
2005 Aug 17
4
Stop an action ?
Hi. I am working on a generic authentification system for rails (more complete than the login generator). The way it works is you call a method inside your action, passing the domain as a parameter (domains are like a group of users with specific rights). For that purpose, I need to exit the action inside this method because it redirects to a login page if that person isn''t
2006 Jul 07
5
link_to: link is missing id
I''m using a legacy table, where the unique id is not ''id'' I have a Model class like the following: class Article < ActiveRecord::Base set_primary_key "ARTICLE_ID" end however, using a link_to like the following (modified scaffolding), the link has no id value: <% for article in @articles %> <tr> <% for column in
2006 Apr 07
0
How to combine rjs with ActiveView::Helper?
Suppose in controller: class ArticlesController < ApplicationController def search ... render :update do|page| page.replace_html ''panel_tab_searchresults'',:partial => ''article'', :object =>@articles end end And i want to add ajax styled Paginator to the view,i have got the method and i can work well directly used in view:
2006 Apr 30
0
Role based auth recipe from a subfolder?
Hi guys, I have implemented the recipe for role based auth in the book, it works perfect(after sometime of pain to make it work fine), im using class inheritance to authenticate all the classes from one point(class AdminController in this case) i have this base structure: class AdminController < ApplicationController ... end class ArticlesController < AdminController ... end i define
2010 Aug 16
0
assert_redirected_to partial assertion does not work?
Hi, From the docs I see: http://api.rubyonrails.org/classes/ActionController/Assertions/ResponseAssertions.html This match can be partial, such that assert_redirected_to(:controller => "weblog") will also match the redirection of redirect_to(:controller => "weblog", :action => "show") and so on But it my case it does not work. As
2010 Oct 15
0
AssociationTypeMismatch / Model Caching in development envirnment
Hi there— I''m trying to get started with Rails, and I''ve run into this issue and searched high and low--so hopefully someone can help point me in the right direction. I''m having an issue where my model classes seem to be getting cached by something, and so if I make subsequent requests, I get an AssociationTypeMismatch error. To be specific, on update is where it