Displaying 20 results from an estimated 25 matches for "apidock".
Did you mean:
apidocs
2011 Jan 11
9
Can I omit respond_with.
If I don''t want xml results but only html can I omit respond_with in
some actions?
For example index from:
respond_with(@sectors = Sector.all)
becomes only
@sectors = Sector.all
isn''t it?
--
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
2011 Jul 01
0
layout of http://apidock.com/rails.
I like the tabs, do you think they had used simple-navigation?
I want the same effect in my application.
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
2011 Apr 09
4
API documentation for find_in_batches
Hello,
At guides.rubyonrails.org I read about the possibilities of
find_in_batches. However I cannot find this option anywhere in the API
documentation (api.rubyonrails.org).
My question: where should I look for the documentation of this
command?
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email
2009 Jul 04
9
prevent orphan records
If I have
belongs_to :user
Do I need to have
validates_presence_of :user_id
?
Does Rails validate the presence of :user_id automatically if I have
belongs_to :user?
In other words, does Rails prevent against creating orphan records that
belong to non-existent users?
Thanks.
--
Posted via http://www.ruby-forum.com/.
2011 Apr 15
2
ActionMailer - Setting Header Values - Version Issues
When I first started using Rails, actionmailer set email header values
by assigning values to instance variables within a model method.
There were some specific instance variables such as ''subject'', ''from'',
etc. Header values for which there was no specific instance variable
assigned could be set using the @headers hash. This hash could be
used to set the
2012 May 13
1
is assert_select_rjs deprecated in Rails 3.1 ?
I have seen it in 3.0.9 doc (
http://apidock.com/rails/v3.0.9/ActionDispatch/Assertions/SelectorAssertions/assert_select_rjs
)
but it''s not mentioned in the latest guide (
http://guides.rubyonrails.org/testing.html#integration-testing-examples)
if deprecated how can I check the view from an Ajax call
( assert_match + gsub could work...
2011 Mar 09
1
ActiveRecord serialize method not returning YAML array in test environment.
Hello,
I''ve got a problem with deserialization of AR "serialize" method
(http://apidock.com/rails/ActiveRecord/Base/serialize/class) in my
tests.
It just gives me pure String instead of my data Array.
Example:
User > AR::Base
serialize :roles, Array
end
Console:
u = User.new
u.roles = ["admin", "support"]
u.save
# => true
User.first.roles
# => ["...
2012 Jul 17
6
Database connection parameters are tied to the filesystem
...y.
I found https://github.com/rails/rails/issues/5297 which explains the
issue/solution far better then I could.
Active record supports this natively, I can''t see why rails would force the
requirement of a database.yml and for it to have a "production" section.
see http://apidock.com/rails/ActiveRecord/Base/establish_connection/class
URL section.
Regards
David
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-core/-/8qOi...
2012 May 21
4
Getting model column names
Hello,
I am writing a RoR application that connects to a couchDB database using
couchrest_model.
The definition of my model is the following one:
class BdsDataAuthor < CouchRest::Model::Base
property :id, Integer
property :first_name, String
property :last_name, String
end
I would like to be able to get the list of the model columns, e.g., the
result of
BdsDataAuthor.columns would be
2010 Sep 23
7
errors.add, setting the whole message
Hi all. I have an attribute, job_role_id_short, that is being set in a
form. This field has a custom validation on it, which does this if it
fails:
self.errors.add(:job_role_id_short, "cannot be blank")
I want to add the error onto the attribute, so that the form builder
will wrap the field in a fieldWithErrors div. However, the error it
generates says "Job Role Short cannot
2010 Sep 17
1
option_groups_from_collection_for_select
...><option
value="1">Prof...</option>
</option>
Does anyone know why this is?
I have tried googling to find out if
''option_groups_from_collection_for_select'' is compatible with Rails
2.3.2, but as far as I can tell, it is.
http://apidock.com/rails/v2.3.2/ActionView/Helpers/FormOptionsHelper/option_groups_from_collection_for_select
--
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 rubyon...
2012 Jun 04
1
How to save the user_id in a separate column when using ActiveRecord::SessionStore?
Hi!
I''m converting my Rails 3.1 app from cookie sessions to database
sessions.
I''ve added an extra column on the sessions table to save the user_id.
I read the documentation in
http://apidock.com/rails/v3.1.0/ActiveRecord/SessionStore and googled
but can''t seem to find a way to set the session''s user_id that works.
Can someone help?
Thanks
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "...
2011 Feb 04
5
Date parse - month and day reversed
.... Is there a
way to tell Ruby or Rails to do this? Been poking around on google and do
not see an answer that works here.
I found a page with this example, which makes me think maybe there is
something weird going on due to my geographic location:
''06/15/2008''.to_date
<http://apidock.com/rails/ActiveSupport/CoreExtensions/String/Conversions/to_date>
# => Sun, 15 Jun 2008
--
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-/JYPxA39Uh5TLH3MbocFF+G/...
2013 Jan 27
2
Help displaying text
Apologies in advance ...this may be a really dumb question but here
goes.
@formatted_question[:a] contains text with HTML markup. I want to
display it in a field so I can control its vertical and horizontal size
on the page. When it is displayed on the page now, rather than
interpreting the HTML, it is output into the text field as a string with
all HTML tags showing. What am I doing wrong??
2011 Mar 09
1
Generating Unique Tokens for Assets within Rails Application
I''ve been developing an application in Rails 3.0.3 using Ruby 1.9.2.
It is one of my first applications using Rails 3 and I am quite
pleased with the progress thus far. However, I am wanting to add a
feature that I have thought through, but I am not sure where to really
begin.
Essentially, I am building a dumping ground for files, much like
Dropbox, however this is mostly for personal
2012 Jan 19
4
redirect_to with a hash instead of parameters
All,
I have numerous places in my codebase like this:
redirect_to :action => ''schedule_by_uid_and_run_date'', :uid =>
@schedule.first.train_uid, :year => @date.year, :month => @date.month,
:day => @date.day
I''d like to replace the :year, :month and :day parameters with a hash
containing the three parameters. @date is an instance of a Date class,
2012 Jun 18
4
Problem with exists? method
Hi,
I have a DB with table TABLENAME, column COLUMN and an active resource
client trying to connect to the DB. When i do
Tablename.find(:all) => i get all the entries from the table
But Tablename.exists?(:column => value) always returns false
I verified that the above command works from rails console. Dont
understand why it always returns false even when there are valid
records.
And in
2013 Mar 24
6
forgery protection for multiple browser tabs
Hi,
http://apidock.com/rails/ActionController/RequestForgeryProtection only
maintains one CSRF token at a time. When a user visits some site, he gets a
new token in the session. He then might open a linked site of the same
rails app in a new browser tab (maybe some info he''d like to read), and
again he w...
2008 Oct 24
4
AR object return nil on save
Hi!
I''m upgrading existing app from Rails 1.2.6 to 2.1.2. I have
encountered following problem with AR objects.
Model definition did not change and with 1.2.6:
params={}
params[:flight] = "1111"
params[:airline] = "Air France"
params[:luggage] = 0
r=Reservation.new params
r.save
is working code, new Reservation. With the same dataset, changing only
2011 May 04
6
Form without scaffold ?
Hi
Strange to Rails.Read the tutorial on Scaffold.Can i generate a
Simple form without using Scaffold?
John
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to