suggestions would be greatly appreciated.
Thanks,
Tim
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to rubyonrails-talk+unsubscr...@googlegroups.co
*Create a ecommerce page with rails backend in 16 min *
Tutorial Series
https://www.youtube.com/watch?v=2-GgdayPLro
Thanks !
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from
Hi Everyone, i have been learning rails for a while, one thing alway
challenge me when developing rails is frontend development and integration.
I really want to find a way to keep pushing programmer happiness on using
rails. So i have spent almost one year to building ui resource marketplace
when
generating the asset paths.
Thanks,
Tim
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to rubyonrails-talk+unsubscr...@googlegroups.co
Hello all,
We're considering moving our Rails app from Engineyard to Amazon's
OpsWorks. We should have a considerable savings doing this.
Has anyone out there done this? Just wondering what horror stories (or good
stories) there are in doing this.
Thanks
--
You received this message
It doesn't look like rails is installed.
No idea how to do it on Windows but on Linux or Mac I would suggest
running, gem install rails
On Thursday, 27 June 2013 03:18:48 UTC+1, Oliver David wrote:
I'm newbie and installed Rails last week. When I did rails -v in cmd
prompt, I got this:
What's the issue?
On Wednesday, 26 June 2013 10:30:43 UTC+1, hussainakhtar wahid wrote:
hi all ,
having isues with creating a ajax call in my simple rails application ,
can any body be available for some time to help on mail or chat ??
--
You received this message because you are
On Fri, Feb 22, 2013 at 3:51 AM, javinto jan.javi...@gmail.com wrote:
Have you been looking at CanCan?
I've implemented a similar situation with CanCan. It will not cover your
needs for 100% but it will do a lot.
Yes I have been looking at cancan. I have also been looking at Consul.
Of the
I have the following scenario.
Users have various levels of ability. They can only view and edit
their own records (their profile). Their managers can only view and
edit their employees records. The regional managers can view and edit
only the people in their regions and the corporate
Rafi A rafigl...@gmail.com wrote:
Ashok,
You can disable the browser back button with the help
of JavaScript snippets:
I don't think so. This is in the FAQ in comp.lang.javascript, and the
answer is that it can't be done.
--
Tim Slattery
slatter...@bls.gov
--
You received this message
Stepping through the Hartl Rails 3 Tutorial from the 2nd edition book hot
off the presses. Modified the Gemfile *exactly* as specified in the book,
immediately got version issues:
Could not find gem 'jquery-rails (= 2.0.0) x86-mingw32', etc., etc.
Tried removing the version spec from various
. In that case, you have to parse the address to
get the domain name, look up the MX record in the DNS for that domain
(not the normal A record), then establish contact with the remote
machine, etc. Using an SMTP relay server is much simpler.
--
Tim Slattery
slatter...@bls.gov
--
You received
should appear.
--
Tim Slattery
slatter...@bls.gov
--
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.
To unsubscribe from this group, send email to
rubyonrails-talk
anything to help. Still don't get it.
--
Tim Slattery
slatter...@bls.gov
--
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.
To unsubscribe from this group, send email
Colin Law clan...@googlemail.com wrote:
On 21 August 2012 21:12, Tim Slattery slatter...@bls.gov wrote:
I have a controller named RegistriesController. It contains a single
method:
def edit
@jolts_registry = JoltsRegistry.new
end
This runs, and the associated view is invoked
that. Same message. I've tried several different
permutations of methods, etc. Always the exact same message. I have no
clue in the world what in the hell it wants me to do. I have no clue
where it gets jolts_registries from in the first place.
--
Tim Slattery
slatter...@bls.gov
--
You received
Tim Slattery slatter...@bls.gov wrote:
Colin Law clan...@googlemail.com wrote:
Don't understand, which route?
You are trying to create a form for a JoltRegistry, that expects to
submit to a jolts_registries_path (as in the error message). The
normal way to generate the route would be to use
' for
##Class:0x184fdd4:0x1cf7aa0
What does that mean?
--
Tim Slattery
slatter...@bls.gov
--
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.
To unsubscribe from this group
tomkins j.tomk...@live.com wrote:
Try request.session_options[:id]
Thanks to all who replied. The code above worked. No doubt some of the
other suggestions would have also.
Many thanks from someone trying to figure out Ruby and Rails at the
same time!
--
Tim Slattery
slatter...@bls.gov
I'm trying to retrieve the session ID in rails. I found a web page
that said to use
session.session_id
But when I do that, I get:
undefined method `session_id' for
#Rack::Session::Abstract::SessionHash:0x2e14c5
What do I need to do?
--
Tim Slattery
slatter...@bls.gov
--
You received
You can use the as option on your form_for tag:
form_for(@person) will generate inputs like person[name]
form_for(@person, :as = something[person]) will generate an input like
something[session][email]
--
You received this message because you are subscribed to the Google Groups Ruby
on
Sorry, should have been something[person][name] instead of
something[session][email]
--
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.
To unsubscribe from this
it?
--
Tim Slattery
slatter...@bls.gov
--
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.
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscr
If the button is to submit a form, you can use image_tag_submit
http://api.rubyonrails.org/classes/ActionView/Helpers/FormTagHelper.html#method-i-image_submit_tag
Otherwise, you can just use link_to(image_tag(...))
--
You received this message because you are subscribed to the Google Groups
Check what the error message is telling you. You need to install a
JavaScript runtime.
Could not find a JavaScript runtime. See
https://github.com/sstephenson/execjs for a list of available runtimes
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails:
Check out the guide to associations. It should have more information than
you need...
http://guides.rubyonrails.org/association_basics.html
--
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
It's case sensitive. Are you sure you don't mean name instead of Name?
--
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/-/mqTCBUktDAQJ.
To post to
The error message is telling you the problem:
relation appointments does not exist
Can you post the contents of your CreateAppointments migration file? I'm
assuming this is where the appointments table should be created.
--
You received this message because you are subscribed to the
id and class are built-in ruby methods that are present on all object
instances.
Rails uses them in a different manner than the default Ruby implementation.
They are undefined so that they can be picked up by the method_missingmethod.
--
You received this message because you are subscribed to
For your first example, Rails already has built-in keys for submit buttons
that you can change globally:
en:
helpers:
submit:
create: Create %{model}
update: Update %{model}
Or only for a specific model:
en:
helpers:
submit:
post:
create: Create the new
Just curious why you want to do this without using any database or models
or gems?
At any rate, check out this tutorial below. It uses a model, but you can
copy the code from the DataFile class to accomplish what you are trying to
do.
Your folder structure does not seem right. You should not have a home
folder. You should have a users folder with a home.html.erb
On Tuesday, April 17, 2012 10:06:30 AM UTC-4, amvis wrote:
i have one controller
*class UsersController ApplicationController*
* *
* def home*
*
Set config.assets.debug = false in config/development.rb
--
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/-/WDMIcYMtBJUJ.
To post to this group, send
What problem are you trying to solve by doing this?
Just seems like it would make your code more complicated with no real
benefit.
--
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
no is a reserved word. You will need to enclose it in quotes.
NO: Nope
--
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/-/JsFPHGqMHHQJ.
To post to
Can you paste the exact error that you are getting?
--
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/-/KQzCf8AuYtoJ.
To post to this group, send
I am a little confused here. If ModelB belongs to ModelA, I think your
foreign key relationship is backwards. The model_b_table should have a
foreign key to model_a_id, not the other way around.
Regardless, though, you can pass conditions to delete_all which should help
you accomplish what you
When you write belongs_to :parent Rails expects there to be a class
called Parent.
If you want this to be related to the MyModel class, you'll need to
explicitly state that:
belongs_to :parent, :class_name = 'MyModel'
--
You received this message because you are subscribed to the Google
conn = ActiveRecord::Base.connection_pool.checkout
raw = conn.raw_connection
raw.exec(COPY tablename (col1, col2, col3) FROM STDIN)
# open up your CSV file looping through line by line and getting the line
into a format suitable for pg's COPY...
rc.put_copy_data line
# once all done...
I have done some googling to try and figure out how I can use COPY
FROM STDIN with rails and have ran into some posts on stackoverflow or
the mailing list but none of them seem to be working with rails 3.2
Does anybody have a working example of using COPY FROM STDIN?
Some things I have tried
Very intermediate into programming and never done anything with visual
basic, although if anyone could help me better understand the
following I would be very greatful!
In my ruby script I have
require dl
user32 = DL.dlopen('user32')
actWindow =
Session variables should be shared, unless I'm not understanding the
question.
You can set a session variable in one controller like so:
session[:my_key] = 'my value'
Then access it in another controller by simply calling session[:my_key]
--
You received this message because you are
You can specify a layout that applies only to specific actions in a
controller:
layout whatever, :only = [ :some_action ]
Check out the guide on layouts for more options:
http://guides.rubyonrails.org/layouts_and_rendering.html
--
You received this message because you are subscribed to the
I believe those two are just the most common.
Look at the rest of the code, though. It looks like you can specify other
flash values like so:
redirect_to suppliers_path, :flash = { :success = 'Supplier was
successfully created.' }
--
You received this message because you are subscribed to
Your constraint is slightly wrong.
Unless you are settings request.session[:token] somewhere else in your
code, chances are it's going to be nil. What you most likely want to check
for is request.params[:token] which will match the token in the URL.
You also have it backwards. The constraint
For the simple reason that single quotes in Ruby do not allow for string
interpolation (such as \r and \n), while double quotes do.
On Tuesday, March 6, 2012 2:33:23 PM UTC-5, Craig White wrote:
.join(\r\n) did the trick. Needed to use double quotes and not single
quotes (don't understand
You probably want to use $(#allclick).update instead of
$(allclick).update
Note the # that indicates you are selecting an element by the ID.
--
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
How do your Article and Blog models relate to the User model?
Assuming User has many Articles and Blogs you can simply do this:
user = User.find_by_whatever(something)
user.articles.tagged_with(tagname)
user.blogs.tagged_with(tagname)
--
You received this message because you are subscribed to
Well you have at least two options to hide the parameters:
You could change your link_to call and include :method=:post so it does
actually send a post request. This doesn't really hide the parameters since
the user can still view the source of the page and look at them.
You could send them as
Maybe just put the logic in the controller?
if @brand.nil?
if @store.nil?
@brand_link_path = from_catalog_path(params[:id].blank? ?
Category.root.id : params[:id], product.id, product.name_url)
else
@brand_link_path = from_store_path(@store.id, product.id)
end
else
Sounds like you could just add a belongs_to :user to the Comment class.
But since you already have comments on the user, you'll need to give the
reverse association another name. Perhaps comments_owned
So add has_many :comments_owned, :class_name = Comment to User.
--
You received this
I think your issue may be a mixup with class instance and instance
variables.
However, what's the issue you are having with all this? Are you getting any
error messages?
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To view this
What exactly are you trying to do? All that search_field does is create a
HTML input with type=search
If you want a dropdown you should use collection_select or something similar
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To view
Pretty sure that YES and NO are reserved words.
Try putting the definition in quotes:
NO: Norway
--
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
This is by no means a RoR question. But the solution is pretty simple, so
I'll give in.
One way to do it would be to just put next if line.lineno == 1 at the
beginning of the loop.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To view
If you can do it in JavaScript, you can always just do window.history.go(-2)
--
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/-/84XQPpvPqsEJ.
To post
You have the developer/:user_name/delete route set to use delete as the
method, rather than get
Since browsers usually don't support sending requests other than post or
get, you'll need to pass a _method=delete parameter to that route
Check out the rails guide on routing for more information:
It depends how you generate the controller. If you use a command like this:
rails g controller posts index show edit new update create destroy
It will indeed create a GET route for each action. Kind of annoying.
You can generate the restful controller and route declaration by using the
Just a note that you should be careful using this method to increment a
value. It can cause a race condition.
A safer method is to use increment_counter since it updates the value
directly in the database, not using the current attribute value on the
instance
The problem is that the inner string is not marked as html_safe. In your
link_to tag, this string is not considered html_safe:
link_to(*rights.controller + raquo; + rights.action*, :controller
= rights, :action = edit, :id = rights.id)
Colin's suggestion, which is the solution, is to
Try this:
:include_blank = Please select
--
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/-/ysC9cdWs6J8J.
To post to this group, send email to
Try this. You can pass a string to include_blank
:include_blank = Please select
--
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/-/r-jglcjPF-IJ.
To
The :prompt option was not added until rails 3.1.0
--
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/-/cSLW0PgNtgcJ.
To post to this group, send email
What does your view look like? Do you have any error message related code
in there?
What does the output HTML look like? Is the error message repeated in the
HTML?
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To view this discussion
The easiest way is probably to just have a boolean is_admin field on the
user model.
Really depends on your other requirements though.
--
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
How did all the children end up with the same ID?
Posting some of your problematic code can help us help you.
--
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
If you don't want them to be compiled, you can just put them directly in
the public/assets folder instead of in app/assets
--
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
They are not compressed because you have config.assets.debug = true
Kind of strange though that they are in the wrong order. What does your
javascript_include_tag look like, and what do the files it's calling look
like?
--
You received this message because you are subscribed to the Google
I apologize... I guess I wasn't sure what you were asking.
ActionController::Base doesn't have *any* methods included. Not even the
index, new, edit, etc. The only methods available are the ones you add in
your application. So adding delete method to ActionController doesn't
really make sense.
You can easily add a delete method to your controller:
def delete
@post = Post.find(params[:id])
end
Then add it to your routes as well:
resources :posts do
get 'delete', :on = :member
end
And you're done
--
You received this message because you are subscribed to the Google Groups Ruby
You could just have your welcome#index action redirect to another
controller/action if the user is signed in.
--
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
pe...@vandenabeele.com wrote:
On Sun, Dec 11, 2011 at 12:30 AM, Tim timdhol...@gmail.com wrote:
Does anyone know if it is possible to set the ruby version (and thus
the rails version) within a rails app? Say I have 2 versions of ruby
installed on my machine and version 1 is set in the path
Does anyone know if it is possible to set the ruby version (and thus
the rails version) within a rails app? Say I have 2 versions of ruby
installed on my machine and version 1 is set in the path, but I want
to use version 2 for this particular app. Can I set that in the path
or does that have to
I've used both, but prefer kaminari.
I like kaminari's concept of scopes and using views rather than the method
will_paginate uses.
--
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
report_listing_path will return the path to whatever route you have
defined as report_listing
You can run rake routes from the command line to see which routes you
have configured in your application.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails:
Hi,
I am wondering if it is possible to change the ruby version that rails
is using on startup and not use the version that is set in the PATH of
the application. For example say the server has the path set to /
ruby1 and I want to use /ruby2 can I set that in the rails
application itself instead
Rubymine.
Has full support for git (and everything else you can think of)
On Fri, Nov 18, 2011 at 3:17 PM, Mathew S. li...@ruby-forum.com wrote:
Anything but Aptana Studio
I have not had good luck with Aptana... So Please give me a list of your
favs.
And how you would open up the
I'll bump this. I too am interested in getting minitest working
especially with autotest.
I kind of got something going but it's ugly and doesn't work with autotest.
On Thu, Oct 20, 2011 at 12:37 PM, djangst djan...@gmail.com wrote:
I'm looking for a simple way to integrate minitest/spec with
No rails necessary.
Check out the timeago jQuery plugin.
http://timeago.yarp.com/
--
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/-/Mr_ShXivZOUJ.
Did you restart rails on the production server after you updated the file?
The old version is probably being cached.
--
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
So whenever you migrate down and back up it works? Sounds like the
migration is working properly then.
Under what circumstances does it not work?
--
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
On Sunday, October 30, 2011 9:31:50 PM UTC-4, John Merlino wrote:
get send_activation_notification
= :send_activation_notification, :as = send_activation do
resources :users do
resources :accounts
end
end
But it doesn't work for me. Note that
Well provided you don't have any code in your application that won't work
with https, you should be good to go.
Just make sure the domain you are using to access your Rails application is
SSL protected (via Apache, load balancer, or other means) and then simply
access it using https.
--
You
What do you mean by comment? Commenting your code? In that case you can
just use a JavaScript comment:
// this is a comment
/*
this is also a comment
*/
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To view this discussion on the web
I think for Rails to recognize that the attribute should be included, you
need to use attr_accessible rather than the Ruby method attr_accessor.
--
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
error.full_messages does indeed call human_attribute_name.
Did you check the source for that method in the link you posted?
http://ar.rubyonrails.org/classes/ActiveRecord/Errors.html#M000311
full_messages @base.class.human_attribute_name(attr) + + msg
--
You received this message because
On Friday, October 21, 2011 3:53:33 AM UTC-4, Ruby-Forum.com User wrote:
But there is something wrong.
Does someone can help me?
Probably. What is wrong? Are you getting any error messages? Have you
checked out what params looks like in your controller (puts params.inspect)?
--
You received
Have a look at the documentation for check_box_tag
http://api.rubyonrails.org/classes/ActionView/Helpers/FormTagHelper.html#method-i-check_box_tag
It specifies that any other keys passed to options will be used as HTML
attributes. So you can pass your onclick attribute to check_box_tag in the
On Friday, October 21, 2011 2:57:56 PM UTC-4, Ruby-Forum.com User wrote:
Task: I want use postgresql sequence for generation of primary key.
I use 'set_sequence_name', but this don't work.
What part of it does not work? Are you getting any error messages?
--
You received
Well you don't exactly have to do it by *hand*. It's pretty easy to write a
script to generate the command for you. Just change table_name to whatever
your model is...
table_name = Post
output = [ rails g scaffold #{table_name} --skip-migration ]
ignore_columns = [ 'id', 'created_at',
I think what you're looking for is delegate which is a rails extension to
Module:
http://api.rubyonrails.org/classes/Module.html#method-i-delegate
class ModelC ActiveRecord::Base
has_many :model_a
end
class ModelA ActiveRecord::Base
belongs_to :model_c
delegate :version, :to = :model_c
I believe you can also pass a --skip-migration option to scaffold so it
won't generate the migration.
--
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
Gotcha. You could always create a helper for it.
--
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/-/HweoZagzy1cJ.
To post to this group, send email
How do you call the session_code method?
What data type are unit_id and code? And what does a typical session[:code]
look like?
--
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
Why not just something like this? Then you can put your dojo.js in
assets/javascripts and compile it like normal. Seems kind of unnecessary to
add extra logic to javascript_include_tag
%= javascript_include_tag
http://ajax.googleapis.com/ajax/libs/dojo/1.6.1/dojo/dojo.xd.js; %
script
On Friday, October 14, 2011 2:53:20 AM UTC-4, Ruby-Forum.com User wrote:
I have one big problem: when I try record to db through
update_attributes! (which must save when record invalid).
I'm not so sure that's entirely accurate. Check out the API for
update_attributes! and save! methods:
You're defining @review as an instance variable, so you have to use it as
one in the view:
$(#votes).html(%= *@*review.votes_count %)
--
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
Now you have the opposite problem... You are now calling list as an instance
method and you have it defined as a class method.
You need to do ONE of the following.
Define it as a class method, and call it as a class method:
def self.list
code
end
@list = Sale.list
Define it as an instance
That's to be expected with your HTML.
What you currently have will generate HTML that looks like the following if
you have 3 reviews:
p id='votes'1 vote/p
p id='votes'2 votes/p
p id='votes'3 votes/p
$(#votes).html(3 votes)
$(#votes).html(4 votes)
$(#votes).html(5 votes)
See the problem?
The
Great. You need any help/contributors? :D
Am Thu Oct 13 16:57:30 2011 schrieb dz:
Gitlab released. A similar to github application but for your servers
with private repositories only.
If you want to store manage projects on your own hosts - it will be
a good solution
For more information -
1 - 100 of 512 matches
Mail list logo