Displaying 20 results from an estimated 80 matches similar to: "New AJAX function: remote_replace_with_partial() <-- write less code"
2007 Nov 14
1
has_many_polymorphs and acts_as_list ?
First, BRAVO for this wonderful plugin: has_many_polymorphs ! Now my
problem:
4 models : Collection, Page, Fragment, Belonging (which is the join
table):
1 class Collection <
ActiveRecord::Base
2 has_many_polymorphs :elements,
3 :through => :belongings,
4 :from => [:pages, :fragments, :collections],
5 :as => :collector,
6 :parent_order =>
2010 Jul 15
2
Can partials be accessed from two views?
For me to keep my application DRY i need to be able to have partials
that can be accessed from two views. How is would I go about doing this?
Many thanks,
jakx12
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2010 Sep 07
2
Caching
What is the best way to set up caching when GET parameters are
involved? For example I don''t want both /index and /index?
tags=example to be cached as index.html. Does that make sense?
Thanks,
Tom
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2010 Jan 20
0
putting labels back on a matrix.
I did not post this question to the ecology list, even though it is about an analysis using Vegan, since my question is based more on basic data manipulation in R. I think this is a fairly simple question but for the life of me I cannot find a reference for in the archives.
I have an analysis using a matrix in which I needed to strip the ID variable off the input data to run the analysis. Now I
2006 Apr 07
2
Re: Re: page.replace_html "#{var_containing_id_name}", :partial
> you mean like this?
>
> def do_some_ajax_thing
> <at> element_id = "content_div"
> end
>
> do_some_ajax_thing.rjs
>
> page.replace_html <at> element_id, :partial => "edit"
>
> remember, the view templates have access to the attributes defined
> in the controller
Actually, its more like this: I have a list page. Each row
2006 Jun 24
6
Ajax fade effect
I have a list of categories, when I delete one of them, I want that item
to fade and then get removed. So I do the following:
1. home_controller:
def delete
@category = Category.find_by_name(params[:name])
@element_id = @category.name
Category.delete_all(["name = ?", @category.name])
end
2. delete.rjs:
if @element_id
page.visual_effect :fade, @element_id
2006 Jun 19
10
Trying to delete from a unordered list using ajax
I have a controller method as such:
def delete
@category = Category.find_by_name(params[:name])
@element_id = @category.name
Category.delete_all(["name = ?", @category.name])
end
(For the purpose of this exercise, category names are unique)
I have the corresponding delete.rjs file:
if @element_id
page.remove :id => @element_id
page.visual_effect :highlight,
2006 Mar 24
1
Multiple table relationships
Hello,
I''m just starting out with some Rails development and have the following
table structure. I understand how to do a two table has many join but I
actually need to relate a third table. Here is my structure:
components
id
name
updated_at
elements
id
name
updated_at
element_types
id
name
updated_at
components_elements
component_id
element_id
2006 Jan 25
2
Using ''GET''-method in Forms
Hi all,
I''m using a selection-list / dropdown-list to choose an element in a number
of grouped elements. Is there a way of passing an element_id to the form AND
using the HTTP-''get''-method? I found that the <% start_tag %> has a
:method-switch as an option, but it passes the arguments on like
"/controller/action/?action=1". I would need something like
2006 Jan 02
3
best to integrate dynamic navbar into layout
I''ve been trying to come up with a good way to integrate a dynamic
navbar into my layout. By dynamic, I meas that each link has 3 images.
Normal, rollover, and dark for the current page. I have it working but
it seems like there should be a better way. Here is how I did it,
please let me know if there is a better way. Rails makes so many things
simple, that this seems very
2009 Jun 03
1
NOOBE help
I know, I should not have to ask this question, but it appears that ALL
my previous yum.repos.d entries have been trashed, with the only ones
left is base, CentOS Media then the mirrors.rpmforge.reo,
rhel-mondo.repo, rpmforge.repo, and webmin.repo.
I've been bitten by the mixing of repositories before and want to avoid
that scenario. Something is amok in the existing, and it throws all
2010 Feb 05
5
White screen after some time in WoW
My problem:
After some time playing WoW (about 1-2 minutes) the whole screen turns white. Everything else seems to work perfectly, I still have sound and I still can interact with my character. I can even open a terminal (blindfolded) and type 'killall WoW.exe' to quit WoW and make the white screen go away.
wine --version outputs 'wine-1.1.37'
I use the propiertary nVidia drivers
2013 May 12
10
Capybara with redirect
I am having an issue where a feature works fine but the corresponding
test fails, and I can''t understand why.
I created a mock application to demonstrate the problem.
https://github.com/assafshomer/clear_button
All it does is show an input form with a clear button. The clearing
happens by redirecting back to the same form. It does clear it when you
run the app, but the test for it
2006 May 20
7
Polymorphic, many-to-many, self-referential data model
No matter what I try I''ve been unable to work how to get this to work with
the cool ActiveRecord helpers. I''m not sure if it''s possible, Josh Susser''s
blog suggests it is, but damned if I can work it out...
I have:
Container which can contain one or more Element. An Element is a polymorph
of either a Container or a Chunk. An Element can exist in one or more
2009 May 08
0
Wine release 1.1.21
The Wine development release 1.1.21 is now available.
What's new in this release (see below for details):
- Beginnings of shader model 4 support.
- Support for copying/pasting images from X11 applications.
- A number of GDIPlus improvements.
- Various listview fixes.
- 64-bit support in winemaker.
- Support for building on Mac OS X Snow Leopard.
- Various bug fixes.
The source
2013 Feb 07
12
[PATCH 01/12] generator: Add new Mountable argument type
This type is initially identical to Device.
---
generator/bindtests.ml | 2 +-
generator/c.ml | 7 +++++--
generator/csharp.ml | 6 ++++--
generator/daemon.ml | 4 ++--
generator/erlang.ml | 6 +++---
generator/fish.ml | 8 ++++----
generator/gobject.ml | 11 ++++++-----
generator/haskell.ml | 11 +++++++----
generator/java.ml | 10 +++++-----
2012 Jan 09
1
[PATCH 1/2] generator: Rename java_structs to camel_structs to better reflect their purpose
This map was originally included just for the java bindings, but is generally
useful to any binding which uses camel case by requirement or convention.
---
generator/generator_haskell.ml | 4 ++--
generator/generator_java.ml | 10 +++++-----
generator/generator_main.ml | 2 +-
generator/generator_structs.ml | 12 +++++-------
generator/generator_structs.mli | 8 ++++----
5
2013 Jan 24
3
[REVIEW ONLY] Mountable patches
These 3 patches implement support for APIs which must accept a mountable, but
don't update apis which must return mountables.
Matt
2012 Aug 14
7
[PATCH 0/7] Add tar compress, numericowner, excludes flags.
https://bugzilla.redhat.com/show_bug.cgi?id=847880
https://bugzilla.redhat.com/show_bug.cgi?id=847881
This patch series adds various optional arguments to the tar-in and
tar-out commands.
Firstly (1/7) an optional "compress" flag is added to select
compression. This makes the calls tgz-in/tgz-out/txz-in/txz-out
deprecated, and expands the range of compression types available.
2017 Apr 21
0
[PATCH 1/2] generator: Simplify the handling of string parameters.
Previously we had lots of types like String, Device, StringList,
DeviceList, etc. where Device was just a String with magical
properties (but only inside the daemon), and DeviceList was just a
list of Device strings.
Replace these with some simple top-level types:
String
StringList
and move the magic into a subtype.
The change is mechanical, for example:
old