Displaying 20 results from an estimated 60000 matches similar to: "no layout in xmlHttpRequest in Rails2.2"
2008 Sep 10
5
xmlhttprequest for updating
Hello,
I am updating an object with an AJAX form:
view:
<% remote_form_for(@sample, :update => "content2") do %>
<p>
parameter: <br />
<%= select("sample","parameter",Parameter.find(:all).collect {|p|
[p.description.gsub(''_'', '' ''),p.id]},{},{:size => 4, :multiple =>
true}) %>
2008 Aug 30
5
make layout false
Hi
i am having lot of HTML files those files dont want layouts so, for
each rhtml i am mentioning in controller list.rhtml,edit.rhtml
def list
render :layout=>false
end
def edit
render :layout=>false
end
is any simple method to mention wat are the files dont want layout in
one line..
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
2007 Dec 15
2
Reading Model data before update
Hi all,
here is the challenge:
I have this validation method, that basically prevents an object which
billed = true to be updated:
def before_update
if read_attribute(:billed)
errors.add_to_base(''This service has already been billed for'')
end
!read_attribute(:billed)
end
The above code does not work in case I do something like:
object =
2006 Dec 17
1
Markaby template & layout (can't get them to work together)
Hi all,
I am starting a new rails app with the Markaby plugin (had some issues
installing, but think its working).
First, i created an index.mab file for a controller containing:
h1 "First template"
That rendered fine. Also, I do not have a "def index ..." in the
controller.
Then I created an app/layouts/application.mab file. It didn''t get picked
up until after
2009 Jul 24
6
Routes from raw js (using XMLHttpRequest)
I am making an ajax call from js to call a method (assocboxchange) in
my controller (AssociatesController), using XMLHttpRequest. I know
the XMLHttpRequest works fine because I use it in other places with
success. My problem is my URL I am using for this request doesn;t
access the method in my controller which I (think) I am specifying. I
am having it post to /channels/assocboxchange/" with
2008 May 26
0
how to get the data type of a variable?
Hi all:
I''m importing a csv file which I need to check if a particular column is
a valid dollar amount (doest need to have the $ sign)
What I have is
if parsed[column5].class.to_s = Float
But this class method is actually giving me "CSV::Cell"
Would anyone be able to give me a hand on this?
Thanks
grace
--
Posted via http://www.ruby-forum.com/.
2007 Aug 31
2
dynamic layouts from DB
Hello,
I''m trying to get layouts from the database and use it as layout, but
its not working as excepted, it always try to find something from the
layout director
views/layouts/ ___ .rhtml
Even the below code render it as HTML and not ruby code
@layout = Layout.find(:first)
@test = "test"
render :text = @layout.html
Result:
joiasd jioasd ijoaidsoj ajiod <%= @test %>
2005 Dec 21
5
ajax - multiple updates on single xmlhttprequest
Hello,
I was wondering whether anybody would share a working example of a multiple
html update on a single xmlhttprequest.
Thank you in advance for your help.
_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how to
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement
2006 Apr 10
0
302 Redirect + XMLHttpRequest = ARGH!!1
I''ve looked at various sources for how to handle 302 redirects but they
all seem to be fundamentally flawed, ie don''t work at all. I''ve writted
a much more verbose writeup of my problems on my blog and rather than
repeat that here just go there.
http://height1percent.com/articles/2006/04/10/http-302-redirects-xmlhttprequests-argh-1
Thanks
--
Posted via
2006 Nov 04
0
Re: Tutorial about XMLHttpRequest+Rails
this is an old post, but I just wondered if the tutorial is still available anywhere, I would be interested.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060823/60556f75/attachment-0001.html
2005 Oct 18
3
Ajax.Request / XmlHttpRequest details
Does anyone know a good reference for the various statuses that
XmlHttpRequest''s readyState property can have? I mean, I know what
the states are, but I''m unclear on the circumstances under which each
occurs...
In a simple test I wrote, I''m seeing the loaded, interactive and
complete states (i.e. my Ajax.Request instance calls its onLoaded,
onInteractive and
2007 Nov 01
1
How to pass data from a view to a partial rendered in a layout?
In the application I''m working on, a layout renders a partial that
displays a breadcrumb navigation bar across the top of a page. In
other words, the layout renders a partial that displays breadcrumbs.
But the navigation bar rendered by a partial in a layout needs to use
data from the view to determine which breadcrumbs to display.
My question is: how can data be passed from a view to
2005 Mar 06
8
Tutorial about XMLHttpRequest+Rails
Hi All
I just finished writing up a tutorial relating my experience
developing a system to edit line-items ''in-line'' in my Rails
application using XMLHttpRequest. I thought this might be of interest
to some readers of this list... Check it out at
http://hieraki.goodlad.ca/read/book/1
Thanks!
Dave
--
Dave Goodlad
dgoodlad-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org or
2007 Jul 24
1
Popup Content Without Application Layout
I am building a page that uses ThickBox
(http://jquery.com/demo/thickbox/) to display details about a record. A
user clicks a link on the page and a ThickBox pops up showing the record
as HTML. Unfortunately since I have an overall layout setup in my
application layout, that HTML is showing in the small popup box and it
doesn''t match.
How do I remove the added layout for just this
2008 Jan 31
1
Layout appears three times!
Hey guys,
I am developing an application for my university and I''m having
problems with the way it''s getting rendered. I configured the main
controller to use a layout called "unet-main" and when it displays on
my local machine it works great, but when I upload it to my dedicated
server and try to view it the layout repeat itself three times
downwards.
My dedicated
2006 Nov 07
0
rxml template accidentally rendered within html layout
Hi,
I have the following in my controller:
def show
@quest = Quest.find(params[:id])
respond_to do |format|
format.html
format.xml
end
end
And in my routes:
map.resources :quests
I have two views for this action, quests/show.rhtml and
quests/show.rxml. Now what I would expect as a response to
''/quests/1.xml'' is that Rails sends, as XML, the rendered rxml
2008 Dec 18
2
Render a view from console
Hello!
In my application I''m trying to render a view from a class in /lib
folder. I have found that it''s very similar to render a view from
console. So, I have tried different methods:
>> string = ActionView::Base.new.render( :inline => ''works'', :layout => false )
=> "works"
>> string = ActionView::Base.new.render( :template =>
2008 Mar 17
6
REPOST: fallback layout mechanism
Sorry for reposting but as I got no reply so far so I am just coming
to try my luck again.
I am doing a multi-lingual website which might have several layout
pages (language dependent)available. I want to do a mechanism to fall
back from one language to another default language if such layout
file
is missing. Any chance I can do an is_exist check on the layout? With
my current code I really want
2009 Apr 27
5
ruby jasper report
Hi,
I am trying to create a pdf using ruby jasper.
For this I am referring this url:-
http://oldwiki.rubyonrails.org/rails/pages/howtointegratejasperreports
I have done everything whatever is in that link.
Still I am not able to get the pdf. I am not getting any error in log
file. My log file is:-
"Processing AccountController#customer_report (for 127.0.0.1 at
2009-04-27 13:19:34) [GET]
2008 Apr 20
1
Why is respond_to always rending the RXML view?
I''m having a problem in Rails 2 where respond_to is always rendering the
RXML view even in the HTML rendering response. Can anyone tell me why
this might be happening? Here''s a code snippet:
respond_to do |accepts|
accepts.html
accepts.xml { render :action => ''show.rxml'', :layout => false}
end
If I change this to the following it works fine: