Displaying 20 results from an estimated 3000 matches similar to: "ActiveAdmin: Nested attributes not working for STI"
2012 Jan 26
2
Problem while creating new resource on ActiveAdmin
HI All,
I have installed the Active Admin successfully, but facing the following
error while restarting the server after generating an resource.
*rails generate active_admin:resource item*
/home/logs/Desktop/training/RAILS/courier/app/admin/items.rb:1:in `<top
(required)>'': uninitialized constant Item (NameError)
from
2012 Dec 06
6
How to allow the user to user their own domain name
HI All,
I am currently having feature where my users to have a subdomain for their
account like xxx.myaddress.com,yyy.myaddress.com these will point to the
corresponding users .
How can I implement the feature where user can enter their own domain name
instead of sub domain?
regards,
Loganathan
Mob: +91 7760780741 | +91 9944414388
Skype: loganathan.sellappa
ViewMe
2013 May 02
0
nested forms in activeadmin is mass assigning
Here is my question<http://stackoverflow.com/questions/16325137/yet-another-cant-mass-assign-protected-attributes-address-post>
.
--
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
2006 Apr 22
7
Proper Database Design For A Newbie
Hi all,
I am starting out learning Ruby on Rails (coming from a PHP background)
and I have a question about proper database design.
Let me give you a quick example of what I want to do:
Database:
CREATE TABLE `users` (
`id` int(11) NOT NULL auto_increment,
`login` varchar(40) default NULL,
`email` varchar(100) default NULL,
`crypted_password` varchar(40) default NULL,
`salt`
2012 Jun 18
0
Creating an object with a nested has_many :through relationship
I have 3 models that define members, groups and the subscriptions: Member,
Group, and GroupMember.
class Member < ActiveRecord::Base
> has_many :group_subscriptions, class_name: "GroupMember"
> has_many :groups, through: :group_subscriptions
> attr_accessible :email, :password
> end
> class Group < ActiveRecord::Base
> has_many :member_subscriptions,
2009 Jun 20
0
[Rails 2.3] nested_attributes and validation of nested model
Hi,
I''m using nested models to create form in my view. It looks like this:
<% form_for :user, :url => {:action => "add_owner" }, :html => {
:method => :post } do |u| %>
<li><label>Name: </label><%= u.text_field :name %></li>
<li><label>Surname: </label><%= u.text_field :surname %></li>
<%
2009 Jul 15
0
has_many and has_one ... and nested form
Hiya
I am looking at Rails 2.3.2 and how to cleanly do the following:
- I have model User
- User has many Plans
- User has one Active Plan
- New User form has fields on it to create the Active Parent
I want to create a new User with an Active Plan in one form.
At the moment I have:
class User < ActiveRecord::Base
has_one :active_plan, :class_name => ''Plan'',
2013 Mar 30
1
How to use group in nested associations
The below query fails:
Timesheet.joins(:time_entries).select("timesheets.*,
sum(time_entries.worktime) as total").group("timesheets.start_date")
The models have the following relations:
Timesheet < AR
has_many :activities, dependent: :destroy, inverse_of: :timesheet
has_many :time_entries, through: :activities
accepts_nested_attributes_for :activities,
2013 Mar 25
1
validates presence of foreign key fails in nested form
I''m using accepts_nested_attributes as follows:
class Timesheet < ActiveRecord::Base
attr_accessible :status, :user_id, :start_date, :end_date,
:activities_attributes
has_many :activities, dependent: :destroy
has_many :time_entries, through: :activities
accepts_nested_attributes_for :activities, allow_destroy: true
end
class Activity < ActiveRecord::Base
attr_accessible
2011 Oct 05
2
formtastic / activeadmin
Newbie question:
want to following code to migrate to formtastic:
<% f.fields_for :assets do |asset_fields| %>
<% if asset_fields.object.new_record? %>
<p>
<%= asset_fields.file_field :asset %>
</p>
<% end %>
<% end %>
tried this:
f.inputs "Appartment Details" do
f.input :assets do |asset_fields|
2012 Oct 18
0
unexpected return (LocalJumpError) only when executing this code within autoloaded classes?
Posted on stackoverflow but no traction yet:
http://stackoverflow.com/questions/12942505/why-does-using-set-trace-func-work-in-some-places-but-cause-unexpected-return-l
The following is a generified part of the code in a gem I''m working on:
module SomeModule
class << self
attr_accessor :procedure
def log_events(*args)
args.flatten!
2010 Jun 24
0
Nested Model Forms
I''m trying to get a multi level nested form model working but have hit a
problem. In one of my models, I have a habtm association and it''s throwing
an error on a nested form and these are check boxes with a method of
''time_unit_ids[]''.
The nested forms work without the habtm (time_unit_ids[]) so things are
pretty much set up okay.
Here''s the set up
2011 Aug 22
0
Paperclip nested resources problem
My models:
class Country < ActiveRecord::Base
has_many :regions
has_many :assets, :dependent => :destroy
accepts_nested_attributes_for :assets
end
class Region < ActiveRecord::Base
belongs_to :country
has_many :appartments
has_many :assets, :dependent => :destroy
accepts_nested_attributes_for :assets
end
class Asset < ActiveRecord::Base
belongs_to :region
2010 Jan 20
0
need help with nested forms and habtm
Hi,
I''m currently stuck with a problem I just can''t find a clever solution
for. I checked every tutorial, issuetracker, API reference I could
find but found nothing to "enlighten" me --> I desperately need your
help :-).
My Question is: is it possible to use nested forms for habtm
associations?
--> Here some more info about what I wanted to do and what failed
2006 Apr 19
0
[patch] Re: Test migration (IMAP copy) and INTERNALDATE?]
I haven't been able to find what is responsible for altering the time on
APPENDed mail, but was able to come up with a temporary workaround ...
simply calling utime() later on in the process resolves it.
Below is my patch.
Steve
--- dovecot-1.0.beta7-orig/src/lib-storage/index/maildir/maildir-save.c
2006-03-25 05:53:43.000000000 -0500
+++
2011 Jan 26
0
loganathan sellappa wants to chat
-----------------------------------------------------------------------
loganathan sellappa wants to stay in better touch using some of
Google''s coolest new
products.
If you already have Gmail or Google Talk, visit:
http://mail.google.com/mail/b-7a8d3415f7-ed372409f0-m8PAltJCGfXEPlT5wBTNZ__b0RU
You''ll need to click this link to be able to chat with loganathan sellappa.
To get
2009 Nov 06
0
Nested objects not propagating from view
I thought I had this fixed, but apparently not. It works okay from the
console, but not from the view. I have the following:
# partial schema
create_table "users", :force => true do |t|
t.string "login", :null => false
t.string "first_name"
t.string "last_name"
t.string "email", :null => false
2009 May 12
2
2.3 Nested Model Forms; build new without updating existing
I''m trying to build something similar to a Facebook messaging app, in
which the view displays all the messages for a particular thread, with
a form box for replying at the bottom of the thread.
The problem is that using fields_for generates form fields for each
existing record, and for one new record. In this case, there is no
need to edit existing messages - just a need to add new
2013 Jan 08
6
Fwd: HOW TO USE SSL IN SAVON
HI All,
I want to consume the SOAP apis using SSL in the SAVON gem, but I am facing
the below error while trying to access the soap services.
client = Savon.client(wsdl: "https://xxx?WSDL")
client.operations
HTTPI GET request to xxxxx (curb)
HTTPI::SSLError: Curl::Err::SSLPeerCertificateError
In the Savon site <http://savonrb.com/version2.html#globals-ssl> I found
that options
2010 Dec 07
1
fields_for and one out of many from association
class Person < ActiveRecord::Base
has_many :addresses
has_one :primary_address, :class_name => ''Address'', :order =>
''preferred desc, id''
accepts_nested_attributes_for :addresses, :allow_destroy => true
accepts_nested_attributes_for :primary_address, :allow_destroy =>
true
end
class Address < ActiveRecord::Base
belongs_to :person
end