Dear All
i follow the instruction of Ruby on rails 3 tutorial, now i want to
update the email of the User,
user =User.find(1)
user.update_attributes(:email=t...@gmail.com)
but the save failed, error message is password can not be blank,
so i try this one
my rudimentary understanding... you need these all to be has_many :through
relationships and you need only one person model and new relationship
models to account for privileges.
user
has_many organizations, through memberships
organization
has_many users, through memberships
membership
I am using validations for first name, but I am getting error message
two times for the label and text_field,
div class=field
%= f.label :first_name %nbsp;
%= f.text_field :first_name %
/div
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails:
On Tue, Jan 17, 2012 at 9:12 AM, Daisy Di li...@ruby-forum.com wrote:
Dear All
i follow the instruction of Ruby on rails 3 tutorial, now i want to
update the email of the User,
user =User.find(1)
user.update_attributes(:email=t...@gmail.com)
but the save failed, error message is password
I'm interested too, I've added you to a circle.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To view this discussion on the web visit
https://groups.google.com/d/msg/rubyonrails-talk/-/vFUoj8FMJNIJ.
To post to this group, send email to
I have:
class Company ActiveRecord::Base
has_many :categorizations
has_many :categories, :through = :categorizations
rails c
irb(main):003:0 comp=Company.find 1
Company Load (2.0ms) SELECT companies.* FROM companies WHERE
companies.id = 1 LIMIT 1
= #Company id: 1, name: company-1,
I am adding you all Got 20+ thanks!
I am hoping we can start from this Thursday/Friday.
Thanks
Rajeev
On Tue, Jan 17, 2012 at 3:13 PM, Agis A. corestudios...@gmail.com wrote:
I'm interested too, I've added you to a circle.
--
You received this message because you are subscribed to the
On 17 January 2012 06:01, sachin kewale sachinkew...@gmail.com wrote:
hi all,
I successfully deployed the ROR project on Centos server,i have one
question how can i access that application from my machine ?
on starting WEBRick server it is started on this ip http://0.0.0.0:3006,
i want
On 17 January 2012 07:40, loganathan sellappa loganathan...@gmail.com wrote:
Hi All,
I am having an ror application with ruby1.8.7 and rails2.3.5, the
performance of my application is not good enough. Is their any plugin or gem
available to improve the performance. Also I have already
Nice! Can you give us some more general info? For example, what's the level
(beginner, intermediate etc)? Will we use 'Hangout'? Who's going to teach?
I'm excited about this :D
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To view this
On 17 January 2012 08:56, Kapil Kaligotla
kapil.kaligo...@magikminds.com wrote:
I am using validations for first name, but I am getting error message
two times for the label and text_field,
div class=field
%= f.label :first_name %nbsp;
%= f.text_field :first_name %
/div
Show us the
If I get this right, Unit Testing is all about testing if our app handles
our data the way it should. In other words it's all about testing the
model? (ex. does our app *rejects product titles with fewer than 10 chars *as
it should?)
So the way to do unit tests are always to use assertions? Or
On 16 ene, 15:54, jsnark s...@monmouth.com wrote:
Oops. Pilot error.
set :bundle_flags, '--local'
did not work.
On Jan 16, 9:43 am, jsnark s...@monmouth.com wrote:
Usually it looks more like:
set :bundle_flags, --deployment --local --without development test
--deployment has several
In my model i had used the validation
validates :first_name, :format = {:with = /^[a-zA-Z.\s]*$/
i}, :length = {:minimum = 1, :maximum = 25}, :presence = true
in views
div class=field
%= f.label :first_name %nbsp;
%= f.text_field :first_name %
/div
in the browser i am getting
On 16 ene, 16:54, Erwin yves_duf...@mac.com wrote:
when I use a quart joins on Roles and Profiles models
Role.joins(:profiles).where('profiles.profilable_type' = Admin)
I get the following generated sql
SELECT `roles`.* FROM `roles` INNER JOIN `profiles_roles` ON
On 17 January 2012 11:20, Kapil Kaligotla
kapil.kaligo...@magikminds.com wrote:
In my model i had used the validation
validates :first_name, :format = {:with = /^[a-zA-Z.\s]*$/
i}, :length = {:minimum = 1, :maximum = 25}, :presence = true
in views
div class=field
%= f.label
On Mon, Jan 16, 2012 at 11:44 PM, Daisy Di li...@ruby-forum.com wrote:
Dear All
i am a beginner of ruby ob rails , now there is one problem i dont know
how to resolve it,there two tables ,
one is reservation,colums are:
id(int),mbr_id(int),,qty_reserved(decimal),valid_date(datetime)
the
I'm a beginner to both Ruby and Rails and I'm currently reading the Agile
development with Rails, in which I'm currently developing the cart of the
store.
I have a *line_items* model which *belongs_to :products*. This makes sense.
Later in the example we use this code to check if a product is
On 17 January 2012 11:47, Agis A. corestudios...@gmail.com wrote:
I'm a beginner to both Ruby and Rails and I'm currently reading the Agile
development with Rails, in which I'm currently developing the cart of the
store.
I have a line_items model which belongs_to :products. This makes sense.
Hi all
I am working on app related to song download.In that I can
able to download a individual song added to cart.
Now what i want is to download all songs added in cart in single
click.Please help me out.
Thanks in advance..
--
You received this message because you are
I see.
Now I've upgraded my seeds.rb file, to add some entry into the line_items
table and see how it works.
Actually I've added this line: *LineItem.create (product_id: '8', cart_id:
'1')*
*
*
but when I run rake db:seed I get this error:
rake db:seed
rake aborted!
On Tue, Jan 17, 2012 at 1:05 PM, Agis A. corestudios...@gmail.com wrote:
I see.
Now I've upgraded my seeds.rb file, to add some entry into the line_items
table and see how it works.
Actually I've added this line: *LineItem.create (product_id: '8',
cart_id: '1')*
*
*
but when I run rake
Thank you! Silly me for missing that.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To view this discussion on the web visit
https://groups.google.com/d/msg/rubyonrails-talk/-/PWJe97NuBPkJ.
To post to this group, send email to
I Want to download mor than 5 songs at a time. I Tried that
http://stackoverflow.com/questions/3498281/mass-downloading-from-rails-maybe-with-paperclip
using that web site.
Is there any other way to download songs without using zip file.
--
Posted via http://www.ruby-forum.com/.
--
You
Hi Rajeev,
Great idea.Tell me if i could help you!
On Jan 17, 3:16 pm, Agis A. corestudios...@gmail.com wrote:
Nice! Can you give us some more general info? For example, what's the level
(beginner, intermediate etc)? Will we use 'Hangout'? Who's going to teach?
I'm excited about
Try to add some thing in about page first so that every body came to
know what is it all about.
On Jan 17, 3:16 pm, Agis A. corestudios...@gmail.com wrote:
Nice! Can you give us some more general info? For example, what's the level
(beginner, intermediate etc)? Will we use 'Hangout'? Who's
Hi Fred,
I was having the same issue. I finally resolved it by defining the
find_by_email method in my app/models/user.rb file...
Example:
---
def self.find_by_email(email)
where(:email = email).first
end
---
That did it for me!
Good luck,
Aaron Gray
--
Posted
@Jordan, thank you for the explanation. I'm having a hard time seeing what
the relationships model looks like: id, user_id, blog_id,
relationship_type_id? In that, the relationship_type_id decides if the
relationship is a user or an editor?
Blog
belongs_to organization
belongs_to editor
Just a note that you should be careful using this method to increment a
value. It can cause a race condition.
A safer method is to use increment_counter since it updates the value
directly in the database, not using the current attribute value on the
instance
It was easier to develop each app independent of the others. When I
found that I was duplicating code in models, I created a gem that
contains the common methods. I'm now wondering if it would be better
to have a single large app. For one thing, it would make navigating
between the apps easier.
Evoke Technologies is client-centric and relationship-based company,
with focus to provide cost effective software maintenance support
while our client's can focus on future needs. As a SEI-CMM level 3
standards company operating as an offshore development center in
Hyderabad. Evoke has
Check out ActionDispatch::Cookies on http://api.rubyonrails.org/
I think you'll want to use cookies.delete
On Jan 16, 1:36 am, serpent403 aman.webdra...@gmail.com wrote:
In my rails application i am using oauth to get access to the user's
profile data. The thing is when the authorization login
Roundarch is seeking a Ruby on Rails Developer in NYC. Please send your
resume to rwankov...@roundarch.com for immediate consideration.
--
Rossanne
--
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
I've looked through a fair amount of the questions - yet, I am still
confused.
I am making a Rails app that connects with the Healthgraph API (here
http://developer.runkeeper.com/healthgraph/registration-authorization).
I am supposed to make a POST request via Rails - based on a parameter
I
I'm working on a Rails 3 app that requires a few fields that can be given
in multiple units of measure, e.g. miles, kilometers, etc. for distances,
miles-per-hour, meters-per-second, etc. for speeds, and so on. I'm curious
how others have modeled these types of compound datatypes in Rails. Some
replace 0.0.0.0 with your IP address.
if your centos server IP is 192.168.168.2 then you should access it using
this address
http://192.168.168.2:3006
make sense?
Thank You
/Lito Manansala
twitter: @avmanansala https://twitter.com/#%21/avmanansala
skype: bulcrack
On Tue, Jan 17, 2012 at 2:01
Hi all,
I want to get all association methods in one single model
Any default method is provided by Active Record ???
i am using ruby 1.9.3 and rails 3.1.3
Please reply me
Thanks,
kingston.s
--
You received this message because you are subscribed to the Google Groups Ruby
on
WeLoveWords en quelques mots :
WeLoveWords.com , société créée il y a 2 ans, est le premier réseau
social destiné aux auteurs.
Nous sommes par ailleurs la première place de marché des contenus
écrits et aidons nos partenaires à trouver des textes qui
correspondent à leurs besoins.
Nous avons déjà
Hi all,
Saving without callbacks is not working in rails 3.1.
please tell me alternatives available..
Thanks,
Kingston
--
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 17 January 2012 13:40, jsnark s...@monmouth.com wrote:
It was easier to develop each app independent of the others. When I
found that I was duplicating code in models, I created a gem that
contains the common methods. I'm now wondering if it would be better
to have a single large app.
On 17 January 2012 06:41, Kingston.s jenor...@gmail.com wrote:
Hi all,
I want to get all association methods in one single model
What do you mean get the methods?
Colin
Any default method is provided by Active Record ???
i am using ruby 1.9.3 and rails 3.1.3
Please reply me
Could not find net-ssh-2.2.2 in any of the sources
(Bundler::GemNotFound)
$ ls -l vendor/cache/net*
-rw-rw-r-- 1 xxx xxx 27136 2012-01-17 08:44 vendor/cache/net-
scp-1.0.4.gem
-rw-rw-r-- 1 xxx xxx 61440 2012-01-17 08:44 vendor/cache/net-
sftp-2.0.5.gem
-rw-rw-r-- 1 xxx xxx 133120 2012-01-17
On 17 January 2012 11:22, Kingston.s jenor...@gmail.com wrote:
Hi all,
Saving without callbacks is not working in rails 3.1.
Yes it is.
I presume you mean that you cannot make it work. Tell us what you
have tried and what the result was.
Colin
--
You received this message because you are
On Tue, Jan 17, 2012 at 8:36 AM, Tim Shaffer timshaf...@me.com wrote:
Just a note that you should be careful using this method to increment a
value. It can cause a race condition.
A safer method is to use increment_counter since it updates the value
directly in the database, not using the
On Tue, Jan 17, 2012 at 7:41 AM, Kingston.s jenor...@gmail.com wrote:
Hi all,
I want to get all association methods in one single model
Any default method is provided by Active Record ???
i am using ruby 1.9.3 and rails 3.1.3
User.reflect_on_all_associations.map{|a|
On Jan 17, 2012, at 7:58 AM, Deepika V. wrote:
I Want to download mor than 5 songs at a time. I Tried that
http://stackoverflow.com/questions/3498281/mass-downloading-from-rails-maybe-with-paperclip
using that web site.
Is there any other way to download songs without using zip file.
A
If you are finding yourself having to switch between some of the
applications just to get a simple task done then those applications,
at least, would do well to be merged.
But beware at the other end we have some applications that have
evolved over time to the extent that we are looking to break
On Tue, Jan 17, 2012 at 00:06, Dustin Frazier dustin.fraz...@gmail.com wrote:
I'm working on a Rails 3 app that requires a few fields that can
be given in multiple units of measure, e.g. miles, kilometers, etc.
for distances, miles-per-hour, meters-per-second, etc. for speeds,
and so on. I'm
Hi, I have to test one of my models, but it uses a seed database.
How do I delete everything on my database and create it again from seed
(default code for some examples) for every one of my unit tests?
Right now, when I run rake db:test:units (and if I put something on my code
like
What libraries did you use?
On Sat, Jan 14, 2012 at 1:33 AM, Robert Walker li...@ruby-forum.com wrote:
Rodrigo Ruiz wrote in post #1040810:
The problem is that the function I'm trying to minimize is a lot more
complicated (so is its derivative), so I wanted a function that could do
the
Thanks Javier.
--
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
On Tue, Jan 17, 2012 at 4:04 PM, Rodrigo Ruiz rodrigo.ru...@gmail.comwrote:
Hi, I have to test one of my models, but it uses a seed database.
How do I delete everything on my database and create it again from seed
(default code for some examples) for every one of my unit tests?
Right now,
Hi,
I can deploy to staging fine.
When i try and deploy to production i get the following error below,
it gets so far and then bombs out.
RAILS_ENV=production bundle exec rake assets:precompile --trace
mkdir -p /var/www/rails/workstars/site/releases/20120117151339/public/
assets/vouchers
mkdir
On 17 January 2012 15:04, Rodrigo Ruiz rodrigo.ru...@gmail.com wrote:
Hi, I have to test one of my models, but it uses a seed database.
How do I delete everything on my database and create it again from seed
(default code for some examples) for every one of my unit tests?
I think most
I appreciate the reply about to implement the Unit and Measure classes (as
you call them). I'm already pretty clear on how I want to handle the values
with units themselves, my questions is more about how best to use these
Measure instances in a Rails model: storing unit-ed values for many
Hello there ppl.
I want to have a counter which will:
- count the number of times that the 'index' controller action is called
and store this in a cookie
- will be displayed in the view only if the times visited is greater
than 5
- it must look like this: You have visited this
On Mon, Jan 16, 2012 at 11:40 PM, loganathan sellappa
loganathan...@gmail.com wrote:
I am having an ror application with ruby1.8.7 and rails2.3.5, the
performance of my application is not good enough. Is their any plugin or gem
available to improve the performance.
There are gems to *analyze*
On 17 January 2012 16:24, Agis A. corestudios...@gmail.com wrote:
Hello there ppl.
I want to have a counter which will:
count the number of times that the 'index' controller action is called and
store this in a cookie
will be displayed in the view only if the times visited is greater than 5
Thanks Tom.
I feel like anyone doing this for the first time: clumsy!
On Mon, Jan 16, 2012 at 4:05 PM, Tom Meinlschmidt to...@meinlschmidt.comwrote:
and now change 'return false' to 'return false' inside your jquery
submit()
tom
On Jan 16, 2012, at 21:58 , Tom Allison wrote:
Changed
No I'm calling it from the controller, should I call it from the view? If I
try to call it from the view like this: counter_display I get
undefined local variable or method `show_counter' for
##Class:0x007fdbab80c7b0:0x007fdbab813f10
--
You received this message because you are subscribed to
Thank you, I manage to do what I wanted with fixture.
Going to trying factory too as soon as I can.
Thanks for the help
On Tue, Jan 17, 2012 at 1:50 PM, Colin Law clan...@googlemail.com wrote:
On 17 January 2012 15:04, Rodrigo Ruiz rodrigo.ru...@gmail.com wrote:
Hi, I have to test one of my
On 17 January 2012 16:38, Agis A. corestudios...@gmail.com wrote:
No I'm calling it from the controller, should I call it from the view? If I
try to call it from the view like this: counter_display I get
Please don't top post, insert your reply into the previous message at
appropriate points.
I've done it as you said, in the helper. So this is how it should be done?
Is there a general rule for deciding whether a function like this should go
into the controller or into the helper?
My code in the helper:
def display_counter
You have visited this page +
On Jan 17, 2012, at 11:55 AM, Agis A. wrote:
I've done it as you said, in the helper. So this is how it should be done? Is
there a general rule for deciding whether a function like this should go into
the controller or into the helper?
My code in the helper:
def display_counter
On 17 January 2012 16:55, Agis A. corestudios...@gmail.com wrote:
I've done it as you said, in the helper. So this is how it should be done?
Is there a general rule for deciding whether a function like this should go
into the controller or into the helper?
My code in the helper:
def
I've found nothing about the method in subject.
If, for a has_many :though = managements association I do:
Model.new.methods.grep(/management/)
I see some methods like:
:after_remove_for_managements, :before_add_for_managements=,
:before_add_for_managements
and others similar.
What those
I must create a class (JobClass) and include ActiveModel::Validations?
and then
valided = JobClass.new(params).valid?
The JSON body :
http://pastebin.com/TwRbydmq
I can not create rules corresponding to the validation of the field
method ... It can be concat or split but it is not the first
This makes sense. But on the other side, if I put this method in the helper
(as I did) then I'm embedding business login in the helper (if 5), am I
not?
It's more a logical question. Is the *if visits are more than 5 display
the counter* business logic or not? Which part of the framework
Well I did something like this now, just in order to let the controller
decide *with how many visits the counter will appear.*
*
*
Controller:
def increment_counter
session[:counter] ||= 0
session[:counter] += 1
@times_visited = session[:counter]
@min_times = 5
end
On Tue, Jan 17, 2012 at 3:20 AM, Kapil Kaligotla
kapil.kaligo...@magikminds.com wrote:
validates :first_name, :format = {:with = /^[a-zA-Z.\s]*$/
i}, :length = {:minimum = 1, :maximum = 25}, :presence = true
Your format regex will pass an empty string (), or a string of nothing
but space
Archit Bhise wrote in post #1041310:
I'm trying to also do it via Javascript - but I'd rather not - since
it leaves my client secret exposed. Also, I don't recieve data back
either.
...
...
$.ajaxSetup({
'beforeSend': function(xhr){
xhr.setRequestHeader(Accept,
On 17 January 2012 18:19, Agis A. corestudios...@gmail.com wrote:
Well I did something like this now, just in order to let the controller
decide with how many visits the counter will appear.
Controller:
def increment_counter
session[:counter] ||= 0
session[:counter] += 1
This is a full time, on-site, salaried Sr. Ruby on Rails Developer
position located in New York City paying $100,000-$135,000 depending
on experience + benefits. No telecommuting allowed. US Citizens or
Green Card holders only please. Local candidates preferred, but
candidates interested in
Is there an alternative to Rails for Zombies 2? I'm looking for the
free kind. ;)
--
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
Hey all,
I have 90 records in database with this kind of format: 2011-05-10
11:23:15
So they are all 2011-05-10 but have different times.
User enters two dates, and just in case the two dates are the same, I
want to ensure I grab all records that span entire day.
So I do this:
On Tue, Jan 17, 2012 at 5:03 PM, Rory Glenn Pascua li...@ruby-forum.comwrote:
Is there an alternative to Rails for Zombies 2? I'm looking for the
free kind. ;)
Well... RFZ2 its unique :), but there are other resources... not as fun as
RFZ (but that's my opinion)
You can try this
On Jan 17, 6:53 pm, Colin Law clan...@googlemail.com wrote:
On 17 January 2012 11:22, Kingston.s jenor...@gmail.com wrote:
Hi all,
Saving without callbacks is not working in rails 3.1.
Yes it is.
I presume you mean that you cannot make it work. Tell us what you
have tried and what the
On Jan 17, 7:08 pm, Peter Vandenabeele pe...@vandenabeele.com wrote:
On Tue, Jan 17, 2012 at 7:41 AM, Kingston.s jenor...@gmail.com wrote:
Hi all,
I want to get all association methods in one single model
Any default method is provided by Active Record ???
i am using ruby 1.9.3
I need some help please..
when I created web application about books market, i create a cart and
using test the message error appear like this on rake test:functionals
LineItemsControllerTest
test_should_create_line_item
ERROR
Cannot redirect to nil!
and also appear on web side,
This post helped me resolve my issue:
http://www.ruby-forum.com/topic/57923
The key is using the strftime method.
So now I can do this:
units.reports.reports_for(Date.parse(Date.parse('5/10/2011').strftime('%Y/
%d/
%m')).beginning_of_day,Date.parse(Date.parse('5/10/2011').strftime('%Y/
80 matches
Mail list logo