Hi All,
I am going through the getting started guide here
http://guides.rubyonrails.org/getting_started.html
And in section 5.7 it refers to a code snippet that I don't understand what
to do with it.
post GET/posts/:id(.:format) posts#show
I don't understand if I am supposed to put
As we say in rails skinny controllers, fat models.
Ideally most of the business logic, all database interactions should go to
model, becz model is meant to do it.
controller methods should only contain request and response code, so that
it is easy to test.
Regards
On Monday, 2 December 2013
As Colin mentioned, already there are lot of good
posts,articles,discussions good enough to handle most of the installations
and other related queries. Incase if you don't find it anywhere,
we/community would look into the same and do the needful. We want it to
grow organically so we would
Hi folks.
ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]
Rails won’t install:
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
On Mon, Dec 2, 2013 at 11:18 AM, VP li...@viaduct-productions.com wrote:
ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]
Rails won’t install:
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem
On Sun, Dec 1, 2013 at 4:54 PM, Eric Blow ericb...@gmail.com wrote:
Hi All,
I am going through the getting started guide here
http://guides.rubyonrails.org/getting_started.html
And in section 5.7 it refers to a code snippet that I don't understand
what to do with it.
post GET
On 1 December 2013 22:54, Eric Blow ericb...@gmail.com wrote:
Hi All,
I am going through the getting started guide here
http://guides.rubyonrails.org/getting_started.html
And in section 5.7 it refers to a code snippet that I don't understand
what to do with it.
post GET
Hello,
I also has this problem, I need to create an AuditTrail instance in db even
if the transition is failed, but if the transition failed, the transaction
is rollback, and the failed AuditTrail instance is not created in database.
On Wednesday, January 27, 2010 12:55:46 PM UTC+8, FFighter
I want to send other params i.e hidden field values in
`get_autocomplete_items(parameters)`
and I tried
= rec.autocomplete_field :name,
autocomplete_recruiter_name_job_applications_path,
:placeholder=Recruiter name,:id_element=#phone, :param_name =
'search'
But ajax request is sending by
We have a limited e-copies of the book available for review. If interested
in reviewing the book Instant
Hamlhttp://www.packtpub.com/integrate-haml-into-current-application-setup-and-development-workflow/book
within 7-10 days of receiving the digital copy?? Please the follow the
steps below
Hello everyone,
I'm a newbie following the
http://guides.rubyonrails.org/getting_started.html , so far everyone is
working without problems except a modification that I made earlier.
I've created a view called welcome that act as main content page where I
list all the posts, going a bit
Hi there,
i want to use collection_check_boxes (in rails 4) but i am a little bit
stuck... okay, first things first:
i have 2 models:
class Supervisioncategory ActiveRecord::Base
has_many :phonenotes
end
and
class Phonenote
On Dec 3, 2013, at 12:18 PM, Ronny Fauth wrote:
Hi there,
i want to use collection_check_boxes (in rails 4) but i am a little bit
stuck... okay, first things first:
i have 2 models:
class Supervisioncategory ActiveRecord::Base
has_many :phonenotes
end
Is it possible to serialize the query builder data part of
ActiveRecord::Relation and use it later to query the database with exactly
the same query?
to_sql is not suitable
My task is to have reload a div that contains a list of records got from
DB. It can be taken from DB via simple search,
Am 2013-12-03 18:42, schrieb Walter Lee Davis:
View source as generated by Rails in your browser, and see what these
checkboxes look like in HTML. That's where I would start debugging
this. My guess is that you need these to be supervisioncategory_ids,
since that's what the b/t is saying the
On Dec 3, 2013, at 12:49 PM, Ronny Fauth wrote:
Am 2013-12-03 18:42, schrieb Walter Lee Davis:
View source as generated by Rails in your browser, and see what these
checkboxes look like in HTML. That's where I would start debugging
this. My guess is that you need these to be
Am 2013-12-03 19:26, schrieb Walter Lee Davis:
Okay, that looks right, as far as it goes. Now what happens in your
console if you find a phonenote, and ask for its supervisions?
p = Phonenote.first
p.supervisions
# error, or array?
2.0.0-p353 :002 p.supervisions
Am 2013-12-03 19:46, schrieb Ronny Fauth:
Am 2013-12-03 19:26, schrieb Walter Lee Davis:
Okay, that looks right, as far as it goes. Now what happens in your
console if you find a phonenote, and ask for its supervisions?
p = Phonenote.first
p.supervisions
# error, or
Hi everyone!
Rails 3.2.16 and 4.0.2 have been released!
These two releases contain important security fixes, so please upgrade as soon
as possible! In order to make upgrading as smooth as possible, we've only
included commits directly related to each security issue.
The security fixes in
The following works:
r = u.utility_data.select(utility_id,
sum(ami_residential)).group(utility_id)
= #ActiveRecord::Relation [#UtilityDatum id: nil, utility_id:
5621]
r.first[:sum]
= 263
but when written as a one-liner:
u.utility_data.select(utility_id,
BTW, I also tried this:
UtilityDatum.
select(sum(ami_residential)).
where(:utility = u).
group(utility_id).
unscope(:order, :limit).
first
... but that still tacks on ORDER BY and LIMIT clauses to the query, so
it still fails. Evidently I don't understand unscope().
--
Posted via
Just sorted out using Nested Eager Loading.
% post.comments.each do |comment| %
td%= comment.commenter %/td
td%= comment.body %/td
On 03/12/13 16:23, phil...@bailey.st wrote:
Hello everyone,
I'm a newbie following the
I'm using Rails 3, Passenger, and Postgresql. Yesterday the rails
application was running very slow. So I rebooted the server. Less than 24
hours later, it is consuming even more memory than before and when trying
to load the web page, it just hangs forever. I ran passenger-memory-stats
to
Scott Ribe wrote in post #1129304:
On Dec 2, 2013, at 8:43 PM, yinwen Xuan li...@ruby-forum.com wrote:
but the result is all showing sq feet, any idea, sorry I don't know
where else I can work it out.
You're very close, but spelling matters. Review my prior message to you.
--
Scott Ribe
On Dec 3, 2013, at 6:08 PM, yinwen Xuan li...@ruby-forum.com wrote:
Sorry Scott, All fixed now.
you are a good teacher!!
let me know if you want student, I am happy to pay tuition ;-)
I'm glad it's working.
One last thing, regarding people who told you to move this from view to
controller,
An image barcode reader can be integrate within .NET Framework in any
programming language, such as, C#.NET, VB.NET, ASP.NET and .NET Windows
Forms with any Visual Studio Version.
http://www.rasteredge.com/dotnet-imaging/addon-barcode-reader/
--
Posted via http://www.ruby-forum.com/.
--
You
It sounds like you're in a tangle between FSM states and ActiveRecord
states. You might need to add a payment_queued state that forces an AR
save before transitioning to do_pay. You could then add some logic that
fires a loop back to through do_pay (retry n times after increasing
timeout)
27 matches
Mail list logo