of the ideas so far have been great. I'll post back with any more
issues, and if people could keep the suggestions flowing, I would be
forever grateful!
Thanks,
--Matt Royer
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Googl
Marnen Laibow-Koser wrote in post #961590:
> Another idea: if this is to be read-only, you could use the XML files
> themselves as the DB, either through ActiveModel or (probably better)
> something like eXistDB.
That would be awesome! Any links on where to go to figure out how to do
that? I'll l
t have the same confidence in
myself. There's a lot I don't know about Ruby and Rails, and I'm still
trying to learn. I can create a database in Rails. I know how to do
that. But I don't know how to get this text from the xml files turned
into objects to send to the
es describing what I need (I've googled
this subject extensively), or any hints, tips, etc... -- would be
GREATLY appreciated.
Thanks in advance,
--Matt Royer
Attachments:
http://www.ruby-forum.com/attachment/5391/noko-ono.rb
--
Posted via http://www.ruby-forum.com/.
--
You received thi
Marnen Laibow-Koser wrote:
> Run it through html2haml and see what you get. Note, however, that it
> will usually produce
>
> %span
> = content
>
> where you generally want
>
> %span= content
>
> Other than that, it's great to help you get started.
PERFECT! Thanks Marnen!
--
Posted via ht
I wondered if anyone could help me with turning the following in ERB
into HAML. I'm VERY new with HAML:
<%= link_to "New Order",
new_order_path, :remote => true %>
Today's Activity
<% @orders.each do |order| %>
<%= "#{leading_zeros order.id}"
%> <%= link_t
Colin Law wrote:
> What I do not understand about this is why this was (apparently)
> showing on screen when it was in print.css, which presumably is only
> intended to be used for printing.
That was odd to me too. I guess I was just excited that my issue was
solved, because I didn't even think t
sited:after {content:" (" attr(href)
")";font-size:90%;}
Take out the following code:
content:" (" attr(href) ")";
That will do it for you.
Thanks again everyone!
--Matt Royer
--
Posted via http://www.ruby-forum.com/.
--
You rece
Thanks for the tips Colin and Anand... Neither corrected the issue. I'm
going to see if I can do this from another system. I'm wondering if my
installation is jacked up or something. I'll post again and let everyone
know what i've found. I'm on my system at work, so am limited by what I
can do.
reciated.
Thanks in advance,
--Matt Royer
--
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
> I'm getting the same thing. I'm on Rails 3.0.0.beta4.
>
> Have you found a solution to this?
One more thing. I only get this when I use Firefox (I haven't tried
Opera or Chrome though). In Interet Explorer, this works how it should
with only showing the names and not the the paths in parenthe
Adler Santos wrote:
> for example I have the following simple code in my views:
>
> <%= link_to "Here", :controller => 'home', :action => 'inside_here' %>
>
> I get the "actual" view in the page looking like this:
>
> Here (/home/inside_here)
>
> where the underlying url is showing right beside
Update for anyone that needs help in this area. I found my problem. You
might have to do the same (if you are using this function the way I am).
In my controller, I don't know why I put this in the Index action
before. It is now in the SHOW (duh) action:
format.js {
render(:update) {|pag
Matt Royer wrote:
> I wasn't sure if this was the right way to accomplish this:
>
>
>
> format.js {
> render :update do |page|
> page.replace_html 'order_div', :partial => 'show_order'
> end
> }
>
>
Sorry, forgot to
I wasn't sure if this was the right way to accomplish this:
format.js {
render :update do |page|
page.replace_html 'order_div', :partial => 'show_order'
end
}
Apperently not, as it doesn't work. But can someone at least tell me if
I am on the right track? I've checked everywh
e to the /orders/show/etc... I
want it to display the info that show normally would in the same page. I
have a list of orders to click on. Want this to happen without a full
page refresh.
Can anyone help me with the new way Rails handles this sort of thing?
Thanks,
--Matt Royer
--
Posted via ht
lly care how I got there (thought JS would
be the quickest, that's why I posted this), so thank you very much for
the solution!
-- Matt Royer
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on R
Matt Royer wrote:
>
>
>
>
>
>
> <% @orders.reverse.each do |order| %>
>
> <%= link_to_remote( "#{order.id} #{order.name}" , :url =>
> {:controller => 'orders', :action => 'show',
I have the following code:
<% @orders.reverse.each do |order| %>
<%= link_to_remote( "#{order.id} #{order.name}" , :url =>
{:controller => 'orders', :action => 'show', :id => order.id }, :update
=> "order_div", :method => 'get' ) %>
<% end %>
I want to create a button or lin
an, this stuff is daunting, but cool to work with.
Thanks again Colin.
--Matt Royer
--
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
Colin Law wrote:
> Are you sure line 9 of that file is the one you have shown above?
> Have you remembered to save the file?
I forgot to take my previous solution out of the view. :) Dumb mistake,
I know.
Thanks Colin for you help!
--Matt Royer
--
Posted via http://www.ruby-for
Matt Royer wrote:
> Thanks Peter!
>
> I put the method in the application_helper.rb file:
>
>
> def leading_zeros(number)
> "%05d" % number
> end
>
>
> And then put the following like you said:
>
>
> #{leading_ze
Colin Law wrote:
> Rather than attempt to add a method to the String class, which is what
> you seem to be suggesting, You could add a method to your model that
> returns the id and name as a formatted string. So in order.rb
> something like
> def order_code
> "#{'%05d' % id} #{name}"
> end
> Th
Peter Hickman wrote:
> you could create a method called
>
> def leading_zeros(number)
> "%05d" % number
> end
>
> and then call it
>
> "#{leading_zeros order.id}#{order.name}"
>
Thanks Peter!
I put the method in the application_helper.rb file:
def leading_zeros(number)
"%05d
I found the following topic in the forum:
http://www.ruby-forum.com/topic/82137
Ian J Cottee had an easy way of adding leading zeros to a number:
"%05d" % an_int
I'm still new to ruby, so I wanted to know. How would I put this into a
method that I can attach to whatever string I want
Ar Chron wrote:
> Seems like pretty elementary logic...
> For populating the droplist on the form, you just need a set of items
> with a defined coding scheme (0 = today, 1 = 1 week, 2 = 2 weeks, 3 = 1
> month, 4 = 1 year, 5 = all, or some such).
>
> In the controller interpreting the link_to_re
to the javascript tag at the top of the layout. I added :default instead
of just that library though because I was messing with some other
functions.
Anyway, that's about all I can think of for right now. Hopefully it will
help to go back through the check list of little things to che
I have the following code:
Today's Activity
<% @orders.reverse.each do |order| %>
<%= link_to_remote( "#{order.id} #{order.name}" ,
:url => {:controller => 'orders', :action => 'show', :id => order.id },
:update => "order_div", :method => 'get' ) %>
<% end %>
This
Thanks Rob!!! It worked PERFECTLY. Thanks again for you help!
--
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
Rob Biedenharn wrote:
Hi Rob,
Thanks for the quick response!
I'm sorry, I'm still relatively new at this Rails stuff. I have gone
through a couple of books, but it's hard to tie it all together. :)
When you put the following:
>:id => order.id
Where should I enter that? Within the link_to
Okay, I made a really dumb mistake and put:
<% javascript_include_tag 'defaults' %>
Instead of:
<% javascript_include_tag :defaults %>
So that fixed my rendering. At least I'm getting information over to the
other column now. But it's an error, because it can't find the ID. I
attached the scr
Hi,
I attached a page for clarity of what I want.
I have a two column page (index.html.erb). On the left hand side, I have
the order ID and order NAME displayed. There is a SHOW link next to each
entry.
I want to be able to click on the SHOW link and have it display the full
order information on
32 matches
Mail list logo