On Sep 12, 2013, at 8:56 AM, Joel Pearson wrote:
> Just use error handling properly.
>
> begin
> #standard code
> rescue
> #only runs if an error occurred
> else
> #only runs if an error did not occur
> ensure
> #always runs at the end regardless of error level
> end
It seems to me that OP may
On Thursday, September 12, 2013, Alireza T. wrote:
Do I need to worry about CSS? Please note that, I
> have no interest in becoming a front end developer and my main interest
> is back-end.
>
You'll need the basics, probably not much more... but you'd get better
money if you can do the whole job,
I have a bachelor degree in Comp Sci. I know the basics of CSS. I can
change fonts, backgrounds, colors, etc but I can not make complex
layouts.
I am planning to learn Ruby on Rails so I can apply for jobs as a Web
Application Developer. Do I need to worry about CSS? Please note that, I
have no in
On Thu, Sep 12, 2013 at 11:52 AM, Robert Walker wrote:
>> Params are strings by definition; can you provide a test case/code
>> that demonstrates where this is not the case?
>
> Not necessarily the case. For example the create and update actions in a
> users_controller will likely contain the use
Hassan Schroeder wrote in post #1121316:
> On Wed, Sep 11, 2013 at 3:36 PM, Paul E. G. Lynch
> wrote:
>> If, in your view, you are expecting params[:name] to be a string, but
>> actually rails has parsed it into {"."=>"1234"} (or something more
>> malicious)
>
> Params are strings by definition; c
In my Capistrano recipes, bundle install --without development test is
performed. Then I tried to run a script with:
bundle exec rails r scripts/my-script.rb
It complained about not finding a development-only gem dependency that is
not even required by that script.
How am I supposed to call ra
On Wed, Sep 11, 2013 at 3:36 PM, Paul E. G. Lynch wrote:
> If, in your view, you are expecting params[:name] to be a string, but
> actually rails has parsed it into {"."=>"1234"} (or something more
> malicious)
Params are strings by definition; can you provide a test case/code
that demonstrates w
It is because I am trying to distinguish between "real bugs" and bad input
(a 400 error) that I don't want this to be a 500 error. I have a rescue
action that sends me an email when a 500 error occurs (though it limits the
number it sends) because if there is a bug in the program that users are
ru
On Thu, Sep 12, 2013 at 12:22 PM, Paul Lynch wrote:
> It is because I am trying to distinguish between "real bugs" and bad input
> (a 400 error) that I don't want this to be a 500 error. I have a rescue
> action that sends me an email when a 500 error occurs (though it limits the
> number it send
Thanx for your reply.My problem is that at a later point of time this would
account for very large data set as the users will increase. I want to
optimize my website and want to save time on data query from the
database.Also, i will be looking for similar user profile based on user's
attribute
Joel Pearson wrote in post #1121289:
> Just use error handling properly.
>
> begin
> #standard code
> rescue
I am looking for the below operations,but only when error will be
occured :
a = (1..10)
i=0
until a.size>10
next i+=1 if i<5 # this should be done on Error
p a[i]
i+=1
end
If still I
Maybe a real example would help, rather than infinite-loop pseudo-code.
val = -3
until val > 2
begin
val +=1
1/val
rescue
puts 'Error on ' + val.to_s
else
puts 'No Error on ' + val.to_s
end
puts 'Finished with ' + val.to_s
end
--
Posted via http://www.ruby-forum.com/.
Just use error handling properly.
begin
#standard code
rescue
#only runs if an error occurred
else
#only runs if an error did not occur
ensure
#always runs at the end regardless of error level
end
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed
Thanx for your reply.My problem is that at a later point of time this would
account for very large data set as the users will increase. I want to
optimize my website and want to save time on data query from the
database.Also, i will be looking for similar user profile based on user's
attribute
It's unclear to me why you *wouldn't* want a 500 ISE here. Silently
swallowing ArgumentError or NoMethodError is a terrible idea, since it also
can obscure real bugs.
If you really want that behavior, try:
<%= sanitize(params[:name]) rescue '' %>
--Matt Jones
On Thursday, 12 September 2013 09
On Thu, Sep 12, 2013 at 9:26 AM, Paul Lynch wrote:
> In this case it is user (hacker, scanner, etc.), not the programmer, who has
> passed the illegal argument. I don't think that should result in a 500
> server error. To avoid that, either the programmer has to check each input
> parameter to m
In this case it is user (hacker, scanner, etc.), not the programmer, who
has passed the illegal argument. I don't think that should result in a 500
server error. To avoid that, either the programmer has to check each input
parameter to make sure it is a string, or something like sanitize has to
m
I need one suggestions from you :-
Suppose I do have a code as below:
until row == nil do
#code1
begin
#code2 <~~ which can raise an error
rescue
end
#here I want some guard which can check,if any error occurred or
not.If #error then skip below part and continue
The information would seem to fit a RDMS perfectly. But then as you have
not given us any idea as to how simple or complex you expect this data to
be no one can tell. Tell us what the data is like and we will be able to
give you a better answer.
On 12 September 2013 09:16, Yash Ladia wrote:
> I
I am working on a social networking project. I need to store about 10-15
user profile information like movies,music,books,relationship-status and so
on. I am confused about which database should i use to store user profile
info. There are NOSQL solutions like MONGODB as well as Neo4j(graph). Or
20 matches
Mail list logo