I wrote a Gem (https://github.com/absolutedevops/civo) which is a simple Rails
Engine containing a few API accessing models.
However, when I include it in a Rails project, any generators create their
files under the Gem's source code not the project's. I can't see anything I'm
doing in the Gem
Yes, Engines are considered part of the framework level rather than the
application level. If I developed an engine and released it as a gem, you
wouldn't want my lines littering your application stack trace, right?
Cheers,
Andy
*Andy Jeffries* Ruby on Rails, RubyMotion, jQuery Developer
requests have to come back to the same backend server.
Hope this helps.
Cheers,
Andy
*Andy Jeffries* Ruby on Rails, RubyMotion, jQuery Developer Taekwondo 6th
Dan Instructor
andyjeffries.co.uk +44 7939 164853 @andyjeffries
http://twitter.com/andyjeffries fb.com/andyjeffries
http://facebook.com
to be careful that one is seeing a real
effect, which apparently you were, so that is all right.
Doh, fair point, thanks for catching that :-)
Cheers,
Andy
*Andy Jeffries* Ruby on Rails, RubyMotion, jQuery Developer Taekwondo 6th
Dan Instructor
andyjeffries.co.uk +44 7939 164853
On 17 March 2014 15:32, Colin Law clan...@gmail.com wrote:
Did you try swapping the two lines round and checking that the result
is consistent?
Yes, it's consistent for me. Was it not for you or are you just asking?
Cheers,
Andy
--
You received this message because you are subscribed to
According to a quick benchmark on my machine (MacBook Air 2013, Ruby
2.1.0p0), using double quotes is about 2% faster:
require 'benchmark'
n = 10_000_000
Benchmark.bm do |x|
x.report { n.times do ; a = 1; end }
x.report { n.times do ; a = '1'; end }
end
user
The company I'm currently contracting at has released their first piece of
Open Source Software, a Ruby gem for interacting with REST servers. There
are other gems out there but we wanted something that felt more like using
ActiveRecord (like ActiveResource) but more customisable.
When I create a table with the following SQL:
# create table foos (id SERIAL, content VARCHAR(255));
And define a class as follows:
class Foo ActiveRecord::Base
serialize :content, JSON
end
Creating a new instance of the class gives an error:
f = Foo.new
NoMethodError: undefined method
the second argument to serialise is used to say that you always want
the serialised object to be of a certain class (e.g. Hash, an
application specific class etc.). I'm not sure what you meant by
passing JSON as that argument but I suspect that it isn't doing what
you think it is.
I was
I was basing it on this article (as well as a stack overflow answer) that you
can provide a custom serializer in Rails 3.1:
http://edgerails.info/articles/what-s-new-in-edge-rails/2011/03/09/custom-activerecord-attribute-serialization/index.html
JSON provides a dump and load method on
I've also just tried upgrading JSON to 1.6.0 (as that's the version that seems
to be installed if I do gem install json), same problem.
Cheers,
Andy
--
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
It's a generator, but it comes up with quite nice 37 Signals style admin
interfaces.
http://github.com/andyjeffries/andy_admin
Cheers,
Andy
--
Andy Jeffries
http://andyjeffries.co.uk/ #rubyonrails #mysql #jquery
Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS
Company number
Hoptoad
--
Andy Jeffries
http://andyjeffries.co.uk/ #rubyonrails #mysql #jquery
Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS
Company number: 5452840
On 28 July 2010 11:26, Pale Horse li...@ruby-forum.com wrote:
Ideally, what I need is a method of rescuing ALL errors
Sorry, no idea.
(just to let you know that you're not being ignored it's just likely that
no-one has an answer for you, this generally works fine for me).
--
Andy Jeffries
http://andyjeffries.co.uk/ #rubyonrails #mysql #jquery
Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS
On 23 July 2010 10:52, Tom Mac li...@ruby-forum.com wrote:
I have a of line code like
%= stylesheet_link_tag styles,:cache = cache/styles %
And it produces source as
link href=/stylesheets/styles.css?1279620123 media=screen
rel=stylesheet type=text/css /
The rails output shows:
[paperclip] An error was received while processing:
#Paperclip::NotIdentifiedByImageMagickError: /var/folders/pD/
pDBak1ufEeSHluZ8kAougU+++TI/-Tmp-/stream20100721-4816-1pbpnnn-0 is not
recognized by the 'identify' command.
What is the best way to do this?
The
Why is mySQL not the typical default DB?
Because SQLite is easier to install/maintain on a developer's machine. It's
easy enough to switch to MySQL when creating a project:
rails my_project -d mysql
I'm used to building up tables by hand...I'm aware there is a faster way
of doing it in
I wouldn't normally post silly little corrections/typos, but as the OP was a
newbie (and might play with it, type the code in and fail to get it all to
work):
$ ./script generate scaffold User login:string password:string
first_name:string last_name:string
Should be:
$ ./script/generate
Or as another example:
http://github.com/andyjeffries/andy_admin
:-)
--
Andy Jeffries
http://andyjeffries.co.uk/ #rubyonrails #mysql #jquery
Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS
Company number: 5452840
On 18 July 2010 08:25, Abder-Rahman Ali li...@ruby-forum.com
http://github.com/andyjeffries/andy_admin
Thanks a lot.
Does it give you the layouts to the pages?
It generates the stylesheets and layouts, styles a lot of the standard
classes and gives an amended form builder.
Do you have an example of that?
I've been meaning to put together a
It mentions that we have the following in the routes.rb file:
map.connect ':controller/:action/:id'
map.connect ':controller/:action/:id.:format'
Now, in completing the tutorial, we will add the following to
routes.rb:
map.root :controller = home
In the first two statements we have
On 19 July 2010 15:46, Abder-Rahman Ali li...@ruby-forum.com wrote:
I know that this question may not be here, but think that most of you
using RoR deal with Git.
I run a MAC OS X 10.5.8, and want to install Git running on my machine.
But, I didn't find this version of my MAC OS X here: Hi,
Anyway, unless you are using your Mac as a server, why are you running
Passenger on it in the first place? Mongrel is perfectly suitable for
development.
A lot of people:
1) Work on more than one site at a time (during a day)
2) Want it always available rather than having to remember to
On 19 July 2010 16:38, Abder-Rahman Ali li...@ruby-forum.com wrote:
I now added /usr/local/bin to my path as follows:
export PATH=$PATH:/usr/local/bin
http://www.how-to-linux.com/2010/04/how-to-add-usrlocalbin-to-your-path-on-centos/
Good job.
But, when I run now: brew install git
I
posting the same question, phrased
slightly differently without reading responses.
Cheers,
Andy
--
Andy Jeffries
http://andyjeffries.co.uk/ #rubyonrails #mysql #jquery
Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS
Company number: 5452840
On 16 July 2010 11:53, Amit Jain li
Thanks for the suggestion. However what did you mean specifically with
your last comment?
With anything like this any time you save when building up the
conditions
will be dwarfed by the time it takes to run the actual query
Putting words in Frederick's mouth, but it simply means that
What the purpose to hide the controller and action from URL?
To have nicer URLs? For example:
http://www.facebook.com/andyjeffriesrather than
http://www.facebook.com/user/show/andyjeffries
It's quite a common request.
You can use the Apache mod_rewrite itself to make this change. You will
On 16 July 2010 13:51, Michael Pavling pavl...@gmail.com wrote:
On 16 July 2010 13:48, Ram yourstruly.vi...@gmail.com wrote:
Anyone know a function that loops through an array and returns true if
any one element satisfies the condition but false if none satisfy the
condition? And it should
My thinking is that perhaps every time a page is rendered, a mongrel has
to instantiate this controller and that marshalling this into RAM is
very time-consuming. Or does a controller get loaded into RAM at server
startup and then the effect is not all that substantial for each page?
Any
what makes you think they aren't there ?
I searched for them to no avail. Shouldn't they be in the
Expense model (app\models\expense.rb); or
Expense controller (app\controllers\expenses_controller.rb?
No, they are dynamically defined and exist in memory only at runtime.
Welcome to
Welcome to dynamic objects and classes :-)
Thanks. This restores my faith in Rails and enhances my appreciation
of newsgroups, especially this one.
Now I've got to put them to use!
Good luck.
Post back if you have any more problems.
Cheers,
Andy
--
You received this message because
I am new in ROR.
I want to hide controller and action name from url.
exp. my current url:
http://localhost:3000/triggers/index/amit123
expected:
http://localhost:3000/amit123
remove controller(trigger) and action(index) name from url.
I am a rails beginners. I have created a couple of simple applications
without following TDD.
I have a question - Do good programmers really follow TDD strictly ? I
mean.. Do they follow { 1. Write Test 2. Write Code 3. Refactor }
cycle ?
Is Writing tests before Implentation code
$ irb
class MyHash Hash ; end
= nil
h = MyHash.new
= {}
h.is_a? Hash
= true
Cheers,
Andy
--
Andy Jeffries
http://andyjeffries.co.uk/ #rubyonrails #mysql #jquery
Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS
Company number: 5452840
On 9 July 2010 08:52, Hemant
On 9 July 2010 00:32, Gerardo Gonzalez Cruz gerardogc2...@gmail.com wrote:
I Work rails on my beauty Gentoo System, i find hard install rails over
Ubuntu because you need know each package to install :-(, on Gentoo is easy.
Really?
apt-get install ruby1.8 ruby1.8-dev rubygems
gem update
On 8 July 2010 19:39, Erwin yves_duf...@mac.com wrote:
In a test app, I have a drop-down selection to change the language of
the site.
I use an Ajax request to an action in which the locale is changed, and
the it's redirected to the home page
unfortunately, the locale seems to be changed but
be a better way with Restful_authentication and you'll need to
find out the param names you need to change the values for, but that may
point you in a direction to get it working...
Cheers,
Andy
--
Andy Jeffries
http://andyjeffries.co.uk/ #rubyonrails #mysql #jquery
Registered address: 64
Please don't make it a flame war about linux distros.
To the OP, I really haven't heard about any Gentoo user in the rails
community so far, if I have to say there's a predminant OS in the
rails community that would be Mac OS. (And I don't know why either)
As a Mac OS X user I don't
this his the generated code from my haml code
form onchange=this.form.submit(); method=post action=/
switch_language?locale=fr
select name=language[] id=language_option value=enAnglais/
option
option selected=selected value=frFrançais/option
option value=deAllemand/option/select
/form
Good catch Hassan
--
Andy Jeffries
http://andyjeffries.co.uk/ #rubyonrails #mysql #jquery
Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS
Company number: 5452840
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post
I'd recommend starting here...
Episode 141: PayPal Basicshttp://railscasts.com/episodes/141-paypal-basics
Cheers,
Andy
--
Andy Jeffries
http://andyjeffries.co.uk/ #rubyonrails #mysql #jquery
Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS
Company number: 5452840
On 8 July
We're developing the site but the day to day running is down the client
(but
they have lots of power from various sources, redundancy and sysadmins to
type the password back in).
Is the client trying to keep the code hidden from his own sysadmins or
are you trying to hide it from the
Or if there is any way so that I can encrypt my code
without interrupting the execution of the application.
If your client is determined to access your code even an encryption of
the Ruby source code will not be sufficient. In order for MRI to
interpret Ruby it must be decrypted. If the
Interesting solution, but also not secure. Anybody who has root can
read out your running processes' memory spaces and either (a) grab the
key and yer pwned or (b) grab the bytecodes, decompile and yer pwned.
Yep. Completely agree. They weren't planning on stopping crackers, but
sysadmins
On 7 July 2010 01:25, Skip Levens s...@getactivestorage.com wrote:
Props to Andy's solution - thats pretty awesome... hopefully not
everyone needs that!
Thanks Skip and I agree with your hope.
There are so many weird things I've done on this project, it's been a
great/interesting
On 6 July 2010 10:34, Sumanta Das li...@ruby-forum.com wrote:
Or if there is any way so that I can encrypt my code
without interrupting the execution of the application.
You can do this (I've had to do it for a client) but it's not simple and I
can't share my solution's code. However, you
On 6 July 2010 11:31, Michael Pavling pavl...@gmail.com wrote:
On 6 July 2010 11:19, Andy Jeffries a...@andyjeffries.co.uk wrote:
You can do this (I've had to do it for a client) but it's not simple
snip super secret process
Very interesting approach. Will file that for future reference
On 29 June 2010 11:00, Neil Bye li...@ruby-forum.com wrote:
I have this bit of code in my email.controller
user = @current_user
story = @current_story
recipient = story.user
It doesn't work because @current_story isn't defined. How can I find the
current page to make this work?
You
We're actually looking for currently UK located developers.
Thanks anyway,
Andy
--
Andy Jeffries
http://andyjeffries.co.uk/ #rubyonrails #mysql #jquery
Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS
Company number: 5452840
On 26 June 2010 08:21, ratnamraj varasala chinnuj
The company I'm contracting at is looking for:
An enthusiastic, junior Ruby on Rails developer. Maybe you've been using
PHP for a few years and have recently started playing with Rails or you've
been using Rails for a while but only in a small/sideline capacity and want
to move up to using it in
Use Apache locally too. It's simple, Apache is already installed on
Snow
Leopard. Install Passenger and configure it (which you'll need to learn
how
to do for production anyway).
What a waste of effort IMHO. I've never used anything but Mongrel
locally. It works fine n
What
Look in your log file (your_app/log/*.log) - the error will be detailed in
there.
Also, it seems from the error message you're running in production mode, you
should really switch to development then you'd see the full error message in
your browser.
Cheers,
Andy
--
Andy Jeffries
http
These values are then converted to seconds and stored as decimal in the DB
(I allow fractions of a second, too (tenth, hundredth, millisecond). when
they are retrieved form the DB, I convert the seconds to a string format of,
for example, 01:39:11 (from 5951 seconds). If fractions are used,
If you have two floating point values representing seconds (and parts of)
why can't you just compare the two floating point values?
What part are you stuck with? Can you give us some code with a comment on
which bit you can't do.
I don't have a problem with comparing floats, but I might
I have been just tasked to learn Rails for a new project and have been
given Mac machine for it. I have never used a Mac / Linux ever. I have
used Rails before on Windows. I need to set up Rails development env
on this Mac machine. Its Mac OS X - Snow Leopard. The development
environment
stylesheet_link_tag with the :cache option.
Cheers,
Andy
--
Andy Jeffries
http://andyjeffries.co.uk/ #rubyonrails #mysql #jquery
Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS
Company number: 5452840
On 4 June 2010 09:37, Gregory Ma li...@ruby-forum.com wrote:
Hi,
I
See the :cache = true option of stylesheet_link_tag
http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html#M002231
You don't have to use true either - you can use a string (so if you have
more than one layout each using a different set of stylesheets you can
create
rake db:seed RAILS_ENV=test
--
Andy Jeffries
http://andyjeffries.co.uk/ #rubyonrails #mysql #jquery
Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS
Company number: 5452840
On 4 June 2010 15:31, Ramos wonder.ra...@gmail.com wrote:
I am seeding my environment for testing
and if you ask a boss or customer what is that
they prefer, pretty vs. working code, I can tell you that not 100 but
200% of them will choose working. ;)
I don't give my clients that choice. They get properly designed code
that works. It's not up to the client to make technical
http://tinyurl.com/253tgp8
(hint to Ivan, use http://lmgtfy.com/ - it's great for links like this :-) )
--
Andy Jeffries
http://andyjeffries.co.uk/ #rubyonrails #mysql #jquery
Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS
Company number: 5452840
On 3 June 2010 14:00, Ivan
yep u can
index.js.erb
and in it, render your response
buts its worse idea, return json, and build dom
I'm not sure to understand.
You think it's better to return json and than build the dom from the
javascript?
It's faster/lighter to do it that way.
However, you often break
It's faster/lighter to do it that way.
However, you often break DRY* as you have two sets of logic used to
create
markup from a dataset (one in Rails and one is JS). So I'm not sure I
agree
with Ivan.
If you don't agree how would you do it?
I'd do it as the OP requested, have a
I'd do it as the OP requested, have a partial used in both places and
return that.
Sorry, just realised you were the OP :-)
In particular I'd use jQuery's load method to load the URL in to an element
(the original page's container for this section):
http://api.jquery.com/load/
And from
This is exactly what I planned to do until you said it would be better
to return json
Ivan said it would be better, not me :-)
I said that it is faster/lighter weight - but not better and said I
disagreed with him.
Cheers,
Andy
--
You received this message because you are subscribed to
mm, u can do it
but
1) u should write yet anothe action at controller, its not like REST
No reason why you should...
def show
...blah...blah...blah
if request.xhr?
render :partial = whatever
end
end
2) its will be more slower, than render at mobile device, from json
How
On 3 June 2010 15:06, Michael Pavling pavl...@gmail.com wrote:
I've a requirement to put some user-managed attributes on a model.
Essentially, I want Entity-Attribute-Value functionality - the
administrator has the ability to create fields on the model, and to
specify their type (datetime,
On 3 June 2010 15:17, Ivan Nastyukhin dieinz...@me.com wrote:
if request.xhr?
render :partial = whatever
end
if developers, from my team, write this, i curse too much for such)
If a developer from my team makes a judgement/technical direction based on
incomplete facts I'd curse
class UserAccount ActiveRecord::Base
serialize :meta_data, Hash
end
That would get it working to demo, but I *know* that they're going to
want to search/filter on the attributes once they have their hands on
them, so I'd prefer to start with a DB record per attribute that gets
Out of interest, what's your problem with the above code?
its crutch, for incomprehensible thing
Sorry, I don't understand - could you rephrase...
Premature optimisation is the root of all evil...
yep, but i'm thinking, that write 1-10 LOC in js, witch will be build
partial for each
Out of interest, what's your problem with the above code?
its crutch, for incomprehensible thing
Sorry, I don't understand - could you rephrase...
U should not insert if request.xhr?
u can create view, with build js ( show.js.erb)
and in its view call render, but with js escape
Fair
 ActiveSupport::JSON.decode(cookies['item_list'])
and the result is actually in a hash, then the ordering is lost...
Is it true that if the original JSON object has an array of hashes (1
key and 1 value), then the order can be preserved?
But what if the original JSON object was a hash of
http://weblog.rubyonrails.org/2006/3/1/new-in-rails-enumerable-group_by-and-array-in_groups_of
enjoy!
This isn't quite the same thing though.
a = %w(1 2 3 4 5 6 7 8 9 10)
a.in_groups_of(3)
= [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, nil, nil]]
It gives you 4 groups, not three as the OP's
I am in a great need of you people. My migrations are not running on
production database. I done some changes in production mode and then i
ran rake db:migrate RAILS_ENV=production / RAILS_ENV=production. But
my database is not reflecting. Can you people tell me that what are the
possible
Did you create new migrations or edit existing ones?
I edited migrations on my local machine and checked in them.. :) Just
now i realised that this could be the problem of me.
It is indeed :-)
Ok tell me one thing, if i edit a already migration file, and run rake
db:migrate then would that
I edited migrations on my local machine and checked in them.. :) Just
now i realised that this could be the problem of me.
It is indeed :-)
Resolved it. Thanks to all of you with a big smile .. :) :)
Happy to help.
Good luck,
Cheers,
Andy
--
You received this message because you are
On 27 May 2010 15:15, anon_comp neocools...@gmail.com wrote:
I know this has already been resloved, but instead of creating a new
migration, you could have gone back to version 0
rake db:migrate VERSION=0
then run rake db:migrate
this should update all migrations you edited.
The downside
On 27 May 2010 15:45, james hindle.ja...@gmail.com wrote:
I need to make some minor record changes in the database on my live
production site. I use Capistrano to deploy. I know I can activate
script/console by entering my /current Capistrano directory and
running:
RAILS_ENV=production
What would happened if you never use private methods? Will it be some
security issue (and if yes, I'd like to see an example if it is
possible)
OK, here's a quick example. Assuming you have the default routing rules in
place so it handles /:controller/:action
class LoginsController
@licences = Licence.scoped_by_user_id(10)
usedpermlicence = @licences.scoped_by_status_and_licence_type(1, 0)
usedtemplicence = @licences.scoped_by_status_and_licence_type(1, 1)
remainlicence = @licences.scoped_by_status_and_licence_type(0, 0)
remaintemplicence =
a million rows, then actually test/benchmark your app.
Cheers,
Andy
--
Andy Jeffries
http://andyjeffries.co.uk/ #rubyonrails #mysql #jquery
Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS
Company number: 5452840
On 29 April 2010 09:13, TechSlam aslam9...@gmail.com wrote
Mohammed, you can write the above as follows:
@property.destroy if IsAuthorized?(@property.user_id)
Well, you could, *if* IsAuthorized? -- which idiomatically should
be is_authorized? -- returned a boolean value :-)
Personally I'd prefer authorized? - I never use is_...?, the is_ is just
in my application, i have login form. while login into the application
iam maintaning the details in session. i want to remove the stale
sessions and while removing the stale sessions i want to perform some
operattions on database . how to do this.
How are the sessions stored? The default
Yes. Yesterday called, they want their news back...
http://twitter.com/#search?q=rubyonrails.org
--
Andy Jeffries
http://andyjeffries.co.uk/ #rubyonrails #mysql #jquery
Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS
Company number: 5452840
On 21 April 2010 10:09, Amala
There's normally an actual error above that, you've posted the stack trace
(which is useful after you know what the error is).
Cheers,
Andy
--
Andy Jeffries
http://andyjeffries.co.uk/ #rubyonrails #mysql #jquery
Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS
Company number
in my head today.
Any ideas?
Cheers,
Andy
--
Andy Jeffries
http://andyjeffries.co.uk/ #rubyonrails #mysql #jquery
Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS
Company number: 5452840
--
You received this message because you are subscribed to the Google Groups Ruby
Having a bit of a braindead day, can anyone help with this. I have three
models: Player, Game, Prediction (Player has_many :games, :through =
:prediction)
I want a named_scope that finds games that the current player hasn't
already
predicted.
How about tackling it from the Player
On 19 April 2010 10:25, Amala Singh amalasi...@gmail.com wrote:
If it takes one year to develop a CMS in rails then is that rubbish that
have tutorials
that claim develop a blog in 15 minutes?
It would take less than a year to develop a CMS for a client (I've done it a
NUMBER of times), but
I've been reading the Rails Guide about caching and I have a few
questions about it.
I've read that it is not possible to cache a page with url parameters,
for instance 'http://.../com/products/category_id=5'. Am I correct?
Isn't there any way to be able to do so?
You can do it, but it
http://www.example.com/products/category/5
Then it would work - the 5 would become 5.html in a folder called
category
in a folder called products.
Thank you Andy for you explanation.
How do you do to make your urls look like this?
config/routes.rb
map.category
Thanks for your views. I wonder why this is not taking up. I know
drupal is stealth.
But with handy rails in hand, if we start now, in a year we could make not
only drupal,
a double or triple that of a drupal. Because I believe that drupal with
PHP, not that
easy to make upgrades
Along with Bundler which now puts all gems directly in to your project
(there is a blog post somewhere on using Bundler with Rails 2.3...)
Cheers,
Andy
--
Andy Jeffries
http://andyjeffries.co.uk/ #rubyonrails #mysql #jquery
Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS
i am very very interested on Ruby on Rails
technology presently i am working as SEO and Web analytic and now i
want to learn all about Ruby on Rails so please help me for it
I'd recommend this site :
http://tinyurl.com/cvh574
Good luck,
Andy
--
You received this
I have searched for a development sandbox tool, like virtualenv or
buildout in python. But I didn't have results.
Please, Any suggestion?
What do you mean?
Running 'rails sitename' will create you a website.
From the resulting sitename folder you can do script/console to run an
interactive
Yes, I know about this AR behavior.
I think, would be correct if the comparison works both ways.
For beginners, it looks like a bug.
Is it really worth monkeypatching Array#eql? for this? I think not.
I almost posted the same thing earlier, but had a second thought.
Would it not be
On 14 April 2010 01:45, Me chabg...@gmail.com wrote:
Are these two below the same thing?
1. module X
module Y
class Z
2. class X::Y::Z
Providing class Z has already been created with style 1, yes.
If you try to run style 2 without X and Y having been created you will
I defined the following in routes.rb to use ':title' instead of ':id'.
map.movie '/
movies/:title', :controller='movies', :action='show',
:conditions={:method=:get}
This seems to work fine, but 'movie_path()' still uses ':id' instead
of ':title'.
movie = Movie.get(parms[:id])
p
On 14 April 2010 09:29, bala kishore pulicherla balumc...@gmail.com wrote:
you can use http://svn.techno-weenie.net/projects/plugins/permalink_fu/plugin
I think you're solving a different problem than he asked for though.
Permalink_fu is good for creating slugs, so if he had Throw Momma From
But how to return records with no Orders ? I'm thinking that I may
need something along the lines of:
But that seems ugly.
Any suggestions for neater ways?
How about using counter caches - something like:
class Order ActiveRecord::Base
belongs_to :customer, :counter_cache = true
end
On 14 April 2010 12:29, ashu rajeevsharm...@gmail.com wrote:
What i have
snip
What i need
when user Click On Age or name or sex records
should be in that order as user clicked.if user clicked on age Twice
Then record should reverse . that would be bonus .
By
On 14 April 2010 02:57, David Zhu dzwestwindso...@gmail.com wrote:
Before a user submits a form can I redirect them to a confirmation
page with all their fields on it, and then finally, there is a final
submit button that saves it to the database? Tanks
You could code this, yes.
You'd want
1 - 100 of 190 matches
Mail list logo