Displaying 20 results from an estimated 2000 matches similar to: "Set up a default route"
2006 Aug 15
6
try creating a table for your model
Railers:
Greetings from the low end of the learning curve. I have installed all
the prerequisites on Win32, including a lite MySQL database with a
table in it called Inventory.
Then I run this command line...
ruby script/generate ajax_scaffold Inventory
...and I get this error message:
error Before updating scaffolding from new DB schema, try creating
a table for your model
2007 Feb 16
13
negate the regexp in validates_format_of
Railsters:
ActiveRecord''s validation system puts other database systems to shame.
However, the newbies might not know how to write a regexp that
excludes a match, instead of tests for it. Understand - I''m just
asking this question to help them. I have been using Regexps since
''grep'' on Xenix! But the newbies here might not know how to do this:
2006 Nov 04
2
how to use LabellingFormBuilder
Railsers:
As usual for a product written very rapidly, most of its documentation
assumes some other documentation told you something critical.
For example, the file form_helper.rb tempts me with this documentation:
# <% form_for :person, @person, :url => { :action => "update" },
:builder => LabellingFormBuilder do |f| %>
That''s beautiful. Now what do I
2007 Feb 03
7
Interesting radio button behavior with "onclick"
Hello:
I have radio buttons like this:
<% fields_for :goalhist do |g| %>
<table>
<tr>
<td align=left><%= radio_button_tag (''duedate'', 0, checked = false,
options = {:onclick => ""}) %>
Start now
</td>
</tr>
<tr id="detailed" style="display: none"><td colspan=2>
2007 Feb 14
5
FormTestHelper should change hidden fields
Railsoids:
FormTestHelper rules. It tests your response.body form at the same
time as it triggers your action, with all the parameters in that form.
This obviously improves quality.
But it took issue with this:
submit_form ''validate_stuff'' do |form|
form[''IBhidden''] = ''validate''
end
The field IBhidden is a hidden field. To be
2006 Nov 28
11
New Rails Site: Wordie
My latest stupid web trick, built, with love, in Rails:
http://wordie.org
Make lists of words. See who else likes the same words. Basically, it''s
a dating site. Built on thanksgiving while half-watching football and
launched yesterday. In other words, half-baked, but I thought some of
you might find it mildly amusing.
John
____________________________
John McGrath
Squirl: a site for
2006 Nov 21
1
RXML vs form_tag etc
Railsers:
The documentation for *.rhtml views invariably mentions *.rxml views.
They sound like a Good Thing, because some of my generating code mixes
Ruby and HTML so densely that the code is full of %><% markers.
Dropping down to only one language would be a blessing.
However, this documentation invariably avoids mentioning one tiny,
insignificant detail:
How do you inject raw HTML
2007 Feb 04
1
dispatch.cgi -> Anonymous modules have no name
I upgraded to Rails 1.2.1 and deployed to my ISP, who has 1.2.1 ready
and waiting.
The site disappeared into an HTTP 500 error.
So I get into the site, run public/dispatch.cgi or dispatch.rb, and get this:
# ./dispatch.rb
Status: 400 Bad Request
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:405:in
`to_constant_name'': Anonymous modules have no
2006 Oct 30
1
domain language?
RSpeckers:
I went with RSpec instead of Systir because I downloaded and installed
the former first.
(I know that''s not exactly a ringing endorsement! ;-)
I want to compete with FIT and Fitnesse, like this:
http://www.zeroplayer.com/cgi-bin/wiki?TestFlea#tropism
(Click on a Green Bar to distend one test case.)
I want a domain-specific language in the parchment-colored area on the
2006 Apr 18
1
''wrong number of arguments'' for text_field?
This is probably something very simple but I can''t seem to figure out
why I keep getting the ''wrong number of arguments (1 for 2)'' error with
the following code when I try to create a new record. If anyone can see
what is going wrong here please help!
new.rhtml
-------------------------------------------------
...
<%= start_form_tag :action =>
2006 Nov 17
1
SQLite3 put a parse error in my schema.rb for timestamps
Railsers:
I switched from MySQL to Sqlite3 for Test-Driven Development. It meant
the difference between
(Long term, I want to understand the db:migrate system well enough
that I can run a long test, occassionally, that migrates everything to
MySQL and retests it there. That will prevent nasty surprises at
deployment time. But that''s not the current question!)
Because I don''t
2007 Feb 04
10
where to install script.aculo.us ?
I''d like to try autocompletion, and my understanding based on AWDWR:2,
and on various website tutorials, is that I should install the
script.aculos.us
javascript library.
My question is how to do that. The instructions on their site tell me
to "Put prototype.js, scriptaculous.js, builder.js, effects.js,
dragdrop.js, slider.js and controls.js in a directory of your website,
2006 Nov 27
3
Power User Tipping Point: PHP to Ruby
I have been waiting for a tipping point to start using Ruby
applications instead of PHP applications. My criteria include the
availability of Ruby and RoR web hosts and Ruby equivalent applications
readily available for PHP. I keep finding PHP applications to fill my
needs but not Ruby applications or hosts offering Ruby support. For
example, I use content management systems which are
2007 Feb 13
4
PDF Thumbnail - RMagick
Hi,
I need to create a preview of a PDF upload to a CMS I''m building. Does
anyone know how to create a thumbnail of the first page of a PDF using
RMagick?
Any ideas welcome,
~ Mark
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"
2017 Nov 08
3
Possibly [OT] ansible vmware inventory plugin
This might be OT, but it is CentOS related.? I've been running Ansible
on C7 for a handful of months now, and updated to 2.4 as soon as it was
available. I've been building inventories by hand in that time (mostly
due to the fact we had no actual documentation on the managed external
customer servers). However, as we have a multiple VMware clusters,
thought it might be time to tinker
2007 Mar 05
2
Help with rjb
I am trying to do file i/o with rails and rjb and can''t figure out a
way to make this work. Here''s what I am trying to do:
- a user uploads an image to the server via a standard html form:
<%= file_field("blog", "attach") %>
- this returns a ruby File object to the controller in
params[:blog][:attach]
2006 Dec 05
6
Best Book
Hi there,
What is the best book of Rails???
Or the top sellers, thanks..
--
Felipe Amaral
Vento Livre Internet
--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from
2007 Nov 16
4
Newb - variable returns # sign?
Hi Gurus-
I want to return the variety from the species table based on the
active record link to inventory table
class Species < ActiveRecord::Base
has_many :inventories
end
class Inventory < ActiveRecord::Base
belongs_to :species (this is the singular and the plural, so that''s
OK)
end
My inventory_controller looks like:
def show
@inventory =
2006 Oct 14
4
Editable data grid
Does anyone have a good recommendation for implementing an editable
data grid (like a spreadsheet) based on a dbase table/model?
What I would like is something similar to Google Spreadsheets.
Thanks,
Peter
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group,
2006 Nov 30
41
TDD killing my joy of Rails
I''ve been working through the book ''Beginning Ruby on Rails E-Commerce''
which is very heavy on Test Driven Development. As in, you have to
write tests for scaffolding methods and validations and crap like that.
And then they fail. And you KNOW its the test not the method. So you
spend 2x the time writing a test that has to be adapted when
requirements change. You