> On Aug 4, 2018, at 6:15 PM, fugee ohu wrote:
>
> I've been hosting my rails apps on freebsd Anyone have preferences which OS
> to host on?
I host all my Rails apps on FreeBSD. I have been doing that since Rails 0.7,
without any problems.
I prefer FreeBSD over any Linux distribution. In
Been doing some react-native work and naively just assumed it would be
easy-breazy to get
websocket support via the ActionCable code I already wrote for the web-app.
Just wondering if there's any plans on it from anyone before I make an
attempt myself.
--
You received this message because you
Ok, DBA and I figured this out. The test schema and prod schema were not
identical and the sequence has been messed up.
I still don't know why the pk key constraint name (that was only in prod db
schema at that time) appeared on the error message during testing.
Anyway, thank you all for your
Hi,
`specify` is actually just the same as `it`. It's just there because
sometimes it reads better. See here:
https://github.com/rspec/rspec-core/blob/master/lib/rspec/core/example_group.rb#L82
- Mirri
On Fri, Jan 18, 2013 at 5:22 PM, and...@benjamin.dk wrote:
Hey fuzzy,
I think the first
Nope, just an alias.
On Sat, Jan 19, 2013 at 12:48 AM, fuzzy hlog...@gmail.com wrote:
Thanks Mirri for you post ... I had a look at the link ... are they
saying that 'specify' has now been superceded by 'it'?
On Jan 18, 10:17 am, Mirri Kim mirri@gmail.com wrote:
Hi,
`specify
On your controller, use `create!` to see what is preventing the save.
On Mon, Nov 12, 2012 at 5:19 PM, Soichi Ishida li...@ruby-forum.com wrote:
Rails 3.1.3
rspec-rails (2.11.4)
rspec 2.11.1
I am new to rspec. I don't quite understand tests for POST create part.
I have generated
Hi Soichi,
You can temporarily do `if @plan.save!` to raise an error instead of just
having it return false and not give you any feedback. Doing this is okay
because you should not bother testing your validations as far as the
controller is concerned (you do that on your model). In any case, try
I won't generally go with that approach:
- Skill.all can get big
- You're doing 2 queries by default plus the array subtraction
It's better to just use a scope or a class method on Skill or some service
class in my opinion but for brevity nothing tops that. The results would
(should) be cached
Hi there, try:
PdfHelper.should_recieve(:create_pdf).with(user, file)
On Sun, Sep 16, 2012 at 1:01 AM, Adnan adnan.a...@gmail.com wrote:
Hello,
Here is my *pdf_helper.rb* = http://pastebin.com/QU1kTKXk. I want to
test, if self.create method can take more than two arguments. But, when I
try
; a.should == 1.
On Sun, Sep 16, 2012 at 1:57 AM, Mirri Kim mirri@gmail.com wrote:
Hi there, try:
PdfHelper.should_recieve(:create_pdf).with(user, file)
On Sun, Sep 16, 2012 at 1:01 AM, Adnan adnan.a...@gmail.com wrote:
Hello,
Here is my *pdf_helper.rb* = http://pastebin.com/QU1kTKXk. I
Hi, there are links to the release notes at the bottom of that page (e.g.,
http://guides.rubyonrails.org/3_2_release_notes.html).
On Fri, Jun 29, 2012 at 10:32 AM, RVince rvinc...@hotmail.com wrote:
Carlos, I keep going over this url, but I dont see any reference to
version changes here. What
Just a reminder: it's just specific with the find(). find_by_* will return
nil unless you add a ! (e,g,, find_by_name!()) then it also returns the
exception
On Wed, Jun 20, 2012 at 8:55 AM, John Merlino stoici...@aol.com wrote:
ok I thought it would return nil
thanks for response
On Jun 19,
Server starting failed (ruby 1.9.3p194, rails 3.2.3 )
Attachments:
http://www.ruby-forum.com/attachment/7346/ruby193err.txt
--
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
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)
skip_filter :authenticate_user!, :only = [:index, :show] unless
@current_layout.nil?
I'm guessing that the unless statement is being parsed as an argument
to skip_filter. Try using parentheses like this:
skip_filter(:authenticate_user!, :only = [:index, :show]) unless
@current_layout.nil?
Hi everyone,
I'm sure the answer is out there and quite simple, but I haven't been
able to find it.
Suppose I have the following classes with polymorphic associations:
class Comment ActiveRecord::Base
belongs_to :commentable, :polymorphic = true
end
class Camera ActiveRecord::Base
Just in case this wasn't clear, I would like every comment to belong
to a user and only be editable by that user, but be associated with a
product type (Camera, Book, etc.). This is why I doubt the simple
class definition I outlined below would suffice.
Best,
Mike
On Feb 3, 4:26 pm, Mike Kim
Thanks, Tim
Actually, and I haven't fully tested this out yet, I think it's
simpler than that. Currently, I hvae the following:
class Comment ActiveRecord::Base
belongs_to :user
belongs_to :commentable, polymorphic = true
...
end
and that seems to be working. I have another issue now that
Hi everyone,
I have the following classes:
class User ActiveRecord::Base
devise :database_authenticatable, :registerable, :timeoutable,
:recoverable, :rememberable, :trackable, :validatable
has_many :comments, :dependent = destroy
...
end
class Comment ActiveRecord::Base
Duane,
Try running rake routes in order to see which controller is being
used for the create method. Hopefully that'll help narrow things down.
Best,
Mike
On Jan 31, 7:45 pm, Duane Morin li...@ruby-forum.com wrote:
So I've inherited a legacy application and I'm trying to work around the
figure it out.
On Jan 21, 7:41 pm, Mike Kim fourcatra...@gmail.com wrote:
I'm trying to use mongodb and postgresql simultaneously with Rails
3.1. I believe I have everything set up correctly.
What I'm interested in knowing is how to get rails to flip-flop back-
and-forth betweenmongoidand
and just wasting
people's time.
Thanks,
Mike
On Jan 23, 10:00 pm, Mike Kim fourcatra...@gmail.com wrote:
Thanks Neener54, but I think I found the answer.
Instead of running:
rails g model Blogpost
I need to run
rails g active_record:model Blogpost
and that should generate all
I'm trying to use mongodb and postgresql simultaneously with Rails
3.1. I believe I have everything set up correctly.
What I'm interested in knowing is how to get rails to flip-flop back-
and-forth between mongoid and activerecord.
For example, if I want to generate an ActiveRecord model after
solutions to
challenging problems.
Please email me at kim.wat...@andiamopartners.com for more details.
Generous relocation assistance is provided to candidates outside of
the NYC or DC areas.
Thanks for your time,
Kim
kim.wat...@andiamopartners.com
Ruby on Rails Web Developer
Global Financial
Yes, I meant the wiki at http://wiki.rubyonrails.org.
Thanks, Colin and Frederick, for checking.
On Wed, Dec 14, 2011 at 1:15 AM, Frederick Cheung
frederick.che...@gmail.com wrote:
On 14 Dec 2011, at 09:11, Colin Law clan...@googlemail.com wrote:
On 14 December 2011 03:13, Mike Kim
Hi everyone,
I apologize in advance for the newbie question, but I haven't been able to
view any content on the Rails Wiki pages. All I get are the Table of
Contents and the Discussions. I am able to view content when I click on
View Page Source, but obviously this is not ideal.
I'm using
Thank you Fred for another reply.
But having relationship report-question-answer will lead to
unnecessary generation of the question per each report. In my case,
question is same for all reports.
Could you please guide me what I should do then?
I feel like I'm stuck in db model now.
Your
By making it nested_attributes I'm able to control it but still some
weird loop.
I don't fully understand how loop works in rails so please advise.
First this code makes one text area per each question.
div class=question
% QuestionSingle.all.each_with_index do |question, index| %
p%=
Sure, Thank you very much.
reports_controller.rb
def new
@report = Report.new
@report.answer_singles.build
respond_to do |format|
format.html # new.html.erb
format.json { render :json = @report }
end
end
_form.html.erb
%= form_for(@report) do |f| %
% if
I found from the development log that I'm passing question_single_id as
nil.
Seems to be my code of this part is not working
%= f.fields_for :answer_singles, {:question_single_id = index} do
|answer| %
%= answer.text_area :content, {:question_single_id = index} %
What I meat to do was to
Thank you very much Frederick.
I have changed my code according to it.
But in the form how I can implement this?
Once I'm using the same code it will display 3 fields since it's using
fields_for loop for all answers.
What can I use in this case?
--
Posted via http://www.ruby-forum.com/.
--
It doesn't work as I expected.
I changed the controller and view but it doesn't work
in report_controller.rb
def new
...
QuestionSingle.each do |qs|
report.answer_singles.build ...
end
so answer_single generated as many as questions.
So when I call answer_singles in the fields for it
Hello Please help me to find this code work.
I'm trying to make a report with predefined questions.
I have made questions from the scaffold and filled it.
Now is to assign answer fields per each questions.
[DATA TYPE]
class Report ActiveRecord::Base
has_many :answer_singles
end
class
just remove rake.gemspec and it will work. It worked for me at least.
http://rubyforge.org/forum/forum.php?thread_id=48830forum_id=37643
On Oct 3, 12:36 pm, Steve Mills li...@ruby-forum.com wrote:
I am evaluating RubyMine but am getting the following rake issue...
the files in the gem to your
production
machine, including the support programs which are built when compiling
passenger for a particular web server.
Kim
--
You received this message because you are subscribed to the Google Groups Ruby on
Rails: Talk group.
To post to this group, send email
are interested, please email Kim at k...@sourcepad.com and
spig...@sourcepad.com.
Look forward to speaking with you!
Cheers,
Kim Abunado
Recruiting Manager
SourcePad LLC
0916.496.8346
www.sourcepad.com
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk
Schroeder hassan.schroe...@gmail.com
wrote:
Sorry, I originally thought this was to the ruby list...
On Sun, Jun 6, 2010 at 8:17 PM, Kim kim.gri...@gmail.com wrote:
I am asking how to turn the JPEG IO stream into an image I can pass on
and display in a view.
def index
result = Net
On Jun 7, 1:07 am, Frederick Cheung frederick.che...@gmail.com
wrote:
On Jun 7, 7:05 am, Kim kim.gri...@gmail.com wrote: Really? Do you really
think there isn't a reason why I am not just
using an image_tag? Really?
Seems like a legitimate question to me.
The image is protected and I have
I need to pull an image from a URL (I have permission) that is a .jpg.
I know I need to set the content-type to 'image/jpeg', but not sure
where to do that at.
result = Net::HTTP.get_response(URI.parse('http://
link_to_image.jpg') )
result.body = gives me encoded junk.
Looking for help on how
hassan.schroe...@gmail.com
wrote:
On Sun, Jun 6, 2010 at 5:40 PM, Kim kim.gri...@gmail.com wrote:
I need to pull an image from a URL (I have permission) that is a .jpg.
result = Net::HTTP.get_response(URI.parse('http://
link_to_image.jpg') )
result.body = gives me encoded junk.
No, it gives you
is? If not find_by_sql then is connection.execute
the right way? Looking for an actual solution.
Thanks.
On May 18, 1:33 pm, Frederick Cheung frederick.che...@gmail.com
wrote:
On May 18, 8:39 pm, Kim kim.gri...@gmail.com wrote:
I am trying to figure out how to use an abstract class to access
rick.denat...@gmail.com wrote:
On Wed, May 19, 2010 at 1:50 PM, Kim kim.gri...@gmail.com wrote:
Well like I said, I am trying to figure out how to use an abstract
class to access a separate database. I understand why calling the
object attribute is not working, what I am looking for is the proper
Thanks Jonathan for the example. I had been using an AR model for my
non-rails table. The piece I was missing was setting the table name!
So for others this is what I did
class Whatever AR
self.establish_connection :whatever (non-rails DB defined in .yml)
self.set_table 'name of non-rails
I am trying to figure out how to use an abstract class to access
multiple databases. I can connect just fine using
establish_connections in an abstract class, and I can query the
database using find_by_sql on the abstract class. I am having problems
with then using the data returned from the
Thanks everyone for all your insight. It was very helpful.
I was hoping to avoid dereferencing but I guess there's no way around
it. I will look into using has_one with a scheduled service for
updating the secondary table.
Thanks!
--
You received this message because you are subscribed to
Hi everyone,
I want to create a model that uses two tables for its data. Is that
possible or just a bad idea? I don't want to do the has_one because I
want to avoid the extra dereferencing.
For example
Model A
- attributes name in first table
- attribute phone_num in second table
Thanks,
Okay here's why I want to do it.
The first table contains just data.
The second table will be a view whose data can change depending on
other external factors. It could change daily.
Yes this second table could be an association but I would have
preferred it not to be.
On Mon, Mar 15, 2010 at
this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---
--
Frank Kim
http://betweengo.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
Thanks Frederick, I forgot about that option.
On Tue, Mar 2, 2010 at 3:00 AM, Frederick Cheung
frederick.che...@gmail.com wrote:
On Mar 2, 5:47 am, Frank Kim railso...@gmail.com wrote:
However when I do this:
team.bench_players player
It saves it in the wrong table, i.e
to this group, send email to rubyonrails-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.
--
Frank Kim
http://betweengo.com
That makes a lot of sense Ar. Thanks!
On Tue, Mar 2, 2010 at 6:22 AM, Aldric Giacomoni li...@ruby-forum.com wrote:
Frank Kim wrote:
Hi Ar,
The attribute idea makes a lot of sense. If I did it that way then I
could use the same join table. However I would have to use specify
custom SQL
, 2010 at 6:22 AM, Aldric Giacomoni li...@ruby-forum.com wrote:
Frank Kim wrote:
Hi Ar,
The attribute idea makes a lot of sense. If I did it that way then I
could use the same join table. However I would have to use specify
custom SQL for how to select from it, right? Or is there a better
way
Frederick,
That was the solution.
Thanks!
-Frank
On Tue, Mar 2, 2010 at 6:01 AM, Frank Kim railso...@gmail.com wrote:
Thanks Frederick, I forgot about that option.
On Tue, Mar 2, 2010 at 3:00 AM, Frederick Cheung
frederick.che...@gmail.com wrote:
On Mar 2, 5:47 am, Frank Kim railso
Hi,
I have a team which has and belongs to many players.
class Team ActiveRecord::Base
has_and_belongs_to_many :players
end
class Player ActiveRecord::Base
has_and_belongs_to_many :teams
end
What I'd like to do is add bench players to my team. The bench will
have many players and many
Thanks everyone, that was really helpful!
On Sun, Feb 14, 2010 at 4:31 AM, Frederick Cheung
frederick.che...@gmail.com wrote:
On Feb 14, 6:54 am, Frank Kim railso...@gmail.com wrote:
I have a model, let's call it Player.
It has many Trophies.
How do I do a simple query in Rails in my
I have a model, let's call it Player.
It has many Trophies.
How do I do a simple query in Rails in my controller that will return
let's say all Players that have more than 5 tropies?
Sorry for the dumb question but I can't figure it out. :-)
--
Frank Kim
http://betweengo.com/
--
You
actually, this is not what i want to do ;)
sorry my poor english sentences made you misunderstand it.
okay.
if there is a general website like amazon, the site has plenty of
javascript function.
the one of them is func_a() function what I want to call it.
in my local,
there is a ruby script
If switching to the unixODBC is an option for you, you may try the
following.
- Install unixODBC.
Download it from http://www.unixodbc.org/; and configure it something
like,
./configure --prefix=/usr/local/unixODBC-2.2.14 --enable-gui=no.
- Install freeTDS with
./configure
tomrossi7 wrote:
Have you gotten unixODBC to work on Snow Leopard?
Yes, it worked for me.
--IJ
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk
Let me introduce myself
I'm active Rails developer.
Just opened social community site using Rails 2.2.2.
Check out our site.
http://onioning.com
Any feedback would be appreciated.
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are
I am new to Ruby on Rails. Actually I just started two days ago... I am
working o existing code and having a problem. we have two database
tables called 'users' and 'roles' they are many-to-many relationship and
linked through mapping table called roles_users. I want to update user's
role, but I
I solved the problem. Yeah I am stupid
Here is the code snippet which solved the problem I had.
@user.roles.delete(@old_role)
@user.roles@new_role
Nam Kim wrote:
I am new to Ruby on Rails. Actually I just started two days ago... I am
working o existing code and having
know how to do that. Can anyone help?
On Wed, Feb 18, 2009 at 6:08 AM, Sazima rsaz...@gmail.com wrote:
Frank,
What do you mean? You can't post TO a form, you post FROM a form...
Cheers, Sazima
On Feb 17, 9:18 pm, Frank Kim railso...@gmail.com wrote:
Hi,
This is probably a dumb question
::escape(k)}=#{CGI::escape(v)} }.join('')
= f=l1c1s=GOOG
irb(main):005:0 price,change = `wget -o /dev/null -T 2.0 --post-data
'#{postable_params}' -O - '#{app_url}'`.chomp.split(',')
= [349.80, +7.14]
Jeff
On Feb 18, 8:59 am, Frank Kim railso...@gmail.com wrote:
I probably did not say
submitted correctly.
Thanks,
--
Frank Kim
http://betweengo.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
I need to integrate some RoR generated pages into a Drupal website. My
idea is to re-use the PHP files that make up the layout of the Drupal
site in the Rails template files. So instead of rendering the menu in
a partial, I want it to use the menu PHP file. I want to do this so
changes to the
page.body.scan(/\\/tr\\n\\/form\\n\tr\\n(.*)\\/tr\/mi) gets
half the results
page.body.scan(/\\/tr\\n\tr\\n(.*)\\/tr\/mi) gets the other half
I need help writing the reg ex that gets all the results.
Thanks in advance.
--~--~-~--~~~---~--~~
You received this
I got it. page.body.scan(/\\/tr\\n[\\/form\\n]*\tr\\n(.*)\\/tr
\/mi)
thanks.
On Oct 30, 1:31 pm, Kim [EMAIL PROTECTED] wrote:
page.body.scan(/\\/tr\\n\\/form\\n\tr\\n(.*)\\/tr\/mi) gets
half the results
page.body.scan(/\\/tr\\n\tr\\n(.*)\\/tr\/mi) gets the other half
I need help writing
\ntd \nnbsp;\n/td]
I am trying to get the values (all but newlines and such) out from in
between the td /td
Tried this :
s.first.scan(/\td \(.*?)\\/td\/mi)
But I never get the first td a href values.
Any help is appreciated. Thanks. Kim
--~--~-~--~~~---~--~~
You
yep, that was it. Thanks.
On Wed, Oct 15, 2008 at 7:44 PM, Mark James [EMAIL PROTECTED] wrote:
Kim wrote:
%= check_box_tag(db.id, db.id, session[:selected].include?
(db.id), :onclick = remote_function( :url = {:action =
'selected',:cid
= db.id})) % %=db.title%
Any other
( :url = {:action =
'selected',:cid
= db.id})) % %=db.title%
Any other suggestions?
On Oct 9, 11:52 pm, Frederick Cheung [EMAIL PROTECTED]
wrote:
On Oct 10, 12:30 am, Kim [EMAIL PROTECTED] wrote: I know the
remote_function call is adding the object to the
session[:selected] array, but for some
It turns out it is not hanging, it is just that the Execute
db:schema:dump phase takes a long time. In my case it took ten
minutes because I had a bunch of tables from other applications in my
database.
-Frank
On Wed, Oct 8, 2008 at 4:40 PM, Frank Kim [EMAIL PROTECTED] wrote:
When I run rake
I have an A-Z list that controls a list of check_box_tag values. So a
user clicks on a A-Z link, the list of checkboxes are displayed, they
tic the checkboxes and the value is stored in the session variable,
and they go on like that until they submit. Once they submit, the
session variable is
When I run rake db:migrate w/ oracle it hangs on the db:schema:dump
part and I am not sure why.
E:\work\sandbox\codeReviewrake db:migrate --trace
(in E:/work/sandbox/codeReview)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
**
74 matches
Mail list logo