def grouplist
@currentgroupid=Group.find_by_group_name(params[:group_name])
@currentgroupfriends=GroupFriend.find_all_by_user_id_and_group_id(current_user.id,@currentgroupid)
format.html {redirect_to :back}
end
Please check my controller and help me in solving my problem.
I need to get
On May 20, 12:14 am, brianp wrote:
> If the user updates the profile and it's processed via the dealer then
> this would not be an issue because it would still be in context
That is correct, however if you set the dealer_id to readonly, then it
is not possible for the user to change it anyway, so
Hi, ok if you replace Concept with Vehicle (ala tank, car, truck, plane,
etc), Entity with Model (Z30, 911 turbo, F16, etc), Dimension with
SubjectiveDimension (quality, comfort, etc) and Fact with FactualDimension
(price, model_year, max_speed, etc) would it make more sense?
1) Vehicles have many
Sent from my iPhone
On May 19, 2010, at 8:04 PM, Me wrote:
If you have an array of objects and you do
array_of_objects.each do |o|
o.method
end
Do the attributes of the object get passed to the method so you can
access them?
The object's attributes are available within the instance met
nice. I'll be looking forward to that.
Will it play nice with other login options (the old oauth in
particular, which is still needed for Twitter)?
Cheers,
Andrew
On May 19, 12:10 am, giovanni wrote:
> I'm working on a new version of authlogic_oauth that will use
> oauth2...
> I think it's wha
i need to find records which are starts with numeric values. So how
can i write the sql query?
nirosh
--
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-t...@googlegroups.com.
To unsubscribe
Hi
In a partial,
I display "group_name" , when clicked on groupname the div with id="abc"
should appear below my group.
I want to make my div visible false initially at the time of loading my
page and Once click on the groupname I the div should be visible below
the groupname.
I tried with fol
If you have an array of objects and you do
array_of_objects.each do |o|
o.method
end
Do the attributes of the object get passed to the method so you can
access them?
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this grou
I'd have to second Heroku. It would be hard to devise something
simpler.
On May 19, 3:56 am, Trausti Thor Johannsson wrote:
> dreamhost.com, they are quite cheap and give you a chance to grow up
> for very little money. Then you can grow into a vps at their site or
> move elsewhere.
> What they
Rob Lacey wrote:
> Thanks for the response Alex, to be honest I'm getting in a muddle
> trying to figure out how this works / fits together, but I'm picking up
> bits and pieces here and there. I'll take a look at RESTful
> authentication and have a play.
Some concepts may be useful, but please do
TEKsystems is working with a client to find a Ruby on Rails developer
for a position here in New Orleans. They are looking for an entry level
or mid level Ruby on Rails developer. The client develops applications
for e-commerce websites. This position is full-time and the candidate
must work on-sit
A yeah i guess that does make sense.
Now what about...I think well trying to come up with my counter-piece
I answered my own question so let me see if I have it correct:
If the user was created in context of the dealer like you said. Then
in the dealers control panel the user can update there
ya we have you know action.format set up, I was trying to auto set up links
for each type.
On Wed, May 19, 2010 at 16:49, steve ross wrote:
> On May 19, 2010, at 2:01 PM, Chris Habgood wrote:
>
> Cool forgot about the (false). Any way to get the respond_to formats also
>
> On Wed, May 19, 2010 a
On May 19, 2010, at 2:01 PM, Chris Habgood wrote:
> Cool forgot about the (false). Any way to get the respond_to formats also
>
> On Wed, May 19, 2010 at 15:55, steve ross wrote:
> On May 19, 2010, at 1:35 PM, Me wrote:
> >
> > Is there a way to list on a web page the current controller actions
>
Thanks Jonathan for the example. I had been using an AR model for my
non-rails table. The piece I was missing was setting the table name!
So for others this is what I did
class Whatever < AR
self.establish_connection :whatever (non-rails DB defined in .yml)
self.set_table 'name of non-rails table
Conrad Taylor wrote:
> On Wed, May 19, 2010 at 1:26 PM, Siva Kilaru
> Good luck,
>
> -Conrad
Thanku Conard,
I appreciate it. I want to know about the file not found thing while
installing Rails 3.0 beta.
Can you help me out in this as well??
Good Luck
Siva
--
Posted via http://www.ruby-for
Cool forgot about the (false). Any way to get the respond_to formats also
On Wed, May 19, 2010 at 15:55, steve ross wrote:
> On May 19, 2010, at 1:35 PM, Me wrote:
> >
> > Is there a way to list on a web page the current controller actions
> > define din the controller? Would like to put up a l
On May 19, 2010, at 1:35 PM, Me wrote:
>
> Is there a way to list on a web page the current controller actions
> define din the controller? Would like to put up a link for each
> automatically.
>> PagesController.instance_methods(false)
=> ["destroy", "contact", "list", "show", "expire_all", "e
On Wed, May 19, 2010 at 1:26 PM, Siva Kilaru wrote:
> Hi guys,
>
> I am really new to these things like ROR and Postgres.
>
> When I was installing ROR 3.0 it says
>
> Successfully installed rails 3.0.0 beta
> 1 gem installed
> Installing ri document for rails 3.0.0 beta
> File not Found: lib
>
>
Is there a way to list on a web page the current controller actions
define din the controller? Would like to put up a link for each
automatically.
--
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 rubyo
Yeah, thank you very much.
The problem was the version of RubyGems.
Uff, thanks, you (David and Marnen) are my salvation.
Greetings.
El 18 de mayo de 2010 20:35, Iván Hernández Cazorla <
ivanhcelrinconelme...@gmail.com> escribió:
> Thanks David, then I try with this project that you show me.
>
Hi guys,
I am really new to these things like ROR and Postgres.
When I was installing ROR 3.0 it says
Successfully installed rails 3.0.0 beta
1 gem installed
Installing ri document for rails 3.0.0 beta
File not Found: lib
This is the one which I really dont understand and dont know what to do?
Hi,
I also need to validate users via Shibboleth on a Ruby application using
Nginx and Mongrel.
I've searched but not found instructions on how to do this.
Would someone please let me know if they have a resource for
implementation of Shibboleth on a Ruby / Nginx / Mongrel setup?
Thank you!
Jonathan Rochkind wrote:
> An AR model for a particular table, as you can see you can even use AR
> associations (to other tables within the same db! Trying to make
> associations cross-db tends not to work):
> http://umlaut.rubyforge.org/svn/trunk/app/models/sfx_db/object.rb
Heh, I also see re
Kim wrote:
> To clarify:
> Some of the data for my rails app is stored in a non-rails DB table. I
> need to query this other database and then show the data in the rails
> app.
I can only tell you what I did when I needed to do this. I did NOT use
find_by
_sql, I actually set up ActiveRecord clas
by far the easiest way to use rails with apache is to use passenger:
http://www.modrails.com/
On May 19, 3:02 pm, Payah Bleh wrote:
> I have this application installed on my computer
> apache HTTP Server 2.2
> Ruby 1.8.7
> Gems
> Rails
> Mysql 5.1
>
> in appache configuration file i made some cha
> No. It has *nothing* to do with appearance. PUT is for updating an
> existing resource (generally through a form).
and i am updating a resource... i'm not using #update_attributes, but
in my controller I am saving.
> I think that the need for a PUT link does not exist, period. If your
> app
I have this application installed on my computer
apache HTTP Server 2.2
Ruby 1.8.7
Gems
Rails
Mysql 5.1
in appache configuration file i made some change:
From: Options Indexes FollowSymLinks
To: Options Indexes FollowSymLinks ExecCGI
unmark AddHandler cgi-script .cgi .rb
Then i go to comman
frankjmat...@gmail.com wrote:
>> >> In any case, the arguments are whatever is defined in that particular
>> >> route. Run rake routes or look at your routes file to see what that
>> >> would be.
>>
>> > That doesn't make any sense.
>>
>> Whether it makes sense or not, it is the case. :) �The argum
Hello
I am reading Agile Web Development with rails (third addition).
And I need some help with it.
I have reached chapter 9.3 (AJAX)
when I press on the add to cart button I get an error message.
a real ugly one.
eventually, I downloaded the PDF version and copied the content of the
files but it
So I have an action that results in atom:
def index
...
respond_to do |format|
...
format.atom { render :layout => false}
end
end
Then I have a builder template to render the atom, called
index.atom.builder.
Inside this builder template, I'd like to render one of my existing html
p
To clarify:
Some of the data for my rails app is stored in a non-rails DB table. I
need to query this other database and then show the data in the rails
app.
I have a model (have tried with abstract class and without) Computers
that is connected to the non-rails DB with establish_connection.
Then
What chewmanfoo is talking about is moving code from the controller
into the model. Basically, the consumer controller would call the
worker model (if one exists), not the worker controller. When you're
in a situation where you need to run two or more controller actions on
the same request then it'
amit_pandya wrote:
This things happens because of version conflict of authlogic, either
upgrade or remove current one and install old one
Adam Hill wrote:
> Hi, I had the same issue - I think it has something to do with the
> latest version of Authlogic possibly requiring Ruby 1.9???, whereas
>
regarding the class method you mentioned, then I can run the
Worker.do_work(inputs) method by calling Worker.do_work(inputs)?
On May 19, 1:20 pm, Conrad Taylor wrote:
> On Wed, May 19, 2010 at 11:07 AM, chewmanfoo wrote:
> > Guys,
>
> > I have created a new controller Worker which has a method
>
> >> In any case, the arguments are whatever is defined in that particular
> >> route. Run rake routes or look at your routes file to see what that
> >> would be.
>
> > That doesn't make any sense.
>
> Whether it makes sense or not, it is the case. :) The arguments are the
> :parameters in the rou
On Wed, May 19, 2010 at 1:50 PM, Kim wrote:
> Well like I said, I am trying to figure out how to use an abstract
> class to access a separate database. I understand why calling the
> object attribute is not working, what I am looking for is the proper
> way to interact with the separate database.
On Wed, May 19, 2010 at 11:07 AM, chewmanfoo wrote:
> Guys,
>
> I have created a new controller Worker which has a method
> do_work(inputs), and another method show_work, which has a meaningful
> associated view (showing the results of the 'work'.
>
> So, I need to display the result of show_work
I am calling a partial in another controller (benefits) like..
<%= render :partial => "benefits/b_index", :collection => @benefits,
:locals => {:hide_list => true} %>
in the partial i just cant seem to access the local variable
<% if hide_list == true %> throws unknown variable error
What are you trying to achieve with {:index=>nil} on the select
helper?
<%= p.select :bd2, %w[1 2 3 4] %> should work
On May 19, 5:28 pm, "N.Li" wrote:
> Hello, I'm new to Ruby on Rails.
>
> I am creating a form for searching purpose:
>
> <% form_for :src_cond,
> :url => {:action =>'search
Guys,
I have created a new controller Worker which has a method
do_work(inputs), and another method show_work, which has a meaningful
associated view (showing the results of the 'work'.
So, I need to display the result of show_work in the view of another
class called Consumer.
So, I need to do a
I'm trying to run an existing project on a new installation of Rails
on a Windows 7 machine. When I try to load the schema, I get:
rake aborted!
undefined method `full_name' for "\377\376-":String
I can't figure out what is causing the error. My best guess is some
kind of gem conflict, but vario
Well like I said, I am trying to figure out how to use an abstract
class to access a separate database. I understand why calling the
object attribute is not working, what I am looking for is the proper
way to interact with the separate database. If an abstract class is
not the way, what is? If not
Thanks for the reply, So I guess there is no ruby implementation for
SAML IdP service yet (or at least not open source one).
- reynard
On May 19, 5:43 am, ChristianP wrote:
> None of those will give you SAML identity provider functionality. They
> are both SAML service provider interfaces.
>
> -
This is not a problem if you are always creating users in context of
dealers and validating that the one doing the creation is allowed to
manage the data for the dealer in question.
@dealer.users.create(params[:user])
This ensures that the users dealer_id is set to @dealer.id, even if
somebody trie
Yes I have that's how I know it's changing the form method to PUT to
dealer/id/edit. It's also adding an id of: edit_dealer_id_{#number}
where {#number} is an actual digit.
On May 19, 9:38 am, Colin Law wrote:
> On 19 May 2010 16:44, brianp wrote:
>
> > Expecting to get rendered: The same form p
Hi!
Assume I have a model named Thread.
Normal users should be able to change the attributes [title, body].
Admin users should be able to change [title, body, sticky, ...].
Now I wonder what's the corrent/best way to restrict/control access to
certain model attributes depending on the current us
Hello, I'm new to Ruby on Rails.
I am creating a form for searching purpose:
<% form_for :src_cond,
:url => {:action =>'search'} do |p| %>
<%= p.radio_button("bd", "1") %> a
<%= p.radio_button("bd", "2") %> b
<%= p.select :bd2, %w[1 2 3 4],{},{:index=>nil} %>
<%= p.submi
I have the following in my en.yml
en:
hello: "Hello world"
activerecord:
errors:
models:
et:
not_enough: "Not enough points for this transaction"
when I call I18n.t :not_enough in my custom validation method in model
Et, I get a translation missing error. I have
On 19 May 2010 16:44, brianp wrote:
> Expecting to get rendered: The same form page I've created at the :new
> action with the Invalid model notices from my model validations.
>
> What is getting rendered: A form that LOOKS the same, with my Invalid
> model notices but now does not POST to the :cr
On 19 May 2010 16:09, Jorge alejandro Mendoza torres
wrote:
> daphonz wrote:
>> Have you tried using:
>>
>> rake db:migrate RAILS_ENV=production
>>
>> -c
>>
>> On May 18, 12:35�pm, Jorge alejandro Mendoza torres
> I already tried the instruction and the migrations were made in the
> production da
Yeah the objective protecting the foreign keys are not letting the
Users make the changes. Maybe an admin of the app could say a person
or child has changed families (parents do split up). But we don't want
some smart child using curl and changing his family to any family id
he wants on his own. An
frankjmat...@gmail.com wrote:
[...]
>> In any case, the arguments are whatever is defined in that particular
>> route. �Run rake routes or look at your routes file to see what that
>> would be.
>
> That doesn't make any sense.
Whether it makes sense or not, it is the case. :) The arguments are t
On May 19, 11:29 am, Marnen Laibow-Koser wrote:
> frankjmat...@gmail.com wrote:
> > yeah, i've read it half a dozen times
>
> Read *what*? Please quote when replying so it's clear what you're
> responding to.
I have read the rails routing guide a dozen times.
> > - doesn't give me any insight o
Expecting to get rendered: The same form page I've created at the :new
action with the Invalid model notices from my model validations.
What is getting rendered: A form that LOOKS the same, with my Invalid
model notices but now does not POST to the :create action. The form
has magically changed my
Aerodame wrote:
> Due to some corporate firewall difficulties I decided to go to my home
> Mac and install the plugin in a rails project and then just copy the
> plugin from the vendors/plugin folder to my (inside) corporate
> project.
>
> Is there a special registration that needs to take place s
frankjmat...@gmail.com wrote:
> yeah, i've read it half a dozen times
Read *what*? Please quote when replying so it's clear what you're
responding to.
> - doesn't give me any insight on
> the argument list for the _path family of functions and apidock is
> less than helpful as well.
Are you ta
daphonz wrote:
> Have you tried using:
>
> rake db:migrate RAILS_ENV=production
>
> -c
>
> On May 18, 12:35�pm, Jorge alejandro Mendoza torres ["id_oficina = ?",
clave[i].to_i])
In my table, all records exist.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because y
had the same problem, any solutions ?
--
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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send
yeah, i've read it half a dozen times - doesn't give me any insight on
the argument list for the _path family of functions and apidock is
less than helpful as well.
searching through google led to some obscure blog that said i could
do:
link_to 'do something', station_path(@station, :station =>
Does anyone have any suggestions about building a plugin architecture for a
Rails application?
This would be different from the Rails plugin architecture; this would be
plugins for my Rails application in particular (i.e. like Firefox
extensions, or OpenOffice extensions)
--
Hi there
I try to use form_tag form_tag( post_path, :method => :put)
to generate
I am in rails 3.0.0 beta 3
Any one have the same situation? would you like to tell me how to fix
it?
Cheers,
Danyi
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: T
frankjmat...@gmail.com wrote:
> where can i find the documentation for all of the
> action_controller_path functions?
>
> multiple submits on a form are no longer a viable solution because the
> only way to tell which one was hit was to know the name "value" of the
> submit button.. when its in di
RichardOnRails wrote:
> Thanks for your help. My faith the Unit Test *really* works is
> strengthening :-)
Excellent! When you get a chance, try RSpec, see how much nicer it is,
and watch yourself achieve enlightenment!
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
--
P
tshim wrote:
> rake db:seed RAILS_ENV=production
Thank you.
--
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 rubyonrails-t...@googlegroups.com.
To unsubscrib
<% @photos.in_groups_of(3, false) do |group| %>
<% group.each do |photo| %>
<%= photo.filename_or_whatever %>
<% end %>
<% end %>
or something relatively close to that
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google G
Not sure that you would want to do this but you can
a = (1..20).to_a
until a.empty?
x = a.slice!(0,3)
puts x.inspect
end
Gives
[1, 2, 3]
[4, 5, 6]
[7, 8, 9]
[10, 11, 12]
[13, 14, 15]
[16, 17, 18]
[19, 20]
so you could have
<% until @photos.empty? -%>
<% x = @photos.slice!(0,3) -%>
<% x.
Use a form builder. See the api doc.
On May 19, 3:04 am, poseid wrote:
> hello,
>
> I want to make a table within a form by making a new form_tag. The
> following code in ApplicationHelper fails:
>
> def tabular_form_for(name, object = nil, options = nil, &proc)
> concat("", proc.binding)
>
rake db:seed RAILS_ENV=production
On May 19, 6:15 am, Rob Nichols wrote:
> How do you define which version of the database is populated via the new
> default seed process? Running this:
>
> rake db:seed
>
> runs the code in seed.rb in the development environment and therefore
> loads the seed da
On 19 May 2010 13:59, the batman wrote:
>
>> * you could (if you like it clunky) just use .each maintain your own
>> counter and do your next row operations when it gets to a multiple of
>> 3
>
> I think that's what I was trying to do, though I didn't know how to get
> a new table row
> was I on t
None of those will give you SAML identity provider functionality. They
are both SAML service provider interfaces.
- Christian
On May 18, 6:32 pm, Reynard wrote:
> Hi there, thanks for releasing this toolkit. Does "supports both
> service provider and identity provider initiated web SSO" means yo
hi
invite location
location invite
background: location is not set at the time of the invite...
i = invite.find(1)
>> how do i build the location and update the invite (location_id) in
one go? (build doesnt set the foreign key for me..)
loc = i.build_location(:title=>'test')
loc.save!
>> c
> * you could (if you like it clunky) just use .each maintain your own
> counter and do your next row operations when it gets to a multiple of
> 3
I think that's what I was trying to do, though I didn't know how to get
a new table row
was I on the right track?
<% @photos.each do |photo| %>
<%
one more info:
the code above works when I create a new parent (and either create a
new child or choose an existing one in the nested form).
The code doesn't work when I edit the model and choose an existing child
record (the association won't be created), any hints?
--
Posted via http://www.
Hi everyone,
The call for proposals is open for Acts as Conference 2010. This year
we're focusing on software craftsmanship, Agile, web development, and
of course the leading edge in the Ruby on Rails world. We're going
even bigger than last year, with a full day of hands-on workshops, and
two day
On 19 May 2010 13:20, the batman wrote:
> I want to create a table displaying image thumbnails, 3 per row.
> Can I use an if loop to create the tags?
"if" doesn't produce a loop - it's just a conditional check.
Assuming your images are stored in an array, you can use any of a
number of methods
To me it looks like you are doing way too much abstraction here. With
model names like Concept, Entity and Dimension it is going to be
extremly hard for anybody else to wrap their heads around what exactly
you are trying to design. At least I can't do it, and hence I cant
really give any advice eit
I want to create a table displaying image thumbnails, 3 per row.
Can I use an if loop to create the tags?
or is this better acheived with css?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
T
How do you define which version of the database is populated via the new
default seed process? Running this:
rake db:seed
runs the code in seed.rb in the development environment and therefore
loads the seed data into the development database.
What is the syntax to use seed to populate the produc
Thanks for your help. My faith the Unit Test *really* works is
strengthening :-)
On May 18, 12:56 am, frogstarr78 wrote:
> The problem is that the function crud_views_as_a_string is not defined
> (GenModCRUD.rb:22:` def crud_views_as_a_string') to take an argument.
> But in your test you are cal
Hi guys. So I have a few models: Concept, Entity, Dimension, Rating,
User and Fact
1) Concepts can have many dimensions and many entities and many facts.
2) Concepts may share dimensions, but not entities or facts (so the
Concept universities can share the Dimension quality but not the Fact
num_st
hello,
I want to make a table within a form by making a new form_tag. The
following code in ApplicationHelper fails:
def tabular_form_for(name, object = nil, options = nil, &proc)
concat("", proc.binding)
form_for(name,
object,
(options||{}).merge(:builder => TabularForm
hello,
I want to make a table within a form by making a new form_tag. The
following code in ApplicationHelper fails:
def tabular_form_for(name, object = nil, options = nil, &proc)
concat("", proc.binding)
form_for(name,
object,
(options||{}).merge(:builder => TabularForm
If ActiveRecord were to know that it's supposed to create an habtm
association to another object simply because a foreign_key is present
in the attributes hash of the new object, then I think that would
create a lot of overhead in the create method, and it's a bit too much
magic in my opinion. On e
On May 19, 2:36 am, brianp wrote:
> BUT the page gets rendered as an
> edit_dealer_id page. with a new hidden field telling the form to
> submit via put method.
I dont really unserstand what you're saying. What are you expecting to
get rendered, and what is actually getting rendered?
--
You rece
On 19 May 2010, at 00:08, Philip Hallstrom wrote:
Good to know. That won't help with the authenticity token though...
Indeed, our swfuploads are completely separated into reusable
Javascript objects, so I didn't think of it anymore.
Note to self: don't answer mailing list replies while h
You need to add a bang to the create methods for the addresses so that
an exception is raised. Rollbacks only happen if an exception is
raised.
ActiveRecord::Base.transaction do
# (...)
@dealer.addresses.create!(params[:mailing_address])
@dealer.addresses.create!(param
On 19 May 2010, at 06:33, badnaam wrote:
I have a form with a select box and there is a div under the select
box that gets populated with data collected via ajax, based on the
value selected in the select box. I use an observe field to accomplish
this. It all work pretty well except, let's say,
I'm working on a new version of authlogic_oauth that will use
oauth2...
I think it's what you are searching for...
It will be released at the end of the week, keep eyes on
http://github.com/potomak
On May 8, 3:52 am, Alex wrote:
> Rpx might be good for some people. It's a single sign-on service
Setup:
I have 3 drop downs generated by collection_select, where in the next
drop down's option values are dependent on which option value was
selected in the previous drop down. This is done using observe_field.
e.g.
country => state => city
Here's the code:
%div
.label
Grading Scheme Sel
http://rapidlinks007.blogspot.com/
http://rapidlinks007.blogspot.com/
http://rapidlinks007.blogspot.com/
http://rapidlinks007.blogspot.com/
http://rapidlinks007.blogspot.com/
http://rapidlinks007.blogspot.com/
Visual Studio 2010 Training Course And Video Tutorials
Download torrent --- *Visual Stud
Why does Child even have the family_id attribute? Can't you get the
child's family through it's person (parent)?
Unless the child can belong to a different family than the person,
this is an unnecessary association.
Anyway, that doesn't really answer the question.
accepts_nested_atrributes_for and
92 matches
Mail list logo