As it turns out, I had declared that my main object class had many of
another type of object (photos). In my object controller new method I
had
@object.photos.build
But then in my form I only had one field for the photo object. It was
trying to build the photo objects with just one string
Hi,
I installed rails 2.3.5 and ruby 1.8.7 and downloaded the
rfacebook plugin to create a simple facebook app and then when I ran
some of the rake tasks I ran into problem like undefined const
CGI::Session and when I googled about it, it said this was a change
in Rails 2.3 where CGI::Session
Hi folks,
I am just getting into rails again after a multi-year stint of
mod_perl jobs, which might grant me some newbie-indemnity for the time
being - but I've found an issue I think warrants discussion.
As discussed here -
Im building a proyect, it is posible to integrate Datamapper with Ruby
on Rails?
--
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-t...@googlegroups.com.
To unsubscribe from this group, send
I am looking for Ruby on Rails developers for web and mobile
applications. I ideally require 3 to 4 developers immediately for a
company in downtown Toronto.
Here is the job description, please email if you are intrested
Responsibilities:
•Designing and developing data-driven applications
Hello, I bought a book called Head First Rails and it's great,
starting off with giving me a few commands to instantly begin diving
into learning Rails. However, I ran into a problem that I'm not quite
sure how to fix.
So I'm following along the beginning exercise where I did the
following
I have a few ActiveRecord subclasses that reassign their default scope
upon instantiation based on some criteria (i.e. subclasses of the AR
model Person will change their default scope according to rows found
in the `roles` table). This works find during development, but during
testing this fails
What does you mean?
You can create class in lib folder. For example: my_class.rb - class
MyClass ; end
Rails will load your library.
On 1 апр, 06:57, trans transf...@gmail.com wrote:
Is there any means for having an external library loaded before
ActiveSupport is loaded when starting up a
Hi,
Please, try it:
DateTime.parse(2010-03-31T07:47:46 -500).to_s
On 1 апр, 01:22, Sav savar...@gmail.com wrote:
Can someone help me format the following date into a db-friendly
datetime value?
Here is the date I get from an XML file...
xmldate = 2010-03-31T07:47:46 -500
But
On Apr 1, 5:36 am, Soulzityr soulzi...@gmail.com wrote:
=booting WEBrick
=Rails 2.3.5 application starting onhttp://0.0.0.0:3000
=call with -d to detach
=Ctrl-c to shutdown server
[TIMESTAMP] INFO WEBrick 1.3.1
[TIMESTAMP] INFO ruby 1,8,6 2008-08-11 [i386-mswin32]
[TIMESTAMP] INFO
On Apr 1, 1:52 am, JSW yetanotherj...@gmail.com wrote:
How many rails developers do we think put a POST-method validation
filter around all their form processing code, and yet expect
protect_from_forgery stills somehow protects the actions?
Without getting into the debate about how
This is normal behavior
With the ruby script/server command you actually started a web server process.
Now that process is holding your console (the Windows 7 cmd)
So you should start a new console and you can type all others commands. In the
first console, you can watch the result of the server
2010/4/1 Carlos Andrés Gallón Villegas cgall...@gmail.com:
Im building a proyect, it is posible to integrate Datamapper with Ruby
on Rails?
Did you try googling for ruby rails datamapper? It throws up many
links on how to do it.
Colin
--
You received this message because you are subscribed
On Thu, Apr 1, 2010 at 1:08 AM, Frederick Cheung frederick.che...@gmail.com
wrote:
Without getting into the debate about how idempotent GET requests
really are I'd suspect that these days most people are using restful
routes. If you use restful routes and remove the default route then
it's
coming this error in my paper clilp plugin m getting this error
* Photo C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/
hrithik_roshan1,3756,1.jpg is not recognized by the 'identify'
command.
* Photo C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/
hrithik_roshan1,3756,1.jpg is not recognized by the 'identify'
Not even one requirement related to ruby. Are you sure, you are
looking for ruby developers?
- Artiom.
On Thu, Apr 1, 2010 at 4:49 AM, Jason Vaz vaz.ja...@gmail.com wrote:
I am looking for Ruby on Rails developers for web and mobile
applications. I ideally require 3 to 4 developers immediately
I am looking for a number of Ruby on Rails developers for web and
mobile applications for an exciting new project based in the North
West of England. If you are interested in either a contract or
permanent position and eligible to work in the UK then please forward
me a copy of your CV for review.
On Apr 1, 3:55 am, oivoodoo alex.kor...@gmail.com wrote:
What does you mean?
You can create class in lib folder. For example: my_class.rb - class
MyClass ; end
Rails will load your library.
You have to load those manually. So that doesn't help.
We can put scripts in config/initializers,
On Apr 1, 8:38 am, trans transf...@gmail.com wrote:
We can put scripts in config/initializers, however these are loaded
into the system AFTER ActiveSupport has been loaded. I need a way to
load a library BEFORE ActiveSupport.
The reason is to load other libraries that may also have core
I just fell foul of a problem that i've encountered several times in the
past and never really thought of a good solution. I wonder if there's a
solution out there for this.
I just did some refactoring, moving Quiz#subject from being a text field
in the quizzes table to being a standalone table,
On 1 April 2010 13:10, Tom Mac li...@ruby-forum.com wrote:
Hi
I have two date fields in table start_date and end_date .There data
type are datetime. Now in the view I am accepting values of them as
text fields like And I am following RailsCast 32
%= f.text_field :start_date_string,
Hi,
Despite close reading of Matz's Ruby book and Agile Web Dev. w. Rails,
I can't figure out how to tackle the challenge of sharing validation
code across models with attributes in common.
In each of my models I'd like to validate the shared attributes with a
custom validator that includes
On Apr 1, 1:48 pm, Max Williams li...@ruby-forum.com wrote:
Ways around it i can think of ...
a) i make sure that my migrations don't use something from the codebase
which is going to be deleted in the future. This seems difficult if not
(conceptually at least) impossible. When you're
I want to use a value entered in by a user in an object's form to look
up another value in a reference table and assign that value to the
corresponding attribute in the object. How do I do that?
Right now I have in my controller create method:
if @number = Work.find_by_sql( SELECT inv FROM
On Apr 1, 2:00 pm, ES emsto...@gmail.com wrote:
I want to use a value entered in by a user in an object's form to look
up another value in a reference table and assign that value to the
corresponding attribute in the object. How do I do that?
Right now I have in my controller create
Ok, thanks! So would this be the way to do it?
@i = Work.find_by_sql( SELECT inv FROM samples_development.works
WHERE worknbr REGEXP ' + @sample['work_number'] + '; )
@sample.inv = @i['inv']
I keep getting can't convert String into Integer
On Apr 1, 3:07 pm, Frederick Cheung
No, that was wrong, it returns an array, so I had to add .first :
@i = Work.find_by_sql( SELECT inv FROM samples_development.works
WHERE worknbr REGEXP ' + @sample['work_number'] + '; )
@sample.inv = @i.first['inv']
On Apr 1, 3:30 pm, ES emsto...@gmail.com wrote:
Ok, thanks! So would
Hi Grar,
If you have a User model where you want to use some shared validations, you
could create a module like this – in lib/my_email_validations.rb:
module MyEmailValidations
def self.included(base)
base.validates_presence_of :email
base.validates_length_of :email, :minimum =
Hi all,
I apologize for the funky subject of this post.
I have a partial I created while recreating a railscasts example (nested
resources part 2 -
http://railscasts.com/episodes/197-nested-model-form-part-2) and I've
come to a halt.
What I want to do is force a question to be asked if this is
Frederick Cheung wrote:
Create private copies of the classes involved in the migration ie
class ChangeQuizzes ActiveRecord::Migration
class Quiz ActiveRecord::Base; end
...
end
obviously include only what behaviour the migration actually needs.
Fred
ah, now that's a good
This seems like a non-issue to me that can and should be handled by
the developer of the app, regardless of what lang/framework you're
using, by following basic best-practices for securing your app against
csrf or sql-injection or ... attack.
So in your post example, if you didn't want to
HI,
I have a pretty weird problems with dates.
my objective was to parse some text files and put them into a
database.
the lines of the file are divided with a | and some of the fields are
dates in this format dd.mm.
now in the parsing a get the system date to skip parsing elements in
the
This book is quite useful, you can just get the PDF version if you
wish:
http://www.pragprog.com/titles/rails3/agile-web-development-with-rails-third-edition
This is a useful place to get info:
http://guides.rubyonrails.org/
On Mar 31, 7:08 am, IanJ ian_johns...@pobox.com wrote:
Hi
I'm
G'day folks. In the Rails console, if you configure ActiveRecord's
logger to output to STDOUT, like this:
ActiveRecord::Base.logger = Logger.new STDOUT
how do you switch it back to writing to a file? I tried the 2 lines
below separately, but AR still logs to STDOUT afterwards:
Fred, do the initializer files get called before the environment.rb on boot?
On Wed, Mar 31, 2010 at 3:32 PM, Frederick Cheung
frederick.che...@gmail.com wrote:
On Mar 31, 8:20 pm, Me chabg...@gmail.com wrote:
Trying to keep things organized I created a directory under app called
On 1 April 2010 15:36, Adam anlauf.a...@gmail.com wrote:
HI,
I have a pretty weird problems with dates.
my objective was to parse some text files and put them into a
database.
the lines of the file are divided with a | and some of the fields are
dates in this format dd.mm.
now in the
I agree with Victor, it's a very good book.
But perhaps you can start with a very good starting book that I bought before
the mentioned book.
It's Head First Rails.
It has a very interesting learning concept which cleared a lot of web concept
to me
Good luck
Le 1 avr. 2010 à 16:44, Victor S a
Lasse,
Yes, that was exactly what I needed.
I see I need to explore the specifics of mixing in (which maybe Matz's
book underserves) -- in this case it was the self.include(base)
expression that was key.
Finally, where attributes refer logically to the same kind of data,
but have different
I have finally had some success, and it turns out that it was as simple
as this:
%= observe_field(text_input_#{parameter},:function =
check_box_#{parameter}.checked=true) -%
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google
Nice – glad you could use it :)
/Lasse
2010/4/1 Grary grary.sti...@gmail.com
Lasse,
Yes, that was exactly what I needed.
I see I need to explore the specifics of mixing in (which maybe Matz's
book underserves) -- in this case it was the self.include(base)
expression that was key.
Try searching for the error on Google:
http://www.google.dk/search?q=%22is+not+recognized+by+the+%27identify%27+command.%22
Hope this helps.
/Lasse
2010/4/1 Rahul Mehta rahul23134...@gmail.com
coming this error in my paper clilp plugin m getting this error
* Photo
I'm currently developing a Rails 2 project that I'd like to migrate
across to Rail 3. However I'm having real trouble in the first place
getting Rails 3 to work straight out of the box with a blank project.
Initially I tried getting this working a JRuby 1.5 snapshot then 1.4.
I've now been
Especially try this one:
http://blog.jonathanhinson.com/ (search for Getting Paperclip Working In
Windows)
/Lasse
2010/4/1 Lasse Bunk lasseb...@gmail.com
Try searching for the error on Google:
http://www.google.dk/search?q=%22is+not+recognized+by+the+%27identify%27+command.%22
Hope this
Hi Tony,
Hope ur using Jquery
Add the class to the remove link and add the following line of code
div class=fields
%= f.error_messages %
p
%= f.text_field :content %
% unless f.object.new_record? %
%= link_to_remove_fields remove, f,:class=remove %
% end %
/p
I have been facing this problem for a while now. ar-extensions is
really good but it doesn't preserve the links between models like
one-to-one many-to-many etc.
I am trying to insert ~1M records daily. ActiveRecord hasn't a hope of
doing this in a reasonable time.
I am hoping that I am
babu nair wrote:
Hi Tony,
Hope ur using Jquery
Add the class to the remove link and add the following line of code
div class=fields
%= f.error_messages %
p
%= f.text_field :content %
% unless f.object.new_record? %
%= link_to_remove_fields remove, f,:class=remove %
Hey boys, just wanted to let you know I published a post about
ActiveHelper [1] , a framework I released earlier this week to clean-
up helpers and put them back to classes using delegation and
inheritance.
The post [2] studies briefly how rails' own helpers could be cleaned
up with ActiveHelper.
Hi Artiom;
Yes I am looking for ruby developers. Would you be intrested? or did you
have someone in mind?
Thanks
Jason Vaz
On Thu, Apr 1, 2010 at 6:49 AM, Artiom Lunev artiom.lu...@gmail.com wrote:
Not even one requirement related to ruby. Are you sure, you are
looking for ruby developers?
I'm using the attachment_fu plugin to upload large files. I'm using the
latest version and I'm running it under Rails 2.3.5.
My file upload doesn't work and I get this error in the log:
DEPRECATION WARNING: ActiveRecord::Errors.default_error_messages has
been deprecated. Please use
Hello people,
I am using Rufus scheduler to send emails every day at 4am. To do this I
am using:
scheduler = Rufus::Scheduler.start_new
scheduler.every '1d', :first_at = '2010/04/1 04:30' do
#do something
end
There is a better way to write this schedule ?
By the way, I placed this code at
Phil Ostler li...@ruby-forum.com wrote in
message news:7e3f1c8e83517d604d3d7ab7545ff...@ruby-forum.com...
I'm currently developing a Rails 2 project that I'd like to migrate
across to Rail 3. However I'm having real trouble in the first place
getting Rails 3 to work straight out of the box
Hello list,
Does anyone know if ruby-ldap supports connection timeouts? We have LDAP
integrated into our authentication system to provide LDAP authentication as
well. It works fine if you input a valid host/port and if the LDAP server is
responding ok. However, if the host doesn't respond for
Have you added sweeper path ?
config.load_paths += %W( #{RAILS_ROOT}/app/sweepers)
On Apr 1, 1:53 am, Jeremy Woertink li...@ruby-forum.com wrote:
Jeremy Woertink wrote:
David wrote:
Have you added the sweeper to your list of observers in config/
environment.rb?
Actually, I had not. I
I'm a fairly visual person, and I have a piece of paper with many
boxes and arrows with labels like has many and belongs to for my
database models. It's messy, but it works.
What I keep looking for--weeks, actually, I'm certain it's out there,
but I haven't hit on the right set of Google query
On Apr 1, 8:09 am, Nick Sutterer apoton...@gmail.com wrote:
Hey boys, just wanted to let you know I published a post about
ActiveHelper [1] , a framework I released earlier this week to clean-
up helpers and put them back to classes using delegation and
inheritance.
Ugh, I could have really
On 1 April 2010 20:03, Dudebot craign...@gmail.com wrote:
What I keep looking for--weeks, actually, I'm certain it's out there,
but I haven't hit on the right set of Google query terms :)--is
something that will take a Rails set of models and show its design.
Railroad does this (after a
Hi Marcelo,
If that ldap lib doesn't include any timeout settings/params for
timing out long-running ldap calls (which if you're talking about ruby-
net-ldap, it doesn't at this time), then one way would be to wrap
those potentially-long-running calls in ruby's timeout (http://ruby-
On Thu, Apr 1, 2010 at 8:50 AM, Fitz Fitz li...@ruby-forum.com wrote:
I have been facing this problem for a while now. ar-extensions is
really good but it doesn't preserve the links between models like
one-to-one many-to-many etc.
Have you tried doing batches via transactions? By default
On Apr 1, 2:12 pm, Michael Pavling pavl...@gmail.com wrote:
Railroad does this (after a fashion)http://railroad.rubyforge.org/
So that rocks. When did the world get so ultra cool? *Many, many*
thanks.
Craig
--
You received this message because you are subscribed to the Google Groups Ruby
Anderson Leite wrote:
Hello people,
I am using Rufus scheduler to send emails every day at 4am. To do this I
am using:
scheduler = Rufus::Scheduler.start_new
scheduler.every '1d', :first_at = '2010/04/1 04:30' do
#do something
end
There is a better way to write this schedule ?
Ralph Shnelvar wrote:
Is this the right forum to post this to?
In jRails.js there is a call to
hide
in which hide takes four parameters.
Where is that hide defined?
To answer my own question ... so for the next poor schmuck who doesn't
know any Javascript ...
Using firebug and the
On Thu, Apr 1, 2010 at 1:11 PM, Ralph Shnelvar li...@ruby-forum.com wrote:
Is this the right forum to post this to?
Not really, but... :-)
Using firebug and the wonderful http://jsbeautifier.org/
to unminimize javascripts so that you can actually use Firebug to track
through the code ...
Hm...seems like a better aproach...
How about this schedule to run every day...is it correct? Looks like
strange for me have to define the :first_at param...
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails:
Hello,
I got two controllers, both should create new subscriptions (the name
of the model). Now the thing is how to create in case of the
controller not named subscriptions_controller.rb.
To avoid flooding the list I put both controllers and the view in the
other controller (the one that fails)
Quy Doan wrote:
Have you added sweeper path ?
config.load_paths += %W( #{RAILS_ROOT}/app/sweepers)
Yes, and they seem to load ok. I don't get any errors for uninitialized
constants or anything.
Environment.rb
RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION
require
I have an application which does some time-consuming work after a form
is submitted.
I'd like to have a little message saying please wait but I'm not
sure how to implement that.
I'm thinking somehow you have to send a page to the browser from the
method that is being called by the form.
Sounds
Hi Jeff,
Thanks! Every single day I'm amazed by what's possible with Ruby, the more I
learn, the less I know, but I guess that's good :)
This led me to the SystemTimer gem. The Timeout class was failing, I guess
because it is external call that cross the barriers, as explained here:
Hey all,
I am unable to get a highcharts plugin to render a chart in a rails
application: http://github.com/loudpixel/highcharts-rails
I believe it has something to do with the sql queries to the database
placed in a ruby array, which the javascript is unable to intepret. This
is what I have:
I'm running into an interesting problem where an ActiveRecord instance
#valid? returns false, but #errors#full_messages is empty.
This is in one of my models. The code was run in ruby-debug sitting in
one of my validation methods.
(rdb:1) self.publisher_address.valid?
false
(rdb:1)
This is the first time I'm working with Engine's in Rails, let alone
in Rails 3. I basically followed these steps to set up the mountable
app:
http://blog.dynamic50.com/index.php/2010/02/rails-3-0-mount-multiple-apps-as-engines/
Now that the mountable app is built, I'm moving on to create the
I have a Model called Page, which has a column called page_type.
I want to display all pages by page type (which can change/be added).
What is the best way of doing this? I was, in the view looping through
each page_type, then doing an SQL search for a Page with that
page_type. But I don't want
Are you looking for something like this?
@pages = Page.all(:order = 'page_type')
order is just a SQL ORDER fragment. Then display it in your view
with:
= render :partial = 'page', :collection = @pages
I'm not sure if that's too simplistic of an approach. Does that help?
Angelo
On Apr 1, 3:21
Hi friends
I am using act_as_solr plugin for indexing my database for my application i
am having huge volume data (70 data) for this i am facing a problem it
will take more then 6 to 7hrs to index the whole data is that any way to
speed up the indexing process please help me friends
--
You
I've uploaded my development project to my production server, and am
experiencing an odd effect.
All database find methods in which the date is passed as a param are
coming up nil -- it seems that there's an incompatibility in the date/
time format in there somewhere.
E.g. in the view, obtaining
74 matches
Mail list logo