similar to: Is there any documents about CGIResponse?

Displaying 20 results from an estimated 100000 matches similar to: "Is there any documents about CGIResponse?"

2007 Mar 23
11
Is there such a thing as button_to_remote?
I''ve changed my destructive link_to statements in favor of button_to. But what if I want to make an .rjs call with that button? Seems like we need something equivalent to link_to_remote, so that the button can make an ajax request instead submitting the form. Or am I missing the point entirely? Jeff --~--~---------~--~----~------------~-------~--~----~ You received this message
2006 Sep 10
11
Using partials with Markaby
I''m trying to use a partial from within Markaby. I haven''t been able to figure out how to access a parameter passed into the partial. Here''s the code I''m using: h1 "Create a new note" if @note render :partial => ''form/errors'', :record => @note end ... (that snippet, as well as the partial is stolen shamelessly from Restolog
2006 Oct 04
7
Enterprise Software is all about wizards
Would any one else say that enterprise systems (+150 tables) are mainly consisted of wizards. The flow in the software from screen to screen is looselt based on how the business flows, and is required to be very structured. From screen to screen the options available to the user are very limited. There is not much freedom and the user is not overwhelmed with options. Complex applications
2007 Jan 25
2
render .rhtmlx if present, otherwise render .rhtml
We have a product where our customer is "allowed" to make minor changes to the .rhtml views. Obviously, this can be an issue when updating the software, as changes need to be merged in. Also, sometimes the customer wants to back out there change but no longer has the original file. SOOO.... I''d like to tell them - if you want to change a .rhtml file - just copy it to
2008 Sep 24
5
Auto refresh field
Hi, I would to know if it is possible to automaticly refresh some particular field ? Clearly, I have a model called "productions" with fileds "name" and "numbers". Another application update fields "numbers" of the mysql table. On an "index.html.erb", I have the list of "production" and i would like to view automaticly when value of
2007 Dec 05
4
render :update and controller private methods
Probably asked and answered, but... Why are controller private methods inaccessible inside the block passed to render :update ? This does not work: class MyController < ApplicationController def some_action render :update do |page| page.replace_html ''an_element'', some_private_method end end private def some_private_method return
2009 Jan 04
3
Missing Template with edge Rails (2.3)
After freezing edge rails, all my controller examples are failing with MissingTemplate errors. e.g., "Missing template attachments/create.erb in view path app/views" Trying to actually render the views gives me the same error. I noticed I can fix most of them by using respond_do but I usually never use it. I almost always only need to respond to one format in one action so I omit
2008 Feb 27
2
observe_field not generating any script
Hi - I have a view: <% content_for(:page) do %> <h1>New user</h1> <% form_for :user, @user, :url => { :action => "create" } do |form| %> <%= render :partial => ''form'', :locals => { :form => form, :genders => @genders} %> <%= submit_tag "Create" %> <%end%> <%
2008 Mar 17
9
Render index view and RJS on load?
Hi, I''ve searched for a while online and been unable to find anything concerning this. I have a controller with an index action, which has an index view. This view renders the index page but also needs to execute some javascript to show some data (using effects) when the page loads. I thought I could just create the view and RJS with the same name and the RJS would be run after the
2007 Dec 02
3
Better way for select list for belongs_to?
I''m currently doing all of this just to have a drop-down list of Courses for a particular student: ===== edit template ===== <%= f.select :course, @courses, :selected => @student.course.id %> =================== ===== students controller ===== def edit @student = Student.find(params[:id]) @page_title = "Edit #{@student.full_name}" @courses =
2011 Jan 25
3
How to fasten btrfs?
Hi, I am using 2.6.36.3 kernel with btrfs, 512MB memory and a very slow disk, no special options for mounting btrfs except noatime. Now I found it very slow. When I rm a 5GB movie, it took 20 secs. -- 竹密岂妨流水过 山高哪阻野云飞 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at
2009 Jan 20
4
Shared templates across controllers
Hey all, Here''s my situation: I have a pair of controllers with associated models (called Services and Testimonials) that are quite similar. Because their CRUD behavior is executed via AJAX, the "templates" for the actions are all short .rjs files. Now, because of the similarity of the models, most of the templates are exactly the same, with only the object names changed. That
2007 Sep 22
2
Dynamic view - is it possible at all?
I have the following question. It sounds weird, but still. We all have app/views/say.rhtml or any other template for the view. It can include of course instructions in <% %> So the question is next -- is it possible to use .rhtml as a view which we just uploaded? I.e. user uploads his own .rhtml, controller saves it in the database, and shows the view using it. Is it possible at all?
2007 May 03
2
Multiple Update Actions that are Relatively the same
Hi there, I have 2 actions that are rather identical: # Put /account/you/update_password def update_password @user = current :user respond_to do |format| if @user.update_attributes(params[:user]) format.html {redirect_to account_url} else format.html {render :action => "edit_password"} end end end # PUT /account/you # Update
2007 Oct 12
13
How to maintain Form State between Postback ?
Hi all, I''ve trying to look for answers for my problem but so far couldn''t find one, hopefully you can tell me what to do. This problem is so ubiquitous to Web Development, pertaining the fact that the web is stateless, i.e. how to maintain form''s state between postback. Basically, I have a form with some validations run for some of the fields, whenever the user submit
2007 May 14
6
ActiveResource and RESful edit
Hi I''d like to know how to have ActiveResource generate a URL for the /teams/1/edit type of resource. I''ve got custom_methods.rb and have used Team.find(1).get(:edit) This generates http://localhost:xxxx/teams/1/edit.xml But all I get returned is a hash of the attributes (in this case of team 1), rather than an object of team 1. In other words the
2007 Dec 22
3
collection_select validation problem
I''m trying to assign a parent foreign key value using collection_select from my child "new" form. The problem I''m having is if I do not make a selection, I get the following error instead of the Rails validates_presence_of error: You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occurred while evaluating
2008 Feb 28
2
redirect_to or render
Hey, a newbie here. Can someone please give me a brief explanation whats the difference between the redirect_to method and the render method and when should I use one instead of the other ? thnx alot ! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send
2009 Mar 01
15
Ajax in Rails
Hi All, New to the group, and new to learning rails. I''m having some trouble, i''ve done a few tutorials on creating some small apps with rails and am now starting to play around myself. I''ve been trying to create a simple form which when a user enters any data that data is displayed as a preview elsewhere on the page instantly, just like when creating an advert with
2007 Nov 04
4
Hidden URL
Hello, I have in my application a private public URL. For those who know Flickr, it is sorta like the URL you give to your friend for them to access your photos. Usually the URL looks like this: http://www.domain.com/url/khjuytf678ysdfksdgihsd Where "khjuytf678ysdfksdgihsd" is an encoded path. Let say I want to have a public-private page for: