similar to: Unexpected attribute modification

Displaying 20 results from an estimated 5000 matches similar to: "Unexpected attribute modification"

2006 May 25
0
Double Render Error...
I''ve been fighting with a Double Render Error. I have some sidebar partials that I render to strings in my application controller''s before_filter: @left_sidebar_for_layout = render_to_string(:partial => ''shared/left_sidebar'') Then in my application layout, I simply add them as a string, like I would @content_for_layout This normally works fine. However,
2006 Mar 17
2
How to let the layout be more OO?
I am confused about the @content_for_layout.''cause it will display all the views in the layout.Do I have any methods to let the layout be more OO? I mean that for example,the app currently have more than one views to be displayed,but only some of them to be displayed at the same time at different <div></div> units. I hope there exists a kind of way that: <%= if
2006 Apr 18
2
link_to_function onmousedown
Hi, Is there some way to produce an anchor that looks like the following using helpers, or should I just code it in the rhtml like this? <a href="#" onmousedown="javascript:foo(); return false"> Thanks, Brad -- Bradley Mazurek
2006 May 24
1
How to marshal Javascript data?
I''m trying to marshal some information I have in Javascript, and send it over an AJAX request to the server, specifically to be stored in a model on the server side. I have some Javascript routines I wrote that gather information about the user selection. I see that the link_to_remote has a :before option in which I can write Javascript to collect what I need, but right now I''m
2006 Apr 04
1
Manipulating has_many :through associations
Hi, I haven''t done any associations before, so please forgive my incorrect use of terminology... If I set up a has_many :through association, can I manipulate the associated instances directly (like an Array), or do I need to manipulate the join model? For example, suppose I have two classes and the associated join model: class foo has_many :foo_bars has_many :bars, :through
2006 Mar 08
1
Components calling components...
Hi, I''m relatively new to ruby and rails. I would like to have a sidebar component call one of several other constituent components. I''ve run into some problems, and so I''ve pruned things back to a relatively simple case. I have a sidebar component. Renders great. In it''s layout, I call render_component for another component I would like in the sidebar.
2006 Jun 09
8
Installation on OSX...
Hi, Just got my first Mac. I''m trying to install rails on it, using the instructions in the rails wiki: http://wiki.rubyonrails.com/rails/pages/HowtoInstallOnOSXTigerUsingDarwinPorts I go to install mysql, and the version of mysql supported by DarwinPorts appears to be 4.1.18. But all the sites appear to only have 4.1.19 or 4.1.20. So it looks like DarwinPorts is over a month out
2006 Mar 08
0
Can components call components?
Is a component supposed to be able to call another component (which presumably could call another component)? Brad -- Bradley Mazurek
2006 Mar 16
0
Conflicting Attributes in Model and Join Table...
Hi all, I''ve got a Post and User classes. The Post has a user_id attribute to point to the user that created it. I want to implement favorites, so I made Post and User both "has_and_belongs_to_many" and created a favorites join table. The join table has a post_id and a user_id column. Now when I get my post everything seems to be okay, but in some contexts, the user_id
2006 Sep 29
2
ApplicationHelper is not a parent of SomeHelper?
i have: # file application_helper.rb module ApplicationHelper def load_components @right_sidebar = ''some stuffs'' end end # file user_public/blog_helper.rb module UserPublic::BlogHelper def load_components ApplicationHelper.load_components @right_sidebar += ''{blog archive}'' end end the problem is, i want to load the
2006 Sep 14
1
digits in summary.default
Dear all, the number of significant digits in summary default is digits = max(3, getOption("digits") - 3) on my platform this results to be 4. The point is that if you have, say, integer data of magnitude greater than 10^3 the command summary will produce heavily rounded results. A simple example follow: > x <- c(123456,234567,345678) > x [1] 123456 234567 345678 >
2012 May 28
1
rendering a partial inside another using render_to_string and (:formats) in controller
I want to clean my code by moving the duplicated lines : partial = render_to_string( :partial => "#{file}", :formats => [:html] ) to the pagination_partials function. ================================================= WORKING CODE: ================================================= def render_format_search_partial(file, options={}) # TODO remove this line to use the one
2002 Sep 19
0
Unexpected Tag Errors - Solution
Hi all. After weeks of debugging etc. I found the problem. It would seem like its a compiler error on SCO, because in line 286 of io.c - read_unbuffered() - it declares a 'static' variable (type size_t) called 'remaining', and while the ANSI standard says that static vars are automatically initialised to zero, it would seem that this is not always the case. By explicitly
2010 Nov 04
0
Re: Train wreck getting render_to_string to work from foreign controller [SOLVED]
Just for collective knowledge as I have found no info on this problem online: I solved this by adding an .html.erb file for the "missing template", since by design or bug Rails3 will not find or render another controllers view (in my experience). Then in the new html.erb file, I just put <%= render "comparisons/display" %> because the views *are* able to find templates
2008 Feb 19
3
render_to_string in a controller test?
Hi all, I know that in general, view and controller tests should be isolated, such that controller specs don''t test views etc. However, I think I''ve run into a situation that might be an exception. My controller uses render_to_string to produce a chunk of HTML that it passes to a model to be processed. The controller then redirects the user to a different page. The
2006 Jul 11
1
Aggregate Controllers
Hi, I''m developing a dashboard like page and basically want to combine the result of multiple actions on a page. I''ve done this so far: def index r1 = render_to_string :action => "action1" r2 = render_to_string :action => "action2" render :text => r1+r2 end This works, but now I want to render from other controllers and this is where
2006 Mar 08
0
render_to_string() in a controller that isn''t default route?
Is it possible to call render_to_string() in a controller that is not set as the default route? The content controller is set in routes.rb: map.connect '''', :controller => "content". The content controller is calling a template controller, and I would like to be able to call render_to_string() within the template controller, however I receive the error:
2009 Jun 23
0
render_to_string inside method shared across several controllers
I use render_to_string to generate short reports (in HTML) under certain conditions when users access my application. The reports are stored in the database and uses database information at the time they are generated (and can thus not be generated later, e.g; when you want to consult them). The reports are generated the same way regardless of which controller has been accessed. Conditions for
2007 Nov 30
5
render_to_string in an after filter
I''m using render_to_string in an after_filter, which renders a partial that is sent to a web service. Here''s the code: class MyController < ApplicationController after_filter :post_to_webservice def show # show logic end def post_to_webservice stuff = render_to_string :partial => ''stuff'' webservice_post(stuff) end I get a DoubleRenderError in the
2006 Apr 20
0
Using render_to_string in other custom classes
I have a project where I''m publishing files. Once when the user clicks publish via a URL and one when an email is received that tells the app they want to publish again. Because the publishing requires templates I have them in there own views. The problem is when I want to publish via email I don''t want to ask the controller to render the views. This is what I tried to