I could easily write the HTML to create a few select elements, however, it's
the Ruby part that I am not as familiar with. Could you provide an example of
what the controller code (or model, helper, etc) would look like to convert the
3 fields into a valid time value ready to store in a
if cookies is permanent i cant verify if signed in is true or false
--
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 to this group, send email to rubyonrails-talk@googlegroups.com.
To
On 14 August 2011 05:04, Nagesh Shenoy li...@ruby-forum.com wrote:
Thank you Walter and Colin for giving such a good idea. I ll try with
foreigner gem and will go through rails guide.
1.)Actually i wanted to confirm whether rails has support for
non-integer primary_key?
It can be done, but
I highly recommend using jQueryUI Datepicker for more usable date selection.
However, if you want to have it your way, create fields in your model for
all the select boxes, and use the before_save callback to construct the
final date field for storing in the database.
Refer
3. Yes.
http://compositekeys.rubyforge.org/
On Sun, Aug 14, 2011 at 12:42 PM, Colin Law clan...@googlemail.com wrote:
On 14 August 2011 05:04, Nagesh Shenoy li...@ruby-forum.com wrote:
Thank you Walter and Colin for giving such a good idea. I ll try with
foreigner gem and will go through
On 14 August 2011 05:56, Rahul raikra...@gmail.com wrote:
# To change this template, choose Tools | Templates
# and open the template in the editor.
puts Hello World
def squareroot(a)
u=a
l=0
while (l=u)
m = l + (u-1)/2
if (m**2) a
l = m + 1
elsif (m**2) a
On 14/08/11 05:56, Rahul wrote:
# To change this template, choose Tools | Templates
# and open the template in the editor.
puts Hello World
def squareroot(a)
u=a
l=0
while (l=u)
m = l + (u-1)/2
puts u = #{u}, l = #{l}, m = #{m}
if (m**2) a
[snip rest of code]
On 14 August 2011 07:42, Andrew misbehav...@gmail.com wrote:
I could easily write the HTML to create a few select elements, however, it's
the Ruby part that I am not as familiar with. Could you provide an example of
what the controller code (or model, helper, etc) would look like to convert
Read this:
http://ruby.railstutorial.org/chapters/sign-in-sign-out#sec:sessions
--
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 to this group, send email to
however, it's the Ruby part that I am not as familiar with.
Then it's time to put rails away and buy a beginning ruby book.
--
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 to this
The Ruby Programming Language by Matz is my personal favorite. You might
want to try that.
On Sun, Aug 14, 2011 at 1:05 PM, 7stud -- li...@ruby-forum.com wrote:
however, it's the Ruby part that I am not as familiar with.
Then it's time to put rails away and buy a beginning ruby book.
--
Hi,
resources :car do
resources :wheel
resources :engine do
resources :piston do
..
so a normal url would be localhost:3000/cars/engines/piston...
I want to rename these objects to something similar localhost:3000/c/e/
p
Basically ONLY in the web url displayed in browser I want
once it new a project, use this command: rails new demo, and it will
run the bundle install command, it takes too long, how to solve it?
this problem appears in ubuntu, when i create a project in windows, no
such problem.
--
You received this message because you are subscribed to the Google
Hello!
Which Ruby on Rails installation scenario is the best for performance
and durability in production:
- Ubunthu + Apache + Passanger
- Ubunthu + Nginx + Unicorn
- Ubunthu + Apache + Mongrel
- Any other option?
And could someone provide links to some best practice or guidelines to
install
On Aug 14, 10:33 am, Yaroslav Govorunov govoru...@gmail.com wrote:
Hello!
Which Ruby on Rails installation scenario is the best for performance
and durability in production:
- Ubunthu + Apache + Passanger
- Ubunthu + Nginx + Unicorn
- Ubunthu + Apache + Mongrel
- Any other option?
Well
On Aug 11, 12:27 pm, Yaroslav G. li...@ruby-forum.com wrote:
Hello!
I’d like to share some concepts with community regarding asynchronous
operations in Rails, hoping for feedback and advice.
We (Helicon Tech) currently work on Ruby
on Rails implementation for
Microsoft IIS. Our goal is to
On 14 Aug 2011, at 04:27, Samhita wrote:
Hi,
resources :car do
resources :wheel
resources :engine do
resources :piston do
..
so a normal url would be localhost:3000/cars/engines/piston...
I want to rename these objects to something similar localhost:3000/c/e/
p
Hello, i have just submitted a bug report, but maybe anybody has some
experience with this problem?
Here are the steps to reproduce the error:
Create an application with 2 models:
$ rails new assoc_test_app
$ cd assoc_test_app
$ rails generate model Person name:string
$ rails generate model
http://ruby.railstutorial.org/ruby-on-rails-tutorial-book
http://guides.rubyonrails.org/
On 12 ago, 07:10, honey ruby emailtohoneyr...@gmail.com wrote:
Can any one guide to to learn much easy and to learn great extent .i
know the basic concepts of loop, form,link_to , redirect_to.then whats
Example
RoR API:
The file name: (no follows rails name convention):
actionpack/lib/action_view/helpers/javascript_helper.rb
The Module name (in namespace ActionView::Helpers) :
module JavaScriptHelper
Our custom code:
The file name:
App/Helpers/javascript_helper.rb
The
This bug is not present in rails 3.1!
--
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 to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send
On Aug 14, 1:52 pm, Frederick Cheung frederick.che...@gmail.com
wrote:
On Aug 11, 12:27 pm, Yaroslav G. li...@ruby-forum.com wrote:
Thank you Fred for your answers!
Personally I worry slightly about ruby's ability to handle several
thousand IO streams. Does it use efficient select
Hi guys,
I need to access the asset_path helper from within a model to get the full
path of an asset. How do I do that?
Thanks
Martin
--
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
Can we able to use rspec in rails console
--
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 to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group,
Hi! This problem(in model):
validates :some_digits_collection, :presence = true, :format = { :with
= /^\d*$/, :message = Must contain only digits! }
So, :some_digits_collection must match only digits. But when I puts
123f(for example) in my form, it matches too and there no errors! Why?
--
I've got a table of events, and each event has a boolean attribute
is_ten_event.
On each row of the table is a chekbox to edit the value of is_ten_event,
so that multiple rows can be edited with one submit.
In order to allow boxes to be un-checked as well, the logic in the
controller works like
On Aug 14, 2011, at 2:29 PM, Misha Ognev wrote:
Hi! This problem(in model):
validates :some_digits_collection, :presence = true, :format =
{ :with
= /^\d*$/, :message = Must contain only digits! }
So, :some_digits_collection must match only digits. But when I puts
123f(for example) in my
On Aug 14, 2011, at 2:58 PM, Michael Baldock wrote:
I've got a table of events, and each event has a boolean attribute
is_ten_event.
On each row of the table is a chekbox to edit the value of
is_ten_event,
so that multiple rows can be edited with one submit.
In order to allow boxes to be
It matches because it's true. The expressions states any number of digits
before the end of line. It does not state exclusively digits.
On Aug 14, 2011, at 12:19 PM, Walter Lee Davis wrote:
On Aug 14, 2011, at 2:29 PM, Misha Ognev wrote:
Hi! This problem(in model):
validates
On Aug 14, 2011, at 4:42 PM, Rafael Ubaldo wrote:
It matches because it's true. The expressions states any number of
digits before the end of line. It does not state exclusively digits.
That wasn't what I got from it on Rubular. The ^ and $ surrounding the
\d* mean the entire line is
In case anyone likes to import .csv files, or you need to do some single
table exports through csv and then re-import them later on, you can use
the following code I created.
The first file is the rake file and the second file is the lib file.
The command to use is:
rake
Walter, thanks for helping,
Try doing it without any special effort in the controller.
Not sure what you mean I should do, I understand what you're saying, but
I'm not sure what the 'normal' / simple way to do this is.
This is what I've got in the controller after trying to simplify like
you
On Sun, Aug 14, 2011 at 3:17 PM, Nike Mike li...@ruby-forum.com wrote:
Can we able to use rspec in rails console
Start your console in the test environment
rails console test
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google
On Aug 14, 2011, at 5:31 PM, Michael Baldock wrote:
Walter, thanks for helping,
Try doing it without any special effort in the controller.
Not sure what you mean I should do, I understand what you're saying,
but
I'm not sure what the 'normal' / simple way to do this is.
This is what
Perhaps the input value is being cast to
an integer for storage, and so the trailing letters are being stripped
out.
This is one simple way to check this: puts f123 to field.
f123.to_i = 0
123f.to_i = 123
But in Rails validation, f123 is validates too.
Michael
--
Posted via
Thank you so much, works!
--
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 to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to
i dont need the cookie for the current user, but for every user. So a
user can see if someone else is connected or not
--
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 to this group, send
But 0 passes this regex -- it's one digit. If you wanted to ensure
that you had n or more digits, you would use a regex like this:
^\d{2,}$
to match two or more digits.
Or, you could check to see if the first digit was larger than a 0 if
that first digit cannot ever be 0:
^[1-9]\d*$
On Aug 14, 2011, at 9:55 PM, Tomas R. wrote:
i dont need the cookie for the current user, but for every user. So a
user can see if someone else is connected or not
Read up on storing the session in a database in the Rails Guide. That
way you can query the database to find out who's on
Examples with authentication
http://www.justinbritten.com/work/2009/05/rails-api-authentication-using-restful-authentication/
http://www.whatcodecraves.com/articles/2008/11/25/how_to_make_an_api_for_a_rails_app/
2011/8/13 Ronaldo Paiva li...@ruby-forum.com
Hi, i'm new in this forum.
I
Tomas R. wrote in post #1016683:
i dont need the cookie for the current user, but for every user.
Adding requirements at this late date voids our contract. I quit.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups Ruby
41 matches
Mail list logo