similar to: Noob needs help with ''if'' block

Displaying 20 results from an estimated 6000 matches similar to: "Noob needs help with ''if'' block"

2006 Mar 16
10
Substruct Open Source E-Commerce Platform
Finally it''s here :) The Rails app to do battle with the likes of Miva Merchant and OS Commerce! I''m releasing Substruct 0.051 into the wild. More information here: http://dev.subimage.com/projects/substruct Please check it out! I''d love to hear all of your thoughts - and I''m looking for contributors! -- seth at subimage interactive
2006 Apr 16
8
"Cannot convert String to Integer" after using association
So, I''ve written a partial that does some stuff with a given instance of my class "entity". Entity is ActiveRecord. I''m able to retrieve all sorts of data from an @entity, until I do something like: <% for @attribute in @entity.attributes %> <div id="attribute_<%= @attribute.id %>"> <%= render(:partial =>
2010 Jun 09
3
bootpred for multinomial
I applied bootpred for multinomial logistic reg. (with nnet package). I used same as theta.fit and theta.predict of R for my data. but give me error. Can I do this with response vriable;7 levels predictor variables:5 (1 classifier, 4 continuous)?   Thanks alot Azam   [[alternative HTML version deleted]]
2006 Mar 15
7
O''Reilly Rails Cookbook on Rough Cuts
Subject says it all. Anybody taken a look yet? http://www.oreilly.com/catalog/railsckbk/?CMP=ILC-GG7423313304&ATT=railsckbk After buying the Ruby Cookbook and the other Rails book, I''m pretty gunshy about another Rough Cuts purchase. Sean
2006 Jul 31
4
RJS to find an element
I''m trying to implement a remove from cart method based on the examples in the second edition Agile book. I have everything working except for the RJS that removes items from the cart. Ideally what I''d like to do is highlight an element that I am deleting only if there is more than one of that particular item in the cart. If the item deleted is the only of
2006 Mar 17
1
How to update values in database in this form?
Hi, This is my rHtml page & Corresponding actions & model pages:- ===listform.rHtml================= <h1>Products List</h1> <%= start_form_tag(:action => "add_to_cart")%> <table> <tr> <% i=0 %> <th> Product No. </th> <th> Unit Price </th> <th> Available Qty. </th> <th> Demand Qty. </th>
2005 Mar 08
15
Rails 0.10.1and WEBrick
Doesn''t appear to work with WEBrick. Works find with Apache/FastCGI. Something wrong in the way Rails is trying to process paths from the WEBrick server. If I try to send in http://localhost:3000/recipes/new, WEBrick is interpreting /new as my controller, instead of my action.
2006 May 21
3
Using ParseDate in for loop
Hi, I''m trying to use ParseDate within a for loop but I get this error: can''t dup NilClass Any suggestions for making this work? Thanks, -Jason
2006 Dec 27
10
Mixing html tags and Ruby blocks
I''m trying to get the following idea to work: <%= @column_names.each { |t| <td> t.downcase </td> <td> @listing.send(t.downcase)</td> } %> Essentially I want to display a form that has a left and right TD, with the left TD being a column name and the right TD being the column data. If there''s a better way (the Rails way ?), I''m all ears
2006 Feb 14
7
9cays - A Rails app for Group Email
Even though it''s a little OT, I thought I''d announce the free public beta of a new Rails app that I''ve been working on for a while: http://9cays.com Think of it as mini-mailing list software. For a lot of smallish conversations, normal mailing list are too heavyweight (requiring setup, moderation, admin, etc.), but group email is a pain because messages
2005 Nov 15
2
FormOptionsHelper select call failing
In Rails 0.14.3, I''m doing the following in a view: <%= select ''folder'', ''format'', [''a'', ''b'', ''c''] %> This line in is failing with: ActionView::TemplateError (too few arguments.) Am I calling select incorrectly? (Yes, the @folder object does exist, and does have an attribute
2006 Jan 12
2
Engines issue: rake test_plugins failing when it shouldn''t
I create a simple engine with a simple controller: class FredController < ApplicationController def hello render :text => ''Hello, world!'' end end and I create a simple functional test within the engine: class FredControllerTest < Test::Unit::TestCase ... def test_hello get :hello assert_response :success end
2006 Jun 10
3
Weird Problem With Active Record
Is it me or is my model getting the created_at from the wrong model! I have a HABTM relationship between Problems and Tags. In one of my controller I do the following: def view @tag = Tag.find_by_name @params[:id] end In my view I do this: <% @tag.problems.each do |problem| %> ... <%= problem.created_at %> ... <% end %> Now, how come the created_at
2005 Nov 16
3
Association collections problems
Hi all! I find association collections to be quite hard to understand and use. I have a Leg class that has_many :choices, and a Choice class that belongs_to :leg. In a controller I want to update both a Leg and its Choices. If I do it like this: @leg.choices.update params[:choice].keys, params[:choice].values It updates the database directly (or more specifically only updates records that
2005 Jul 26
3
Generating unique random tokens for ActiveRecord objects
I have an ActiveRecord subclass that needs to generate a random (hard to guess) token for each record in its corresponding table. Currently I''m doing something like this: def before_create self[''token''] = random_value while self.class.find_by_token(self[''token'']) self[''token''] = random_value
2006 May 31
2
I''m Collecting Media Refernces for Ruby and Rails
I''m trying to collect media references (URLs) to articles, podcasts, and videos about Ruby and Ruby on Rails, like this month''s Linux Journal ( http://www.linuxjournal.com/issue/147) or the recent DDJ article ( http://www.ddj.com/dept/architect/187203512). If have such a collections yourself (or just know of some good references), could you please share them on this thread.
2006 Jan 31
4
Rails bug? Conditions on associations ignored by eager loading
I''m looking for someone to confirm the following as a bug in Rails 1.0 before I post it to Trac. If I use eager loading on an association that has conditions defined, the conditions are ignored. The following example illustrates the problem. I have two tables: create_table "blogs", :force => true do |t| t.column "name", :string end create_table
2004 Mar 11
1
Re: make.search.html() without write permission in R.home() (PR#6663)
Brian Yandell <byandell@wisc.edu> writes: > Folks, > I am working on a Windows system which is part of the UW-Madison > statistics LAN. R is maintained on a file system to which I cannot write. > I tried installing a package and got the following interplay: Set the lib argument to install.packages to a directory in which you do have write permissions. From ?install.packages
2006 Feb 12
3
Error when Eager Loading "Not unique table/alias"
Hi list, I get the error "Not unique table/alias" (myql 4.1) when trying eager load 2 classes that use the same base class (not STI) Example: <code> class Wedding < ActiveRecord::Base belongs_to :bride, :class_name => ''Person'', :foreign_key => ''bride_id'' belongs_to :groom, :class_name => ''Person'',
2006 Apr 03
5
Heavy e-mail receive
Performance experts, Normally to receive e-mails is to pipe their content to script/runner individually from a mail server, sendmail or postfix. Doesn''t this configuration run like Apache 1.3 with CGI, meaning for each e-mail a boot of the entire Rails environment and thus low scalability? Is there anything working like lighttpd-fcgi or going toward its approach? DD -- Posted via