Displaying 20 results from an estimated 30000 matches similar to: "make rails connect with database"
2012 Oct 09
10
Auto refresh the drop-down
I have an option in dropdown like "Add new option" written using
grouped_collection_select.
And when user clicks on the "Add new option". A pop up dialog appears to
add a new value. And when I click create it hits the database and adds the
value to the db.
But It never updates the dropdown list. Suggest me a way to auto refresh
only the current dropdown with the new
2012 Dec 13
7
Thin server giving Stack level too deep error
Hi,
I am using thin web server in my rails project. But it gives stack level
too deep error. Couldn''t find any appropriate solution to this.
I have tried updating the ruby but didn''t help.
Regards,
Sumit
--
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
2013 Jan 24
12
group by + sum
Hi.. I need some support...
table:
week_id, user_id, project_id, hours
ex. =>
33, 2, 1, 10
34, 2,1,15
33, 2, 2, 20
35, 3, 1,20
etc.
Want to display a sum of hours per week_id per user_id
I have:
@hours = HourUser.includes(:user).group_by { |h| h.week_id }
@hours.keys.sort.each do |hour|
@hours[hour].collect(&:stunden).sum
Hours are summed up, but not sorted by user_id..
How to get
2012 Sep 12
8
Round off method in 1.8.7
Hi all
i am trying to use round method if have a value 2.08 i want it as 2.1 and
it worked in 1.9.2 but not in 1.8.7 is there any other way of doing it.
USING 1.9.2
1.9.2p320 :001 > 2.08.round(1)
=> 2.1
1.9.2p320 :002 > 2.04.round(1)
=> 2.0
USING 1.8.7
irb(main):001:0> 2.08.round
=> 2
irb(main):002:0> 2.08.round(1)
ArgumentError: wrong number of arguments (1 for
2012 Sep 13
10
access key error
I am getting following error while run my rails app in my server
ActionView::Template::Error (You did not provide both required access keys.
Please provide the access_key_id and the secret_access_key.):
--
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
2012 Sep 11
10
wickedpdf
Hi all i''m trying to generate pdf and i got this error
Location of wkhtmltopdf unknown and i also get
Bad wkhtmltopdf''s path
gpa/vendor/plugins/wicked_pdf/lib/wicked_pdf.rb:26:in `initialize''
/EDWARD/_gpa/vendor/plugins/wicked_pdf/lib/pdf_helper.rb:53:in `new''
/EDWARD/gpa/vendor/plugins/wicked_pdf/lib/pdf_helper.rb:53:in `make_pdf''
2013 Jan 09
4
CSRF resets my session in Firefox
Hello all,
I''ve been trying to diagnose an issue with CSRF and Firefox
specifically. I''ve got an ajax based form, using UJS (yes, I have
csrf_meta_tag in my layout and I''ve tried adding the X-CSRF-Token header
to the ajax beforeSend events without any luck)... The form just posts
some data to an ajax method that creates, saves, and sets the session
for a shopper as
2012 Sep 20
7
jQueryUI autocomplete (Rails 3.1): can't get source as url to work
Hey,
I''m able to duplicate everything in Ryan Bates'' screencast on jQueryUI
autocomplete (#102<http://railscasts.com/episodes/102-auto-complete-association-revised>),
except for the piece that calls the server for completion data.
Here is my view html:
<input data-autocomplete-source="/searches" id="search-markets"
2012 Nov 09
8
method conditional option pattern
When I have this pattern
sign_me(@user, :event => :authentication, :subdomain => subdomain)
how can I write it to avoid sending the :subdomain option if subdomain.nil?
( if possible ..)
sign_me(@user, :event => :authentication #?, :subdomain =>
subdomain unless subdomain.nil? )
--
You received this message because you are subscribed to the Google Groups
2012 Oct 31
5
css background not showing
Hi all,
for some reason adding the following is doing nothing...
.post.hover {
background: FAFAFA;
I''ve got this in my posts.js coffee file
$ ->
$(''.post'').hover (event) ->
$(this).toggleClass("hover")
and my index is
<% @posts.each do |post| %>
<div class="post">
<strong><%= post.title %></strong>
2013 Mar 12
8
Heroku db id Starting with 1000
Hello All,
How do I change the heroku database( already existed ) table id to start
from say 1000?
I tried with a fresh database on local & it works with this:-
*execute "ALTER users orders AUTO_INCREMENT = 1000"*
Thanks,
Avinash
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from
2012 Nov 26
5
Missing template pages/layout only occasionally
I have my app email me errors when they occur. I get this about 2-3
times a week with thousands of hits a day to the site. pages/show is a
.html.erb file that renders the partial
_strategicrelationshipacademy.html.erb essentially. Or whatever partial
it calls for. I get this on many different ''pages''. Obviously the
partial exists if it renders it fine most of the time. What
2011 Mar 10
10
JS data to rails view helper
I have a view helper like ryan bates complex forms task helper, rails
2.2.2. Anyway is there a way to send the value selected in a select menu to
the helper? I am trying to do stuff without going back to the server.
<%= select_tag :discout_code, options_for_select(@discount_codes)%><%=
add_exclusion_date_link(''Add Existing'', JS ) %>
--
You received this
2011 Aug 31
9
undefined method `model_name' for NilClass:Class in rails 3.0.0
Hi,
i got search which shows following error
ActionView::Template::Error (undefined method `model_name'' for
NilClass:Class):
1: <%= form_for(@employee) do |e| %>
2: EMP ID<%= e.text_field :id %><br>
3: <%= e.submit ''search'', :controller => ''employees'', :action =>
''search1'' %>
2012 Sep 17
5
Biometrics fingerprint scanner in RoR? Is it possible? and how?
I''m a graduating student of IT right now and in a couple of months, we''ll
be starting on a new project in the University. My group and I decided to
create a voting system which requires Fingerprint scanner to identify the
voters and make the voting process more secured. I still don''t know how
biometrics fingerprint scanner works exactly and I''ve just started
2011 Jun 01
4
missing these required gems: will_paginate
Hi EveryBody,
I hope some one help me.
I am new on ROR so might be problem is silly or Obvious. i had
developed a project and i had use "WILL_PAGINATE" plugin in my app.
It''s working well at localhost.
But when deploying on HEROKU, ALL step is going well but when running
$heroku rake db:migrate
ERROR IS
Missing these required gems:
will_paginate
You''re
2012 Sep 10
5
flash[:notice] not working
Hi,
anybody please help me out,am using rails 3 but using this
flash[:notice] doesnot works, i have used this in controllers.
any idea ? please help.
Regards,
Manoj
--
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 group, send email to
2012 Oct 10
8
link_to with additional data
Hi,
rails 3.2.8
I must be missing something basic (and it''s been driving me mad) because I
am trying to send one additional data attribute to my controller from a
link, but I can''t seem to get it into the params received by the controller.
I have looked around and found answers, but none seem to affect my links.
I''ve set up a dummy app with a home page and a single
2012 Dec 28
3
git push heroku master error
allo vous tous vois l''erreur
Counting objects: 66, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (52/52), done.
Writing objects: 100% (66/66), 26.30 KiB, done.
Total 66 (delta 3), reused 0 (delta 0)
-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.3.0.pre.2
Running: bundle install --without development:test
2012 Nov 30
4
Tokeninput incremental search not working
Rails 3.1.3
After watching
http://railscasts.com/episodes/258-token-fields?autoplay=true
I have installed the similar functionality to my app.
However,
def index
@cities = City.all
...
does in fact give the list of all cities in the text field, but
def index
@cities = City.where("name like ?", "%#{params[:q]}%")
...
does NOT