- If you need to do different things to each class you probably want
different observers for each one. Anyway, if they all share the attributes
needed inside the observer you don't really need those "if".
- A better looking alternative to 'record.class.name=="Order"' could be:
'record.is_a?(Orde
deseos,
Best wishes,
Meilleurs vœux,
Juan Pablo
--
http://www.jpgenovese.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-ta
subscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msg/rubyonrails-talk/-/t_GmEPrLUIMJ.
For more options, visit https://groups.google.com/groups/opt_out.
--
--
Mis mejores deseos,
Best wishes,
M
El miércoles, 23 de mayo de 2012 08:31:51 UTC+2, Ruby-Forum.com User
escribió:
>
> > You dont have a "def paginate " method defined in your controller.
> > Anyway you'll probably want to use a pagination gem such as Kaminari,
> > which
> > includes all you need for that purpose.
>
> Hi Juan,
I would still iterate the elements that way, then you may extract the div
construction to several partials or a helper receiving the key and value
that deals with what to render on each case.
It may sound a bit complex, but this way you keep your views clean, which
are 90% of the times the dir
El martes, 22 de mayo de 2012 15:56:54 UTC+2, amvis escribió:
>
>
>
> On Tuesday, 22 May 2012 09:34:20 UTC-4, azizmb.in wrote:
>>
>> Also, you could clean things a little by doing:
>>
>> <% @update_coupon.select{|doc| doc["value"] == 2}.each do |doc| %>
>> do stuff
>> <% end %>
>>
>>
> T
El martes, 22 de mayo de 2012 15:37:04 UTC+2, Ruby-Forum.com User escribió:
>
> I am working with Railsspace social networking book. I stuck in the
> problem when i am doing paginate for the search result. It gives the
> following error.
>
> NoMethodError in CommunityController#index
>
> unde
El martes, 22 de mayo de 2012 15:29:04 UTC+2, amvis escribió:
>
> *controller*
> @update_coupon = JSON.parse(get_updatecpn.body)
> *
> *
> *view*
> 1, <% @update_coupon.each do |doc| %>
> 2, <% if doc["value"] == 2 %>
>
> 3, <%end%>
>
> Here the *@update_coupon* getting from controller,In the co
On 24 April 2012 20:32, Rafael C. de Almeida wrote:
> On Apr 24, 3:24 pm, Rogerio Medeiros wrote:
> > phones = [{area_code:'31', number:'32210412'},
> > {area_code:'32', number:'32210412'}]
> >
> > lawyers = []
> > phones.each do |phone|
> > lawyer << Lawyer.joins(:phones).where('phones.area_
El martes, 24 de abril de 2012 03:56:21 UTC+2, Rafael C. de Almeida
escribió:
>
> Hello
>
> I have two tables: Lawyer and Phone. Phone is separated into area code
> and number. A lawyer has many phones. I want to produce a query which
> searches for lawyers who have a phone matching a phone f
El lunes, 16 de abril de 2012 23:43:44 UTC+2, yellowreign escribió:
>
> m running Rails 3.0.7, Ruby 1.9.2, and mySQL (local and remote). I have a
> query which is pulling in records that I don't understand. The purpose of
> the query is to total points that users receive from customer jobs they
El domingo, 15 de abril de 2012 13:42:53 UTC+2, Ruby-Forum.com User
escribió:
>
> I am using Fedora 16 fresh install, latest upgrades, I have gcc, gems,
> libv8, make, bundler etc installed.
> This error has me tossed.I've googled for hours and not found a
> resolution.
>
> firefox localhost:30
El sábado, 14 de abril de 2012 18:53:52 UTC+2, LuisRuby escribió:
>
> Hi, friends!
>
> I'm using Rails 3.2.3, RVM, Postgresql 9.1.3 and running Ubuntu Server
> 11.10 on my own Dell server.
> I tried this:
>
> cap deploy:check
> * executing `deploy:check'
> * executing "test -d /home/digifot
El sábado, 14 de abril de 2012 13:58:56 UTC+2, Ruby-Forum.com User escribió:
>
> I'm a newbie and have searched many posts and railscast tutorials and
> still cant get around this associations thing.
>
> I have 2 models, a Hotel (created by scaffolding) and Facility.
>
> The point is to associate
El sábado, 14 de abril de 2012 14:05:08 UTC+2, Ruby-Forum.com User escribió:
>
> Juan Pablo Avello wrote in post #1056480:
> > El sbado, 14 de abril de 2012 13:12:19 UTC+2, Ruby-Forum.com User
> > escribi:
> >> class CourseLesson < ActiveRecord::Base
> >&g
El sábado, 14 de abril de 2012 13:12:19 UTC+2, Ruby-Forum.com User escribió:
>
> Thank you Juan and Colin.
> One thing I didn't mention is that canceled_time comes from different
> class where the relationship is:
>
> class CourseDate < ActiveRecord::Base
> has_many :course_lessons
> end
>
> Co
El sábado, 14 de abril de 2012 01:01:04 UTC+2, Ruby-Forum.com User escribió:
>
> Hi,
> I'm trying to select record as follows:
> @course = CourseDate.find_all_by_date_and_canceled_time(Date.today,nil)
>
> records with todays date but those where the canceled_time is empty, the
> above find selects
es 4 de abril de 2012 16:26:40 UTC+2, Ruby-Forum.com User
escribió:
>
> Juan Pablo Avello wrote in post #1055004:
> > El mircoles 4 de abril de 2012 15:30:15 UTC+2, Ruby-Forum.com User
> > escribi:
> >> Gem::Installer::ExtensionBuildError: ERROR: Failed to build ge
El miércoles 4 de abril de 2012 15:30:15 UTC+2, Ruby-Forum.com User
escribió:
>
> Hi all,
>
>
> I install Ruby1.9.2po0 and Rails3.2.3 on RedHat5
> When I create a project "rails nwe chapter"
>
> It show below error message:
> *
> Insta
El martes 13 de marzo de 2012 15:10:40 UTC+1, Ruby-Forum.com User escribió:
>
> I have the following code:
>
> advertisements_arel = Advertisement.order("advertisements.id
> DESC").arel
> @advertisements = (params[:website_id].present? ?
> advertisements_arel.where(:website_id => params
El lunes 12 de marzo de 2012 11:38:24 UTC+1, Maxus escribió:
>
> Hi All,
>
> I rebuilt my enviroment on linux, still the same issue occours. Any one
> have any idea whats going on?
>
> Thanks!
> Maxus
>
>
>
> On Monday, March 5, 2012 4:21:44 PM UTC+8, Maxus wrote:
>
>> Hi People,
>>
>>
El miércoles 7 de marzo de 2012 10:01:30 UTC+1, Ruby-Forum.com User
escribió:
>
> Rails 3.1.3
>
> I have models and their association like,
>
> Video 1: n: Script
>
> When users newly create a Video, I want it to create the very first
> Script entry together.
>
> I have put
>
> @scr
El viernes 2 de marzo de 2012 10:35:20 UTC+1, amvis escribió:
>
> I am using rails3. when i am trying to insert data into postgrsql got the
> error like this
>
>
> *PGError: ERROR: value too long for type character varying(15)*
>
> In the migration file have * t.string
> :contact_number,:limit=
t and didn't find any solution that worked...
Anyone that made them work together?
Thanks a lot!
Juan Pablo
--
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-t...@googlegroups
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
--
Mis mejores deseos,
Best wishes,
Meilleurs vœux,
Juan Pablo
--
Jetbrains RubyMine IDE can do that.
Sateesh Kambhamapati wrote:
Hi
I would like to know the relations ship between models by using er
diagrams.
How it is ??
please suggest me
--
You received this message because you are subscribed to the Google Groups "Ruby on
Rails: Talk" group.
To post
Lite database
for a Gnome2-ruby application I'll be developing soon, but only for
config data and stuff like that.
But, in case of Web Applications, I would rather go with something much
more elaborated than SQLite.
Cheers!
Juan Pablo
Fernando Perez wrote:
Juan Pablo Genovese wrote:
Bu
Buy "The RSpec Book" from Pragmatic. It's outstanding, and will give you
extremely useful insight on TDD and BDD.
Cheers!!
debadatta wrote:
Hi all,
I am a newbie in rails. I have done some small applications in
rails but can't know how to make TDD and BDD in RSpec and other
tools. I have
Well, giving a second thought, it all depends. :)
If your app has very low concurrency and traffic, and if it is low in
transaction intensity and you don't have any security constraints,
SQLite may be *it is* fit for production.
But... with SQLite you have poor support for concurrency, it's no
Fernando,
glad you solved the issue!!
However, I must say this: *don't* use SQLite in production environments!
It's excellent for development, but flimsy and poor suited for production.
Try MySQL or PostgreSQL for cost-free production ready databases.
Cheers!!
Fernando Perez wrote:
If anyone
u ask here: http://groups.google.com/group/git-users
Cheers and happy coding!
Juan Pablo
Sachin wrote:
Hello Experts,
I am trying to host a git repository in dreamhost, have a pre
installed git version 1.5.4.1 on the server.
I have referred to many sites on which a lot of information given.
d work in the future.
--
Mis mejores deseos,
Best wishes,
Meilleurs voeux,
Juan Pablo
--
http://www.twitter.com/eljuanchosf
RichardOnRails wrote:
Hey Marnen,
Suppose someone posted on the Math Forum (if there is such a thing)
the question: what
s,
Best wishes,
Meilleurs vœux,
Juan Pablo
--
http://www.twitter.com/eljuanchosf
2010/7/5 Marnen Laibow-Koser
> RichardOnRails wrote:
> > Hi Marnen,
> >
> > Thanks for your response (especially since you posted with an
&g
.com
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
--
Mis mejores deseos,
Best wishes,
Meilleurs vœux,
Juan Pablo
--
http://www.twitter.com/eljuanchosf
--
You receive
ils-t...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
--
Mis mejores deseos,
Best wishes,
Meilleurs
ssary users and
permissions by yourself.
Check this page for reference:
http://wiki.rubyonrails.org/getting-started/installation/linux
Hope this helps. :)
2010/5/28 Roelof Wobben
> Juan Pablo Genovese wrote:
> > Is your MySQL instance running in the same computer? If no, did you op
Andi,
Download this file and extract it's contents to your Ruby's bin directory.
http://www.sqlite.org/sqlitedll-3_6_23_1.zip
Cheers!
JP
2010/5/14 Andi Lebaron
> Hi, I'm trying to follow the Rails tutorial found here,
> http://guides.rubyonrails.org/getting_started.html and when I go to run
>
What URL are you using in your Firefox?
dwhitekiss wrote:
> Hi,
>
> I was able to create the a boilerplate code using the generate script.
> However, the expected (for this) about page did not show up in the
> browser. Do some encountered this already?
>
> # script/generate controller about inde
Por nada! Buena elección. :)
You're welcome. Good choice. :)
2009/11/23 Mike
> Thank you everybody! I started using GIT and NetBeans.
>
>
> On 23 nov, 16:11, Leonardo Mateo wrote:
> > On Mon, Nov 23, 2009 at 5:12 PM, Mike wrote:
> > > Hello,
> >
> > > I am going to start a new project in R
Hi Mike,
we have a very similar team setup.
If you want to go completly free, try Netbeans with the Rails Plugin. For
us, is the best free IDE out there for Ruby and Ruby On Rails. We switched
to RubyMine (paid) but it is really awesome... couldn't be happier.
For VCS, we use Git without any doub
TheTribster wrote:
> After 3 days I am giving up on RoR.
Don't! Try again. Your efforts we'll be compensated several times with
Rails.
> I have a MAC and after installing
> Aptana RoR no longer see mySQL and after dozens of adjustments and
> downloads it still doesn't work.
Well... I used Net
41 matches
Mail list logo