Displaying 20 results from an estimated 200 matches similar to: "ruby on rails 3 tutorial book chapter9 Signin Failure"
2010 Nov 28
2
Dynamic find_by method returning nil in a class method
I have a user Model with a class method that I am using to do some
authentication
basically something like this
class User < ActiveRecord::Base
attr_accessor :password
attr_accessible :first_name, :last_name,
:email, :birth_date, :sex,
:password, :password_confirmation
email_regex = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
validates :first_name,
2011 May 06
3
Why returns nil?
Hi everyone, I''d like some help to understand this method:
def self.authenticate(email, submitted_password)
user = find_by_email(email)
return nil if user.nil?
return user if user.has_password?(submitted_password)
# Don''t understand why it doesn''t return user instead of nil
# since ''user = find_by_email(email)'' was the last
2011 Nov 04
5
Beating the Top-Posting Dead Horse
On Fri, Nov 4, 2011 at 12:44, BeeRich <beerich-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> As for top posting, that is an old school habit.
Er, no it isn''t. You young punks wouldn''t know old-school if it bit
you in the diapers! Now get off my lawn! ;-)
Seriously though, REAL old-school quoting is interleaved point by
point, with anything irrelevant trimmed
2013 Oct 04
4
Best Book 4 RoR
Hello,
Is there a great book for Ror. I am looking for a book with a step by step
approch and by PROJECTS!!
RoR needs to be ''practiced'', and i didn''t find those WORKING PROJECTS.
Am i dreaming or is this paper exists. All the books on amazon are not
amazING. They talks only about
theory. Theory is fine, i mean this is RoR. But then...
Thanks for those who, first,
2012 Feb 07
10
Ruby Developer position
Please let me know your interest in following.
Location: Columbia, SC
Duration: 12 months+
Rate: $65/hr 1099/c2c
Required Skills:
RUBY, RAILS, GIT, MYSQL, CUCUMBER, RSPEC, JQUERY, EXCELLENT ORAL AND WRITTEN
COMMUNICATION SKILLS, TEST-DRIVEN DEVELOPMENT, LINUX, OS X, JSON, COMMAND
LINE, SQL, SSH, HAML, SCSS
Thanks
Sandeep
Sandeep Jain
Software People Inc.
www.softwarepeople.us
2012 Jan 27
4
Redirecting to create new page with input
Rails 3.1.3
I believe this is a very very fundamental question, but since I am new
to Rails, it''s more productive to ask someone to point out what I need
to do.
Say, I have a search method that generates a list of youtube videos. I
have completed this part.
And also, I have set up a database, Video, whose fields are video_title
and URL.
I need to place a button to each of these video
2012 Oct 29
16
Newbie - deployment, hosting
Hello,
So, after learning ruby on rails and building a great app on my local
machine, I need to find a host, deploy, and of course maintain a (staging
and) production environment.
This all seems very confusing, and I''d like to learn this in an organized
manner, step by step:
I''ve come across the names: Unicorn, nginx/apache, capistrano,
Thin/mongrel, Engine Yard, EC2, etc.,
2007 Nov 13
2
new to rspec, error running "rake rspec" on debian/etch
I have the latest version of rspec and rails-rspec installed. I''m using
the debian versions of ruby and rails. On a new project after a
generate an "rspec_model" and then try to run "rake spec", I get the
following error:
dan at dan-server:~/projects/cw/registration$ rake spec
(in /home/dan/projects/cw/registration)
2012 Dec 26
2
has value in a console but it's nil in my controller and my view?
I have this strange behavior and I don''t undertand why. Here is the thing:
I have this record in my payment model:
1.9.3p286 :019 > u.payment.last
Payment Load (0.3ms) SELECT "payments".* FROM "payments" WHERE "payments"."user_id" = 10
=> [#<Payment id: 37, bank_name: "Mercantil", plan: "Plan Uno", date:
2010 Aug 12
10
Scaffolding working...kinda
Hello all. I''ve been working through some online tutorials, learning ROR
and have a question on scaffolding. Through the command promt i''ve ran
the command:
$ script/generate scaffold Albums
This created the controllers, helpers, models, and views.
I have a database table titled "albums" and have two records saved
within
The problem is that the scaffold command did
2012 Apr 11
1
multi model form
hi,
can someone advice how can I create a form with fileds from different
models.
also how to get the different models (objects) saved.
thank you
dani
--
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
2012 Mar 01
1
Testing selector order in RSpec
Could someone point me to a reference that explains how I would test
the order of elements on an HTML page?
For example, in RSpec I would like to verify that the content of one
<p> element appears before the content of another.
response.should have_selector("p", :content => "Should appear first")
response.should have_selector("p", :content =>
2012 Apr 18
1
Re: validates_uniqueness_of question
Hi All,
I am trying write a validation rule where I need to ensure that when a
certain value is updated or created in a particular columns, a number of
other columns columns are unique and that another column does not contain a
certain value.
I have been able to use the validates_uniqueness_of :column_a (to be
updated or inserted) with , :scope =>
[ :column_b , :column_c , :column_d ]
2011 Nov 29
2
image with Content-Type: text/html;
i have images such as this
http://www.cairo360.com/resource.servlet?path=event/6178/event_standard_6178_20112111_542213373.jpeg
its Content-Type: text/html;
"carrierwave" dosent recognize it as image
is there is any way to fix that ?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"
2011 Nov 26
1
ActionController::RoutingError (No route matches [GET] "/image.jpg"):
I am using rails 3.1.3.
Inside config/ application -> config.assets.enabled = true
Inside development.rb -> config.assets.compress = false
Inside production.rb -> config.serve_static_assets = false;
config.assets.compile = false
I have images placed in assets/images. If i do localhost:3000/assets/
image I get the image in the browser, but
unfortunately, on the browser i am
2012 Aug 16
1
How to create subpages.
What I am trying to do is create subpages within the main page.
So if the top navigation is
- Home
www.example.com/
- About
www.example.com/about
- Contact
www.example.com/contact
- Support
www.example.com/support
I would want a sub navigation under the pages like so;
- Home
www.example.com/
- About
www.example.com/about
----- History
www.example.com/about/history
----- Locations
2012 Feb 07
2
how to assign edit/remove privileges for only own details and not on others?
Hello,I am quite new on rails. Currently making CRUD apps in rails 3.0
in windows.
I''ve used devise [1.1.rc0] for authentication.In those apps any logged
in user can change other user''s details.
How can I design the app, so that any logged in user can edit/remove
his details only if he wishes to do so and can only view others''
records.
After logging in he should be
2011 Nov 10
2
Rails nested Routing
Hi there!
I experienced an issue with routing.
Basically, I''m trying to follow step-by-step the Rails'' official guides
process for what concerns the nested routing.
So, I have Newspapers that has_many :ads , and :ads belongs to
:newspaper .
What I did was simply trying to obtain an URL like this:
http://localhost/newspapers/1/ads/1
but when I set routes.rb in this way:
2012 Mar 11
1
notifications (or flash messages) in an api application
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello!
As a noob in rails, i am having a problem on how to find a decent and straightforward notifications system for my application.
Being a Api like application (talking with the client is made using JSON / later on XML as well), i have a problem finding a good solution to feed my needs.
I have tried to use the rails validators, but then i have
2011 Oct 05
3
Rails 3 Select_tag in javascript give missing ; error
When I write
var x = "<%= select_tag(:activity_group,
options_for_select(activity_grp),{:include_blank => ''Create New
Group'', :style => ''width: 100px''}) %>";
where <% activity_grp = @activity_group.map { |ag| [ag.name,
ag.id] } %>
However, I get error (missing ; before statement) in Firebug because
var x = "<select