I'm inmporting a csv file and I have strings like this: 15-OTT-98, 5-GEN-96.
They are dates: OTT stands for Oct in italian and GEN stands for Jan.
How can I render those strings in valid date format?
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails:
On 19 May 2011, at 10:24, Mauro wrote:
I'm inmporting a csv file and I have strings like this: 15-OTT-98,
5-GEN-96.
They are dates: OTT stands for Oct in italian and GEN stands for Jan.
How can I render those strings in valid date format?
# Note: my Italian is very rusty to non-existent,
On 19 May 2011 09:04, Peter De Berdt peter.de.be...@pandora.be wrote:
On 19 May 2011, at 10:24, Mauro wrote:
I'm inmporting a csv file and I have strings like this: 15-OTT-98,
5-GEN-96.
They are dates: OTT stands for Oct in italian and GEN stands for Jan.
How can I render those strings in
On 19 May 2011, at 11:17, Mauro wrote:
Ok.
Can I create past that method inside a custom rake task and use it
inside the namespace?
Ex:
/lib/tasks/import.rake
def parsedatestring(datestring)
day, monthname, year = datestring.split(-)
year = (year.to_i Date.today.year - 2000 ? 19#{year}
Does Rails 3 support native working with postgresql schemas, or I
should try some own solution?
I have some already-created postgresql database with 4 or somth
schemas.
By putting schema_search_path: ejabber, public, admin, statistic
into database.yml I told Rails that I have more than 1 schema.
On May 18, 5:16 pm, PsiPro arjes...@gmail.com wrote:
Since it looks like your making a storefront I would suggest looking
at Spree's ERD for inspiration. (http://rails-erd.rubyforge.org/images/
spree.png)
Brian, both Spree and ERD are very helpful. I hadn't come across them
before. Thanks!
On May 18, 8:56 pm, Kendall Gifford zettab...@gmail.com wrote:
Any chance you'd be willing to list some of the gems that aren't working
with your setup? It might be in yours and everyones best interest to try to
fix get the gems themselves fixed so they can properly work with nested
Hi,
we have a mac osx server in the intranet where i want to host my rails
application. I installed successfully passenger on the machine.
Now when I am working on the server, I can access the rails app
through the url, e.g. test.local
But when I put the same URL in the browser in one of the
On 19 May 2011, at 12:32, frankblizzard wrote:
we have a mac osx server in the intranet where i want to host my rails
application. I installed successfully passenger on the machine.
Now when I am working on the server, I can access the rails app
through the url, e.g. test.local
But when I
Hi,
I want to use module in Rails 3
I have module in /lib directory.
file name: my_module.rb
Code of Module:
module MyModule
def self.my_method
loop do
puts I am started!!!
sleep 2
end
end
end
Now, I want to use this module in my rb file resides in
For further details about this issue, refer to the post -
http://rorguide.blogspot.com/2011/03/installing-mysql2-gem-on-ruby-192-and.html
This along with many other issues of mysql2 gem has already been solved
by many users and they have posted their solutions also.
Thanks
Ritesh Kumar
Hi Peter,
thanks for your reply.
BTW, why would you run Apache or nginx on port 3000 when you can just
run everything on the same webserver?
I don't have apache running on 3000 - it have Webbrick still running
there so the clients can reach the rails app, but I want to deploy it
via
I think the question's more about creating a new record that has all of
the relationships?
All the Marshal trick does is create an identical copy.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk
Hello,
I'm trying create a simple check_box that if checked include a
hidden_field, but I haven't success.
Something like this:
p class=field/p
%= check_box_tag(:patrono, value = 1, checked = false, options =
{}) %
%= f.label Patrono %
% if :patrono.checked == true %
%=
Hi,
I am trying to install a paperclip gem using the command
`gem install paperclip-2.2.0.gem` . This doesn't work for me.. it keeps
giving me the error..
mohnish@mohnish-desktop:~/Downloads/Important_backups/new_gems/paperclip$
gem install paperclip-2.2.0.gem
ERROR: While executing
Try this:
%= collection_select(:taggings, :tag_ids, Tag.find(:all), :id, :name,
{}, {:multiple = true}) %
--
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
On 19 May 2011, at 14:07, frankblizzard wrote:
BTW, why would you run Apache or nginx on port 3000 when you can just
run everything on the same webserver?
I don't have apache running on 3000 - it have Webbrick still running
there so the clients can reach the rails app, but I want to deploy
Hi ,
Am using rails 3 .I have added code in my controller
---
la.map{|c| ActiveRecord::Base::Serializer.new(c).serializable_record
---
But am getting below error
Can anyone point me in the right direction... I have created a page
using a form_for which pulls from question' table. I would like to
submit answer data to student_data table. I can't figure out how to
submit specific fields to the alternate table. f.submit uses the table
specified by
Yes Michael you are right...
Mohammed,
You can achieve this by using git bash...(git command line). Just
google it for git installation for windows.
For multiple tab support you can use console2. One of the coolest
features is the ability to plug-in any shell. So you can even configure
it to
DC,
Try this,
http://www.railsforum.com/viewtopic.php?id=717
Use form_tag instead form_for
Saravanan K
http://bit.ly/9NpP7e
--
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
Eric,
You have to write javascript function within the check_box_tag in order
to verify whether the checkbox is checked or not and then enable the
hidden field if it is checked.
Saravanan K
http://bit.ly/9NpP7e
--
Posted via http://www.ruby-forum.com/.
--
You received this message because
Hi,
Thanks for the suggestions. I've restructured my application a bit, but
am running in to problems with 'repo' not being defined in the
controller. I'm actually a bit confused about where the method to commit
the files should go. My thinking is that it should be in the model (as
that
hi,
use jQuery and then
= f.hidden_field_tag hidden_field, value, { :id = hidden_field}
= f.check_box_tag name, 1,false, {:id = my_checkbox}
jQuery('#my_checkbox').bind('click', function() {
jQuery('#hidden_field').attr('disabled', !jQuery(this).attr('checked'));
}
when field is disabled,
i have option model with this structure:
Class Option ActiveRecord::Base
has_one :base_price, :class_name = OptionPrice, :conditions =
{:base = true}
define_index do
indexes base_price.provider_price, :as = :p_base_price
indexes base_price.margin_price, :as = :m_base_price
Hi All,
I just started incorporating a mobile MIME format into my websites to
account for mobile phone technologies visiting my pages. I decided to
share a functional controller test for requesting the mobile mime type
and asserting if it finds a particular div selector.
This test case can be
Hi
I have a form for importing a csv file. With every entry in my CSV I
do a delayed background call from a webservice and the result is then
saved to my database. This is working great!
Now I tried a CSV file with over 400 rows. After clicking import in my
form it takes some time and then I get
Adding an example for show.mobile.erb for a user model so that you don't
encounter any gotchas. This is using the same example from above:
setup do
@user = users(:testuser)
end
test should get show.mobile.erb do
@request.accept = mobile
get :show, :id = @user.to_param, :format = 'mobile'
rspec-core-2.6.1 is released!
This is a bug fix release, restoring integration with with rcov.
full changelog: http://github.com/rspec/rspec-core/compare/v2.6.0...v2.6.1
* Bug fixes
* Don't extend nil when filters are nil
* `require 'rspec/autorun'` when running rcov.
--
You received this
Hello all,
with great difficulty , I guess I have finally been able to find the
appropriate git commit of paperclip which would suit my project's config
which is Ruby 1.8.7 and rails 2.0.2.
I am trying to implement a POC before I integrate paperclip in my
project. The POC is basically
First a disclaimer: I'm no expert on using PostgreSQL w/rails. So, take this
with a grain of salt. Hopefully someone w/more knowledge will respond.
On Thursday, May 19, 2011 3:46:29 AM UTC-6, sleepwalker wrote:
Does Rails 3 support native working with postgresql schemas, or I
should try some
On Thursday, May 19, 2011 5:15:29 AM UTC-6, News Aanad wrote:
Hi,
I want to use module in Rails 3
I have module in /lib directory.
I'm going to assume by /lib you mean RAILS_ROOT/lib ...
file name: my_module.rb
Code of Module:
module MyModule
def self.my_method
loop do
Got a weird situation with an update put to a controller with a form with
nested attributes.
On the data below, I am updating data for both items ('0' and '1') in
rosters_attributes (in the example below I am updating the 'name' attribute
to a new value in both cases. What I am stuck on is that
Is there a form to handle Array type?
I generated a scaffold for a model that has Array for a field type.
But the partial form does not handle this type.
How do we tie Array types to forms?
Thanks,
Alex
--
You received this message because you are subscribed to the Google Groups Ruby
on
Is there a form to handle Array type?
I generated a scaffold for a model that has Array for a field type.
But the partial form does not handle this type.
How do we tie Array types to forms?
Thanks,
Alex
--
You received this message because you are subscribed to the Google Groups Ruby
on
Hey All,
I am having a problem getting an old Ruby on Rails 2 app that hasn't
worked in a year to work.
I'm trying to run rake test:functionals in the root of my project
directory but am getting undefined method `name' for
SystemTimer:String
I've pasted everything that I believe relevant to the
Hi,
thank you very much for taking the time to give this detailed answer.
I will go through it through the weekend in detail as I want to be
able to administrate these things myself.
I'll let you know how it goes..
frank
BTW, why would you run Apache or nginx on port 3000 when you can just
On Thursday, May 19, 2011 3:41:22 PM UTC-6, Ruby-Forum.com User wrote:
Hey All,
I am having a problem getting an old Ruby on Rails 2 app that hasn't
worked in a year to work.
I'm trying to run rake test:functionals in the root of my project
directory but am getting undefined method `name'
What kind of values are you storing in your array? This may be the sort of
thing you need to roll yourself.
Walter
On May 19, 2011, at 5:38 PM, Alex Katebi alex.kat...@gmail.com wrote:
Is there a form to handle Array type?
I generated a scaffold for a model that has Array for a field
I am storing email addresses.
On Thu, May 19, 2011 at 6:21 PM, Walter Lee Davis wa...@wdstudio.com wrote:
What kind of values are you storing in your array? This may be the sort of
thing you need to roll yourself.
Walter
On May 19, 2011, at 5:38 PM, Alex Katebi alex.kat...@gmail.com wrote:
I had the same problem, and found the solution here, by Peturrr:
http://ubuntuforums.org/showthread.php?t=306216
---
Do _not_ use:
sudo gem install rmagick
Peturrr solved this by uninstalling the gem and installing the
precompiled rmagick ubuntu package from the universe repos.:
Hi, I've just gotten started with devise and it's pretty nifty. I just
wondered if people could point me in the right direction for finding
info about 3 things.
1. How come the login form does not report error messages when the
username/password is incorrect? I generated the views and replaced
Hello People,
I have created a tiny Rails app for my personal use. I want to host it
on my personal computer (just like PHP can be hosted easily). I use
Ubuntu Linux, can any one tell me how to do it? Is there any
documentation? Has any one tried it out?
Thanks in advance.
--
Posted via
This is easily done, if you consider Install Apache; gem install passenger;
gem install passenger-apache; follow post install config instructions to be
easy.
Walter
On May 19, 2011, at 8:03 PM, Karthikeyan A k li...@ruby-forum.com wrote:
Hello People,
I have created a tiny Rails app for
On May 19, 5:13 pm, Walter Lee Davis wa...@wdstudio.com wrote:
This is easily done, if you consider Install Apache; gem install passenger;
gem install passenger-apache; follow post install config instructions to be
easy.
I would just run passenger standalone (using Nginx)
--
You received
I am trying to write an application which uses screen scraping. I have
to first get a screen and get then scrape that page and using the link
to a frame in that page, I have to get that frame and then finally
scrape that frame and get some relevant information. When I make the
first call in the
Hey,
I got a form which looks like this:
- form_for(@article, :html = {:multipart = true}, :url =
articles_path) do |f|
= errors_for(@article)
.field
= f.label :text
%br
= f.text_field :text
.field
= f.label :author_id
%br
= f.text_field :author_id
.actions
47 matches
Mail list logo