Displaying 20 results from an estimated 60000 matches similar to: "is there such an association as has_and_belongs_to_one?"
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 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
2008 Jun 21
1
Howto uninstall compiz from Kubuntu
Compiz:
A colleague tempted me with compiz eye candy, and I tried it.
Sorry, but many features were too far outside my usability comfort zone:
- lazy mouse (in /this/ day and age???)
- The Run window did not reliably pop up
- minimize-all-windows turned everything black
Some of those items were configurable. Some required multiple, diverse
reconfigurations to fix. I couldn't fix the
2006 Dec 27
13
Where did UJS go? UJS vs. RJS
I have not been able to access the UJS site, http://www.ujs4rails.com/
for two days. Does that mean there are problems or that it has been
incorporated into Rails core?
In general, what do you think of using UJS instead of RJS?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
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
2008 Jun 15
5
Ruby on Rails 2.1 Tutorial
Hi,
I have put all the basic things in place and you will find it a working
tutorial for Ruby on Rails 2.1.
http://www.tutorialspoint.com/ruby-on-rails-2.1/
I have covered Model, Controller and Views in detail and you will find a
nice example on scaffolding.
If you like this tutorial then please share it with others....Oh
yes...if you have any feedback then please definitely send it to me.
2007 Sep 22
2
Dynamic view - is it possible at all?
I have the following question. It sounds weird, but still.
We all have app/views/say.rhtml or any other template for the view. It
can include of course instructions in <% %>
So the question is next -- is it possible to use .rhtml as a view
which we just uploaded?
I.e. user uploads his own .rhtml, controller saves it in the database,
and shows the view using it.
Is it possible at all?
2008 Sep 06
6
Active record question
I''m not quite sure how to get at this data using Actrive record.. I''m trying to get all the appointments made for a particular project. I''m using four models, Projects, Tasks, Resources and Appointments.
The SQL gets me what I''m looking for but how do I do it using Active Record?
Select a.* from appointments a
join resources r on r.id = a.resource_id
join
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
2006 Nov 28
2
collection_select and selected_value
Hi,
I am using collection_select to build a drop down list. I would like
to have the current value selected. How can I do that?
My current code is straight from the example in Pragmatic Programmers
book [2nd ed, p480] copying here for reference.
<%=
@users = User.find(:all, :order => "name" )
form.collection_select(:name, @users, :id, :name)
%>
I went through the api docs
2007 Sep 21
1
Do fixture_scenarios and RSpec peacibly coexist?
Railsters:
I just installed fixture_scenarios ...
http://fixture-scenarios.googlecode.com/svn/trunk/fixture_scenarios
...into a project with some RSpec specifications. They all went kablooey.
I didn''t even create a scenario; the system just started calling its version
of fixtures(). The normal tests pass and the RSpec ones unanimously emit:
TypeError in ''Context (verbose
2009 May 05
9
no sql in the controller guideline
hello. i just checked Chad Fowler''s post "20 Rails Development No-No''s"
and
one guideline caught my attention. it says:
"Nothing that looks at all like SQL should go into a controller, view,
or helper."
it really came as a surprise to me as Rails itself seems to go against
such practice by its AR ''conditions'' option, which most of the times
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
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>
2008 Jul 20
10
STI and fixtures
Hi all !
Loading fixtures doens''t seems to associate my 2 objects, do know what''s
wrong ?
In app/
class Manager < Employee
has_many :employees,
:foreign_key => :reports_to
end
class Employee < Person
belongs_to :manager,
:foreign_key => ''reports_to''
end
class Person < ActiveRecord::Base
belongs_to :address
end
fixtures for
2009 Apr 08
2
ADVANCED Rails Mailing List?
Is there an advanced rails mailing list? I''ve noticed that much of the
issues on this list are for beginner to intermediate issues, and
posters asking more advanced issues are rarely answered. I still find
this list to be very useful, but I would love to find a community of
more advanced RoR folks to discuss expert level implementations.
-Kevin
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,
2009 Apr 03
2
Recovering in Ruby-libxml parser from invalid UTF8 code
I am parsing XML streams with ruby-libxml using the XML::Reader class.
Several have invalid UTF-8 characters. I need a tutorial or at least some
hints on how to recover and continue the parsing.
TIA,
Jeffrey
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this
2007 Apr 19
4
render_to_string in a model ?
I have a batch job that will call script/runner, I would like in this
call to create html formated email and save it to the database. This is
easy enough in a controller with
yournewhost.email = render_to_string :action => "email_newhost_ready",
:layout => false
But render_to_string is only available in controller action pack, is
there a easy way to render_to_string in a Model? Or
2007 Jun 27
5
Regexp not matched
Sorry, meant to post this in the rails forum. Anyways, how would I write
a rescue method to recover from a failed regexp parsing with error
"regexp not matched"
-Thanks
--
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