similar to: RHTML page not rendering properly

Displaying 20 results from an estimated 2000 matches similar to: "RHTML page not rendering properly"

2006 Oct 30
7
belongs_to nonintuitive results with assignment?
class Page < ActiveRecord::Base has_many :lists end class List < ActiveRecord::Base belongs_to :page end ######### controller code, inside action: list = List.find(params[:id]) old_page = list.page list.page = new_page # what is the value of old_page now? old_page now is the same as new_page! what the heck?!? The only thing i can think of is that old_page is
2006 Nov 04
2
Instant Rails 1.4 final released (with RadRails support!)
This is the final release for Instant Rails 1.4. It corrects the two known problems with the preview1 release (two help menu items caused Instant Rails to crash). Instant Rails 1.4 contains the following major changes: * Upgrades Rails to version 1.1.6 (other components upgraded to current release, also) * SCGI has been replaced by Mongrel (using Apache''s mod_proxy for
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 Oct 05
2
update_attributes
I''m working on a form that updates a product record and several associated detail records. The detail records are showing and populating okay in the form. But when it hits the controller, I get Couldn''t find Detail with ID=detail AND (details.product_id = 38). The :detail params seem to refer to the correct record id. Anyone have an idea how to fix this? Here''s the
2006 Nov 04
2
Possible to use attr_reader/writer in model?
I have some properties that I want setable externally, but readable only internally. I''ve played around with attr_writer (and attr_reader separately) but can''t figure out how to get either to work. I can do what I want using attr_accessor, or just straight out defining the prop setter method. Anybody know how to use attr_writer or attr_reader with a model? You da man, Joe
2006 Nov 09
2
redefining the method belongs_to in ActiveRecord::Base
Hi. I''ve tried to redefine the method belongs_to in ActiveRecord::Base, so every time a model is defined as belonging to :attachment, it should have some additional methods. I tried to do an alias of belongs_to, but this was not successful. The error message in Webrick was > Booting WEBrick... ./script/../config/../lib/ActiveRecordExtensions.rb:67: undefined method
2006 Sep 04
2
"include" versus "extend" - what's the difference
Hi, Just wondering when one would use "include" over "extend"? Both seem to bring in methods to the class no? The context is I''m just trying to understand why both are used with the acts_as_audited plugin: Full extract from plugin (used within here): ================================================== # Copyright (c) 2006 Brandon Keepers # # Permission is hereby
2006 Sep 03
2
Undefined method "xxx" of a model when calling a helper
Hi all I''m creating a shop page. I have a cart model that looks like the following: class Cart attr_reader :line_items def get_line_item id @line_items.each do |l| return l if l.id == id end end def initialize @line_items = [] end def empty! initialize end def empty? return true if @line_items.empty? false end end And I have some
2006 Aug 30
10
respond_to not detecting JS turned on. form_to_remote problem?
I''m trying to use respond_to to redirect visitors who have JS turned off to a different page. The problem I''m having is that respond_to is sending *everybody* there. It''s not recognizing that JS is turned on in the browser. The wanted_html.rhtml file below is rendered whether I''ve got JS turned on or off. I''ve looked at the Accept headers being sent
2006 Jul 18
4
add dataset
Hi, a simple question.. is add dataset not part of zonecfg ? global# zonecfg -z myzone (OK) zonecfg:myzone> add dataset (fails as there is no dataset option) zonecfg:myzone> add zfs (fails as there is no dataset option) Basically how do I add a dataset to a zone ? Thanks Roshan please cc me pererar at visa.com
2006 Aug 01
4
class def error when serving "stand-alone" rhtml files
I''m attempting to set up a rails app so that I can add rhtml files without having to create controllers for each one. I want a simple solution to serving static-like rhtml files as well as those with a little logic. The solution I found is this one: I added the following controller static_controller.rb ##################### class StaticController < ApplicationController end I
2010 Feb 04
18
unionfs help
Is it possible to emulate a unionfs with zfs and zones somehow? My zones are sparse zones and I want to make part of /usr writable within a zone. (/usr/perl5/mumble to be exact) I can''t just mount a writable directory on top of /usr/perl5 because then it hides all the stuff in the global zone. I could repopulate it in the local zone but ugh that is unattractive. I''m hoping
2006 Mar 06
9
Apache + Displaying images
Hi, I''m new to Rails, sorry if I''m repeating the question, but I couldn''t find a solution for my problem so far :( I''m using Apache2 as the web server of my Rails application. I keep my images in public/images and tried inserting images to the page like this; <%= image_tag "rails.png" %> But the image is not displayed on the browser. Can
2012 Nov 07
1
Can someone simply give all the steps to install ruby and rails on windows7 pls
I installed it once but it always come up with a change a path error. Let me know where to install them as well (whether to install all inside wamp or just inside c) I think it doesn''t need to have wamp as it has it''s own server. Pls let me know as it''ll be really helpful for most of them with troubles installing rubyonrails -- You received this message because you
2006 Jul 30
8
Method_missing from Ruby for Rails book
I''m having a problem getting this example from the book to work: class Cookbook attr_accessor :title, :author def initialize @recipes = [] end def method_missing(m, *args, &block) @recipes.send(m, *args, &block) end end cb = Cookbook.new cb << recipe_for_cake cb << recipe_for_chicken beef_dishes = cb.find_all {|recipes| recipe.main_ingredient ==
2006 Jul 17
14
REST Relationship Models
I''m trying to figure out an elegant way to do this: I have the following three tables: people, employer, employees And consequently the following three models: class Person < ActiveRecord::Base end class Employer < ActiveRecord::Base has_many :employees end class Employee < ActiveRecord::Base belongs_to :person belongs_to :employer end I want to be able to say:
2006 Jul 31
2
[UPDATE] More info on RubyConf 2006 registration
Hi -- Registration for RubyConf 2006 is still scheduled to open on August 2, in the early evening Pacific (US West Coast) time. Also, there''s more info at http://www.rubycentral.org/conference (e.g., the fact that this year we''re only taking credit cards, etc.). David P.S. Any LA area Rubyists around? I''ll be there this week doing Rails training. --
2007 Aug 09
7
Integrating polymorphic models into controllers views? how?
I''m having trouble trying to get this to work. How the heck do you get a polymorphic controller to work? Especially integrating it with a view? Let''s say that we have shows, and episodes, then comments. A show has many episodes, an episode has many comments. the route is /shows/1/episodes/1/ Now to add a comment to that episode, how would I do it? Let''s say that the
2006 Aug 08
12
delete_if doesn''t work for has_and_belongs_to_many
I''m using Rails-1.1.4 with Ruby-1.8.4 So let''s say I have 2 model classes: class Item has_and_belongs_to_many :things end class Thing has_and_belongs_to_many :items end i = Item.new i.things << Thing.new( :value => "Something").save i.things << Thing.new( :value => "Something Else" ).save i.save Fine, now I have two records in the
2006 Dec 19
7
Improve the rendering speed of rhtml
I found through the log file that the render of the rhtml template would take too much time if there exists ruby code in the rhtml files.In many cases,these ruby code are tied with these rhtml files closely and can not be decoupled from that,therefore,i have a question that,is there exist some way to improve the rendering speed of rhtml when some ruby codes are included? -- Posted via