Search Results

Search found 8979 results on 360 pages for 'dynamic routing'.

Page 15/360 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • T-SQL Dynamic SQL and Temp Tables

    - by George
    It looks like #temptables created using dynamic SQL via the EXECUTE string method have a different scope and can't be referenced by "fixed" SQLs in the same stored procedure. However, I can reference a temp table created by a dynamic SQL statement in a subsequence dynamic SQL but it seems that a stored procedure does not return a query result to a calling client unless the SQL is fixed. A simple 2 table scenario: I have 2 tables. Let's call them Orders and Items. Order has a Primary key of OrderId and Items has a Primary Key of ItemId. Items.OrderId is the foreign key to identify the parent Order. An Order can have 1 to n Items. I want to be able to provide a very flexible "query builder" type interface to the user to allow the user to select what Items he want to see. The filter criteria can be based on fields from the Items table and/or from the parent Order table. If an Item meets the filter condition including and condition on the parent Order if one exists, the Item should be return in the query as well as the parent Order. Usually, I suppose, most people would construct a join between the Item table and the parent Order tables. I would like to perform 2 separate queries instead. One to return all of the qualifying Items and the other to return all of the distinct parent Orders. The reason is two fold and you may or may not agree. The first reason is that I need to query all of the columns in the parent Order table and if I did a single query to join the Orders table to the Items table, I would be repoeating the Order information multiple times. Since there are typically a large number of items per Order, I'd like to avoid this because it would result in much more data being transfered to a fat client. Instead, as mentioned, I would like to return the two tables individually in a dataset and use the two tables within to populate a custom Order and child Items client objects. (I don't know enough about LINQ or Entity Framework yet. I build my objects by hand). The second reason I would like to return two tables instead of one is because I already have another procedure that returns all of the Items for a given OrderId along with the parent Order and I would like to use the same 2-table approach so that I could reuse the client code to populate my custom Order and Client objects from the 2 datatables returned. What I was hoping to do was this: Construct a dynamic SQL string on the Client which joins the orders table to the Items table and filters appropriate on each table as specified by the custom filter created on the Winform fat-client app. The SQL build on the client would have looked something like this: TempSQL = " INSERT INTO #ItemsToQuery OrderId, ItemsId FROM Orders, Items WHERE Orders.OrderID = Items.OrderId AND /* Some unpredictable Order filters go here */ AND /* Some unpredictable Items filters go here */ " Then, I would call a stored procedure, CREATE PROCEDURE GetItemsAndOrders(@tempSql as text) Execute (@tempSQL) --to create the #ItemsToQuery table SELECT * FROM Items WHERE Items.ItemId IN (SELECT ItemId FROM #ItemsToQuery) SELECT * FROM Orders WHERE Orders.OrderId IN (SELECT DISTINCT OrderId FROM #ItemsToQuery) The problem with this approach is that #ItemsToQuery table, since it was created by dynamic SQL, is inaccessible from the following 2 static SQLs and if I change the static SQLs to dynamic, no results are passed back to the fat client. 3 around come to mind but I'm look for a better one: 1) The first SQL could be performed by executing the dynamically constructed SQL from the client. The results could then be passed as a table to a modified version of the above stored procedure. I am familiar with passing table data as XML. If I did this, the stored proc could then insert the data into a temporary table using a static SQL that, because it was created by dynamic SQL, could then be queried without issue. (I could also investigate into passing the new Table type param instead of XML.) However, I would like to avoid passing up potentially large lists to a stored procedure. 2) I could perform all the queries from the client. The first would be something like this: SELECT Items.* FROM Orders, Items WHERE Order.OrderId = Items.OrderId AND (dynamic filter) SELECT Orders.* FROM Orders, Items WHERE Order.OrderId = Items.OrderId AND (dynamic filter) This still provides me with the ability to reuse my client sided object-population code because the Orders and Items continue to be returned in two different tables. I have a feeling to, that I might have some options using a Table data type within my stored proc, but that is also new to me and I would appreciate a little bit of spoon feeding on that one. If you even scanned this far in what I wrote, I am surprised, but if so, I woul dappreciate any of your thoughts on how to accomplish this best.

    Read the article

  • How Does One Differentiate Between Routes POSTed To In Asp.Net MVC?

    - by Laz
    I have two actions, one that accepts a ViewModel and one that accepts two parameters a string and an int, when I try to post to the action, it gives me an error telling me that the current request is ambiguous between the two actions. Is it possible to indicate to the routing system which action is the relevant one, and if it is how is it done?

    Read the article

  • Canonical Redirect on Dynamic Mass Virtual Hosts on Apache

    - by Josh
    I have a Web app on Apache that allows users to point their domain to the server. Right now I'm using Apache's dynamic mass virtual hosts with an entry VirtualDocumentRoot /www/hosts/%0/docs So with www.companydomain.com it points to /www/hosts/www.companydomain.com/docs The problem is when the user goes to companydomain.com it will point to /www/hosts/companydomain.com/docs Is there an easy way to automatically have Apache check to see if a directory exists for the virtual host, and if not, look for the host name with "www." in front of it? Other subdomains are fine (i.e. abc.domain.com should point to a diff. directory than def.domain.com) but the whole "www" issue is a mystery to me. I am using dynamic mass virtual hosts so the server does not have to restart after each registration for the application. If there is a different way that is fine as long as apache isn't restarted each time. How can I accomplish this? Worst case scenario if there were a way to redirect to a "default" location on the server if not found I could always do a check via PHP or something but I feel like that is a bit hacked together and there has to be a more efficient way. Thanks in advance!

    Read the article

  • Can I have both Windows dynamic disk partition and some other non-Windows partition on the same disk?

    - by haimg
    When a basic Windows disk is converted to dynamic, Windows creates a partition that span the whole disk with the type of "Windows LVM" and manages its dynamic partitions within this space. So even if there is still free space on this disk, it is not visible to any other OS besides Windows. This happens with MBR and GPT disks both. I would like to share a Windows dynamic disk with some other OS. I have to have dynamic disks because I use Windows SoftRaid (mirrors). So, my questions are: Is there any way to "force" Windows to take up less then the whole disk when it converts a basic disk to dynamic? Will Windows tolerate having some other non-Windows partition on its dynamic disk?

    Read the article

  • Can't activate dynamic disk

    - by SuperFurryToad
    For some reason I can't activate a dynamic disk connected to my PC via a USB hard disk enclosure. It has activated previously without any problems. When I check the event logs, I get this message every time I try to activate the disk: dmio: Harddisk2 write error at block 2930277167: status 0xc0000015

    Read the article

  • Dynamic DNS with Comcast

    - by colithium
    I've just recently moved across town. Previously, I had Dynamic DNS set up so I could remotely connect to my desktop (primarily to use TightVNC). My ISP was Comcast and I'm in the Denver, Colorado area. Currently, I'm still with Comcast and still in Denver. My router connects to the internet just fine and my Dynamic DNS record over at DynDNS did get updated with my router's current external IP address. So my router, DynDNS, and public DNS records all agree what my IP address is. However, I can't actually connect to anything from the outside world. My trace route to Google looks something like: Tracing route to google.com [74.125.19.147] 1 3 ms 1 ms 1 ms 192.168.1.1 (this is the internal IP address of my router) 2 * * * Request timed out. 3 9 ms 8 ms 10 ms te-8-2-ur02.wheatridge.co.denver.comcast.net [68.85.221.177] 4 12 ms 12 ms 19 ms te-0-8-0-2-ar02.aurora.co.denver.comcast.net [68.86.103.97] 5 16 ms 13 ms 11 ms pos-0-3-0-0-cr01.denver.co.ibone.comcast.net [68.86.91.1] 6 28 ms 28 ms 27 ms pos-0-9-0-0-cr01.dallas.tx.ibone.comcast.net [68.86.85.174] 7 29 ms 27 ms 28 ms pos-0-1-0-0-pe01.1950stemmons.tx.ibone.comcast.net [68.86.86.94] 8 66 ms 108 ms * 75.149.231.70 9 65 ms 68 ms 93 ms 72.14.233.77 10 67 ms 66 ms 66 ms 72.14.233.111 11 67 ms 67 ms 69 ms 216.239.43.144 12 68 ms 71 ms 73 ms 209.85.249.30 13 66 ms 66 ms 68 ms nuq04s01-in-f147.1e100.net [74.125.19.147] This is what the trace route looks like from an outside source to my DynDNS domain name: traceroute to 98.245.67.65 (98.245.67.65) 1 illuminati-130 138.67.130.61 2 138.67.63.253 138.67.63.253 3 vermiculite 138.67.253.20 4 csm-ct-gw 138.67.253.244 5 138.67.253.2 138.67.253.2 6 ge-7-24-ar01.denver.co.denver.comcast.net 68.86.128.17 7 te-0-4-0-0-ar02.denver.co.denver.comcast.net 68.86.179.21 8 te-9-3-ur01.wheatridge.co.denver.comcast.net 68.86.103.18 9 * * * {Times Out} Now my guess is, whatever is sitting just beyond my router (what the modem connects to) is gumming things up. Even though the routes aren't EXACTLY the same, that appears to be the spot that the trace route either stops or doesn't get a response. My question is, for Comcast networks (particularly in Denver), what would be the device that typically sits there? Is there anything I can do about it? That device seems to not respond to PING but does forward it along when I'm going outwards. But it looks like it eats it when the request is coming in. It's hard to prove that from these logs but I'm assuming that's the case because my router used to accept connections from the outside and I haven't changed anything on it.

    Read the article

  • Dynamic Disk Start on Boot

    - by Xiuhtecuhtli
    Is there a way to make a Dynamic Disc Automatically Come on line after a reboot. at the moment i must manually Bring the disk "online". I was thinking a Startup Script would do the trick. does anyone know of a URL HOWTO or a Premade script to do this?

    Read the article

  • Using dynamic dns updater as Windows service

    - by Sami-L
    Currently I am using a dynamic dns updater software on Windows, but to keep it updating I have not to close it, also the software is not able to run at backgoud, I searched on google but the answer became complicated since there are many details to pay attention to, free, not free, installed on machine, configured on router, trusted, not trusted ... So please help me find a trusted free dns updater for Windows which can run as service, and maybe which can send email when update fails.

    Read the article

  • Recover data from a Windows Dynamic Volume Spanned Disk

    - by iCe
    I have a dynamic volume created with two spanned partitions over two disk. Recently, one disk has started failing, and I want to copy the data inside that disk to another disk, before replacing it. However I don't know how to select only what is inside the failing disk, because the partitions spans across both disks. Maybe imaging the entire disk should do the work? Or I have to copy all the data from both disks? Thanks in advance!

    Read the article

  • ASP.NET MVC: routing help

    - by pcampbell
    Consider two methods on the controller CustomerController.cs: //URL to be http://mysite/Customer/ public ActionResult Index() { return View("ListCustomers"); } //URL to be http://mysite/Customer/8 public ActionResult View(int id) { return View("ViewCustomer"); } How would you setup your routes to accommodate this requirement? How would you use Html.ActionLink when creating a link to the View page?

    Read the article

  • Routing to the actions with same names but different parameters

    - by zerkms
    I have this set of routes: routes.MapRoute( "IssueType", "issue/{type}", new { controller = "Issue", action = "Index" } ); routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults ); Here is the controller class: public class IssueController : Controller { public ActionResult Index() { // todo: redirect to concrete type return View(); } public ActionResult Index(string type) { return View(); } } why, when i request http://host/issue i get The current request for action 'Index' on controller type 'IssueController' is ambiguous between the following action methods: I expect that first one method should act when there is no parameters, and second one when some parameter specified. where did i made mistake? UPD: possible duplicate: http://stackoverflow.com/questions/436866/can-you-overload-controller-methods-in-asp-net-mvc

    Read the article

  • SQL Like keyword in Dynamic Linq

    - by Erwin
    Hi fellow programmer I want to use SQL's Like keyword in dynamic LINQ. The query that I want to make is like this select * from table_a where column_a like '%search%' Where the column_a can be dynamically changed to other column etc In this dynamic LINQ var result = db.table_a.Where( a=> (a.column_a.Contains("search")) ); But the column can't be dynamically changed , only the search key can How do we create a dynamic LINQ like var result = db.table_a.Where("column_a == \"search\""); That we can change the column and the search key dynamically

    Read the article

  • problem with routing/T4MVC Url.Action()

    - by VinnyG
    I have these 2 routes : routes.MapRoute("Agenda", ConfigurationManager.AppSettings["eventsUrl"] + "/{year}/{month}", MVC.Events.Index(), new { year = DateTime.Now.Year, month = DateTime.Now.Month }); routes.MapRoute("AgendaDetail", ConfigurationManager.AppSettings["eventsUrl"] + "/{year}/{month}/{day}", MVC.Events.Detail(), new { year = DateTime.Now.Year, month = DateTime.Now.Month, day = DateTime.Now.Day }); And it work perfectly with this code : <a href="<%= Url.Action(MVC.Events.Detail(Model.EventsModel.PreviousDay.Year, Model.EventsModel.PreviousDay.Month, Model.EventsModel.PreviousDay.Day))%>" title="<%= Model.EventsModel.PreviousDay.ToShortDateString() %>"><img src="<%= Links.Content.images.contenu.calendrier.grand.mois_precedent_png %>" alt="événement précédent" /></a> Except when I get to do the link to today, if it's today, il will point only to www.myurl.com/agenda, witch is the value of CnfigurationManager.AppSettings["eventsUrl"]. What am I doing wrong? It's like if it's today, it point bak to the default agenda... Thanks for the help!

    Read the article

  • ASP.NET Routing - load routes from database?

    - by ropstah
    Is it possible to load routes from the database with ASP.NET ? For each r as SomeRouteObject in RouteDataTable routes.MapRoute( _ r.Name, _ r.RouteUri, _ r.RouteValues, _ //?? r.Constraints _ //?? ) Next How should I store the routevalues / constraints? I understand that there are several 'default' routevalues like .Controller and .Action, however I also need entirely custom ones like .Id or .Page...

    Read the article

  • Routing generated paths in Ruby on Rails

    - by True Soft
    I'm a beginner in ruby-on-rails and I spent my last hour trying to do the following thing: I have a ruby-on-rails application - the blog with posts and categories. I want to have another URL for the posts (I would like to have http://localhost:3000/news instead of http://localhost:3000/posts) First I tried to replace the controller and classes from Posts to News, but I gave up(because of the annoyng singular-plural thing). Then in my I replaced map.resources :posts (case 1) to map.resources :news, :controller => "posts" #case 2 or map.resources :posts, :as => 'news' #case 3 in routes.rb as I saw on some websites. It doesn't work either. How can I do this? EDIT: the output of rake routes is (only first lines): for case 1 and 3: posts GET /posts {:action=>"index", :controller=>"posts"} formatted_posts GET /posts.:format {:action=>"index", :controller=>"posts"} POST /posts {:action=>"create", :controller=>"posts"} POST /posts.:format {:action=>"create", :controller=>"posts"} new_post GET /posts/new {:action=>"new", :controller=>"posts"} formatted_new_post GET /posts/new.:format {:action=>"new", :controller=>"posts"} edit_post GET /posts/:id/edit {:action=>"edit", :controller=>"posts"} formatted_edit_post GET /posts/:id/edit.:format {:action=>"edit", :controller=>"posts"} post GET /posts/:id {:action=>"show", :controller=>"posts"} formatted_post GET /posts/:id.:format {:action=>"show", :controller=>"posts"} PUT /posts/:id {:action=>"update", :controller=>"posts"} PUT /posts/:id.:format {:action=>"update", :controller=>"posts"} DELETE /posts/:id {:action=>"destroy", :controller=>"posts"} DELETE /posts/:id.:format {:action=>"destroy", :controller=>"posts"} the output for case 2: news_index GET /news {:action=>"index", :controller=>"posts"} formatted_news_index GET /news.:format {:action=>"index", :controller=>"posts"} POST /news {:action=>"create", :controller=>"posts"} POST /news.:format {:action=>"create", :controller=>"posts"} new_news GET /news/new {:action=>"new", :controller=>"posts"} formatted_new_news GET /news/new.:format {:action=>"new", :controller=>"posts"} edit_news GET /news/:id/edit {:action=>"edit", :controller=>"posts"} formatted_edit_news GET /news/:id/edit.:format {:action=>"edit", :controller=>"posts"} news GET /news/:id {:action=>"show", :controller=>"posts"} formatted_news GET /news/:id.:format {:action=>"show", :controller=>"posts"} PUT /news/:id {:action=>"update", :controller=>"posts"} PUT /news/:id.:format {:action=>"update", :controller=>"posts"} DELETE /news/:id {:action=>"destroy", :controller=>"posts"} DELETE /news/:id.:format {:action=>"destroy", :controller=>"posts"} I have errors in case 2, because in my sourcecode I don't have edit_news, I have for example <%= link_to 'Edit', edit_post_path(post) %>

    Read the article

  • Zend routing, throws resource not found

    - by bluedaniel
    Ive got a url: http://dev.local/foodies/view?id=bluedaniel and ive got in my bootstrap: protected function _initRoute() { $config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/routes.ini', 'production'); $router = new Zend_Controller_Router_Rewrite(); $router->addConfig($config, 'resources'); } and ive also got in my routes.ini: [production] resources.router.routes.foodies_view.route = ":foodies/:id" resources.router.routes.foodies_view.defaults.module = "foodies" resources.router.routes.foodies_view.defaults.controller = "view" resources.router.routes.foodies_view.defaults.action = "index" so http://dev.local/foodies/bluedaniel should work right? I get a Resource 'foodies:bluedaniel' not found error however with this setup

    Read the article

  • Basic Ruby on Rails Question about routing

    - by Acidburn2k
    I have a controller without any related model. This controller is to span some informations from various models. I have lots of actions there, which define certain views on the page. What would be the best way to organize routes for this controller. What I would like is to have /dashboard/something point to any action in the dashboard controller. Not actions like new/edit but arbitrary (showstats, etc). With trail and error I made something like this: map.dashboard 'dashboard/:action', :controller => 'dashboard', :action => :action Now it is possible to access those url using helper: dashboard_url('actionname') This approch seems to be working ok, but is this the way to go? I am not quite sure understand, how are the helper method names generated. How to generate same helper names as in basic controllers "action_controller_url" ? That would be more generic and made the code more consistent. Thanks in advance.

    Read the article

  • A function's static and dynamic parent

    - by legends2k
    I'm reading Thinking in C++ (vol. 2): Whenever a function is called, information about that function is pushed onto the runtime stack in an activation record instance (ARI), also called a stack frame. A typical stack frame contains (1) the address of the calling function (so execution can return to it), (2) a pointer to the ARI of the function’s static parent (the scope that lexically contains the called function, so variables global to the function can be accessed), and (3) a pointer to the function that called it (its dynamic parent). The path that logically results from repetitively following the dynamic parent links is the dynamic chain, or call chain I'm unable to comprehend what the author means as function's static and dynamic parent. Also am not able to differentiate between item 1, 2 or 3. They all seem to be the same. Can someone please explain this passage to me?

    Read the article

  • Getting results in a result set from dynamic SQL in Oracle

    - by msorens
    This question is similar to a couple others I have found on StackOverflow, but the differences are signficant enough to me to warrant a new question, so here it is: I want to obtain a result set from dynamic SQL in Oracle and then display it as a result set in a SqlDeveloper-like tool, just as if I had executed the dynamic SQL statement directly. This is straightforward in SQL Server, so to be concrete, here is an example from SQL Server that returns a result set in SQL Server Management Studio or Query Explorer: EXEC sp_executesql N'select * from countries' Or more properly: DECLARE @stmt nvarchar(100) SET @stmt = N'select * from countries' EXEC sp_executesql @stmt The question "How to return a resultset / cursor from a Oracle PL/SQL anonymous block that executes Dynamic SQL?" addresses the first half of the problem--executing dynamic SQL into a cursor. The question "How to make Oracle procedure return result sets" provides a similar answer. Web search has revealed many variations of the same theme, all addressing just the first half of my question. I found this post explaining how to do it in SqlDeveloper, but that uses a bit of functionality of SqlDeveloper. I am actually using a custom query tool so I need the solution to be self-contained in the SQL code. This custom query tool similarly does not have the capability to show output of print (dbms_output.put_line) statements; it only displays result sets. Here is yet one more possible avenue using 'execute immediate...bulk collect', but this example again renders the results with a loop of dbms_output.put_line statements. This link attempts to address the topic but the question never quite got answered there either. Assuming this is possible, I will add one more condition: I would like to do this without having to define a function or procedure (due to limited DB permissions). That is, I would like to execute a self-contained PL/SQL block containing dynamic SQL and return a result set in SqlDeveloper or a similar tool. So to summarize: I want to execute an arbitrary SQL statement (hence dynamic SQL). The platform is Oracle. The solution must be a PL/SQL block with no procedures or functions. The output must be generated as a canonical result set; no print statements. The output must render as a result set in SqlDeveloper without using any SqlDeveloper special functionality. Any suggestions?

    Read the article

  • Multiple Default Routes in ASP.NET MVC to different Default Actions

    - by Alex
    I have multiple controllers with different actions (no "Index" actions). The actions I consider "default" actions, are named differently. I want to create default routes for their names and have the first available action (from my list of default actions) executed if only the controller name is provided in the route. So, for example, I have the following actions which I want to consider default and want checked for their existence in a controller in this order: List() Draw() ViewSingle() The routing should somehow search for /{controller} and then take the first available action from the list above as default action, e.g.: /ControllerA -> ControllerA.List() /ControllerB -> ControllerB.Draw() /ControllerC -> ControllerC.ViewSingle() /ControllerD -> ControllerD.Draw() /ControllerE -> ControllerE.List() Is this possible? I tried creating additional Default actions like this but couldn't get it to work: routes.MapRoute("Default1", "{controller}/{action}", new { controller = UrlParameter.Optional, action = "List" } routes.MapRoute("Default2", "{controller}/{action}", new { controller = UrlParameter.Optional, action = "Draw" } routes.MapRoute("Default3", "{controller}/{action}", new { controller = UrlParameter.Optional, action = "ViewSingle" } Help?

    Read the article

  • Ruby on Rails: Routing error

    - by JamesMcL13
    I am having trouble deleting and showing user records. Here is my routes.rb FinalApp::Application.routes.draw do resources :admin devise_for :users, :controllers => { :registrations => 'admin' } resources :projects match "search" => "projects#search", :as => :search root :to => 'projects#index' end Here is my admin controller: class AdminController < ApplicationController def index @users = User.all respond_to do |format| format.html # index.html.erb format.json { render :json => @users } end end def create @user = User.new(params[:user]) respond_to do |format| if @user.save format.html { redirect_to @user, notice: 'User was successfully created.' } format.json { render json: @user, status: :created, location: @user } else format.html { render action: "new" } format.json { render json: @user.errors, status: :unprocessable_entity } end end end # GET /users/1 # GET /users/1.json def show @user = User.find(params[:id]) @user_user_id = params[:id] respond_to do |format| format.html # show.html.erb format.json { render json: @user } end end # GET /users/new # GET /users/new.json def new @user = User.new respond_to do |format| format.html # new.html.erb format.json { render json: @user } end end # GET /users/1/edit def edit @user = User.find(params[:id]) end # POST /users # POST /users.json # PUT /users/1 # PUT /users/1.json def update @user = User.find(params[:id]) respond_to do |format| if @user.update_attributes(params[:user]) format.html { redirect_to @user, notice: 'User was successfully updated.' } format.json { head :no_content } else format.html { render action: "edit" } format.json { render json: @user.errors, status: :unprocessable_entity } end end end # DELETE /users/1 # DELETE /users/1.json def destroy @user = User.find(params[:id]) @user.destroy respond_to do |format| format.html { redirect_to users_url } format.json { head :no_content } end end end Here is my view: <%= stylesheet_link_tag "admin" %> <body> <div id ="title1">Admin</div> <div class ="menu"></div> <div id ="section3"> <table id = "mytable"> <table border = "1"> <tr> <th>Username </th> <th>Email</th> <th>First Name</th> <th>Last Name</th> <th>Admin?</th> <th></th> <th></th> <th></th> </tr> <%= link_to "New User", admin_new_path %><br /> <% @users.each do |t| %> <tr> <td><%= t.username %></td> <td><%= t.email %></td> <td><%= t.firstname %></td> <td><%= t.lastname %></td> <td><%= t.admin %></td> <td><%= link_to 'Show', t %></td> <td> <%= button_to "Delete", t, method: :delete, data: { confirm: 'Are you sure?' } %></td> </tr> <% end %> </table></br> </body> </html> I can display the User database, but when I go to delete a record. I get this error No route matches [DELETE] "/users/11". I am new to rails so please remember this when trying to help. Thanks in advance. Edit: here are my routes = admin_index GET /admin(.:format) admin#index POST /admin(.:format) admin#create new_admin GET /admin/new(.:format) admin#new edit_admin GET /admin/:id/edit(.:format) admin#edit admin GET /admin/:id(.:format) admin#show PUT /admin/:id(.:format) admin#update DELETE /admin/:id(.:format) admin#destroy new_user_session GET /users/sign_in(.:format) devise/sessions#new user_session POST /users/sign_in(.:format) devise/sessions#create destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy user_password POST /users/password(.:format) devise/passwords#create new_user_password GET /users/password/new(.:format) devise/passwords#new edit_user_password GET /users/password/edit(.:format) devise/passwords#edit PUT /users/password(.:format) devise/passwords#update cancel_user_registration GET /users/cancel(.:format) admin#cancel user_registration POST /users(.:format) admin#create new_user_registration GET /users/sign_up(.:format) admin#new edit_user_registration GET /users/edit(.:format) admin#edit PUT /users(.:format) admin#update DELETE /users(.:format) admin#destroy projects GET /projects(.:format) projects#index POST /projects(.:format) projects#create new_project GET /projects/new(.:format) projects#new edit_project GET /projects/:id/edit(.:format) projects#edit project GET /projects/:id(.:format) projects#show PUT /projects/:id(.:format) projects#update DELETE /projects/:id(.:format) projects#destroy search /search(.:format) projects#search root / projects#index

    Read the article

  • Symfony routing with an API Web Service

    - by fesja
    Hi, I'm finishing the API of our web service. Now I'm thinking on how to make the route changes, so if we decide to make a new version we don't break the first API. right now: url: /api/:action param: { module: api, action: :action } requirements: sf_format: (?:xml|json) what i've thought: url: /api/v1/:module/:action param: { module: api1, action: :action } requirements: sf_format: (?:xml|json) url: /api/v2/:module/:action param: { module: api2, action: :action } requirements: sf_format: (?:xml|json) That's easy, but the perfect solution would be to have the following kind of route # Automatically redirects to one module or another url: /api/v:version/:module/:action param: { module: api:version, action: :action } requirements: sf_format: (?:xml|json) any ideas on how to do it? what do you recommend us to do? thanks!

    Read the article

  • Ruby-on-rails: routing problem: controller action looks for show when it should look for finalize

    - by cbrulak
    background: trying to use the twitter gem for ruby-on-rails. in routes: map.resources :twitter_sessions map.finalize_twitter_sessions 'twitter_sessions/finalize', :controller => 'twitter_sessions', :action => 'finalize' (twitter_sessions is the controller for the twitter sessions in my app). The view has one file new.html.erb and is very simple: <% form_tag(twitter_sessions_path) do |f| %> <p><%= submit_tag "twitter!" %></p> <% end %> and the twitter_sessions_controller.rb: def new end def create oauth.set_callback_url(finalize_twitter_sessions_url) session['rtoken'] = oauth.request_token.token session['rsecret'] = oauth.request_token.secret redirect_to oauth.request_token.authorize_url end def destroy reset_session redirect_to new_session_path end def finalize oauth.authorize_from_request(session['rtoken'], session['rsecret'], params[:oauth_verifier]) profile = Twitter::Base.new(oauth).verify_credentials session['rtoken'] = session['rsecret'] = nil session[:atoken] = oauth.access_token.token session[:asecret] = oauth.access_token.secret sign_in(profile) redirect_back_or root_path end However, after I click the "twitter" button, I get this error: 401 Unauthorized .../gems/oauth-0.3.6/lib/oauth/consumer.rb:200:in `token_request' .../gems/oauth-0.3.6/lib/oauth/consumer.rb:128:in `get_request_token' .../gems/twitter-0.9.2/lib/twitter/oauth.rb:32:in `request_token' .../gems/twitter-0.9.2/lib/twitter/oauth.rb:25:in `set_callback_url' app/controllers/twitter_sessions_controller.rb:7:in `create' If I go to the finalize url, http://localhost:3000/twitter_sessions/finalize, directly, I get this error: Unknown action No action responded to show. Actions: create, destroy, finalize, isLoggedInToBeta, login_required, and new Any ideas? Thanks

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >