%= link_to('my_link') do %
divOPEN STREETMAP CONTENT/div% end %
You can put a div inside of the a generated by link_to and this will work
for you but putting block elements inside of a is not really good
practice. Instead you could try span instead of div
On Friday, August 15, 2014
Quick Google search brought
up http://railscasts.com/episodes/26-hackers-love-mass-assignment and this
StackOverflow question,
http://stackoverflow.com/questions/6163759/cant-mass-assign-protected-attributes.
On Thursday, August 14, 2014 3:31:12 PM UTC-6, Fernando Aureliano wrote:
Hi!
I'm
No, the render command goes in your layout in this case since it is
something that a lot of your views are using.
%= render “sidebar” unless current_page?(login_path) %
On Wednesday, August 13, 2014 12:32:48 AM UTC-6, Roelof Wobben wrote:
oke , and put this in the controller ??
Roelof
. I see a message that login_path is not known.
I think that devise is messing things up.
Roelof
Op woensdag 13 augustus 2014 17:56:23 UTC+2 schreef Eric Saupe:
No, the render command goes in your layout in this case since it is
something that a lot of your views are using.
%= render
OSX doesn't have apt-get. You should use brew
instead,http://stackoverflow.com/questions/19688424/why-is-apt-get-function-not-working-in-terminal-on-mac-osx-10-9,
but
this can occasionally have different installation instructions. Make sure
you are installing MySQL correctly for Mac.
On
Hey Diego,
First, there is nothing wrong with running a local web server and just
having your browsers access it. Since the only users of your application
are going to be those on the same network it really doesn't matter if it is
hosted externally or internally and since the Internet going
is: is there any known gem to help handling these communication cases?
Again, thanks for the attention.
Regards,
Diego Dillenburg Bueno
2014-08-04 12:46 GMT-03:00 Eric Saupe eric...@gmail.com javascript::
Hey Diego,
First, there is nothing wrong with running a local web server and just
I had this same problem a while ago. The issue comes in the
update_attributes since it wants to update all of the attributes that are
being passed to it, which is including an empty password. To fix it you'll
need to do two things. First change the validates to only validate if a
password is
I knew there would be a nice simpler Ruby way. I love the second solution,
Rob. Below is the updated example.
id = 100
arrays = [Array.new, Array.new, Array.new]
arrays.sample.push(id)
On Thursday, July 31, 2014 8:45:33 AM UTC-6, Rob Biedenharn wrote:
On 2014-Jul-30, at 10:59 , Eric Saupe
To expand on what Scott is saying here is some code that gives an example
of what he is referring to.
id = 100
x = rand(1..3)
arrays = [Array.new, Array.new, Array.new]
selected_array = arrays[x]
selected_array.push(id)
On Tuesday, July 29, 2014 8:05:16 PM UTC-6, Scott Ribe wrote:
On Jul
This is along the lines of what Matt is referring to.
class DayValidator ActiveRecord::Validator
def validate()
if YOUR_TEST_FOR_INVALIDITY(record.day)
date = Date::DAYNAMES[record.day]
record.errors[:day] already has a target #{date}
end
end
end
class YourClass
@Ian,
He is not using Devise if he is going through the Hartl tutorial. Scott's
suggestion is the one that should be followed.
On Monday, July 21, 2014 10:36:01 AM UTC-6, Ian_Rgz wrote:
It seems that you need to create the Devise mapping(If you're using
devise), to fix this you can:
- Set
Colin,
That shows how to create a Tempfile with a given encoding but the question
is when a user uploads a file through a form and Rails creates a Tempfile
is there a way to indicate that it should always create those Tempfiles
with a default encoding such as UTF-8?
On Thursday, July 17, 2014
wrote:
On 17 July 2014 15:42, Eric Saupe eric...@gmail.com javascript:
wrote:
Colin,
That shows how to create a Tempfile with a given encoding but the
question
is when a user uploads a file through a form and Rails creates a
Tempfile is
there a way to indicate that it should
UTC-6, Ruby-Forum.com User wrote:
Colin Law wrote in post #1152686:
On 17 July 2014 15:42, Eric Saupe eric...@gmail.com javascript:
wrote:
That shows how to create a Tempfile with a given encoding but the
question
is when a user uploads a file through a form and Rails creates
Does setting
config.encoding = utf-8
in your config/application.rb help? You'd also need to add
# encoding: UTF-8
to the top of your file.
I was reading
this http://craiccomputing.blogspot.com/2011/02/rails-utf-8-and-heroku.html
which seems to discuss this problem.
On Wednesday, July 16,
@games = Game.sorted.where(home_team = :id OR away_team = :id, id: params
[:id])
That should do the trick for you. You can have a string inside of your
where statement that equates to SQL. You can then have named parameters
that are used throughout the query as I have done above. In this case
Gotcha. Is the file actually opened when the controller is entered? (That's
an honest question I'm interested in how that works coming as an upload
from a form) The way you've described, that I failed to understand the
first time, to me seems like the best way but I'd be interested to see what
Hassan is right. I doubt the problem is with your Gemfile.lock so I suggest
starting elsewhere and leaving it alone.
The best thing would be to stash your changes using git and going back to a
working version of the application. Go back to the last version that worked
and see what's different.
Maybe try
this?
http://stackoverflow.com/questions/5163339/write-and-read-a-file-with-utf-8-encoding
Does it matter if every file is considered UTF-8 even if it never contains
a UTF-8 character?
On Monday, July 14, 2014 5:01:11 AM UTC-6, Ruby-Forum.com User wrote:
My Rails application (Rails
Because you have /layouts inside of /welcome it would need to be %= render
'welcome/layouts/login' % and I think you'll also need an underscore
before login.html.haml to make it _login.html.haml because it's a partial.
On Sunday, July 13, 2014 5:45:39 AM UTC-6, Roelof Wobben wrote:
Hello,
%= form_for @user do |f| %
div class=field
%= f.label :login_naam %:
%= f.text_field :login_naam, class: login, placeholder: login naam
%br /
/div
%= f.submit %
% end %
You'll want to let Rails take care of the id's so they can match up the
label with the field automatically as
22 matches
Mail list logo