Search Results

Search found 1906 results on 77 pages for 'confirm'.

Page 19/77 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • Associated models in Rails?

    - by dannymcc
    Hi Everyone, In my rails application I have two models called Kases and Notes. They work in the same way comments do with blog posts, I.e. each Kase entry can have multiple notes attached to it. I have got everything working, but for some reason I cannot get the destroy link to work for the Notes. I think I am overlooking something that is different with associated models to standard models. Notes Controller class NotesController < ApplicationController # POST /notes # POST /notes.xml def create @kase = Kase.find(params[:kase_id]) @note = @kase.notes.create!(params[:note]) respond_to do |format| format.html { redirect_to @kase } format.js end end end Kase Model class Kase < ActiveRecord::Base validates_presence_of :jobno has_many :notes Note Model class Note < ActiveRecord::Base belongs_to :kase end In the Kase show view I call a partial within /notes called _notes.html.erb: Kase Show View <div id="notes"> <h2>Notes</h2> <%= render :partial => @kase.notes %> <% form_for [@kase, Note.new] do |f| %> <p> <h3>Add a new note</h3> <%= f.text_field :body %><%= f.submit "Add Note" %> </p> <% end %> </div> /notes/_note.html.erb <% div_for note do %> <div id="sub-notes"> <p> <%= h(note.body) %><br /> <span style="font-size:smaller">Created <%= time_ago_in_words(note.created_at) %> ago on <%= note.created_at %></span> </p> <%= link_to "Remove Note", kase_path(@kase), :confirm => 'Are you sure?', :method => :delete, :class => 'important' %> </div> <% end %> As you can see, I have a Remove Note destroy link, but that destroys the entire Kase the note is associated with. How do I make the destroy link remove only the note? <%= link_to "Remove Note", kase_path(@kase), :confirm => 'Are you sure?', :method => :delete, :class => 'important' %> Any help would, as always, be greatly appreciated! Thanks, Danny

    Read the article

  • Matplotlib: plotting discrete values

    - by Arkapravo
    I am trying to plot the following ! from numpy import * from pylab import * import random for x in range(1,500): y = random.randint(1,25000) print(x,y) plot(x,y) show() However, I keep getting a blank graph (?). Just to make sure that the program logic is correct I added the code print(x,y), just the confirm that (x,y) pairs are being generated. (x,y) pairs are being generated, but there is no plot, I keep getting a blank graph. Any help ?

    Read the article

  • [Iphone-Dev] Assigning values : difference between properties and class variables ?

    - by gotye
    Hey guys, I noticed that I rarely use properties, due to the fact that I rarely need to access my object's variables outside my class ;) So I usually do : NSMutableArray *myArray; // not a property ! My question is : even if i don't declare myArray as a property, does iphone make a retain anyway if I do myArray = arrayPassedToMe; I think so but I just wanted to confirm ;) Any thoughts welcome ! Gotye

    Read the article

  • How to read attachment messages without using scriptlets in JSP?

    - by Stardust
    Hi, I want to know how can I read attachment messages without using scriplets in JSP? After getting Message object as an attribute by using request object from servlets, how can I confirm whether Message content is an instance of Multipart or not without using scriplets like: if(message.getContent() instanceOf Multipart) How can I read the content of any file by using EL in JSP? As I can't see any getRead method in inputStream subclass.

    Read the article

  • Does IBM WebSphere MQ support a 64 bit client on windows?

    - by orpeles
    Title says it all :) No, seriously, I'm porting a C++ 32 bit application to 64 bit on windows. The application is a client of IBM WebSphere MQ. It uses the MQ client API. Now, as the port progresses, I'm trying to find a 64 bit client. So far, no luck. Does anyone here happen to know if where I can find one, or, god forbid, confirm that there isn't one? Regards, Or

    Read the article

  • Console.Write Not Working

    - by Steven
    I created a VB.NET Windows Forms Application in Visual Studio 2008. When I run my program from the command-line, I get no output (only the next prompt). Why? Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Debug.Write("Foo") Debug.Flush() Console.WriteLine("foo") Console.Beep(800, 100) 'confirm this function is called' Me.Close() End Sub

    Read the article

  • Javascript disabling my postback

    - by LoveMeSomeCode
    I have an ASP.NET checkbox, and I want to run some javascript before it posts back. Something like: <asp:CheckBox ID="chkSelected" runat="server" AutoPostBack="True" OnCheckedChanged="chkSelected_CheckedChanged" /> but I want to run a JS confirm dialog when the user click it, and if they were UNCHECKING it, I'd like to ask them if they're sure, and if so, postback and run my serverside code. If they say No, don't postback at all. Anyone know of an 'easy' way to do this?

    Read the article

  • CakePHP auth component password inconsistency

    - by teepusink
    Hi, I managed to get authentication to work by following the tutorial from this page http://planetcakephp.org/aggregator/items/2604-create-simple-user-authentication-using-cakephp%E2%80%99s-auth-component How do I make sure when I'm in the register page, and the password and confirm password the user supplied doesn't match, the password field will be repopulated with the value the user enter and not the hashed version of it? Thanks, Tee

    Read the article

  • What does BizSpark currently offer?

    - by chobo2
    I am looking at bizspark but the page with the software seems outdated. I am wondering if anyone has a current list or can confirm if that is the current list. http://www.bizspark.com/v2/Programs/Pages/BizSpark_Software_and_Tools.aspx Like it still say you get Vs 2008? How about 2010? What version of 2010? How many licenses?

    Read the article

  • Delete Amazon S3 buckets?

    - by Kyle Cronin
    I've been interacting with Amazon S3 through S3Fox and I can't seem to delete my buckets. I select a bucket, hit delete, confirm the delete in a popup, and... nothing happens. Is there another tool that I should use?

    Read the article

  • [N]Hibernate Sessions

    - by Jaimal Chohan
    A silly question, perhaps, but at this time of night, StackOverFlow is my only friend. I'm playing with NHibernate and wanted to factualize these 2 statements regarding Sessions in web applications. 1) You should only ever have 1 ISessionFactory per database for the lifecycle of an application. 2) You should only have 1 ISession per HttpRequest or batch of HttpRequests (i.e. conversation) [I don't want tool or framework recommendation, just want to confirm the above]

    Read the article

  • Multi-line regex support in Vim

    - by Daniel
    I notice the standard regex syntax for matching across multiple lines is to use /s, like so: This is\nsome text /This.*text/s This works in Perl for instance but doesn't seem to be supported in Vim. Instead, I have to be much more specific: /This[^\r\n]*[\r\n]*text/ I can't find any reason for why this should be, so I'm thinking I probably just missed the relevant bits in the vim help. Can anyone confirm this behaviour one way or the other?

    Read the article

  • ISAPI_Rewrite: Zend PHP Framework project setup

    - by Yaw Reuben
    How do I go about getting the isapi_rewrite working on IIS 6.0? My shared hosting account supports ISAPI_Rewrite - I've run the provided tests to confirm. I'm only able to access the index page of my Zend PHP project, but get the 404 error for other actions in my index controller class definition. I've basically placed the code: [ISAPI_Rewrite] RepeatLimit 20 RewriteRule (?!\.(js|ico|gif|jpg|png|css|swf))$ index.php in an httpd.ini access file in my wwwroot directory. Is there anything I'm missing?

    Read the article

  • Linux Scheduling Mechanism in 2.6.22?

    - by Mazen
    Hello, I'm doing some kind of performance evaluation using two different vanilla Linux kernels, 2.6.22 and 2.6.31, since I assume each of them uses a different scheduling mechanism: 2.6.22 uses the old O(1) scheduler, whilst 2.6.31 adopts the CFS. Could anybody confirm the correction of this assumption?

    Read the article

  • JavaScript - Cross Site Scripting - Permission Denied

    - by Villager
    Hello, I have a web application for which I am trying to use Twitter's OAuth functionality. This application has a link that prompts a user for their Twitter credentials. When a user clicks this link, a new window is opened via JavaScript. This window serves as a dialog. This is accomplished like such: MainPage: <div id="promptDiv"><a href="#" onclick="launchDialog('twitter/prompt.aspx');">Provide Credentials</a></div> ... function launchDialog(url) { var specs = "location=0,menubar=0,status=0,titlebar=0,toolbar=0"; var dialogWindow = window.open(url, "dialog", specs, true); } When a user clicks the link, they are redirected to Twitter's site from the prompt.aspx page. On the Twitter site, the user has the option to enter their Twitter credentials. When they have provided their credentials, they are redirected back to my site. This is accomplished through a callback url which can be set for applications on Twitter's site. When the callback happens, the user is redirected to "/twitter/confirm.aspx" on my site in the dialog window. When this happens I want to update the contents of "promptDiv" to say "You have successfully connected with Twitter" to replace the link and close the dialog. This serves the purpose of notifying the user they have successfully completed this step. I can successfully close the dialog window. However, when I am try to update the HTML DOM, I receive an error that says "Error: Permission denied to get property Window.document". In an attempt to update the HTML DOM, I tried using the following script in "/twitter/confirm.aspx": // Error is thrown on the first line. var confirmDiv = window.opener.document.getElementById("confirmDiv"); if (confirmDiv != null) { // Update the contents } window.close(); I then just tried to read the HTML to see if I could even access the DOM via the following script: alert(window.opener.document.body.innerHTML); When I attempted this, I still got a "Permission denied" error. I know this has something to do with cross-site scripting. However, I do not know how to resolve it. How do I fix this problem? Am I structuring my application incorrectly? How do I update the HTML DOM after a user has been redirected back to my site? Thank you for your help!

    Read the article

  • Mysql regexp performance question

    - by Tim
    Rumour has it that this; SELECT * FROM lineage_string where lineage like '%179%' and lineage regexp '(^|/)179(/|$)' Would be faster than this; SELECT * FROM lineage_string where lineage regexp '(^|/)179(/|$)' Can anyone confirm ? Or know a decent way to test the speed of such queries. Thanks

    Read the article

  • pointer is always byte aligned

    - by kumar
    Hi, I read something like pointer must be byte-aligned. My understanding in a typical 32bit architecture... all pointers are byte aligned...No ? Please confirm. can there be a pointer which is not byte-aligned ?

    Read the article

  • Mixing libraries with and without RTTI with GCC on Mac OS X?

    - by Steve the Plant
    I've been banging my head on an issue and before I continue injuring myself some more, I'd like to confirm: Is it possible to have a GCC project that uses libraries that are compiled with and without RTTI? So, for example, I have project A (compiled without RTTI) that uses library B (compiled with RTTI) and library C (compiled without RTTI). In theory, is all that supposed to compile and link with no problems?

    Read the article

  • how to place a file in application sand box in iphone

    - by surajbaba
    Is there any way of placing a file into application "sandbox" i.e into eg: /var/mobile/Applications/30B51836-D2DD-43AA-BCB4-9D4DADFED6A2/Documents of iphone? My Application expects a file to be put into /Documents folder of application so that it can be uploaded to my local server. This method should confirm to the rules of Apple so that it should not be rejected.

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >