hi chaps - i've got a project where I have very limited resources on the
device rails runs on (raspberry pi) - basically i have rails server
running… then periodically i fire off rails runner Model.method (from
an external program on the device)…. all works fine but it's terribly
slow - I think
Try create just a ruby script and include 'rubygems' and 'active_record':
|#!/path/to/ruby
||require'rubygems'|
|require'active_record'|
You must include all the models you need also.
Then give execute permission to your script:
|chmod a+x myscript.rb|
--
Nielson Rolim
On Jun 30, 10:08 am, tanizawa kazuyat7...@gmail.com wrote:
hi
I amd tanizawa.
I had problem.
I can not get main.name value from below sql.
find_by_sql 'select main.id,main.name,sub.name from main left join sub
on sub.id = main.id'
Please teach me how to get borth name value.
when i try /contact_mail/newi it return me error: undefined local variable
or method `em' for ##Class:0x007fca24248858:0x007fca21186df0
model: contact_mail.rg
class ContactMail ActiveRecord::Base
attr_accessible :email, :message, :name, :subject
end
controler:
While I believe it is possible to use fields_for, as you mentioned in your
replies, you do not have to. Here is a possible solution:
# app/controllers/dogs_controller.rb
class DogsController ApplicationController
def new
@dog = Dog.new
@legs = Leg.where(:dog_id = nil)
end
def
dear each, and all and others,
being a completeest newbie to RoR and having got dumb by a month or so
of googling how to add search faculty to a web app, I ask you for
help.
All I got is a database of 200 records so there is no need for sphinxes,
sunspots, elasticsearches, searchlogics, ferrets
Hi Sehrguey,
On Sun, Jul 1, 2012 at 8:04 AM, sehrguey o. li...@ruby-forum.com wrote:
dear each, and all and others,
being a completeest newbie to RoR and having got dumb by a month or so
of googling how to add search faculty to a web app, I ask you for
help.
All I got is a database of 200
On Jul 1, 2012, at 9:04 AM, sehrguey o. wrote:
dear each, and all and others,
being a completeest newbie to RoR and having got dumb by a month or so
of googling how to add search faculty to a web app, I ask you for
help.
All I got is a database of 200 records so there is no need for
On Jul 1, 2012, at 5:37 AM, Nielson Rolim wrote:
Try create just a ruby script and include 'rubygems' and 'active_record':
You might also want (for the connection follow what's in your database.yml):
ActiveRecord::Base.establish_connection({
adapter: ...
})
And you might want to require
Dear Group,
I know that this kind of question may sound not very good to you. But I
just wanted to
ask you that what is the best way to become perfectly effective and
professional with
good knowledge in rails.
I'm a software developer with almost 2.5-3 years of experience. a TDD, BDD
and
Thank. Yeah, I basically ended up doing something similar. I use 'leg[]'
in my select tag, and then manually hooked things up in the back end I
wonder if in your solution if things would have been connected for me?
Never mind just tried it, I still have to hook things up manually in the
S,
You should not have to do any manual association. If you have
params[:dog][:leg_ids] = [...], it should work; you may need to set
attr_accessible
:leg_ids in your Dog model. Show your solution, and maybe we can refactor
it to use less code.
--
Andrew Ferk
On Sunday, July 1, 2012 10:39:14
S,
You should not have to do any manual association. If you have
params[:dog][:leg_ids] = [...], it should work; you may need to set
attr_accessible
:leg_ids in your Dog model. Show your solution, and maybe we can refactor
it to use less code.
--
Andrew Ferk
On Sunday, July 1, 2012 10:39:14
Martin Streicher wrote in post #1066742:
before(:all) seems well-suited to this problem. It creates data that
persists across transactions.
https://www.relishapp.com/rspec/rspec-rails/docs/transactions
Thank you but (after much googling) I discovered that one cannot load
fixtures in
Ahhh, got it working as you said now. Great thanks.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To view this discussion on the web visit
https://groups.google.com/d/msg/rubyonrails-talk/-/RJvnPzGPAqAJ.
To post to this group, send
I don't have much experience with the new asset pipleine, but when
developing locally it seems things are very very slow to compile now.
Am I missing something or is this how the new asset pipleine rails version
is?
--
You received this message because you are subscribed to the Google Groups
16 matches
Mail list logo