something very odd is going on, when I put in the url
http://mysite/blabla/bla/21
it will only see the 2 and ignore the 1 instead of getting the full id
"21"
obviously this is causing a lot of issues in my application.. I am
looking and looking and cant find whats going on..
any ideas what im doing wrong? I have look all over..
here is some code snips
def roster
@authreg_in = session[:authreg]
@name = Authreg.find(params[:id])
name2 = (@name.username + "@" + @name.realm)
@amigos = Rosteritems.find( :all, :conditions => {
:"collection-owner" => "#{name2}" })
end
<%= @name.id %> <!-- this is to debug ->
<%= @authreg_in %> <!-- this is to debug ->
<% if @name.id == @authreg_in || @authreg_in == 1 %>
<table id="authregs">
<tr>
<th>JID</th>
</tr>
<% @amigos.each_index do |amigo| %>
<tr class="<%= cycle(''odd'',
''even'') -%>">
<td><%= @amigos[amigo].jid %></td>
</tr>
<% end %>
</table>
<% else %>
<p>you are trying to see someones elses roster!!!<p>
<% end %>
--
A Spectre is haunting multinational capitalism--the spectre of free information.
All the powers of ``globalism'''' have entered into an unholy
alliance to exorcize this spectre:
Microsoft and Disney, the World Trade Organization, the United States Congress
and the European Commission.
Eben Moglen from the FSF.
http://emoglen.law.columbia.edu/publications/dcm.html
Solidarity:
http://www.dailyradical.org
http://www.diarioradical.org
http://www.spboston.org
http://www.binaryfreedom.info
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
here is more info from the log as you can see the url has 11 and the ID
only gets 1
Parameters: {"format"=>"1",
"action"=>"roster", "id"=>"1",
"controller"=>"rosteritems"}
Completed in 0.00100 (999 reqs/sec) | Rendering: 0.00015 (14%) | DB:
0.00000 (0%) | 406 Not Acceptable
[http://xxxxxxxx.info/rosteritems/roster/11]
What is fomat =>1 ? is the first time I see it.. this may be the cause..?
rek2 escribió:> something very odd is going on, when I put in the url
> http://mysite/blabla/bla/21
> it will only see the 2 and ignore the 1 instead of getting the full id
"21"
> obviously this is causing a lot of issues in my application.. I am
> looking and looking and cant find whats going on..
> any ideas what im doing wrong? I have look all over..
> here is some code snips
>
> def roster
> @authreg_in = session[:authreg]
> @name = Authreg.find(params[:id])
> name2 = (@name.username + "@" + @name.realm)
> @amigos = Rosteritems.find( :all, :conditions => {
> :"collection-owner" => "#{name2}" })
> end
>
> <%= @name.id %> <!-- this is to debug ->
> <%= @authreg_in %> <!-- this is to debug ->
> <% if @name.id == @authreg_in || @authreg_in == 1 %>
>
> <table id="authregs">
> <tr>
> <th>JID</th>
> </tr>
> <% @amigos.each_index do |amigo| %>
> <tr class="<%= cycle(''odd'',
''even'') -%>">
> <td><%= @amigos[amigo].jid %></td>
> </tr>
> <% end %>
> </table>
> <% else %>
> <p>you are trying to see someones elses roster!!!<p>
> <% end %>
>
>
>
>
>
>
--
http://rek2.binaryfreedom.info
http://www.spboston.org
----------------------------------------------
a social revolution is the only feasible route
to the establishment of socialism.
- Karl Marx -
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Try params["id"] instead. On Thu, May 29, 2008 at 3:22 PM, rek2 <rek2-zTjyZANo7oz3ktU1ABlop6HonnlKzd3f@public.gmane.org> wrote:> > here is more info from the log as you can see the url has 11 and the ID > only gets 1 > > Parameters: {"format"=>"1", "action"=>"roster", "id"=>"1", > "controller"=>"rosteritems"} > Completed in 0.00100 (999 reqs/sec) | Rendering: 0.00015 (14%) | DB: > 0.00000 (0%) | 406 Not Acceptable > [http://xxxxxxxx.info/rosteritems/roster/11] > > What is fomat =>1 ? is the first time I see it.. this may be the cause..? > > > rek2 escribió: > > something very odd is going on, when I put in the url > > http://mysite/blabla/bla/21 > > it will only see the 2 and ignore the 1 instead of getting the full id > "21" > > obviously this is causing a lot of issues in my application.. I am > > looking and looking and cant find whats going on.. > > any ideas what im doing wrong? I have look all over.. > > here is some code snips > > > > def roster > > @authreg_in = session[:authreg] > > @name = Authreg.find(params[:id]) > > name2 = (@name.username + "@" + @name.realm) > > @amigos = Rosteritems.find( :all, :conditions => { > > :"collection-owner" => "#{name2}" }) > > end > > > > <%= @name.id %> <!-- this is to debug -> > > <%= @authreg_in %> <!-- this is to debug -> > > <% if @name.id == @authreg_in || @authreg_in == 1 %> > > > > <table id="authregs"> > > <tr> > > <th>JID</th> > > </tr> > > <% @amigos.each_index do |amigo| %> > > <tr class="<%= cycle(''odd'', ''even'') -%>"> > > <td><%= @amigos[amigo].jid %></td> > > </tr> > > <% end %> > > </table> > > <% else %> > > <p>you are trying to see someones elses roster!!!<p> > > <% end %> > > > > > > > > > > > > > > > -- > http://rek2.binaryfreedom.info > http://www.spboston.org > ---------------------------------------------- > a social revolution is the only feasible route > to the establishment of socialism. > - Karl Marx - > > > > >-- Appreciated my help? Recommend me on Working With Rails http://workingwithrails.com/person/11030-ryan-bigg --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 29 May 2008, at 06:52, rek2 wrote:> > here is more info from the log as you can see the url has 11 and the > ID > only gets 1 > > Parameters: {"format"=>"1", "action"=>"roster", "id"=>"1", > "controller"=>"rosteritems"} > Completed in 0.00100 (999 reqs/sec) | Rendering: 0.00015 (14%) | DB: > 0.00000 (0%) | 406 Not Acceptable > [http://xxxxxxxx.info/rosteritems/roster/11] > > What is fomat =>1 ? is the first time I see it.. this may be the > cause..? >Have you got something interesting in your routes.rb ? (the format parameter is usually there so that you can link to foo.xml which provides the xml representation of foo, or one that will provide json etc...) Fred> > rek2 escribió: >> something very odd is going on, when I put in the url >> http://mysite/blabla/bla/21 >> it will only see the 2 and ignore the 1 instead of getting the full >> id "21" >> obviously this is causing a lot of issues in my application.. I am >> looking and looking and cant find whats going on.. >> any ideas what im doing wrong? I have look all over.. >> here is some code snips >> >> def roster >> @authreg_in = session[:authreg] >> @name = Authreg.find(params[:id]) >> name2 = (@name.username + "@" + @name.realm) >> @amigos = Rosteritems.find( :all, :conditions => { >> :"collection-owner" => "#{name2}" }) >> end >> >> <%= @name.id %> <!-- this is to debug -> >> <%= @authreg_in %> <!-- this is to debug -> >> <% if @name.id == @authreg_in || @authreg_in == 1 %> >> >> <table id="authregs"> >> <tr> >> <th>JID</th> >> </tr> >> <% @amigos.each_index do |amigo| %> >> <tr class="<%= cycle(''odd'', ''even'') -%>"> >> <td><%= @amigos[amigo].jid %></td> >> </tr> >> <% end %> >> </table> >> <% else %> >> <p>you are trying to see someones elses roster!!!<p> >> <% end %> >> >> >> >> >> >> > > > -- > http://rek2.binaryfreedom.info > http://www.spboston.org > ---------------------------------------------- > a social revolution is the only feasible route > to the establishment of socialism. > - Karl Marx - > > > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---